PDA

View Full Version : Martaigne's ZMud Client v2.0



Martaigne
05-30-2008, 02:11 PM
I've just released v2.0 of my suite of scripts for GSIV. Formerly the emulated front-end was nothing more than informational, now most of it is interactive.

This suite of scripts is designed to work together as a cohesive package as a Wizard replacement. It includes: Health, Stamina, Mana, and Spirit guages; Roundtime and Cast Roundtime counters; Stance Indicator; Experience Buffer Gauge; Hands Contents and Prepared Spell Indicators; Position, Condition, and Status Indicators; and a directional Compass that displays available exits, as well as an Wound/Scar indicator.

Screenshot v1.0:
http://www.martaigne.com/images/zmud2.gif

Screenshot v2.0:
http://www.martaigne.com/images/zmudv2.0.jpg

Known Issues:
1) Stamina Gauge is sloppy behind the scenes. This can't be helped because stamina isn't included in the %gsl variables for the Wizard. You must set up an alarm to run every so often to check your stamina, and the #GAG commands *occasionally* miss the stamina stuff, especially during lag.

Credits:
ZMud forums: Fang Xianfu, shibbidy joe, shalimar, Stregone, and GuinnessKMF
GSIV Player's Corner forums: Shaelun, Celephais, Bobmuhthol, Priscius

Thank you!

Martaigne
05-30-2008, 02:13 PM
Changes in 2.0: Cosmetic only.



#CLASS {hands}
#VAR righthand {Empty}
#VAR lefthand {Empty}
#VAR SpellPreped {}
#VAR OldPreped {}
#TRIGGER "righthand" {m} {righthand = %gsl( m)} "" {gsl}
#TRIGGER "lefthand" {l} {lefthand = %gsl( l)} "" {gsl}
#TRIGGER {n} {
#if (@SpellPreped != None) {OldPreped = @SpellPreped}
SpellPreped = %gsl( n)
}
#BUTTON 9 {@lefthand} {} {} {} {} {} {} {Size} {223} {14} {} {} {} {} {} {Separ} {} "" {Explore} {} {lefthand} {4}
#BUTTON 10 {@righthand} {} {} {} {} {} {} {Size} {223} {14} {} {} {} {} {} {Separ} {} "" {Explore} {} {righthand} {4}
#BUTTON 11 {@SpellPreped} {} {} {} {} {} {} {Size} {160} {14} {} {} {} {} {} {Separ} {} "" {Explore} {} {spellprep} {4}
#CLASS 0

Martaigne
05-30-2008, 02:13 PM
This experience buffer, unlike many others, takes into account 'saturated' condition of the mind. The gauge is normally a dark red, but will turn bright red and still appear as not quite full when you have reached your normal capacity. The gauge will still appear as bright red but will be completely full when 'saturated' due to AG quests or RPAs.

Changes in v2.0: Cosmetic, and the gauge is now clickable to issue "exp" command.



#CLASS {gauges|exp}
#VAR mindState {} {}
#VAR exp {0} {0}
#TRIGGER {r} {
#var mindState {%gsl( r)}
#if (@mindState=A) {exp = 0}
#if (@mindState=B) {exp = 1}
#if (@mindState=C) {exp = 2}
#if (@mindState=D) {exp = 3}
#if (@mindState=E) {exp = 4}
#if (@mindState=F) {exp = 5}
#if (@mindState=G) {exp = 6}
#if (@mindState=H) {exp = 7}
} "" {gsl}
#BUTTON 8 {Experience Buffer} {exp} {} {} {@exp} {} {} {Size} {126} {14} {} {} {} {32847} {} {Gauge||4|7|6|0} {} "" {Explore} {} {exp}
#CLASS 0

Martaigne
05-30-2008, 02:14 PM
Changes in v2.0: Cosmetic, and minor logic tweaks.

Roundtime Gauge:


#CLASS {gauges|roundtime}
#VAR roundtime {0}
#VAR RT {4000}
#VAR worldtime {1212119047}
#VAR meanroundTime {1212119013}
#VAR Wait {6}
#VAR roundtimemax {3}
#VAR roundChange {0}
#TRIGGER {...wait &%nWait seconds.} {#var roundtime @wait} "" {case}
#TRIGGER "rtTrig" {q} {
#var worldtime {%gsl( q)}
#if (@firstTime = 0) {
#var startTime {%gsl( q)}
#var firstTime 1
}
#Var roundtime %if( %eval( @meanroundtime-@worldtime) <0, 0, %eval( @meanroundtime-@worldtime))
#if (@roundChange) {
#var roundChange 0
#var roundtimemax @roundtime
}
} "" {gsl}
#TRIGGER (@roundtime>0) {} "" {notrig}
#COND {} {#ADD roundtime -1} {wait|param=1000}
#TRIGGER {Q} {
#Var meanroundTime %gsl( Q)
#Var roundChange 1
} "" {gsl}
#BUTTON 1 {Roundtime: @roundtime} {} {} {} {@roundtime} {} {} {Size} {126} {14} {} {} {} {32847} {} {Gauge||12|@roundtimemax|0|0} {} "" {Explore} {} {roundtime}
#CLASS 0


Cast Roundtime:


#CLASS {gauges|castroundtime}
#VAR castroundtime {0}
#VAR castroundtimemax {3}
#VAR CRT {0}
#TRIGGER {Cast roundtime (%d) seconds.} {
#ADD castroundtime %1
#var castroundtimemax %1
#math CRT @roundtime*1000
}
#TRIGGER (@castroundtime>0) {} "" {notrig}
#COND {} {#ADD castroundtime -1} {wait|param=1000}
#BUTTON 2 {Cast roundtime: @castroundtime} {} {} {} {@castroundtime} {} {} {Size} {126} {14} {} {} {} {31} {} {Gauge||1|@castroundtimemax|0|0} {} "" {Explore} {} {castroundtime}
#CLASS 0

Martaigne
05-30-2008, 02:15 PM
Changes in v2.0: Cosmetic, and clicking the gauge issues a "stance defensive" command when in any other stance, and "stance offensive" when in defensive.



