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


Joined: 25 Jan 2020
Posts: 1

PostPosted: Wed Jan 29, 2020 10:25 am   

Cmud Trigger help. (Dartmud)
 
Hello everyone

thanks for looking at my thread!

Can't quite figure out how to make this trigger work, bear with me.

I'm trying to make a set that will alternate between reading and revising a spellbook.

So I'm trying to revise a spellbook (command: revise spellbook) until I get an improvement that looks like this "* You think your scroll reading skill has improved. *"

The revise I have to wait until my concentration gets to "You're bright-eyed and bushy-tailed." before I can do each revise because of the concentration economy on the mud.

Then I want to start studying the spellbook (study spellbok) until I go an adjustable amount of times in a row without improving (You're bright-eyed and bushy-tailed.) then head back to revising until I get that improvement message.

I can do a single simple easy function triggers but this one wants to use the pattern "* You think your scroll reading skill has improved. *" and I'm not quite sure how to get this one working as all my triggers I currently use just go off of one pattern and have a simple command to send back to the mud.

I imagine there is going to be some variables involved and some way to reference them but I have no idea how to go about doing that.

I don't know if this makes any sense
Reply with quote
shalimar
GURU


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

PostPosted: Wed Jan 29, 2020 2:36 pm   
 
Well, you do not have to trigger off the entire line, a partial match off just a word or phrase is plenty, just make your pattern shorter.
That said, we need the line you get from the game when you attempt to study, and when you successfully improve.

Code:

#TR {You think your scroll reading skill has improved.} {spellbook=study spellbook}

#TR {You're bright-eyed and bushy-tailed.} {#SEND {@spellbook}}

#TR {study fail message} {
  studyFail=(@studyFail+1)
  #IF (@studyfail > @studyAttempts) {
    studyFail=0
    spellbook=revise spellbook
    }}

#TR {study success message} {
  studyFail=0
  spellbook=revise spellbook
  }


Then you can set the value of @studyAttemps to determine how long you will try.
_________________
Discord: Shalimar#3679
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