|
nazradin Apprentice
Joined: 23 Mar 2003 Posts: 114 Location: New Zealand
|
Posted: Thu Apr 10, 2003 12:15 am
spellup script suggestions needed GS3 |
spelling up requires casting around 10 spells multiple times,between each cast I have a 3 second Cast Roundtime. I am wondering what is the best way to approach this?
every time i cast get text script
You gesture.
is it possible to run an alias along the line of
#alais spellup {prep spell1;cast;prep spell2;cast;prep spell3;cast etc etc
and have a trigger
#trigger {You gesture.} {#alarm +3}
so that everytime i cast I get a 3 second pause.. or does it not work like that? as that would be useful for combat spell casting as well.
or is using #FORALL really the only way to approach this?
#VAR spell_list {401|401|406|406|414|414|503|507|507|507|507|508|508|509|509|513|513|905|905|905|905|905|911|911|913|919|919}
#FORALL @spell_list {prep %i;cast;#ALARM +3}
while i sorta understand the #forall how do I get it to run? would i just run it spell_list same as an alias to start it?
Also is there any way to pause a script when running, the spellup script can be above my max mana
can get mana
> mana
Mana Points: 351 remaining: 216 do i need to work out some sort of if pattern so that it pauses untill mana is say above 60 which is cost of most expensive spell or is there a set of key strokes that can pause a script?
cheers Nazradin |
|
|
|
nazradin Apprentice
Joined: 23 Mar 2003 Posts: 114 Location: New Zealand
|
Posted: Thu Apr 10, 2003 4:19 am |
with a loop like this is it better to use an Alarm or to use Pause?
#CLASS {Gemstone|Spells}
#VAR spellrefresh {425|430|920}
#ALIAS spellrefresh {#FORALL @spellrefresh {#VAR commands {%additem{#ALA CT +%%1 {prep @spellrefresh.%i}, @commands)};#VAR commands {%additem( cast, @commands)}}}
#TRIGGER {^You gesture.} {#IF (@commands) {#SEND %item( @commands, 1);#DELNITEM commands 1}}
#CLASS 0
this still isnt working .. on the right track?
nazradin |
|
|
|
nazradin Apprentice
Joined: 23 Mar 2003 Posts: 114 Location: New Zealand
|
Posted: Thu Apr 10, 2003 8:12 am |
now have it appearing error free thanks very much to shalimar, but when i fire spellrefesh in command line nothing happens, not getting any commands being procesed, echo is on.
#CLASS {Gemstone|Spells|Spellup}
#ALIAS spellrefresh {#FORALL @spellrefresh {
#VAR commands {%additem( prep @spellrefresh.%i, @commands)}
#VAR commands {%additem( cast, @commands)}
}}
#VAR spellrefresh {425|430|920}
#TRIGGER {Cast Roundtime %n Seconds.} {#ALARM +%1 {#IF (@commands) {
#SEND %item( @commands, 1)
#DELNITEM commands 1
#IF (@commands) {
#SEND %item( @commands, 1)
#DELNITEM commands 1
}
}}}
#CLASS 0 |
|
|
|
itsmarty Novice
Joined: 29 Jan 2002 Posts: 37 Location: USA
|
Posted: Thu Apr 10, 2003 2:24 pm |
quote: now have it appearing error free thanks very much to shalimar, but when i fire spellrefesh in command line nothing happens
Your alias and your variable are both named spellrefresh. I don't know if that's an issue or not, but if not make sure your class is enabled and that your alias is the first thing on the command line when you type it.
Martin |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4689 Location: Pensacola, FL, USA
|
Posted: Thu Apr 10, 2003 6:06 pm |
I see my mistake.... using %n in the trigger pattern instead of %d
Shalimar
AIM: shalimarwildcat |
|
|
|
nazradin Apprentice
Joined: 23 Mar 2003 Posts: 114 Location: New Zealand
|
Posted: Fri Apr 11, 2003 4:52 am |
#CLASS {Gemstone|Spells|Spellup}
#ALIAS spellrefresher {#FORALL @spellrefresh {
#VAR commands {%additem( prep @spellrefresh.%i, @commands)}
#VAR commands {%additem( cast, @commands)}
}}
#VAR spellrefresh {425|430|920}
#TRIGGER {Cast Roundtime (%d) Seconds.} {#ALARM +%1 {#IF (@commands) {
#SEND %item( @commands, 1)
#DELNITEM commands 1
#IF (@commands) {
#SEND %item( @commands, 1)
#DELNITEM commands 1
}
}}}
#CLASS 0
alais spellrefresher does not start when entered into command line, the trigger now fires when i cast any spell, and does a continuous loop recasting spell 425 over and over , have to quit to stop loop.
same when trigger adjusted to
#TRIGGER {Cast Roundtime (%d) Seconds.} {#ALARM +%1 {#IF (@commands) {
#SEND %item( @commands, 1)
#DELNITEM commands 1
#SEND %item( @commands, 1)
#DELNITEM commands 1
}}}
Nazardin |
|
|
|
nazradin Apprentice
Joined: 23 Mar 2003 Posts: 114 Location: New Zealand
|
Posted: Fri Apr 11, 2003 6:19 am |
different approach
#CLASS {Gemstone|Spells|Spellup}
#ALIAS spellrefresher {#VAR spellnum {%numitems(@spellrefresh);#WHILE (@spellnum > 0) { #VAR commands {%additem( prep @spellrefresh.@spellnum, @commands)};#VAR commands {%additem( cast, @commands)};#ADD spellnum -1}}}
#VAR spellrefresh {425|430|920}
#TRIGGER {Cast Roundtime (%d) Seconds.} {#ALARM +%1 {#IF (@commands) {#SEND %item( @commands, 1);#DELNITEM commands 1;#IF (@commands) {#SEND %item( @commands, 1);#DELNITEM commands 1}}}}
#CLASS 0
gives a syntax error in the alais
{#VAR spellnum {%numitems(@spellrefresh);#WHILE (@spellnum > 0) { #VAR commands {%additem( prep @spellrefresh.@spellnum, @commands)};#VAR commands {%additem( cast, @commands)};#ADD spellnum -1}}}
^ syntax error
anyone see whats wrong?
nazardin |
|
|
|
nazradin Apprentice
Joined: 23 Mar 2003 Posts: 114 Location: New Zealand
|
Posted: Fri Apr 11, 2003 7:00 pm |
well i made a working version but it is far from elegant
#CLASS {Gemstone|Spells}
#ALIAS spellup {prep 401;Cast;#Alarm +3 {prep 406;cast;#Alarm +3 {prep 414;cast;#ALARM +3 {prep 503;cast}}}}
#CLASS 0
there must be a better way , especially when my spellup is 20 plus casts., also havnt got it to work with a temp trigger for cast time
but it gives you idea of what i want to actually do.
Nazradin |
|
|
|
|
|