Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-25-2001, 10:17 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
tokenizing test ...

would this be correct ?

if (playerchats && startswith(jail player,#c) && strequals(#g,GP)) {tokenize #c;
setstring server.jailaccount,#t(3);
}

so if the GP says jail account nyghtGT it would set the string
server.jailaccount=nyghtGT right ?

This is my first time using tokenizing like this so thats why i am asking ...
Reply With Quote
  #2  
Old 09-25-2001, 11:48 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Re: tokenizing test ...

Quote:
Originally posted by nyghtGT
would this be correct ?

if (playerchats && startswith(jail player,#c) && strequals(#g,GP)) {tokenize #c;
setstring server.jailaccount,#t(3);
}
Nope. #t(n) starts at zero. jail is #t(0), player is #t(1), and the player name is #t(2). So:
NPC Code:

if (playerchats && startswith(jail player,#c)) {
if (strequals(#g,GP)) {
tokenize #c;
setstring server.jailaccount,#t(2);
}
}

__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #3  
Old 09-25-2001, 12:14 PM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
kool ...

thanx ...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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