Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   plz pr0 scriptorz help. (https://forums.graalonline.com/forums/showthread.php?t=79612)

k_killar 05-03-2008 01:53 PM

plz pr0 scriptorz help.
 
how to get rid of sword on classic.

Robin 05-03-2008 01:58 PM

Not sure if things have changed much but four years ago you'd have to make a custom movement script x-x


EDIT:
Or you could just use the sodding search button

And it was a thread I replied to!

*is sheepish*

http://forums.graalonline.com/forums...t=disablesword

Hey but it was four years ago :P

Robin 05-03-2008 03:39 PM

Quote:

Originally Posted by cbkbud (Post 1388822)
We have a search feature for a reason.

Make a custom movement system, easy enough.

I love how you said.... Uh everything I said. Only even less helpful than myself, and that really is saying something.

Read all the posts? I mean there's only two here man.

Stop trying to increase your post count, it has no bearing on your life.

Chompy 05-03-2008 03:49 PM

Quote:

Originally Posted by Robin (Post 1388834)
Stop trying to increase your post count, it has no bearing on your life.

I have to agree..




Anyways, on topic..

Making your own movement system, or fighting system would solve your problem;o

Here's an easy script that shows you how you can change the sword ani
PHP Code:

//#CLIENTSIDE
function onCreated() {
  
setTimer(0.05);
}

function 
onTimeout() {
  if (
player.ani == "sword") {
    
setani("punch"0);
    
// Change 'punch' into gani you want to display instead of sword
  
}
  
setTimer(0.05);


But to disable classic swords, probably disableweapons();* or disabledefmovement();

But using either of this makes it that you have to make a system to.. enable weapons or movement in your way being..
(* dunno about this one, can't remember it from the top out of my head)

Crow 05-03-2008 04:53 PM

Quote:

Originally Posted by k_killar (Post 1388816)
how to get rid of sword on classic.

Dude, we have the forum search for a reason.

A custom movement system is probably the way you want to go to disable swords though.


:rolleyes:

cbk1994 05-03-2008 04:58 PM

disableweapons() is certainly the best way to go that I can think of if you want to stick with the default movement system. Though, I think some people have made very nice replicas, perhaps check the code gallery.

What I recommend is making a custom Q-Menu and then using disableweapons(); You actually wouldn't even need a custom Q menu, just a script like this:

PHP Code:

//#CLIENTSIDE
function onKeyPressedcodekey )
{
  if ( 
key == "d" )
  {
    ( @ 
player.weapon ).trigger"onWeaponFired""" );
  }



Crow 05-03-2008 05:02 PM

Quote:

Originally Posted by cbkbud (Post 1388865)
PHP Code:

//#CLIENTSIDE
function onKeyPressedcodekey )
{
  if ( 
key == "d" )
  {
    ( @ 
player.weapon ).trigger"onWeaponFired""" );
  }



Should actually look like this:

PHP Code:

//#CLIENTSIDE
function onKeyPressed(codekey) {
  if (
key == "d") {
    
findWeapon(player.weapon.name).trigger("WeaponFired"nil);
  }


Well, some things are preference, but trigger("Event", nil) triggers "onEvent", not "Event", and I had some problem triggering weapons when not using findWeapon() before, might have been me back then though.

cbk1994 05-03-2008 05:05 PM

Quote:

Originally Posted by Crow (Post 1388868)
Should actually look like this:

PHP Code:

//#CLIENTSIDE
function onKeyPressed(codekey) {
  if (
key == "d") {
    
findWeapon(player.weapon.name).trigger("WeaponFired"nil);
  }


Well, some things are preference, but trigger("Event", nil) triggers "onEvent", not "Event", and I had some problem triggering weapons when not using findWeapon() before, might have been me back then though.

Fair enough, I just posted a rough example. I haven't used trigger() for a while.

Also, you don't need findWeapon, you can just do ( @ player.weapon.name ).trigger( ... ); last I checked.

Crow 05-03-2008 05:06 PM

Quote:

Originally Posted by cbkbud (Post 1388869)
Fair enough, I just posted a rough example. I haven't used trigger() for a while.

Also, you don't need findWeapon, you can just do ( @ player.weapon.name ).trigger( ... ); last I checked.

I stated why I did it, I guess it's also preference ;P

Chompy 05-03-2008 05:36 PM

Quote:

Originally Posted by cbkbud (Post 1388869)
Also, you don't need findWeapon, you can just do ( @ player.weapon.name ).trigger( ... ); last I checked.

That's a bad habit though I think, because then you should be able to do
(@ player.account).chat or Chompy.chat which you can't ;o

cbk1994 05-03-2008 05:45 PM

Quote:

Originally Posted by Crow (Post 1388870)
I stated why I did it, I guess it's also preference ;P

Oh, I didn't see that.
Quote:

Originally Posted by Chompy (Post 1388879)
That's a bad habit though I think, because then you should be able to do
(@ player.account).chat or Chompy.chat which you can't ;o

Perhaps, but again it would fall under personal preference.

Chompy 05-03-2008 08:36 PM

Quote:

Originally Posted by cbkbud (Post 1388884)
Perhaps, but again it would fall under personal preference.

Probably..


All times are GMT +2. The time now is 10:40 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.