Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Tokenize and tiles (https://forums.graalonline.com/forums/showthread.php?t=8925)

MrCoolDude 08-05-2001 07:30 AM

Tokenize and tiles
 
Could someone explain what these commands do and how to use them?

tokenize str;
tokenize2 delims,str;

Also, is there a easy way to change a tile at a certain x & y with a different tile?

Thanx

Falcor 08-05-2001 08:11 AM

Tokenize str will break a string into toekns based on Spaces and Commas

so tokenize HI I,AM BOB;

will give you

#t(0) = HI
#t(1) = I
#t(2) = AM
#t(3) = BOB

Tokenize 2 will let you add more conditions fore tokens so

tokenize2 +,HI+I AM,BOB;

will give you

#t(0) = HI
#t(1) = I
#t(2) = AM
#t(3) = BOB

Since You Delimited the Plus also

board[x+64*y] = boardx+boardy*16;

It think thats the syntax for editing. Dont forget to
UPDATEBOARD X,Y,WIDTH,HEIGHT;

MrCoolDude 08-05-2001 08:14 AM

ok thanx

MrCoolDude 08-05-2001 08:16 AM

And I can never get the updateboard command to work for some reason.

MrCoolDude 08-05-2001 08:57 AM

Nevermind...I got updateboard to work.

Lionel-Jonson 08-05-2001 09:00 AM

Opening your eyes and taking everything you see, look at all the colors; yellow blue and green! We can take airplanes and fly around the globe!!

MrCoolDude 08-05-2001 09:33 AM

Ok...one last question.
I've heard that tile changes are local...such as the constructor npc on unholy nations. How would I make the changes visible to everyone? Would I use a timeout?

General 08-05-2001 11:56 AM

...hmm...dunno

zokemon 08-06-2001 03:49 AM

Quote:

Originally posted by Falcor
Tokenize 2 will let you add more conditions fore tokens so

tokenize2 +,HI+I AM,BOB;

will give you

#t(0) = HI
#t(1) = I
#t(2) = AM
#t(3) = BOB

Since You Delimited the Plus

no...
it would give you:
#t(0) = HI
#t(1) = I AM,BOB

MrCoolDude 08-06-2001 09:33 AM

Do you need a NPC-Server for tokenize to work?

Tyhm 08-06-2001 10:18 AM

nope

MrCoolDude 08-06-2001 10:33 AM

ok

Falcor 08-06-2001 11:27 PM

Tokenize2 dilimits spaces and commas PLUSE the delimiters you specifi. I beleive thats how it works.


All times are GMT +2. The time now is 08:06 AM.

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