#CLASS {gauges|stance}
#VAR currentStance {100}
#VAR stanceName {Defensive}
#TRIGGER {g} {
#var currentStance {%number( %gsl( g))}
#if (@currentstance = 0) {stanceName = "Offensive"}
#if (@currentstance = 20) {stanceName = "Advanced"}
#if (@currentstance = 40) {stanceName = "Forward"}
#if (@currentstance = 60) {stanceName = "Neutral"}
#if (@currentstance = 80) {stanceName = "Guarded"}
#if (@currentstance = 100) {stanceName = "Defensive"}

} "" {gsl}
#BUTTON 3 {Stance: @stanceName} {#IF (@currentStance < 100) {stance defensive} {stance offensive}} {} {} {@currentStance} {} {} {Size} {126} {14} {} {} {} {32783} {} {Gauge||12|100|0|0} {} "" {Explore} {} {stance}
#CLASS 0

Martaigne
05-30-2008, 02:16 PM
Changes in v2.0: Cosmetic, stamina monitor now accounts for death using the condition monitor, stamina monitor no longer gags "stamina" command results all the time, and clicking each gauge will issue a command according to the type of gauge, "health", "stamina", "mana", "spirit".



#CLASS {gauges|stats}
#VAR maxstamina {0} {0}
#VAR stamina {91}
#ALARM "staminaAlarm" {*10} {
#IF (@cond6 <> "DEAD!! ") {
stamina
#GAG
#T+ staminagag
}
}
#TRIGGER {You feel fully energetic again.} {@stamina = @maxstamina}
#BUTTON 4 {Health: @hp/@maxhp} {health} {} {} {@hp} {} {} {Size} {126} {14} {} {} {} {47} {} {Gauge||12|@maxhp|@maxhp/4|0} {} "" {Explore} {} {health} {2}
#BUTTON 5 {Stamina: @stamina/@maxstamina} {stamina} {} {} {@stamina} {} {} {Size} {126} {14} {} {} {} {111} {} {Gauge||12|@maxstamina|@maxstamina/4|0} {} "" {Explore} {} {stamina} {2}
#BUTTON 6 {Mana: @mana/@maxmana} {mana} {} {} {@mana} {} {} {Size} {126} {14} {} {} {} {63} {} {Gauge||12|@maxmana|@maxmana/4|0} {} "" {Explore} {} {mana} {2}
#BUTTON 7 {Spirit: @spirit/@maxspirit} {spirit} {} {} {@spirit} {} {} {Size} {126} {14} {} {} {} {31} {} {Gauge||12|@maxspirit|@maxspirit/4|0} {} "" {Explore} {} {spirit} {2}
#CLASS 0
#CLASS {gauges|stats|staminagag} {disable}
#TRIGGER {Stamina points: %1 remaining: %2} {
#var stamina %2
#var maxstamina %1
#GAG
#GAG -1
#T- staminagag
}
#CLASS 0

Martaigne
05-30-2008, 02:16 PM
Changes in v2.0: Cosmetic, changed "None" to "Normal".



#CLASS {gauges|status}
#VAR pos {T}
#VAR cpos {T}
#VAR position {Standing}
#VAR status1 {}
#VAR status2 {}
#VAR status3 {}
#VAR status4 {}
#VAR cond1 {}
#VAR cond2 {}
#VAR cond3 {}
#VAR cond4 {}
#VAR cond5 {}
#VAR cond6 {}
#VAR status0 {Normal}
#VAR cond0 {Normal}
#VAR standing {0}
#VAR nostatus {0}
#VAR nocond {0}
#TRIGGER {P} {
#var pos %gsl( P)
#var standing {0}
#var nostatus {0}
#var nocond {0}
#if (@pos=@cpos) {#abort 1}
#if (%pos( J, @pos)>0) {
#var status1 "Invisible "
#var status0 ""
} {
#var status1 ""
#add nostatus 1
}
#if (%pos( D, @pos)>0) {
#var status2 "Invisible "
#var status0 ""
} {
#var status2 ""
#add nostatus 1
}
#if (%pos( N, @pos)>0) {
#var status3 "Hidden "
#var status0 ""
} {
#var status3 ""
#add nostatus 1
}
#if (%pos( P, @pos)>0) {
#var status4 "Grouped "
#var status0 ""
} {
#var status4 ""
#add nostatus 1
}
#if (%pos( O, @pos)>0) {
#var cond1 "Bleeding! "
#var cond0 ""
} {
#var cond1 ""
#add nocond 1
}
#if (%pos( W, @pos)>0) {
#var cond2 "Bandaged "
#var cond0 ""
} {
#var cond2 ""
#add nocond 1
}
#if (%pos( I, @pos)>0) {
#var cond3 "Stunned! "
#var cond0 ""
} {
#var cond3 ""
#add nocond 1
}
#if (%pos( M, @pos)>0) {
#var cond4 "Unconscious! "
#var cond0 ""
} {
#var cond4 ""
#add nocond 1
}
#if (%pos( C, @pos)>0) {
#var cond5 "Webbed! "
#var cond0 ""
} {
#var cond5 ""
#add nocond 1
}
#if (%pos( B, @pos)>0) {
#var cond6 "DEAD!! "
#var cond0 ""
} {
#var cond6 ""
#add nocond 1
}
#if (%pos( G, @pos)>0) {#var position "Prone"} {#add standing 1}
#if (%pos( H, @pos)>0) {#var position "Seated"} {#add standing 1}
#if (%pos( GH, @pos)>0) {#var position "Kneeling"} {#add standing 1}
#if (@standing = 3) {#var position "Standing"}
#if (@nostatus = 4) {#var status0 "Normal"}
#if (@nocond = 6) {#var cond0 "Normal"}
#var cpos {@pos}
} "" {gsl}
#BUTTON 12 {Position: @position} {} {} {} {} {} {} {Size} {90} {14} {} {} {} {} {} {Separ} {} "" {Explore} {} {position} {3}
#BUTTON 13 {Status: @status0@status1@status2@status3@status4} {} {} {} {} {} {} {Size} {200} {14} {} {} {} {} {} {Separ} {} "" {Explore} {} {status} {3}
#BUTTON 14 {Condition: @cond0@cond1@cond2@cond3@cond4@cond5@cond6} {} {} {} {} {} {} {Size} {216} {14} {} {} {} {} {} {Separ} {} "" {Explore} {} {condition} {3}
#CLASS 0

