Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   tokenizing and setting em ... (https://forums.graalonline.com/forums/showthread.php?t=11238)

nyghtGT 09-05-2001 02:25 PM

tokenizing and setting em ...
 
Can someone please explain to me how tokenizing works and how to use em ?

entravial 09-06-2001 04:08 AM

~AlphaFlame~

Tokenizing works by splitting what you say into tokens which can be read using #t(index)... take this for instance...

tokenize I am a bear;

would give you these tokens
#t(0) I
#t(1) am
#t(2) a
#t(3) bear

But, if you should do...

tokenize "I am" a bear;

you would get these tokens

#t(0) I am
#t(1) a
#t(2) bear

Since anything in " " is read as one token

Now that I've explained, all that's left is for Kaimetsu to swing by, say "I wouldn't have used those words, but I'm sure it's harmless enough", and then elabricate a bit.

General 09-06-2001 05:20 AM

in my spying script i used toeknize but the problem was it glitched out whenever your nick contained " or your chat contained "

entravial 09-06-2001 05:32 AM

Hmm... how was it scripted? I might be able to help... I'm no Kaimetsu by far, but at least I'm willing to help *cough*

[edit] Just tested the tokenize to be sure... the "s don't mess up tokenize in #c or #n...[/edit]

General 09-06-2001 06:06 AM

it was like
setstring server.account,"#c" "#n" "#3" and so on

entravial 09-06-2001 06:20 AM

*sits there a moment*

... take out the "s...

ownerofbabylon 09-06-2001 07:28 AM

wow entravial, that helped me a lot. Someone explained tokenize to me and made me wanna jump out a window. The only thing im wondering is what is it good for?

nyghtGT 09-06-2001 04:51 PM

thanx
 
thanx entravial

entravial 09-07-2001 03:06 AM

"What is triggeraction" is most certainly a valid question.

It's not like he asked me to script out a gargantous bugger using it.

Gah I forgot to put ~AlphaFlame~ at the top of my posts :megaeek: Oh well...

ArmadeusWarlock 09-07-2001 09:42 AM

Just wondering
 
Triggeraction can be used to affect other players and npcs right?

entravial 09-08-2001 02:46 PM

-- THE REAL AND ORIGINAL ENTRAVIAL --

I liek geting credits for waht alphaflame does :D

entravial 09-09-2001 03:28 AM

~AlphaFlame~

*whallops Entravial upside the head* Ok, shush you.

Kaimetsu, for new scripters, commands.rtf and newfeatures.txt doesn't make exactly that much sense. Therefore, they come to this forum and ask what it is in hope that somebody can explain it where they can understand it. :p

zokemon 09-09-2001 04:48 AM

How could they NOT make sense
WTF is evryone thinking!

entravial 09-09-2001 05:27 AM

~AlphaFlame~

Hey, I remember when I was a COMPLETE newbie to scripting and was reading newfeatures.txt and the commands.rtf... half of them left me saying "What the living hell..."

Pssh, I couldn't even make a beer when I started :megaeek:


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

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