Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   disablesword;? (https://forums.graalonline.com/forums/showthread.php?t=52133)

projectigi 04-05-2004 12:33 PM

disablesword;?
 
Hi i search for a command to disable the sword i tried some:
replaceani sword,idle;
//but this hurts when u press the space key O.o
disableweapons;
//blah all weapons disabled :(
disablesword;
//is in my commands.rtf but wont work O.o

Someone know a command to disable the sword?

VeX_RaT_Boy 04-05-2004 01:00 PM

The only thing you can do is to rescript the weapon system.

projectigi 04-05-2004 01:00 PM

Yeah with disableweapons? And callweapon selectedweapon,weaponfired;`?

Dach 04-05-2004 03:49 PM

Re: disablesword;?
 
Quote:

Originally posted by projectigi

disablesword;
//is in my commands.rtf but wont work O.o

there is no disablesword command, there ought to be one though


Quote:


Yeah with disableweapons? And callweapon selectedweapon,weaponfired;`?

yes

R0bin 04-05-2004 04:27 PM

stefan should put disabling the sword in enablefeatures

WanDaMan 04-05-2004 06:14 PM

Quote:

Originally posted by R0bin
stefan should put disabling the sword in enablefeatures
Good idea.

-Ramirez- 04-05-2004 08:00 PM

From what I've seen, Stefan would rather simply tell you to rescript everything than add something new and useful.

Dach 04-06-2004 06:44 AM

Quote:

Originally posted by -Ramirez-
From what I've seen, Stefan would rather simply tell you to rescript everything than add something new and useful.
I thought that was us? then again, I wouldn't doubt that Stefan would say that too sometimes...

Edit: back on the old topic, I just rembered something I might have done a long time ago to disable the sword, set the players sword to a blank image (no-shield.png or whatever) set the swordpower to 0 and viola! no sword! just remember to save a string for when you need to restore the player's sword
Note: It's been a very long time since i've played around trying to disable the sword, and I don't remember if this is what worked for me :(

Kristi 04-06-2004 05:05 PM

Quote:

Originally posted by -Ramirez-
From what I've seen, Stefan would rather simply tell you to rescript everything than add something new and useful.
soooo spiteful!

::edit:: that sucked... dachs works

projectigi 04-06-2004 05:17 PM

Yeah but it still hurts the other players rofl

Dach 04-06-2004 05:20 PM

I just tested my last suggestion, it works, but be careful not to lose the player's sword data during the conversions! (make sure the sword is disabled when you enable, and make sure its enabled when its disabled)

KuJi 06-06-2004 06:50 AM

Making a disable-sword in enablefeatures? Errm no?
NPC Code:

//#CLIENTSIDE
if (timeout || isweapon) {
disableweapons;
setarray this.keydown,11;
setarray this.oldkeydown,11;
for (this.i=0;this.i<11;this.i++) {
this.oldkeydown[this.i]=this.keydown[this.i];
this.keydown[this.i]=(keydown(this.i));
}
if (this.keydown[4]==true && this.oldkeydown[4]==false && selectedweapon>=0) callweapon selectedweapon,weaponfired;
timeout = 0.05;
}
]


GoZelda 06-06-2004 08:18 PM

I believe there was a very simple command.
Try changing the player's sword gani with another one.

replaceani sword,idle;

Loriel 06-06-2004 08:47 PM

Great, then I can fire NPC weapons no matter whether I am swimming, carrying bushes, frozen by NPCs, riding horses...

Loriel 06-06-2004 08:47 PM

That was mentioned in the first post. Read.

GoZelda 06-06-2004 09:49 PM

I did, but the way he posted was so unclear x-x' Why does nobody leave some space between crap? Even I did it as newb.

Dach 06-07-2004 02:10 AM

mine still works?

why, what, who, bah

KuJi 06-08-2004 03:20 AM

Quote:

Originally Posted by Loriel
Great, then I can fire NPC weapons no matter whether I am swimming, carrying bushes, frozen by NPCs, riding horses...

I got a newer npc of it ;O


All times are GMT +2. The time now is 07:34 AM.

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