Martaigne
05-30-2008, 02:17 PM
Changes in v2.0: Cosmetic, each direction is now clickable to go in that direction, and center button is now clickable for a "look" command.



#CLASS {compass}
#ALIAS ShowExits {
#call %btnenable(northwest,%ismember(nw,%1))
#call %btnenable(north,%ismember(n,%1))
#call %btnenable(northeast,%ismember(ne,%1))
#call %btnenable(west,%ismember(w,%1))
#call %btnenable(east,%ismember(e,%1))
#call %btnenable(southwest,%ismember(sw,%1))
#call %btnenable(south,%ismember(s,%1))
#call %btnenable(southeast,%ismember(se,%1))
#call %btnenable(down,%ismember(d,%1))
#call %btnenable(up,%ismember(u,%1))
#call %btnenable(out,%ismember(out,%1))
}
#VAR roomMoved {1}
#TRIGGER {j} {
ShowExits {%2}
#var roomMoved 1
} "" {gsl}
#BUTTON 15 {NW} {northwest} {} {} {} {} {} {Size} {25} {14} {} {} {} {30} {} {} {} "" {Explore} {} {northwest} {3}
#BUTTON 16 {N} {north} {} {} {} {} {} {Size} {25} {14} {} {} {} {30} {} {} {} "" {Explore} {} {north} {3}
#BUTTON 17 {NE} {northeast} {} {} {} {} {} {Size} {25} {14} {} {} {} {30} {} {} {} "" {Explore} {} {northeast} {3}
#BUTTON 18 {W} {west} {} {} {} {} {} {Size} {25} {14} {} {} {} {30} {} {} {} "" {Explore} {} {west} {2}
#BUTTON 19 {L} {look} {} {} {} {} {} {Size} {25} {14} {} {} {} {} {} {} {} "" {Explore} {} {center} {2}
#BUTTON 20 {E} {east} {} {} {} {} {} {Size} {25} {14} {} {} {} {30} {} {} {} "" {Explore} {} {east} {2}
#BUTTON 21 {SW} {southwest} {} {} {} {} {} {Size} {25} {14} {} {} {} {30} {} {} {} "" {Explore} {} {southwest}
#BUTTON 22 {S} {south} {} {} {} {} {} {Size} {25} {14} {} {} {} {30} {} {} {} "" {Explore} {} {south}
#BUTTON 23 {SE} {southeast} {} {} {} {} {} {Size} {25} {14} {} {} {} {30} {} {} {} "" {Explore} {} {southeast}
#BUTTON 24 {U} {up} {} {} {} {} {} {Size} {25} {14} {} {} {} {30} {} {} {} "" {Explore} {} {up} {3}
#BUTTON 25 {O} {out} {} {} {} {} {} {Size} {25} {14} {} {} {} {30} {} {} {} "" {Explore} {} {out} {2}
#BUTTON 26 {D} {down} {} {} {} {} {} {Size} {25} {14} {} {} {} {30} {} {} {} "" {Explore} {} {down}
#CLASS 0

Martaigne
05-30-2008, 02:18 PM
Changes in v2.0: Cosmetic, clicking the wound indicator will now attempt to heal the wound/scare with herbs.

Caveats:
1) A #VAR named @gearcontainer that holds the string value of your herb storage container is required. This is important!
2) This currently assumes the user is not currently in Roundtime to begin with, and also assumes that the required herbs are in inventory. I have plans to tweak in a check for RT and variables that hold current herbs in inventory in a future release.
3) I am still working on code to deal with severed limbs. Missing eyes are in testing in this release.


#CLASS {gear}
#VAR gearcontainer {pack}
#CLASS 0


