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


Joined: 22 Sep 2005
Posts: 3

PostPosted: Thu Jan 12, 2006 8:20 am   

Request for help
 
Greetings,
I am a first-time poster to the forums here, but a long-time user of Zmud.

I am posting my query in this thread, and if its not the right place to post these requests, I apologize in advance.

I'm looking for some help to create triggers for ArmageddonMUD.

Here are the details:
1) My PC has 2 types of spells - offensive and defensive.
2) Each spell can be cast at different power levels (ranging from 1 to 7).
3) Each spell has a unique name (i.e. heal, shield etc etc).

What I need help with is creating a set of triggers in Zmud which will help me record and show me:
1) The number of times each spell has been cast, and at each power level.
2) The number of times each spell was cast successfully (trigger is on ^Ok.), totally, and at each power level.
3) The number of times each spell failed (trigger is on ^You lost your concentration.) totally, and at each power level.

To give you an example:
Spell: Heal
Type: Defensive

I would ideally like to have something like:

command = showme heal

You have cast heal totally 200 times. 5 times at level 1, 20 times at level 2, 100 times at level 3, 50 times at level 4, 0 times at level 5, 0 times at level 6 and 25 times at level 7.

You have successfully cast heal totally 180 times. 5 times at level 1, 20 times at level 2, 80 times at level 3, 0 times at level 4, 0 times at level 5, 0 times at level 6 and 25 times at level 7.

You have failed heal totally 20 times. 0 times at level 1, 0 times at level 2, 20 times at level 3, 0 times at level 4, 0 times at level 5, 0 times at level 6 and 0 times at level 7.

command = showme defensive - would show me all the details for all the spells labelled as "defensive".

command = showme all - would show me all the above details for all the spells.

Could someone please help me out with this? I'd appreciate it a lot. Thanks in advance.
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Thu Jan 12, 2006 5:26 pm   
 
1st step on that would be to post mud text that shows each of those successes.
like do you SEE a msg like:
You cast "heal" at power level 5

or something?

if there ISN'T anything that shows up on the screen EXCEPT an "OK" then what is the exact command that you enter to perform a power lvl 5 heal?

Might wind up making the casts as #oninputs with various if's
_________________
http://www.Aardwolf.com
Reply with quote
Onyxwolf
Newbie


Joined: 22 Sep 2005
Posts: 3

PostPosted: Thu Jan 12, 2006 6:12 pm   
 
Vitae wrote:
1st step on that would be to post mud text that shows each of those successes.


The spell cast is like this:
cast 'one refresh' me

The success messages are like this:
You utter the incantation, 'one refresh'.
Ok.
You feel less tired.

Where:
One = powerlevel
refresh = spell

or

Another spell cast example:
cast 'seven shield' Vitae

The success message would be like this:
You utter some words undecipherable to Vitae.
Ok.
A crackling shield of energy forms around Vitae.

whereas:

The failure messages for all spells are:
You lost your concentration!

Vitae wrote:
like do you SEE a msg like:
You cast "heal" at power level 5


No, the only way for Zmud to recognize the powerlevel is from the casting message. The success or failure messages do not reveal the power level of the spell.

i.e. I think it would be better to set <var spell> and <var spelllevel> in the alias to cast the spell itself.

#AL shield one {cast '%2 %1' %3} -- [NOT ENTIRELY SURE OF THIS METHODOLOGY]
#VAR spell {%1}
#VAR spellpower {%2}

so, something like shield 7 vitae would:
cast 'seven shield' vitae

Vitae wrote:
if there ISN'T anything that shows up on the screen EXCEPT an "OK" then what is the exact command that you enter to perform a power lvl 5 heal?

Might wind up making the casts as #oninputs with various if's


Once this part works, I would like to see the details for a single spell via the SHOWME cmd, as well as the details for all spells in a spell class (defensive or offensive), and finally, all the details for all the spells.

PS: Thank you very much for taking the time and effort to help me out!
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Thu Jan 12, 2006 7:13 pm   
 
Actually,
#AL shield {cast ~'%1 shield~' %2;#VAR spellpower {%1}}

so that you dont really need to change to much typing.
shield 2 vitae

The rest is something else.
I'll have to see what I can come up with. Shouldnt be to hard...i think...(i always say that then do exactly what my sig pic does)

Edit:
Made a mistake on the alias. Corrected now. Tho as it is now to just do the casting the #var isn't needed even.
_________________
http://www.Aardwolf.com
Reply with quote
Onyxwolf
Newbie


Joined: 22 Sep 2005
Posts: 3

PostPosted: Fri Jan 27, 2006 3:06 pm   
 
Thanks for all the help Vitae.

I would really appreciate if someone could take some more time out and help me with my original request though.

Thanks in advance,
Onyxwolf
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Jan 27, 2006 6:08 pm   
 
I haven't played there in a very long time.

For those kinds of muds I usually do something like this:

#VAR Spells %null

#alias cast {
#ADDITEM Spells.List %2_%1
#ADDKEY Spells Casted_%2_%1 1
#SH ~cast '%1 %2' %3
#TEmP casttemp {^({Ok|You lost your concentration!})} {#IF (%%1 == "Ok") {#ADDKEY Spells Failed_%2_%1 1} {#ADDKEY Spells Success_%2_%1 1}}
}

Syntax: Showme shield
#ALIAS SHOWME {
#FORALL "one|two|three|four|five|six|seven" {
#IF (%ismember(%1_%i,@Spells.List)) {
#SHOW Spell %1 stats: Casted %db(@Spells,Casted_%1_%i) Success %db(@Spells,Success_%1_%i) Failures %db(@Spells,Failed_%1_%i)
}
}
}
Output if you have just casted shield levels one and three:
Spell shield_one stats: Casted 200 Success 50 Failures 150
Spell shield_three stats: Casted 200 Success 50 Failures 150

Syntax: SHOWMEALL
#ALIAS SHOWMEALL {#FORALL @Spells.List {SHOWME %i}}
Output if you have just casted shield levels one and three and heal level one:
Spell shield_one stats: Casted 200 Success 50 Failures 150
Spell shield_three stats: Casted 200 Success 50 Failures 150
Spell heal_one stats: Casted 200 Success 50 Failures 150

Untested but you get the idea. I used a database variable so you dont get a zillion variables about.
You can use the %format command or %tab if you want to straighten out the output.
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