Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Does this work lol (https://forums.graalonline.com/forums/showthread.php?t=37334)

KuJi2002 09-04-2002 06:27 PM

Does this work lol
 
Does this script work i doubt it does but if it doesnt can someone help me with it lol. I cant even test the script offline...
NPC Code:

// NPC made by KuJi
if (playerchats && startswith(control,#c) && strequals(#g,Staff)) {
tokenize #c;
if (strequals(#t(1),summon))
this.x=playerx;
this.y=playery;
this.level=#F;
with (getplayer(#t(2)) {
warpto this.x,this.y,this.level;
}
}


KuJi2002 09-04-2002 06:39 PM

NPC Code:

// NPC made by KuJi
if (playerchats && startswith(control,#c) && strequals(#g,Staff)) {
tokenize #c;
if (strequals(#t(1),summon)) {
this.x=playerx;
this.y=playery;
this.level=#F;
with (getplayer(#t(2)) {
warpto this.x,this.y,this.level;
}
}
}


That better?
Will the this.x & this.y work?

KuJi2002 09-04-2002 06:45 PM

So your saying the npc will warp to the x & y as me but not lv?
what if i do #L would that work?

KuJi2002 09-04-2002 06:48 PM

I stopped using strings after it started lagging me

KuJi2002 09-04-2002 06:50 PM

Would this work?
NPC Code:

// NPC made by KuJi
if (playerchats && startswith(control,#c) && strequals(#g,Staff)) {
tokenize #c;
if (strequals(#t(1),summon)) {
this.x=playerx;
this.y=playery;
setstring this.level,#F;
with (getplayer(#t(2)) {
warpto this.x,this.y,#s(this.level);
}
}
}


KuJi2002 09-04-2002 06:54 PM

lol kk
Its missing a closing???
No it aint...
NPC Code:

// NPC made by KuJi
if (playerchats && startswith(control,#c) && strequals(#g,Staff)) {
tokenize #c;
if (strequals(#t(1),summon)) {
this.x=playerx;
this.y=playery;
setstring this.level,#F;
with (getplayer(#t(2)) {
warpto this.x,this.y,#s(this.level);
}
}
}


KuJi2002 09-04-2002 06:59 PM

o i thought u ment } i see its missing 2 strequals and with (getplayer())

KuJi2002 09-04-2002 09:56 PM

oops nm


All times are GMT +2. The time now is 12:32 AM.

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