#CLASS {wounds}
#ALIAS healdown {
#IF (%1 = "scar") {
#IF (%2 = 1 AND %3 = "organ") {healorganminorscar}
#IF (%2 > 1 AND %3 = "organ") {healorganmajorscar}
#IF (%2 = 3 AND %3 = "eye") {healeyemissing}
#IF (%2 = 1 AND %3 = "limb") {heallimbminorscar}
#IF (%2 = 2 AND %3 = "limb") {heallimbmajorscar}
#IF (%2 = 3 AND %3 = "limb") {heallimbmissing}
#IF (%2 = 1 AND %3 = "headneck") {healheadneckminorscar}
#IF (%2 > 1 AND %3 = "headneck") {healheadneckmajorscar}
#IF (%2 = 1 AND %3 = "nerve") {healnerveminorscar}
#IF (%2 > 1 AND %3 = "nerve") {healnervemajorscar}
}
#IF (%1 = "wound") {
#IF (%2 = 1 AND %3 = "organ") {healorganminorwound}
#IF (%2 > 1 AND %3 = "organ") {healorganmajorwound}
#IF (%2 = 1 AND %3 = "limb") {heallimbminorwound}
#IF (%2 > 1 AND %3 = "limb") {heallimbmajorwound}
#IF (%2 = 1 AND %3 = "headneck") {healheadneckminorwound}
#IF (%2 > 1 AND %3 = "headneck") {healheadneckmajorwound}
#IF (%2 = 1 AND %3 = "nerve") {healnerveminorwound}
#IF (%2 > 1 AND %3 = "nerve") {healnervemajorwound}
}
}
#ALIAS healorganmajorwound {
open my @gearcontainer
#WAIT
get my pothinir grass
#WAIT
eat my pothinir grass
#T+ rttrigger
}
#ALIAS healorganminorwound {
open my @gearcontainer
#WAIT
get my basal moss
#WAIT
eat my basal moss
#T+ rttrigger
}
#ALIAS heallimbmajorwound {
open my @gearcontainer
#WAIT
get my ephlox moss
#WAIT
eat my ephlox moss
#T+ rttrigger
}
#ALIAS heallimbminorwound {
open my @gearcontainer
#WAIT
get my ambrominas leaf
#WAIT
eat my ambrominas leaf
#T+ rttrigger
}
#ALIAS healorganmajorscar {
open my @gearcontainer
#WAIT
get my wingstem potion
#WAIT
drink my wingstem potion
#T+ rttrigger
}
#ALIAS healorganminorscar {
open my @gearcontainer
#WAIT
get my talneo potion
#WAIT
drink my talneo potion
#T+ rttrigger
}
#ALIAS heallimbmissing {
open my @gearcontainer
#WAIT
get my sovyn clove
#WAIT
eat my sovyn clove
#T+ rttrigger
}
#ALIAS healeyemissing {
open my @gearcontainer
#WAIT
get my bur-clover potion
#WAIT
drink my bur-clover potion
#T+ rttrigger
}
#ALIAS heallimbminorscar {
open my @gearcontainer
#WAIT
get my cactacae spine
#WAIT
eat my cactacae spine
#T+ rttrigger
}
#ALIAS heallimbmajorscar {
open my @gearcontainer
#WAIT
get my calamia fruit
#WAIT
eat my calamia fruit
#T+ rttrigger
}
#ALIAS healheadneckminorwound {
open my @gearcontainer
#WAIT
get my rose-marrow potion
#WAIT
drink my rose-marrow potion
#T+ rttrigger
}
#ALIAS healheadneckmajorwound {
open my @gearcontainer
#WAIT
get my aloeas stem
#WAIT
eat my aloeas stem
#T+ rttrigger
}
#ALIAS healheadneckmajorscar {
open my @gearcontainer
#WAIT
get my brostheras potion
#WAIT
drink my brostheras potion
#T+ rttrigger
}
#ALIAS healheadneckminorscar {
open my @gearcontainer
#WAIT
get my haphip root
#WAIT
eat my haphip root
#T+ rttrigger
}
#ALIAS healnerveminorwound {
open my @gearcontainer
#WAIT
get my wolifrew lichen
#WAIT
eat my wolifrew lichen
#T+ rttrigger
}
#ALIAS healnervemajorwound {
open my @gearcontainer
#WAIT
get my bolmara potion
#WAIT
drink my bolmara potion
#T+ rttrigger
}
#ALIAS healnervemajorscar {
open my @gearcontainer
#WAIT
get my woth flower
#WAIT
eat my woth flower
#T+ rttrigger
}
#ALIAS healnerveminorscar {
open my @gearcontainer
#WAIT
get my torban leaf
#WAIT
eat my torban leaf
#T+ rttrigger
}
#VAR HeadWound {0}
#VAR WSIndicator {Wounds} {Wounds}
#VAR NerveWound {0}
#VAR NeckWound {0}
#VAR REyeWound {0}
#VAR LEyeWound {0}
#VAR RArmWound {0}
#VAR LArmWound {0}
#VAR RLegWound {0}
#VAR LLegWound {0}
#VAR RHandWound {0}
#VAR LHandWound {0}
#VAR ChestWound {0}
#VAR BackWound {0}
#VAR AbsWound {0}
#VAR StartWounds {0000000000000000000000000000}
#VAR StartScars {0000000000000000000000000000}
#VAR dec2bin {%if( "%1"!="0", %concat( @dec2bin(%eval(%1/2)), %mod( %1, 2)))}
#VAR NewWound {00}
#VAR HeadScar {0}
#VAR NerveScar {0}
#VAR NeckScar {0}
#VAR REyeScar {0}
#VAR LEyeScar {0}
#VAR RArmScar {0}
#VAR LArmScar {0}
#VAR RLegScar {0}
#VAR LLegScar {0}
#VAR RHandScar {0}
#VAR LHandScar {0}
#VAR ChestScar {0}
#VAR BackScar {0}
#VAR AbsScar {0}
#VAR extendbin {%concat( %repeat( "0", 28-%len( %1)), %1)}
#VAR pow {%if( %2 > 0, %eval( %1 * @pow(%1, %eval(%2-1))), 1)}
#VAR any2dec {%if( %len( %1)>0, %eval( %eval( %ismember( %left( %1, 1), {0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O |P|Q|R|S|T|U|V|W|X|Y|Z})-1)*@pow(%2,%eval(%len(%1)-1))+@any2dec(%right(%1,1),%2)), 0)}
#VAR NewWounds {0000000000000000000000000000}
#VAR NewScars {0000000000000000000000000000}
#VAR lasteatenherb {ambrominas leaf}
#TRIGGER {a} {
#VAR NewWounds {@extendbin(@dec2bin(%gsl(a)))}
#VAR HeadWound {@any2dec(%right(@NewWounds,26),2)}
#VAR NeckWound {@any2dec(%left(%right(@NewWounds,24),2),2)}
#VAR RArmWound {@any2dec(%left(%right(@NewWounds,22),2),2)}
#VAR LArmWound {@any2dec(%left(%right(@NewWounds,20),2),2)}
#VAR RLegWound {@any2dec(%left(%right(@NewWounds,18),2),2)}
#VAR LLegWound {@any2dec(%left(%right(@NewWounds,16),2),2)}
#VAR RHandWound {@any2dec(%left(%right(@NewWounds,14),2),2)}
#VAR LHandWound {@any2dec(%left(%right(@NewWounds,12),2),2)}
#VAR ChestWound {@any2dec(%left(%right(@NewWounds,10),2),2)}
#VAR AbsWound {@any2dec(%left(%right(@NewWounds,8),2),2)}
#VAR BackWound {@any2dec(%left(%right(@NewWounds,6),2),2)}
#VAR REyeWound {@any2dec(%left(%right(@NewWounds,4),2),2)}
#VAR LEyeWound {@any2dec(%left(%right(@NewWounds,2),2),2)}
#VAR NerveWound {@any2dec(%left(@NewWounds,2),2)}
} "" {gsl}
#TRIGGER {V} {
#VAR StartWounds {@extendbin(@dec2bin(%left(%right(%gsl(V), 60),10)))}
#VAR StartScars {@extendbin(@dec2bin(%right(%gsl(V),70)))}
#VAR HeadWound {@any2dec(%right(@StartWounds,26),2)}
#VAR NeckWound {@any2dec(%left(%right(@StartWounds,24),2),2)}
#VAR RArmWound {@any2dec(%left(%right(@StartWounds,22),2),2)}
#VAR LArmWound {@any2dec(%left(%right(@StartWounds,20),2),2)}
#VAR RLegWound {@any2dec(%left(%right(@StartWounds,18),2),2)}
#VAR LLegWound {@any2dec(%left(%right(@StartWounds,16),2),2)}
#VAR RHandWound {@any2dec(%left(%right(@StartWounds,14),2),2)}
#VAR LHandWound {@any2dec(%left(%right(@StartWounds,12),2),2)}
#VAR ChestWound {@any2dec(%left(%right(@StartWounds,10),2),2)}
#VAR AbsWound {@any2dec(%left(%right(@StartWounds,8),2),2)}
#VAR BackWound {@any2dec(%left(%right(@StartWounds,6),2),2)}
#VAR REyeWound {@any2dec(%left(%right(@StartWounds,4),2),2)}
#VAR LEyeWound {@any2dec(%left(%right(@StartWounds,2),2),2)}
#VAR NerveWound {@any2dec(%left(@StartWounds,2),2)}
#VAR HeadScar {@any2dec(%right(@StartScars,26),2)}
#VAR NeckScar {@any2dec(%left(%right(@StartScars,24),2),2)}
#VAR RArmScar {@any2dec(%left(%right(@StartScars,22),2),2)}
#VAR LArmScar {@any2dec(%left(%right(@StartScars,20),2),2)}
#VAR RLegScar {@any2dec(%left(%right(@StartScars,18),2),2)}
#VAR LLegScar {@any2dec(%left(%right(@StartScars,16),2),2)}
#VAR RHandScar {@any2dec(%left(%right(@StartScars,14),2),2)}
#VAR LHandScar {@any2dec(%left(%right(@StartScars,12),2),2)}
#VAR ChestScar {@any2dec(%left(%right(@StartScars,10),2),2)}
#VAR AbsScar {@any2dec(%left(%right(@StartScars,8),2),2)}
#VAR BackScar {@any2dec(%left(%right(@StartScars,6),2),2)}
#VAR REyeScar {@any2dec(%left(%right(@StartScars,4),2),2)}
#VAR LEyeScar {@any2dec(%left(%right(@StartScars,2),2),2)}
#VAR NerveScar {@any2dec(%left(@StartScars,2),2)}
} "" {gsl}
#TRIGGER {b} {
#VAR NewScars {@extendbin(@dec2bin(%gsl(b)))}
#VAR HeadScar {@any2dec(%right(@NewScars,26),2)}
#VAR NeckScar {@any2dec(%left(%right(@NewScars,24),2),2)}
#VAR RArmScar {@any2dec(%left(%right(@NewScars,22),2),2)}
#VAR LArmScar {@any2dec(%left(%right(@NewScars,20),2),2)}
#VAR RLegScar {@any2dec(%left(%right(@NewScars,18),2),2)}
#VAR LLegScar {@any2dec(%left(%right(@NewScars,16),2),2)}
#VAR RHandScar {@any2dec(%left(%right(@NewScars,14),2),2)}
#VAR LHandScar {@any2dec(%left(%right(@NewScars,12),2),2)}
#VAR ChestScar {@any2dec(%left(%right(@NewScars,10),2),2)}
#VAR AbsScar {@any2dec(%left(%right(@NewScars,8),2),2)}
#VAR BackScar {@any2dec(%left(%right(@NewScars,6),2),2)}
#VAR REyeScar {@any2dec(%left(%right(@NewScars,4),2),2)}
#VAR LEyeScar {@any2dec(%left(%right(@NewScars,2),2),2)}
#VAR NerveScar {@any2dec(%left(@NewScars,2),2)}
} "" {gsl}
#BUTTON 27 {L Eye} {
#IF (@LEyeWound > 0) {healdown wound @LEyeWound organ}
#IF (@LEyeWound = 0) {#ECHO No injury on your left eye.}
} {} {} {@LEyeWound} {} {} {Size} {38} {14} {} {} {} {32847} {} {Gauge||4|3|2|0} {} "" {Explore} {} {LEyeWound} {4}
#BUTTON 28 {Head} {
#IF (@HeadWound > 0) {healdown wound @HeadWound headneck}
#IF (@HeadWound = 0) {#ECHO No injury on your head.}
} {} {} {@HeadWound} {} {} {Size} {38} {14} {} {} {} {32847} {} {Gauge||4|3|2|0} {} "" {Explore} {} {HeadWound} {4}
#BUTTON 29 {Neck} {
#IF (@NeckWound > 0) {healdown wound @NeckWound headneck}
#IF (@NeckWound = 0) {#ECHO No injury on your neck.}
} {} {} {@NeckWound} {} {} {Size} {38} {14} {} {} {} {32847} {} {Gauge||4|3|2|0} {} "" {Explore} {} {NeckWound} {4}
#BUTTON 30 {R Eye} {
#IF (@REyeWound > 0) {healdown wound @REyeWound organ}
#IF (@REyeWound = 0) {#ECHO No injury on your right eye.}
} {} {} {@REyeWound} {} {} {Size} {38} {14} {} {} {} {32847} {} {Gauge||4|3|2|0} {} "" {Explore} {} {REyeWound} {4}
#BUTTON 31 {L Arm} {
#IF (@LArmWound > 0) {healdown wound @LArmWound limb}
#IF (@LArmWound = 0) {#ECHO No injury on your left arm.}
} {} {} {@LArmWound} {} {} {Size} {38} {14} {} {} {} {32847} {} {Gauge||4|3|2|0} {} "" {Explore} {} {LArmWound} {3}
#BUTTON 32 {Chest} {
#IF (@ChestWound > 0) {healdown wound @ChestWound organ}
#IF (@ChestWound = 0) {#ECHO No injury on your chest.}
} {} {} {@ChestWound} {} {} {Size} {38} {14} {} {} {} {32847} {} {Gauge||4|3|2|0} {} "" {Explore} {} {ChestWound} {3}
#BUTTON 33 {Nerve} {
#IF (@NerveWound > 0) {healdown wound @NerveWound nerve}
#IF (@NerveWound = 0) {#ECHO No injury on your nerves.}
} {} {} {@NerveWound} {} {} {Size} {38} {14} {} {} {} {32847} {} {Gauge||4|3|2|0} {} "" {Explore} {} {NerveWound} {3}
#BUTTON 34 {R Arm} {
#IF (@RArmWound > 0) {healdown wound @RArmWound limb}
#IF (@RArmWound = 0) {#ECHO No injury on your right arm.}
} {} {} {@RArmWound} {} {} {Size} {38} {14} {} {} {} {32847} {} {Gauge||4|3|2|0} {} "" {Explore} {} {RArmWound} {3}
#BUTTON 35 {LHand} {
#IF (@LHandWound > 0) {healdown wound @LHandWound limb}
#IF (@LHandWound = 0) {#ECHO No injury on your left hand.}
} {} {} {@LHandWound} {} {} {Size} {38} {14} {} {} {} {32847} {} {Gauge||4|3|2|0} {} "" {Explore} {} {LHandWound} {2}
#BUTTON 36 {Abs} {
#IF (@AbsWound > 0) {healdown wound @AbsWound organ}
#IF (@AbsWound = 0) {#ECHO No injury on your abdomen.}
} {} {} {@AbsWound} {} {} {Size} {38} {14} {} {} {} {32847} {} {Gauge||4|3|2|0} {} "" {Explore} {} {AbsWound} {2}
#BUTTON 37 {Back} {
#IF (@BackWound > 0) {healdown wound @BackWound organ}
#IF (@BackWound = 0) {#ECHO No injury on your back.}
} {} {} {@BackWound} {} {} {Size} {38} {14} {} {} {} {32847} {} {Gauge||4|3|2|0} {} "" {Explore} {} {BackWound} {2}
#BUTTON 38 {RHand} {
#IF (@RHandWound > 0) {healdown wound @RHandWound limb}
#IF (@RHandWound = 0) {#ECHO No injury on your right hand.}
} {} {} {@RHandWound} {} {} {Size} {38} {14} {} {} {} {32847} {} {Gauge||4|3|2|0} {} "" {Explore} {} {RHandWound} {2}
#BUTTON 39 {L Leg} {
#IF (@LLegWound > 0) {healdown wound @LLegWound limb}
#IF (@LLegWound = 0) {#ECHO No injury on your left leg.}
} {} {} {@LLegWound} {} {} {Size} {38} {14} {} {} {} {32847} {} {Gauge||4|3|2|0} {} "" {Explore} {} {LLegWound}
#BUTTON 40 {Wounds} {health} {Scars} {} {} {} {} {Size} {80} {14} {} {} {} {} {} {} {} "" {Explore} {} {spacer}
#BUTTON 41 {R Leg} {
#IF (@RLegWound > 0) {healdown wound @RLegWound limb}
#IF (@RLegWound = 0) {#ECHO No injury on your right leg.}
} {} {} {@RLegWound} {} {} {Size} {38} {14} {} {} {} {32847} {} {Gauge||4|3|2|0} {} "" {Explore} {} {RLegWound}
#BUTTON 42 {L Eye} {
#IF (@LEyeWound > 0) {#ECHO You must heal your left eye wounds first.} {
#IF (@LEyeScar = 3) {healdown scar @LEyeScar eye}
#IF (@LEyeScar > 0 AND @LEyeScar < 3) {healdown scar @LEyeScar organ}
#IF (@LEyeScar = 0) {#ECHO No scar on your left eye.}
}
} {} {} {@LEyeScar} {} {} {Size} {38} {14} {} {} {} {32863} {} {Gauge||5|3|2|0} {} "" {Explore} {} {LEyeScar} {4}
#BUTTON 43 {Head} {
#IF (@HeadWound > 0) {#ECHO You must heal your head wounds first.} {
#IF (@HeadScar > 0) {healdown scar @HeadScar headneck}
#IF (@HeadScar = 0) {#ECHO No scar on your head.}
}
} {} {} {@HeadScar} {} {} {Size} {38} {14} {} {} {} {32863} {} {Gauge||5|3|2|0} {} "" {Explore} {} {HeadScar} {4}
#BUTTON 44 {Neck} {
#IF (@NeckWound > 0) {#ECHO You must heal your neck wounds first.} {
#IF (@NeckScar > 0) {healdown scar @NeckScar headneck}
#IF (@NeckScar = 0) {#ECHO No scar on your neck.}
}
} {} {} {@NeckScar} {} {} {Size} {38} {14} {} {} {} {32863} {} {Gauge||5|3|2|0} {} "" {Explore} {} {NeckScar} {4}
#BUTTON 45 {R Eye} {
#IF (@REyeWound > 0) {#ECHO You must heal your right eye wounds first.} {
#IF (@REyeScar = 3) {healdown scar @REyeScar eye}
#IF (@REyeScar > 0 AND @REyeScar < 3) {healdown scar @REyeScar organ}
#IF (@REyeScar = 0) {#ECHO No scar on your right eye.}
}
} {} {} {@REyeScar} {} {} {Size} {38} {14} {} {} {} {32863} {} {Gauge||5|3|2|0} {} "" {Explore} {} {REyeScar} {4}
#BUTTON 46 {L Arm} {
#IF (@LArmWound > 0) {#ECHO You must heal your left arm first.} {
#IF (@LArmScar > 0) {healdown scar @LArmScar limb}
#IF (@LArmScar = 0) {#ECHO No scar on your left arm.}
}
} {} {} {@LArmScar} {} {} {Size} {38} {14} {} {} {} {32863} {} {Gauge||5|3|2|0} {} "" {Explore} {} {LArmScar} {3}
#BUTTON 47 {Chest} {
#IF (@ChestWound > 0) {#ECHO You must heal your chest wounds first.} {
#IF (@ChestScar > 0) {healdown scar @ChestScar organ}
#IF (@ChestScar = 0) {#ECHO No scar on your chest.}
}
} {} {} {@ChestScar} {} {} {Size} {38} {14} {} {} {} {32863} {} {Gauge||5|3|2|0} {} "" {Explore} {} {ChestScar} {3}
#BUTTON 48 {Nerve} {
#IF (@NerveWound > 0) {#ECHO You must heal your nerve wounds first.} {
#IF (@NerveScar > 0) {healdown scar @NerveScar nerve}
#IF (@NerveScar = 0) {#ECHO No scar on your nerves.}
}
} {} {} {@NerveScar} {} {} {Size} {38} {14} {} {} {} {32863} {} {Gauge||5|3|2|0} {} "" {Explore} {} {NerveScar} {3}
#BUTTON 49 {R Arm} {
#IF (@RArmWound > 0) {#ECHO You must heal your right arm first.} {
#IF (@RArmScar > 0) {healdown scar @RArmScar limb}
#IF (@RArmScar = 0) {#ECHO No scar on your right arm.}
}
} {} {} {@RArmScar} {} {} {Size} {38} {14} {} {} {} {32863} {} {Gauge||5|3|2|0} {} "" {Explore} {} {RArmScar} {3}
#BUTTON 50 {LHand} {
#IF (@LHandWound > 0) {#ECHO You must heal your left hand first.} {
#IF (@LHandScar > 0) {healdown scar @LHandScar limb}
#IF (@LHandScar = 0) {#ECHO No scar on your left hand.}
}
} {} {} {@LHandScar} {} {} {Size} {38} {14} {} {} {} {32863} {} {Gauge||5|3|2|0} {} "" {Explore} {} {LHandScar} {2}
#BUTTON 51 {Abs} {
#IF (@AbsWound > 0) {#ECHO You must heal your abdomen wounds first.} {
#IF (@AbsScar > 0) {healdown scar @AbsScar organ}
#IF (@AbsScar = 0) {#ECHO No scar on your abdomen.}
}
} {} {} {@AbsScar} {} {} {Size} {38} {14} {} {} {} {32863} {} {Gauge||5|3|2|0} {} "" {Explore} {} {AbsScar} {2}
#BUTTON 52 {Back} {
#IF (@BackWound > 0) {#ECHO You must heal your back wounds first.} {
#IF (@BackScar > 0) {healdown scar @BackScar organ}
#IF (@BackScar = 0) {#ECHO No scar on your back.}
}
} {} {} {@BackScar} {} {} {Size} {38} {14} {} {} {} {32863} {} {Gauge||5|3|2|0} {} "" {Explore} {} {BackScar} {2}
#BUTTON 53 {RHand} {
#IF (@RHandWound > 0) {#ECHO You must heal your right hand first.} {
#IF (@RHandScar > 0) {healdown scar @RHandScar limb}
#IF (@RHandScar = 0) {#ECHO No scar on your right hand.}
}
} {} {} {@RHandScar} {} {} {Size} {38} {14} {} {} {} {32863} {} {Gauge||5|3|2|0} {} "" {Explore} {} {RHandScar} {2}
#BUTTON 54 {L Leg} {
#IF (@LLegWound > 0) {#ECHO You must heal your left leg first.} {
#IF (@LLegScar > 0) {healdown scar @LLegScar limb}
#IF (@LLegScar = 0) {#ECHO No scar on your left leg.}
}
} {} {} {@LLegScar} {} {} {Size} {38} {14} {} {} {} {32863} {} {Gauge||5|3|2|0} {} "" {Explore} {} {LLegScar}
#BUTTON 55 {Scars} {health} {Scars} {} {} {} {} {Size} {80} {14} {} {} {} {} {} {} {} "" {Explore} {} {spacer2}
#BUTTON 56 {R Leg} {
#IF (@RLegWound > 0) {#ECHO You must heal your right leg first.} {
#IF (@RLegScar > 0) {healdown scar @RLegScar limb}
#IF (@RLegScar = 0) {#ECHO No scar on your right leg.}
}
} {} {} {@RLegScar} {} {} {Size} {38} {14} {} {} {} {32863} {} {Gauge||5|3|2|0} {} "" {Explore} {} {RLegScar}
#CLASS 0
#CLASS {wounds|rttrigger} {disable}
#TRIGGER {You take a {bite of|drink from} your %1.} {lasteatenherb = %1}
#COND {q} {
#MATH int_waitfor {@roundtime+1}
#ALARM +@int_waitfor {
put my @lasteatenherb in my @gearcontainer
#ALARM +1 {close my @gearcontainer}
}
#T- rttrigger
} {gsl}
#CLASS 0

