Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Sbrydion
Newbie


Joined: 04 Jan 2005
Posts: 2

PostPosted: Tue Jan 04, 2005 8:04 pm   

Goto script
 
I have been tryin to make a script that makes my character goto rooms
1 through 100. So when i goto room 1 the trigger would fire and goto room 2, and so on up to room 100.

Any help would be appreciated.
Reply with quote
misterbalrog
Apprentice


Joined: 26 Oct 2004
Posts: 108

PostPosted: Tue Jan 04, 2005 8:36 pm   
 
You could use a trigger that starts off with an initial trigger, then executes your commands upon triggering that, then moves accordingly, then in that room there's another thing that it can trigger off (conditional trigger).

A #cond trigger is basically another state in a trigger. So you could create 100 states for a trigger each with a diff pattern or whatever rule you want to apply for it.

Another way could be storing the directions in a stringlist, then go through the stringlist one by one with #alarm and an alias to execute the commands you wish.

There are so many ways you can do it, don't you have any more info on it? What's it going to be used for? Do you have a map of the area created with zMUD? etc.
Reply with quote
Sbrydion
Newbie


Joined: 04 Jan 2005
Posts: 2

PostPosted: Tue Jan 04, 2005 9:01 pm   
 
I have the goto command and can see room vnums, was hopin with that it would be possible to make a script that could go through the room vnums 1 by 1 instead of making 100 seperate triggers.
Its goin to be used to check randomly popping objects in an area im building. 3 objects pop into random rooms throughout the area every 3 hours. so i want to be able to fly through the rooms to check and see if it is working right.
Reply with quote
Erasmus
Wanderer


Joined: 04 Aug 2004
Posts: 82
Location: Philadelphia

PostPosted: Tue Jan 04, 2005 9:39 pm   
 
You could do a #LOOP command that would cycle through every room in the list. Ex:

#ALIAS ObjectCheck {#LOOP minVnum, maxVnum {goto %i;look}}

This would only work if the vnums are in order.

A separate trigger would need to be created to record the objects in the room.
_________________
Erasmus
Reply with quote
misterbalrog
Apprentice


Joined: 26 Oct 2004
Posts: 108

PostPosted: Wed Jan 05, 2005 2:06 am   
 
ah well.. I'm a wizard myself and use the #number thingie.. as in #99 and it'll do smth 99 times.

Like this.

#99 {at 2%if(%i<10,0%i,%i) look}

That will go through zone number 2 and look into each vnum ranging from 1 to 99.

Then you can make a trigger that triggers off whatever it is you want, and you'll be able to make a counter or even whatever.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net