Zmud script
*SNIP*
#var mob_targ {0} {0}
#var attr {%if( @mob_targ, @mob_targ, %0)}
#alias {targ} {#var mob_targ %0}
#alias {notarg} {#var mob_targ 0}
#alias {mm} {cast 'magic missile' @attr}
*END SNIP*
Ok, what i'm trying to do here is just save alot of cut and paste and typing, I have several spells aliased with @attr as their final argument, @attr after expanding is an if statement that checks if @mob_targ is true (a value) or false (0). This does work, but it only works if I edit the value of @attr and save, afterwhich it works flawlessly until I close zmud or log in another character. Otherwise it expands the variable but does not execute the %if statement contained. Is there any way I can make this work without having to first edit the variable?
Zmud help with expanding variables containing %if
The #Func is exactly what i'm doing, it creates a named variable with snippets of zMUD scripting within it. I attempted various other commands
%exec
%eval
%show
and none of them created the desired effect. I figure it has somthing to do with zmud only recognizing the variable as an evaluatable piece of script if the variable is created dynamically (hence the fact it works when saved, but not at startup)
Thanks for the tip though Jorus...
%exec
%eval
%show
and none of them created the desired effect. I figure it has somthing to do with zmud only recognizing the variable as an evaluatable piece of script if the variable is created dynamically (hence the fact it works when saved, but not at startup)
Thanks for the tip though Jorus...
Who is online
Users browsing this forum: No registered users and 12 guests