Martaigne
05-30-2008, 02:19 PM
This is an EXPERIMENTAL feature only. Currently it works ONLY with surge of strength cman and pure potions for bravery. You may edit and expand this script as you like.

How it works:
Enter the command alias "autobuff on" to turn it on. Of course, "autobuff off" turns it off. It will safely renew surge of strength without straining your muscles.

Known issues:
Occasionally the cman surge command will attempt to fire just as you perform an action that causes RT and will fail. I will be adding error checking to this later, but it usually only happens during game lag.

I plan to update this when I release v3.0 of the scripts, which will be configurable to which spells/cmans/sigils/signs/symbols/etc will be renewable.



#CLASS {combat|autobuffing}
#ALIAS autobuff {
#if ("%1" = "on") {
#T+ autobuff
#ECHO AutoBuff refresh ON.
#VAR buffstatus "ON"
#ECHO Starting Surge of Strength.
cman surge
#WAIT
#ECHO Starting Bravery.
#WAIT
open my pack
#WAIT
get my pure potion from my pack
#WAIT
drink my potion
#WAIT
put potion in my pack
#WAIT
close my pack
#WAIT
}
#if ("%1" = "off") {
#T- autobuff
#ECHO AutoBuff refresh OFF.
#VAR buffstatus "OFF"
}
}
#VAR buffstatus {OFF} {OFF}
#VAR surgeactive {NO} {NO}
#VAR braveryactive {NO} {NO}
#TRIGGER {You feel less confident.} {#IF (@buffstatus = "OFF") {#VAR braveryactive "NO"}}
#TRIGGER {You begin to lose touch with your internal sources of strength.} {#IF (@buffstatus = "OFF") {#VAR surgeactive "NO"}}
#STAT {AutoBuff: @buffstatus | Surge: @surgeactive | Bravery: @braveryactive}
#CLASS 0
#CLASS {combat|autobuffing|autobuff} {disable}
#TRIGGER {Your internal strength fully recovers from your most recent attempt to tap into it.} {
#COLOR yellow
#WAIT (@roundtime * 1000)
#IF (@buffstatus = "ON" AND @cond6 <> "DEAD!! ") {cman surge}
}
#TRIGGER {You focus deep within yourself, searching for untapped sources of strength.} {
#COLOR yellow
#VAR surgeactive "YES"
}
#TRIGGER {You begin to lose touch with your internal sources of strength.} {
#COLOR yellow
#VAR surgeactive "NO"
}
#TRIGGER {You feel more confident.} {
#COLOR yellow
#VAR braveryactive "YES"
}
#TRIGGER {You feel less confident.} {
#COLOR yellow
#VAR braveryactive "NO"
#IF (@buffstatus = "ON" AND @cond6 <> "DEAD!! ") {
#WAIT (@roundtime * 1000)
#WAIT
#ECHO Renewing Bravery.
#WAIT
open my pack
#WAIT
get my pure potion from my pack
#WAIT
drink my potion
#WAIT
put potion in my pack
#WAIT
close my pack
}
}
#CLASS 0

