Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   disabling s and d keys (https://forums.graalonline.com/forums/showthread.php?t=64332)

Prozac 02-24-2006 07:22 PM

disabling s and d keys
 
on the wiki page

http://wiki.graal.net/index.php/Crea.../Script/Client

under enablefeatures() it lists a bunch of stuff that can be enabled/disabled.
but what i do not see listed is how to disable the S key from using the sword and the D key from calling the selected weapon. how do i do that without using disabledefmovement?

jake13jake 02-24-2006 09:17 PM

Quote:

Originally Posted by Prozac
on the wiki page

http://wiki.graal.net/index.php/Crea.../Script/Client

under enablefeatures() it lists a bunch of stuff that can be enabled/disabled.
but what i do not see listed is how to disable the S key from using the sword and the D key from calling the selected weapon. how do i do that without using disabledefmovement?

disableweapons(); might be a good start. From there you'd have to rescript weapons calling and the sword. I think it's actually the sword animation that the default hit detection system uses. I'm thinking, hooray, I don't have to worry about this kind of stuff because I've pretty much rescripted the entire system for Classic (well, Storm did, I just went off and completely made my own that works a lot better, I really want to be able to implement it soon).

Prozac 02-24-2006 09:40 PM

disableweapons - ah yes of course ... but then is it possible to have a nopk with, say, an array of levels that you can't pk in, in a server array, and a playerenters system npc that checks if your current level is in that array before calling the weapon action?

jake13jake 02-25-2006 02:15 AM

Quote:

Originally Posted by Prozac
disableweapons - ah yes of course ... but then is it possible to have a nopk with, say, an array of levels that you can't pk in, in a server array, and a playerenters system npc that checks if your current level is in that array before calling the weapon action?

I'd just rewrite the entire weapon handling system :P. It's not very hard at all.
PHP Code:

disableweapons();
if (!(
player.level in serverr.nopklevels))
  
weapon.trigger("wasfired",null); 


Ajira 02-25-2006 06:56 PM

Quote:

Originally Posted by jake13jake
I'd just rewrite the entire weapon handling system :P. It's not very hard at all.
PHP Code:

disableweapons();
if (!(
player.level in serverr.nopklevels))
  
weapon.trigger("wasfired",null); 


Why not just trigger a 'weaponfired' for compatibility with onWeaponFired()..

jake13jake 02-25-2006 07:03 PM

Quote:

Originally Posted by Ajira
Why not just trigger a 'weaponfired' for compatibility with onWeaponFired()..

Shoot me, that's what I meant to say.


All times are GMT +2. The time now is 07:49 PM.

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