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
Darkwytch
Novice


Joined: 20 Feb 2004
Posts: 41
Location: USA

PostPosted: Tue Jan 18, 2005 8:52 am   

Question about a trigger/script not sure if I post here
 
Hi HI,

I would like to create a trigger/script that will allow me to target a mob or a player and spell them up... and if a spell misses... it would recast till it landed. then i could kill it..

I have an alias that spells me up but it doesnt stop casting if the spells duration cant be extended..


examples would be.. taron would be the target things in brown are what i type into the mud

cast curse tar
You begin to speak the words of the spell...

You have completed your casting.
You lose your concentration.


cast curse tar
You begin to speak the words of the spell...

You have completed your casting.
Taron, Lord Vendredi's assistant glows briefly with a dark crimson aura.

how can i get it to target the mob or player. spell them up and if it misses recast... then after it casts.. move onto the next spell i want it to cast?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Jan 20, 2005 12:19 am   
 
First you need to list the spells you want to cast in a list, like:
#VAR spells {curse|silence|fireball}

Now you set up an alias that will start the process. The alias needs to set up a variable indicating the location in the list you are at currently, cast the first spell and enable a trigger to continue casting after the spell is done:
#ALIAS docasts {#VAR target {%1};#VAR pos 1;#T+ autocast;cast %item(@spells, @pos) @target}

Finally, you need the trigger:
#TRIGGER "autocast" {You have completed your casting.} {}
#COND {(*)} {#IF ("%1" = "You lose your concentration.") {cast %item(@spells, @pos) @target} {#ADD pos 1;#IF (@pos > %numitems(@spells)) {#VAR pos 1;#T- autocast} {cast %item(@spells, @pos) @target}}}

To start the process, you would call the alias like:
docasts Kjata
_________________
Kjata
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