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
Zwartia
Newbie


Joined: 22 Nov 2005
Posts: 2

PostPosted: Tue Nov 22, 2005 1:36 pm   

How to control the route used by #WALK?
 
I recently discovered the #walk command, and after cleaning up my map I am now using it successfully to walk fast to any room I want, using the shortest route.

The problem I now encounter and would like advice on, is that there are locations I cannot enter under certain conditions.

For example, I need a herb to easily travel water ways. Thus when I am out of that herb, I want #walk to use routes without water but when i have enough in stock it should walk over the rivers (shortest and safest route normally).

Or another example, when I have 'divine protection' I cannot enter any cities where i am enemied. So, I want #walk to take me round these cities when i am protected but not when I am not.

Is there a way to set this up? Roomscripts?
Reply with quote
Slaem
Apprentice


Joined: 20 Sep 2005
Posts: 135

PostPosted: Tue Nov 22, 2005 1:57 pm   
 
Yes. Set all your water rooms with a high roomcost. Then make a trigger to check how many herbs you have. If high enough for water travel, then the trigger executes a %roomcost() function for all water rooms lowering their cost to an acceptable value. Have another trigger for when your herb level gets too low to raise the water room costs back too high for entry.

Same thing with divine protection. Have a trigger set the roomcosts too high when you have divine prot. I think that should work.
_________________
Show your love.
Support Zugg Software!
Donate to zugg@zuggsoft.com with PayPal Send Money.
Reply with quote
Zwartia
Newbie


Joined: 22 Nov 2005
Posts: 2

PostPosted: Tue Nov 22, 2005 3:33 pm   
 
"all water rooms"
How do I indicate that? Could I make it dependent on zone? I have all cities, waterways, big aerea's in a seperate zone

I think I need an alias rather than a trigger that changes roomcosts.
Something like this:

Aliasname: ChangeRoomcostDP
Value: FORALL (Rooms in EnemyCityZone) {%roomcost(room, maxvalue)}

So, when I first get Divine protection (its a state we get after dieing in the MUD i play, and we revoke it with a command), I can use that alias to change the roomcost of all locations in the EnemyCityZone to max (I think that will give the same effect as toggling the 'DO NOT ENTER' flag of the location).
I will need another alias to reverse the situation of course, but if I have the above working, I can do the rest myself.

As you can see I am not really good at ZMUD programming syntax yet, any help on working this out in more detail would be greatly appreciated.
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