![]() |
Tokens...
Does anyone know how to make a code that will show as many tokens as made? An example...
NPC Code: How would I make the npc show just as many words as said? I have tried this next code to show the text you say up to a limit of five: NPC Code: But it wont say anything. I once saw the code, but it was on Doomsday, and that's gone. Anyone know it? |
use tokenscount to get the number of tokens and work from there
|
Wouldn't it be easier to use #e ?
|
Why use tokenize when you are displaying what the player said?
message #c; would make more sense to me. |
Quote:
|
Ok, I would use #c, but i want something a bit more, like, everything except the first word. Anyone get this? I already know what tokenscount is and all. Like, if i said "/moo Hello, my name is bob." the npc would say, "Hello, My name is Bob". Or if i said, "/moo It's a fine day out, isn't it?" it would say, "It's a fine day out, isn't it?" Something that would put as many tokens as words you say. What is the syntax/formula for that?
|
NPC Code: Didn't test it, but is that what your looking for? |
Re: Tokens...
Quote:
If it's a level NPC, then that code you said should just work fine. If it's a weapon, then it will not, as the NPC does not physically exist in the level for the message command to work, and you will want to use setplayerprop #c,(stuff); to change the player's chat. |
Well dusty, the code didn't work, but the syntax i saw on DoomsDay was very similar... and no, it's not in a weapon, just an NPC.
|
Quote:
As for Dusty's code: Dusty, when exactly is the string containing your chat text a string list? |
I think #e() is your problem.
|
Did Doomsday have a website? If so, I can get the script there. And Lance, you're wrong, it can't be 4 or more... just 4:o.
|
If you were a pretty good scripter, you'd figure it out yourself :-p
The simplest way would be to use #e, using the first token's length to deduce the second token's start index. |
Quote:
whats up with that n-1 thing anyhow? I would've figured that if it were to not work in any circumstances it just wouldn't work if the tokenscount was any less than the highest index of tokens being looked at... |
Quote:
Quote:
|
| All times are GMT +2. The time now is 07:52 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.