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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
gerad
Newbie


Joined: 15 May 2001
Posts: 1

PostPosted: Tue May 15, 2001 6:37 am   

Spelltracker X
 
This was written for sojourn 3, sojourn3.org 9999. It tracks what spells you have remaining and stores them in variables...
*******************************************
*************SPELLTRACKER X****************
****************BY GERAD*******************
*********REAL WORKING VERSION**************
*******************************************
OKAY! We're going to try this again
The example shown is for the shaman spell "jar the soul". It is an example that uses 'pray' (even though the alias is mem), but im sure you could easily modify it for a caster.
===========
First, you must create the following variables for EVERY spell you wish to track.
EXPLANATION:
Create a variable that will be the one you use in your gsays, status bar, etc.. for that spell, in this case we are using "JAR_LEFT" for the number of jar the souls we have left. The foundjar has to do with disabling another trigger so that the variables dont do wierd stuff.
Example: Format:
jar_left <--- spell_name
foundjar <--- foundspell
===========
You need the following triggers for EVERY spell:
===========
EXPLANATION:
The next two triggers have to do with finding the spells in your pray list so that if somehow the numbers get borked you can simply type 'pray' and fix them. Where is says 'jar the soul' is where you want the EXACT name of the spell as it appears in your pray list
TRIGGER:
PATTERN:%1 - jar the soul
COMMANDS:#If {foundjar = 0} {@jar_left = %1}
===========
TRIGGER:
PATTERN:
( %1) %2 - jar the soul
COMMANDS:
@jar_left = %2
@foundjar = 1
===========
EXPLANATION:
This trigger is simply adding one to the variable when you memorize a spell.
TRIGGER:
PATTERN:
You have finished praying for jar
COMMANDS:
#math jar_left {@jar_left + 1}
===========
You need the following aliases for EVERY spell you wish to track:
EXPLANATION:
This alias is used to cast the spell. It tells the 'You start chanting' trigger which spell to remove when it checks the @spell variable.
ALIAS:
NAME:
Jar
COMMANDS:
cast 'jar' %1
@spell = 1
============
EXPLANATION: This alias is used by the You start chanting trigger to subtract one from the variable for the spell you just cast.
ALIAS:
NAME:
Jarcast
COMMANDS:
#math jar_left {@jar_left - 1}
============
Now, you need the following 'core' triggers for Spelltracker X:
EXPLANATION: This simply sets the current spell number to zero if you try to cast one you dont have. Helps to keep things from getting borked.
TRIGGER:
PATTERN:
You dont have that spell memorized
COMMANDS:
@spell = 0
============
EXPLANATION: Same as above, only for when you finish the spell.
TRIGGER:
PATTERN:
You complete your spell
COMMANDS:
@spell = 0
============
EXPLANATION: This is a very important trigger. For every spell you have you must have an entry in this trigger with its own seperate spell number, which must match with the number of the spell in the shortcut alias for the spell.
TRIGGER:
PATTERN:
You start chanting
COMMANDS:
#If {@spell = 1} {jarcast}
@spell = 0
============
And the Final Alias to pray your spells,
ALIAS:
NAME:
mem
COMMANDS:
@foundjar = 0
@jar_left = 0
pray
============
*YOU MUST USE THE ALIASES TO CAST THE SPELLS
*YOU MUST USE MEM TO PRAY YOUR SPELLS
Explanation:
OK! If your not a ZMUD Guru, I am going to explain this as best as I possibly can.
Most importantly, make SURE for every spell you wish to track, you have all of the triggers, variables, and aliases you need.
Now, make sure each spell has its own number and entry in the mem alias and in the You start chanting trigger. This is the number seen in the {@spell = 1} line. In this example, jar the soul is spell number one. If you wished to add blind, you would add a line under #if @spell = 1 {jarcast} that read: #if @spell = 2 {blindcast}. You would also add a line in the mem command that read: @foundblind = 0 and another that read @blind_left = 0.
Basically, if you follow those rules you should be ok.
I posted this because I use many other triggers I found here, and because I wish others to share in the glory of the greatest sojourn casting triggerset ever created :)
If you are having trouble understanding, put all of the triggers in and only replace the name of the spell being cast in the jar alias, and mem and cast around to experiement with how it works :)

And PLEASE, always give credit where credit is due :)

-Gerad

"No I dont use zmud, I _own_ zmud!"
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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