Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   With getplayer ... (https://forums.graalonline.com/forums/showthread.php?t=19400)

Kumada 12-22-2001 01:02 PM

With getplayer ...
 
Would this work?? i want it so it would send the player to x=30 y=30 to the level. But it only works if the player is in that level
so if i said "unjail kumada" it would only unjail me if i was in jail.nw not anywhere else.
Heres what i have..
if (playerchats&&strequals(#g,Guild)){
tokenize #c;
if (strequals(unjail,#c)){
with (getplayer(#t(1))&&strequals(#l,Jail.nw)){
playerx=30;
playery=30;
}}}

aesquivel 12-22-2001 01:07 PM

Re: With getplayer ...
 
Quote:

Originally posted by Kumada
Would this work?? i want it so it would send the player to x=30 y=30 to the level. But it only works if the player is in that level
so if i said "unjail kumada" it would only unjail me if i was in jail.nw not anywhere else.
Heres what i have..
if (playerchats&&strequals(#g,Guild)){
tokenize #c;
if (strequals(unjail,#c)){
with (getplayer(#t(1))&&strequals(#l,Jail.nw)){
playerx=30;
playery=30;
}}}

tht looks about right except i think the letter l is supposed to be a capital L but im not quite sure but other than that i dont see any thing wrong with it

Python523 12-22-2001 02:00 PM

with(getplayer) is NPC Server I believe, wont work offline

aesquivel 12-22-2001 02:02 PM

i think he already knows that .........

Python523 12-22-2001 02:03 PM

Quote:

Originally posted by aesquivel
i think he already knows that .........
I thought if he did, it would be in the NPC Server section, not here

BocoC 12-22-2001 02:10 PM

Re: With getplayer ...
 
Quote:

Originally posted by Kumada
Would this work?? i want it so it would send the player to x=30 y=30 to the level. But it only works if the player is in that level
so if i said "unjail kumada" it would only unjail me if i was in jail.nw not anywhere else.
Heres what i have..
if (playerchats&&strequals(#g,Guild)){
tokenize #c;
if (strequals(unjail,#c)){
with (getplayer(#t(1))&&strequals(#l,Jail.nw)){
playerx=30;
playery=30;
}}}

Try this. I think I got the setlevel2 command right... Remember, this is a p2p only serverside npc.
NPC Code:

if (playerchats && strequals(#g,Guild)) {
tokenize #c;
if (strequals(unjail,#t(0))) {
with (getplayer(#t(1))) {
setlevel2 Jail.nw,30,30;
}
}
}


aesquivel 12-22-2001 02:12 PM

well it really dont matter because either way u look at it its still scripting also more ppl read this section than the other one if u hadent noticed

Python523 12-22-2001 02:15 PM

Quote:

Originally posted by aesquivel
well it really dont matter because either way u look at it its still scripting also more ppl read this section than the other one if u hadent noticed
True, I would think the better scripters would hang out at the NPC Server area, I need to learn some NPC Server myself, I've read the document but its kind of hard to learn it because none of the commands work offline, they should make some kind of offline NPC Server if possible to test out commands

aesquivel 12-22-2001 02:22 PM

ya that sure would help wouldnt it posting it in the future improvements


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

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