Quatrium Disciples Order
  1986 active members
  259 are online

Year

20

Day

323

Time

14:48:48

Guest
Login
snewsgnewsmessagegeneralfactioninventorycombatroom
Message CenterRPG CenterQuestion Center
Archives » NPC Scripts: random response
Year 13 Day 175 20:13
Ettrick Antalaha
Ettrick Antalaha

swcombine.com/rules/?Scripts
on this page it says:

You can use randomness within the responses section.

##############################
Example
Block: start
Hi!
Responses:
!random [response1, response2, response3]! -> How are you?

Will randomly divert the player to one of three response blocks each time they speak to the NPC.
##############################

I have not been able to get random responses to work, even when I create the appropriate Block: response1 Block: response2 and Block: response3

Any suggestions? I'm I reading the example wrong, or has the functionality changed?
If you have a working example, please post one.


____________

1stSun_hban2.png
Year 13 Day 175 22:14
Uh, if I hadn't seen that last line from the rules, I would of said that the response you see to click on would be randomised between the values you put, not diverting you to different blocks. ie:

!random [Hey, You, Hi]! -> hi

Would randomly choose between those 3 words when you run the script so it looks like the responses are different, but go to the same block,


____________

Ellias_sig6.png
Year 13 Day 176 9:31
Ettrick Antalaha
Ettrick Antalaha
Ellias,

I see that's what the function should do, but it doesn't seem to work that way.
The real problem is the example gives you a parsing error, so you can't run it at all.
Either the example is wrong, or random response is erroring.

If you paste in the example as is, you get this message:

"Error parsing/saving: Missing block: How are you? defined in block: start"

This is because "How are you?" is not a Block:
This example syntax is totally backwards to all other examples and usage.


#### I've even tried flipping it around to:
Block: start
Hi!
Responses:
How are you? -> !random [response1, response2, response3]!

but you get this:

Error parsing/saving: Missing block: !random [response1, response2, response3]! defined in block: start

### and If i build out the command with the syntax of the previous ones:
Block: start
Hi!
Responses:
How are you? -> !random [response1, response2, response3]!
Responses:
Block:response1
test1
Block:response2
test2
Block:response3
test3
################
You get this:
Error parsing/saving: Missing block: !random [response1, response2, response3]! defined in block: start


____________

1stSun_hban2.png
Year 13 Day 176 22:28
Block: start
Hello!
Responses:
!random [Sup, NM U, FUAD]! -> How are you?

Block: How are you?
Fine!




Works fine for me. Ellias described it correctly, here:
the response you see to click on would be randomised between the values you put 


Year 13 Day 177 11:07
Ettrick Antalaha
Ettrick Antalaha
Mikel,

Thanks for explaining.
I was under the impression that Block: names had to be one word, because the previous examples were all one word. Maybe if your Response: example was added it would clarify a little more.
Thanks again,


____________

1stSun_hban2.png