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


Joined: 27 May 2011
Posts: 7

PostPosted: Tue Jun 14, 2011 9:59 pm   

Another question !
 
What I am trying to do, is make my character on a mud walk within a certain space on the mud and kill the mobs within it. Is there any way to add a #WA to a trigger set in order to wait until a monster is dead to move to the next room? Basically Im trying to make my character bot the rooms.

kill monster
wait until monster is dead before moving to the next specified direction

how would I do this in tirggers?
Reply with quote
Tyraelxv2
Newbie


Joined: 27 May 2011
Posts: 7

PostPosted: Tue Jun 14, 2011 10:03 pm   
 
Oh and no I'm not cheating. The mud im playing on is bot/script friendly. Im just a noob when it comes to scripting and CMUD. Help is much appreciated.

I also forgot to mention that some of the mobs are roaming mobs. So I am having to use "exa monster" in order to receive a line to trigger the kill.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Wed Jun 15, 2011 10:56 am   
 
Code:
#TRIGGER {message for combat starting} {
  #TEMP "MonsterDead" {message for combat ends} {
    cleanUp
    next movement
    }
  }

or you could do the same in your combat initation and use #WAITFOR to hold the death message
better still, make use of #EVENT and #RAISE... one for onKill, which would check to see if combat is actually over, and then onCombatEnd for the clean and whatnot...
You can be very efficient with this sort of thing if you take the time to break it down step by step
_________________
Discord: Shalimarwildcat
Reply with quote
Ralph1971
Wanderer


Joined: 01 Mar 2008
Posts: 64

PostPosted: Wed Jun 15, 2011 3:59 pm   
 
Could you give a sample scripting of the #event and #raise like you suggested used in this scenario?
given the following:
initial alias to start combat on a non-aggro mob:
k {kill %1} (not sure how the alias k{$target} {kill $target} is better)
and the death message:
(*) is DEAD!
on that message, if there are any other mobs in the room fighting you, glance will show
(mobname) is here, fighting YOU!
_________________
Win7-home - Cmud 3.33a
WinXP-pro - Zmud 7.21
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Thu Jun 16, 2011 5:21 am   
 
in you version you could do:
k silent bob
your alias will try to 'kill silent' silent being %1 and bob being %2, %params would be everything sent to the alias
its more of a way to have a preset local variable
on to the example....

Code:
#TRIGGER {(*) is DEAD!} {#RAISE onDeath}

#EVENT onDeath {
  #ALARM "combatOver" +10 {#RAISE onCombatOver}
  #TEMP "stillFighting" {is here, fighting YOU!} {#UNTRIGGER combatOver}
  glance
  }

#EVENT onCombatOver {
  loot
  bury corpses
  #RAISE autoWalk
  }

#EVENT autoWalk {whatever you use to decide where to go next}


events are better than aliases because if you raise an event that doesnt exist, nothing happens... aliases that dont exist often get sent to the mud as if it was a command
_________________
Discord: Shalimarwildcat
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