Martaigne
05-30-2008, 02:23 PM
This is unrelated to the suite of scripts above, but still handy to have. It creates a nicely formatted echo of various injuries and scars and displays the appropriate herbs/tarts/ales/etc to heal them.


#echo {%cr}
#echo {-------------------------------------------------------------------------------}
#echo {....Injury.........Landing...............Icemule. ................Teras}
#echo {-------------------------------------------------------------------------------}
#echo {Blood..............Acantha Leaf..........Iceberry Tart...........Bloody Krolvin}
#echo {-------------------------------------------------------------------------------}
#echo {Limbs}
#echo {....Mnr Wound......Ambrominas Leaf.......Dabbings Family Tart....Lost Dogwater}
#echo {....Bleeder........Ephlox Moss...........Frog's Bone Porr........Golden Goose}
#echo {....Mnr Scar.......Cactacae Spine........Elk Fat Gel.............Bearded Ladies}
#echo {....Mangled........Calamia Fruit.........Walrus Blubber..........Mad Mutt Frothy}
#echo {....Missing........Sovyn Clove...........Ptarmigan Feather.......Captn' Pegleg's}
#echo {-------------------------------------------------------------------------------}
#echo {Chest/Abs/Back/Eyes}
#echo {....Mnr Wound......Basal Moss............Tundra Grass............Mama Dwarf's}
#echo {....Bldr/swol/Ms...Pothinir Grass........Musk Ox Tart............Aged Schooner}
#echo {....Mnr Scar.......Talneo Potion.........Rock Lizard Potion......Gert's Homemade}
#echo {....Maj Scar.......Wingstem Potion.......Earthworm Potion........Wort's Winter}
#echo {....Mis Eye Scar...Bur-clover Potion.....Starfish Potion.........Volcano Vision}
#echo {-------------------------------------------------------------------------------}
#echo {Head/Neck}
#echo {....Mnr Wound......Rose Marrow Potion....Elk Horn Potion.........Semak's Smooth}
#echo {....Bleeder........Aloeas Stem...........Ram's Bladder...........Dark Swampwater}
#echo {....Mnr Scar.......Haphip Root...........Sparrowhawk Pie.........Agrak's Amber}
#echo {....Maj Scar.......Brostheras Potion.....Polar Bear Fat Soup.....Reaper's Red}
#echo {-------------------------------------------------------------------------------}
#echo {Nerves}
#echo {....Twitching......Wolifrew Lichen.......Leaftoe's Lichen Tart...Orc's Head}
#echo {....Convulsions....Bolmara Potion........Snowflake Elixer........Kenar's Dropjaw}
#echo {....Slur Speech....Torban Leaf...........Ma Leaftoe's Special....Miner's Muddy}
#echo {....Spasms.........Woth Flower...........Flower Shaped Tart......Dacra's Dream}
#echo {-------------------------------------------------------------------------------}

