|
RapidRunner Beginner
Joined: 18 Oct 2003 Posts: 18
|
Posted: Wed Jan 07, 2004 6:26 am
Random Player Picking in a Room |
Hello there, I'm pretty new to Zmud's scripting, all..
Would anyone know how to gather information for like whos in one room, then like throw a ball or something at random people in the room instead of just the same one all the time??
If anyone happens to know how this could be done, please help a new scripter out, thanks.
Peace, Happy New Years. |
|
|
|
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: Thu Jan 08, 2004 4:09 pm |
For a precise answer, please prive an example of what it looks like when you see a list of names in the room. IT can be done... probably. For example... if you have something like this:
Name of the Room
Description of
the room spanning
several lines
Name1 is here.
Name2 is here.
Name3 is here
Exits: N, E and SE
Then this would work:
#CLASS {randomthrow}
#AL setn {setn=%null;look}
#VAR setn %null
#TR "setn" {(%w) is here.} {#ADDITEM setn %1}
#AL rthrow {throw ball to %item( @setn, %random( 1, %numitems( @setn)))}
#CLASS 0 |
|
|
|
RapidRunner Beginner
Joined: 18 Oct 2003 Posts: 18
|
Posted: Fri Jan 09, 2004 4:23 am |
Well.. mud has no room names.. and no descriptions...
The general room has no exits..
I don't know how to make it work with those things out...
it locked Zmud up when i tried it... |
|
|
|
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: Fri Jan 09, 2004 11:10 am |
Then show me an example of what you DO see, so I have something to work with...
|
|
|
|
RapidRunner Beginner
Joined: 18 Oct 2003 Posts: 18
|
Posted: Fri Jan 09, 2004 2:31 pm |
ok, well.. All you see is...
Pabach is here.
You see no exits, no room name or description...
If that helps out, please lemme know..
Thanks. |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Fri Jan 09, 2004 3:13 pm |
Try this:
#trigger {(%w) is here.} {#additem PlayersinRoom {%1};#alarm +1 {throw ball %item(@playersinroom,%random(1,%numitems(@playersinroom)));#var Playersinroom %null}} |
|
|
|
fireangel37 Beginner
Joined: 09 Jan 2004 Posts: 17
|
Posted: Fri Jan 09, 2004 5:28 pm |
That's pretty cool. I want to do something like this, but have a list of people and items displayed in my status window. I used something like this and couldn't sort elements out of the string list. That, and I can't figure out how to get the list to stick until I change rooms...
|
|
|
|
RapidRunner Beginner
Joined: 18 Oct 2003 Posts: 18
|
Posted: Sat Jan 10, 2004 1:49 am |
hehe, it works fine... i had to set Zmud's special characters back to default.. i forgot i changed the ; to ~ for command stacking :P
oh well.. Peace, thanks a lot for the help :) |
|
|
|
RapidRunner Beginner
Joined: 18 Oct 2003 Posts: 18
|
Posted: Mon Jan 12, 2004 2:17 am |
Umm... It targets only the same person in the room all the time, it don't go to random people in the same room...
I dunno what to do bout that :(
Peace, thanks in advance.. |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Mon Jan 12, 2004 8:44 pm |
Hmmm, it works fine for me. It may simply be that the alarm of 1 second is not long enough to capture all the players in the room. Try increasing it to 2
|
|
|
|
|
|