random attack script

by Unknown

Back to Mechanic's Corner.

Unknown2007-12-17 00:34:18
Okay.. So, I've got a script I tried making.. then I realized I was retarded when it come to coding..

You can Swing and Jab, and I want my hunting alias to randomly choose between the two for some flair.. Here's what I have..

%case(%random(1,2)swing,jab) @target

Its missing something..

On Achaea, it randomly choose bewteen the four staffcasts..

staffcast %case(%random(1,4),dissolution,scintilla,horripilation,lightning) at @target

EDIT: nevermind, I took this from Soll on another thread, and made it my own

#var hunting {swing|jab}
#alias kill {#1 {%item( @hunting, %random( 1, %numitems( @hunting)))}} @target

thanks Soll
Unknown2007-12-17 03:07:35
Don't use #1 as a hack. Use #EXEC, like a real man!
Unknown2007-12-17 03:16:54
Whats the difference?

Also, could someone make this update maxhp/hp when I hit QSC or something?

#CLASS {Autosipping}
#VAR END {351}
#VAR SIPHP {200}
#VAR SIPMP {300}
#VAR SIPEGO {300}
#VAR HP {414}
#VAR MAXHP {414}
#VAR MP {414}
#VAR MAXMP {366}
#VAR WLL {351}
#VAR MAXEGO {}
#VAR POW {333}
#VAR LEV {8}
#VAR LEVRANK {Harmless}
#VAR perlev {71}
#VAR standing {1} {1}
#VAR healbal {0} {1}
#CLASS 0
#VAR health {300}
#VAR mana {200}
#VAR ego {333}
#VAR power {10}
#VAR endurance {2240}
#VAR willpower {2240}

Right now, after each level, I have to go into the variables and manually adjust for the health gain
Unknown2007-12-17 04:31:59
wtf.gif

#wtf{doesall}this mean%

Praise the lawd for palisade.
Forren2007-12-17 04:51:11
QUOTE(Bianca @ Dec 16 2007, 11:31 PM) 466849
wtf.gif

#wtf{doesall}this mean%

Praise the lawd for palisade.

#HELP if you don't know what it does - it can look cryptic at first, but once you do ZScript for a while things become second nature.