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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Shanshar
Newbie


Joined: 21 Jan 2013
Posts: 3

PostPosted: Mon Jan 21, 2013 6:26 pm   

Need help with caravan script
 
Hi,

I have this 2 triggers to make me go in a slow walk until destination, i need to wait each time 6-7 seconds or the mule wont follow me:

Trigger 1:
Code:
<trigger priority="2580" id="258">
  <pattern>empiezaCaravana</pattern>
  <value>#slow caravan1
#pause
mirar mula
</value>
</trigger>


Trigger 2:
Code:
<trigger priority="2590" id="259">
  <pattern>Una mula de caravana es de raza caballo.</pattern>
  <value>#while (%inwalk) {
#step
#wait 6000
mirar mula;
}
</value>
</trigger>


I'm having many problems with this:

- First of all, it doesnt get caravan1 as a path each time, sometimes it begins correctly, sometimes it just get it as a wrong command.
- Then, when it theoretically should send just the first direction of the path it sometimes send 5 o 10 steps at a time.
- #step works sometimes, sometimes it just doesnt work.
- I configured directions, because is an spanish mud, so, when i write o or oeste, the map should follow me as if i wrote w or west. oeste works fine but o doesnt. This is a problem when i'm trying to make paths.

I'm not sure if i'm making concept or sintax errors in the script, but it seems that cmud commands just dont work. :S

Thanks for any assistance you may give!
Reply with quote
Llohr
Apprentice


Joined: 17 May 2005
Posts: 108

PostPosted: Tue Jan 22, 2013 3:37 am   
 
I've never used Slow Walking in quite the way that you do here (I don't use #pause/#step, I just use #ok when I want to move again.) but the method you use appears to function fine for me, except that I'm guessing you only use #pause once, in which case #step will only work once. Another possible problem is the Spanish direction setup.

How exactly did you set up the directions? I see that there's a #direction command, which seems the mostly likely method to me.
Apart from norte, sur, este, oeste, etc., I'm not sure what you use for up and down (¿arriba y abajo? Y entonces, ¿cuál letra se utilizan por cual dirección?). As far as what I CAN figure out goes, I imagine you would do something like:

Code:
#dir eo "e|este" e
#dir oe "o|oeste" w
#dir ns "n|norte" n
#dir sn "s|sur" s


And then some similar setup for the diagonals, which aren't something I have personally used much.

It's possible that you could make these changes in the xml script of the "English Directions" default package, but I would personally pick the #dir command as the first thing to try.

Now then, assuming that I understand the point of the triggers properly (trigger 1 starts the path, then looks at the mule, trigger two fires when you look at the mule, taking the next step and waiting six seconds to look at the mule again) I would also try changing the two triggers to these:

Trigger 1
Code:
<trigger priority="2580" id="258">
  <pattern>empiezaCaravana</pattern>
  <value>#slow caravan1
#alarm mm {+6} {mirar mula}
</value>
</trigger>


Trigger 2
Code:
<trigger priority="2590" id="259">
  <pattern>Una mula de caravana es de raza caballo.</pattern>
  <value>#while (%inwalk) {
#ok
#alarm mm {+6} {mirar mula}
}
</value>
</trigger>


You could also skip the middleman and avoid looking at the mule entirely, unless of course you're doing that to make sure the mule is still there.

Also, is the "empiezaCaravana" pattern something that the mud actually sends?
Reply with quote
Shanshar
Newbie


Joined: 21 Jan 2013
Posts: 3

PostPosted: Wed Jan 23, 2013 12:37 pm   
 
The main problem is that when i use slow walking it just send all path, i'm not sure if my cmud isnt working fine.
If i manage to #pause it, sometimes it works and i can just go fine with #step, if i try to use #ok it sends the remaining path.

For directions set up i used view/directions menu. However, seeing the #direction command i saw the error.
My map is receiving 'o' instead of 'w' when using the 'oeste'. That would be easy to resolve. :)
Diagonals arent a problem, in my MUD i would never build something with diagonals, too much work. ;)

Actually i must look at the mule, beacuase there's a glitch, when a thief appears, if you just send at the same time a direction command, you will go foward without the mule.
I can use the messagge: 'La mula ha llegado..' but i'm not sure about it. The command #echo gives many problems if used with #wait command.

"empiezaCaravana" is an #echo i use to test the script until it's finished, then it will be another text that the mud sends.

Thanks for the help, finally the direction problem is solved. :)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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