Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Fix Script Plz? (https://forums.graalonline.com/forums/showthread.php?t=47955)

mewtoo18 09-14-2003 09:56 AM

Fix Script Plz?
 
Can anyone fix this so i hit 1 to turn on and 1 again to turn off? i naver could make scripts do that =/, Thanx:



if (created) {this.mode = 1;}
if (keypressed && strequals(#p(1),1) && this.mode = 1;) {
setstring client.dir,#v(playerdir);
this.mode = 2;
}
if (this.mode = 2) {
timeout=.05;
if (keydown(0) || keydown(1) || keydown(2) || keydown(3) ) {
playerdir = strtofloat(#s(client.dir));
}
if (keypressed && strequals(#p(1),2) && this.mode = 2;) {
setstring client.dir,4;
this.mode = 1;
timeout = 0.00;
}
}

mewtoo18 09-14-2003 09:57 AM

Script Help
 
I made this in erm 1.5 min so if it looks badtell meh =p

mewtoo18 09-14-2003 09:59 AM

here
 
i shortened it by one comand, lol, still wont work way i wanted to =/:

if (created) {this.mode = 1;}
if (keypressed && strequals(#p(1),1) && this.mode = 1;) {
setstring client.dir,#v(playerdir);
this.mode = 2;
}
if (this.mode = 2) {
timeout=.05;
if (keydown(0) || keydown(1) || keydown(2) || keydown(3) ) {
playerdir = strtofloat(#s(client.dir));
}
if (keypressed && strequals(#p(1),2) && this.mode = 2;) {
this.mode = 1;
timeout = 0.00;
}
}

Kaimetsu 09-14-2003 10:49 AM

Nope. Read the rules.


All times are GMT +2. The time now is 05:24 AM.

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