Celephais
05-30-2008, 02:23 PM
Credits:
ZMud forums: Fang Xianfu, shibbidy joe, shalimar, Stregone, and GuinnessKMF
GSIV Player's Corner forums: Shaelun, Celephais, Bobmuhthol, Priscius

Thank you!
You're welcome! Is anybody still evangelizing GS on the ZMud forums? I stopped posting there once I found the PC, last time I went looking on their there wasn't any recent GS info that I could find, but their forums suck for searching.

I had some scripts for keeping track of spell duration in ZMud, I've got them archived somewhere if you want to check them out and see if they've got some stuff you want to integrate.

Martaigne
05-30-2008, 02:34 PM
You're welcome! Is anybody still evangelizing GS on the ZMud forums? I stopped posting there once I found the PC, last time I went looking on their there wasn't any recent GS info that I could find, but their forums suck for searching.

Not really. I think I'm the only person developing GS stuff over there but I'm amazed at the amount of feedback I get from it. I have to have Fang clean out my release thread every once in a while to tidy it up.


I had some scripts for keeping track of spell duration in ZMud, I've got them archived somewhere if you want to check them out and see if they've got some stuff you want to integrate.

YES! I would love this!

Martaigne
06-05-2008, 08:50 PM
Here's a quick glimpse at v2.5. The spell duration timers are based upon work by Celephais. Currently they only track for self-cast spells. Once I implement the spell ranges I'll be releasing this suite. Also included are a thoughts window, deaths window, a brand new friend/enemy highlighting system that utilizes context menus, comprehensive and exhaustive highlights for wands, magic items, scrolls, gems and shells (THANKS VYRSHKANA), herbs, and boxes.

Upcoming for 3.0: MZCNet... a way for the MZC to communicate with other MZC users (in the same GS room) without using a third-party software. This will expand the usage of the spell duration timers to include accurate durations from other users. The AutoBuff system will also be broken into separate elements to allow a user to selectively rebuff spells. There's probably more too.

http://www.martaigne.com/images/25preview.png

TheEschaton
06-05-2008, 10:26 PM
I used to advocate for GS on zMUD, and then I graduated college and never did any programming ever again.

Martaigne
06-06-2008, 12:02 AM
Thank you for your contribution?