Alias/Trigger to Spellup

Scripts and support for your favorite MUD client.
Xyd
Sojourner
Posts: 177
Joined: Thu Apr 26, 2001 5:01 am
Location: Naperville, IL US
Contact:

Alias/Trigger to Spellup

Postby Xyd » Fri Apr 27, 2001 4:57 pm

This lets you create a list of chars that you cast spells on. (God I can't believe I wrote some of this stuff.)

SPAdd name - Adds a charnameto your spellup target list.
SPClear - Clears your charname target list to nothing.
SPDel name - Deletes/Removes a name from your spellup list.
SpellUp - Use this to initiate a spellup sequence (i.e. cast spells on the whole list of chars in your list).

When you type Spellup, you will be prompted for a list of spells to cast on your targets. If you were a cleric, you might just enter vitality as the spell. A mage might enter multiple spells such as stone|haste|globe. Whatever the spells, you must enter them with their keywords as used for casting, and you must separate them with the "pipe" | character.

Below is the necessary code to make SpellUp function. Copy/Paste this into a text file using NotePad and import it into zMUD using Settings/Import/Script. Make sure you select Text File from the File Type drop-down menu.

- - - - - START COPY BELOW THIS LINE - - - - -

#ALIAS SpellUp {#prompt spSpells "Enter spells using a '|' between each spell. i.e. stone|globe|haste";#T+ SpellUp;#var spSpellNo {1};#var spTargetNo {1};SpellPC}

#ALIAS SpellPC {#var spTarget {%word(@spTargets,@spTargetNo,"|")};#var spSpell {%word(@spSpells,@spSpellNo,"|")};#if (%null(@spTarget)) {#T- SpellupUp} {c ~'@spSpell~' @spTarget}}

#ALIAS SPReset {#var spTargetNo {1};#T- SpellUp}

#ALIAS SPClear {#var spTargets {}}

#ALIAS SPAdd {#var spTargets {%additem(%proper(%1),@spTargets)}}

#ALIAS SPDel {#var spTargets {%delitem(%proper(%1),@spTargets)}}

#ALIAS spAbort {#T- Spellup;#SA - - - - - SPELLUP ABORTED - - - - -}

#TRIGGER {^You complete your spell} {#Add spTargetNo 1;#if (@spTargetNo > %numwords(@spTargets,"|")) {#var spTargetNo {1};#add spSpellNo {1}};#if (@spSpellNo > %numwords(@spSpells,"|")) {#t- SpellUp;#SA - - - - DONE - - - -;} {SpellPC}} {SpellUp} 132

#TRIGGER {{Nobody here by that|You abort your |You don't have that spell}} {#SA %upper(%word(@spTargets,@spTargetNo,"|")) FAILED spellup on %word(@spSpells,@spSpellNo,"|");#CO 20;#Add spTargetNo 1;#if (@spTargetNo > %numwords(@spTargets,"|")) {#var spTargetNo {1};#add spSpellNo {1}};#if (@spSpellNo > %numwords(@spSpells,"|")) {#t- SpellUp;#SA - - - - DONE - - - -;#CO 20} {SpellPC}} {SpellUp} 132
Vryx
Sojourner
Posts: 5
Joined: Fri Mar 23, 2001 6:01 am
Location: Dallas, TX, US

Postby Vryx » Fri Apr 27, 2001 7:04 pm

I want to thank you for taking the time to write this functionality. It worked splendidly for me for 2 years and made the every painful dragon spellups, slightly tolerable.

V
Nebomosel
Sojourner
Posts: 53
Joined: Sun Jul 01, 2001 5:01 am

Postby Nebomosel » Thu Dec 13, 2001 11:19 am

Is anyone else using these successfully? I'm using zmud 6.16 and I can't get this set of aliases to work properly. I'm new to mages and getting close to zoning and don't want have to spam type. This can lead to way too many typos and potential deaths. Would appreciate any help anyone can give me.

Neb
Rellanor
Sojourner
Posts: 90
Joined: Sun Oct 28, 2001 5:01 am

Postby Rellanor » Sun Dec 16, 2001 5:17 am

really interested if some one will look at this it sounds great

no more missed spell ups in zones
Rellanor
Sojourner
Posts: 90
Joined: Sun Oct 28, 2001 5:01 am

Postby Rellanor » Tue Dec 18, 2001 11:57 am

The problem lies in the You have completed your spell trigger I don't know what the problem with Zmud 6.16 is but thats where it is so please someone who is good at this sort of advanced trigger please take a look at it
Jhorr
Sojourner
Posts: 515
Joined: Sun Feb 25, 2001 6:01 am

Postby Jhorr » Sat Dec 20, 2003 12:31 am

Indeed, there's an extra semi-colon in there. It should be:

#TRIGGER {^You complete your spell} {#Add spTargetNo 1;#if (@spTargetNo > %numwords(@spTargets,"|")) {#var spTargetNo {1};#add spSpellNo {1}};#if (@spSpellNo > %numwords(@spSpells,"|")) {#t- SpellUp;#SA - - - - DONE - - - -} {SpellPC}} {SpellUp} 132

Also, make sure this script is enabled after you import it.
Celor
Sojourner
Posts: 25
Joined: Thu Jan 16, 2003 6:01 am
Location: Farmingville, NY, USA

problems during spellup

Postby Celor » Wed Feb 25, 2004 3:22 pm

ok this script works great right up until after it casts its first spell... if i have two people to spell up.. it just casts the first spell at the first person.. if i have lets say just one person.. but i want to cast vit and bark.. it only casts the first spell and thats it.. it never says spellup complete or anything like that.. it just craps out after the first spell is cast.. any ideas?
arev
Sojourner
Posts: 2
Joined: Thu Oct 23, 2003 6:33 pm

Postby arev » Thu Mar 18, 2004 2:06 pm

im having the same problem can someone look at this and see whats up? :(
its all about the fantasy not the reality!
Jhorr
Sojourner
Posts: 515
Joined: Sun Feb 25, 2001 6:01 am

Postby Jhorr » Fri Mar 19, 2004 4:18 am

couple preliminary ideas:

1. Make sure you seperate the spell names with the pipe "|" character. I believe spaces on either side of the pipe character are not required.

2. Make sure the spell names are names the MUD recognizes and not your aliases for the spell. For example, although I may use "ds" for c 'dragonscales', I can't use 'ds' when prompted by this trigger set for spell names.

Hope this helps.
old depok
Sojourner
Posts: 572
Joined: Thu Feb 14, 2002 6:01 am
Location: Philadelphia PA USA

Postby old depok » Tue Apr 06, 2004 6:32 pm

OK I imported this and played around with it a bit. When you enter spellup it prompts you to enter the spells. You don't need spaces between the spells but you need a pipe | after each one.

The trigger counts the | s when you enter the spells.

so if you type in Haste|detect i|detect ma it counts only two pipes and will only cast 2 spells (haste and Detect i).

If you type haste|detect i|detect m| it will cast all three.

Other than that it works great (with Jhorr's change to the trigger).

Good luck!

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 16 guests