|
bajella2 Newbie
Joined: 20 Mar 2005 Posts: 4
|
Posted: Mon Apr 11, 2005 4:28 pm
Simple variable problem |
Im writing a script that will cast spells/use skills once I reach a certain level. I tried making a variable called level to set my level.
#VAR {level} {1} {levelset}
Then I have a trigger that when I gain a level, it will add one to the variable.
#TRIGGER {You rise a level!} {#add 1 @level} {levelset}
When I have these two, zMUD creates a new variable called 1 and will keep adding to it, how do I solve this problem? |
|
|
|
Spansh2 Beginner
Joined: 11 Apr 2005 Posts: 10
|
Posted: Mon Apr 11, 2005 4:30 pm |
#add Level 1
|
|
|
|
bajella2 Newbie
Joined: 20 Mar 2005 Posts: 4
|
Posted: Mon Apr 11, 2005 6:23 pm |
heh I tried that before and it didn't work, it;s working now, thanks :)
|
|
|
|
Private Adept
Joined: 10 Jan 2002 Posts: 264 Location: USA
|
Posted: Tue Apr 12, 2005 7:31 am |
i assume you mud has multi classing and that only certain classes gets certain spells, on the mud i play there is even another step... tiers, whereas you tier and can then use spells T-10 levels lower... i came up with this solution for class/level/tier, still needa add a check for whether it is practiced or not...
In this spell: Clerics get aid at 15 as a T0 and Paladins get it at 15
#ALIAS aid {#IF %ismember( Cleric, @current_classes) {
#IF (@current_level >= %eval( 15-(@tier*10))) {
#IF (%1 = "") {starget = self} {starget = %1}
cast 'aid' @starget
}
} {
#IF %ismember( Paladin, @current_classes) {
#IF (@current_level >= %eval( 13-(@tier*10))) {
#IF (%1 = "") {starget = self} {starget = %1}
cast 'aid' @starget
}
}
}
}
upon remorting or tiering, i use an alias to:
additem the @current_classes variable
set @current_level to 1
#ALIAS doremort {current_level = 1;#ADDITEM @current_classes %proper(%1)}
tiering is done with imm interaction and rarely, so i set @tier manually :P
Now if i type or use 'aid' in a script, it'll only attempt a cast if i am a lvl13 cleric or lvl15 paladin (minus the tier adjustment)
As i said, the only addition it needs is to check for practiced, but im too lazy to add, just gotta remember to practice :P |
|
|
|
|
|
|
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
|
|