Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Newbie Script to fix (https://forums.graalonline.com/forums/showthread.php?t=34119)

Dean 07-24-2002 03:46 AM

Newbie Script to fix
 
I know that this will be the ultimate challenge for you! Who am I kidding? This weapon sort of cuts out at random times and I have to reactivate it, any idea why?

if (playerenters){toweapons Wall Hopper;}
if (weaponfired){

while (keydown(1)){
sleep 0.09;
playerx-=1;
}

while (keydown(0)){
sleep 0.09;
playery-=1;
}

while (keydown(2)){
sleep 0.09;
playery+=1;
}

while (keydown(3)){
sleep 0.09;
playerx+=1;
}
}

Any help would be appreciated.

Torankusu 07-24-2002 04:16 AM

i suggest using things like this.mode=0 / 1. 0 being off and 1 being on.

Dean 07-24-2002 04:20 AM

Ah, I haven't got that far in the tutorial yet *blows dust off npcprogramming.doc*:D

Dean 07-24-2002 04:30 AM

Thanks, I'll try and decipher that now, I think I understand it

screen_name 07-24-2002 10:44 AM

use timeout of .1 and this.mode of 1 while you want to test the keys
and have the keydowns in the timeout

Python523 07-24-2002 10:48 AM

Quote:

Originally posted by screen_name
use timeout of .1 and this.mode of 1 while you want to test the keys
and have the keydowns in the timeout

there isnt a lot of difference between .05 and .1 but if he can use .05 fine, why not use it? the script obviously isn't serversided


All times are GMT +2. The time now is 03:18 PM.

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