Code and Scripts

by Daganev

Back to Project L.

Daganev2005-03-09 03:17:41
If you have an idea for a interface trigger set or button or the like, but its rather self dependant(sp?) post it here, keep them short.
Daganev2005-03-09 10:13:06
STolen from Zaltan... stolen from Zarquan


That'd be Zarquan/Larkin's script, here (slightly modified):

CODE
#CLASS {Skills}
#ALIAS skills {
#SHOW {}
#SHOW {%format( "&s&15s&s&15s&s", "Skill", " ", "Level", " ", "Lessons to go")}
#SHOW {%repeat( "-", 60)}
#LOOPDB @MySkillPercents {#SHOW %key%repeat( " ", 20 - %len( %key))@SkillLevel(%key)%repeat( " ", 20 - %len( @SkillLevel(%key)))%format( "&3.0n / &3.0n (&5.0n)", @SkillLevelRemaining(%key), %db( @SkillLessons, %db( @MySkillLevels, %key)), @SkillTotalRemaining(%key))}
}
#ALIAS learn {
~learn %-1
#VARIABLE Teacher %4
}
#VARIABLE MySkillPercents {}
#VARIABLE MySkillLevels {}
#VARIABLE SkillLevel {%db( @MySkillLevels, %1)}
#VARIABLE SkillLevelRemaining {%eval( %db( @SkillLessons, @SkillLevel(%1)) - (%db( @SkillLessons, @SkillLevel(%1)) * @SkillPercent(%1) / 100))}
#VARIABLE SkillPercent {%db( @MySkillPercents, %1)}
#VARIABLE SkillTotalRemaining {%eval( %db( @SkillTotalLessons, @SkillLevel(%1)) - (%db( @SkillLessons, %db( @MySkillLevels, %key)) - @SkillLevelRemaining(%1)))}
#VARIABLE SkillTotalLessons {}
#VARIABLE SkillLessons {}
#VARIABLE Teacher {} {}
#VARIABLE BaseSkills {}
#TRIGGER {You appear to be (%d)~% of the way} {}
#CONDITION {in the skill of (%w).} {#ADDKEY MySkillPercents %db( @BaseSkills, %1) %t1} {within|param=1}
#TRIGGER {Common Skills%sRank%sPool} {#T+ Skills|Update}
#TRIGGER {Your skill in (%w) has risen to (%w).} {#ADDKEY MySkillLevels %1 %2}
#CLASS 0
#CLASS {Skills|Update}
#TRIGGER {^(%w)%s(%w)%s%w$} {#ADDKEY MySkillLevels %1 %2}
#TRIGGER {To see your abilities within each skill} {#T- Skills|Update}
#CLASS 0
#T- Skills|Update

Not sure how that'd work, I haven't used it in a while.
celahir2005-03-09 18:03:11
This will track the score and also has the ability to gag it its how i track my experiance.

CODE

#CLASS {scoretracker}
#ALIAS score {#class score_counter 1;~score}
#ALIAS score_gag {#t+ le_counter;score}
#VAR health_current {2553}
#VAR mana_current {2635}
#VAR ego_current {3152}
#VAR experiance_current {55}
#VAR healthmax {3262}
#VAR manamax {3152}
#VAR egomax {3152}
#VAR level {62}
#VAR reserves {45}
#VAR power {10}
#var karma {0}
#TRIGGER {Your soul cries out in ecstasy as it reaches new heights of power. You have advanced to level (%d).$} {level=%1}
#TRIGGER {^You have slain} {score_gag}
#CLASS 0

#CLASS {scoretracker|score_counter} {disable}
#TRIGGER {Health : (%d)/(%d)} {healthmax=%2}}
#TRIGGER {Mana   : (%d)/(%d)} {manamax=%2}
#TRIGGER {Ego    : (%d)/(%d)} {egomax=%2}
#TRIGGER {Level  : (%d) (?)(%d)(?)(?)} {level=%1;experiance_current=%3}
#TRIGGER {Reserves  : (%d)%} {reserves=%1}
#TRIGGER {You are ranked (%d)(%w) in Lusternia.} {rank=%1;#class score_counter 0}
#TRIGGER {Karma%s~:%s(%d)} {karma=%1}
#CLASS 0

#CLASS {scoretracker|le_counter} {disable}
#TRIGGER {(%d)h, (%d)m,} {#gagoff;#alarm +1 {#T- le_counter}} "" {nocr|prompt}
#TRIGGER {(*) @name (*)$} {#gag;#gagon}
#TRIGGER {score} {#gag}
#CLASS 0
celahir2005-03-09 18:07:54
This will track most of the stats command, though it wont gag it.

CODE
#CLASS {stats}
#ALIAS stat {#class statchecker 1;~stat}
#VAR dexterity {16}
#VAR constitution {13}
#VAR charisma {14}
#VAR intelligence {14}
#VAR size {12}
#VAR lessons {0}
#VAR credits {0}
#VAR rank {131}
#VAR strength {17}
#CLASS 0

#CLASS {stats|statchecker} {disable}
#TRIGGER {Strength%s:%s(%d)} {@strength = %1}
#TRIGGER {Intelligence%s:%s(%d)} {Intelligence=%1}
#TRIGGER {Dexterity%s:%s(%d)} {dexterity=%1}
#TRIGGER {Size%s:%s(%d)} {size=%1}
#TRIGGER {Constitution%s:%s(%d)} {constitution=%1}
#TRIGGER {Charisma%s:%s(%d)} {Charisma=%1}
#TRIGGER {You currently possess (%d) lessons, (%d) Credits.} {lessons=%1;credits=%2;#class statchecker 0}
#CLASS 0


Also for the code in the post before one more trigger:
CODE

#class {scoretracker}
#trigger {^Your Karma rises in response to your deeds.$} {score_gag}
#class 0
Singollo2005-03-09 19:15:56
Eventually I'd like to see us agree on standardized versions for the project so it doesn't conflict people's aliases and variables.
Unknown2005-03-09 21:26:00
QUOTE(daganev @ Mar 9 2005, 11:13 PM)
STolen from Zaltan... stolen from Zarquan
69281


I didn't steal it. He posted it with the intention of other people using it, but there was one flaw in his original code -- it couldn't track the skills you get after Master (e.g. Nihilism after Cosmic). So I modified it so it could do this.
Estarra2005-03-09 23:55:49
QUOTE(Singollo @ Mar 9 2005, 12:15 PM)
Eventually I'd like to see us agree on standardized versions for the project so it doesn't conflict people's aliases and variables.
69522



Maybe just prefix everything with 'zlust' to make sure there is no conflict, i.e. zlustStrength zlustStat, zlustLessons, etc.
Singollo2005-03-10 00:41:40
QUOTE(Estarra @ Mar 9 2005, 07:55 PM)
Maybe just prefix everything with 'zlust' to make sure there is no conflict, i.e. zlustStrength zlustStat, zlustLessons, etc.
69762



Heh, see my post on standardization
celahir2005-03-10 07:34:51
Ok this will check all a persons skills and add then to a db list,
if you choose to you can gag it using the gab alias. It isnt based
on the percentages but it can still tell you what skills a person
has. Then if you wish to set it so that if say someone has deathsense
they get a certain button or a certain class is opened then you would
do:
CODE

#IF (@skills.deathsense) {;do stuff}


Simple enough. Also building a stringlist containing practically all
the skills I can find.

CODE

#CLASS {Skills}
#ALIAS gab {gagskills=1;ab %-1}
#VAR skills {}
#VAR gagskills {0} {0}
#TRIGGER {^(%w) bows to you ending the lesson in (%w).$} {gab %1}
#TRIGGER {^You have gained the following abilities in (%w)~:$} {#class abilities 1;#IF (@gagskills) {#gag;#gagon;gagskills=0}}
#TRIGGER {^Common Skills%sRank%sPool} {#class skilllist 1;#IF (@gagskills) {gagskills=0;#gag;#gagon}}
#CLASS 0

#CLASS {Skills|Abilities} {disable}
#TRIGGER {^%dh, %dm,} {#gagoff;#class Abilities 0} "" {nocr|prompt}
#TRIGGER {^(%w)%s} {#IF (%1!="You") {#IF (%1!="See") {#IF (%1!="AB") {#addkey skills %1 1}}}}
#CLASS 0

#CLASS {Skills|skilllist} {disable}
#TRIGGER {^(%w)%s%s} {gab %1}
#TRIGGER {^%dh, %dm,} {#gagoff;#class skilllist 0} "" {nocr|prompt}
#TRIGGER {Blademaster} {gab blademaster} "" {case}
#TRIGGER {Bonecrusher} {gab bonecrusher} "" {case}
#TRIGGER {Sacraments} {gab sacraments} "" {case}
#TRIGGER {Celestialism} {gab celestialism} "" {case}
#TRIGGER {Necromancy} {gab necromancy} "" {case}
#TRIGGER {Nihilism} {gab nihilism} "" {case}
#CLASS 0


Its just one way of tracking people's skills if you think it should be changed or should be done a different way just say and ill change it.
celahir2005-03-14 13:58:34
Targetting system, based on buttons.

Basically holds up to 9 targets, the alias' to change targets are 1-9 plus the target.
The three buttons show the currently selected targets and you can toggle them with the other two buttons. Also two alias' to have two current targets t to set the first st to set the second tt to set both. I use these personally while bashing then i set them both to be the same when I start fighting.

CODE

#CLASS {Targetting}
#ALIAS t {#var target %1}
#ALIAS st {#var secondtarget %1}
#ALIAS tt {#var target %1;#var secondtarget %1;#echo Targetting %1}
#VAR target {}
#VAR secondtarget {}
#CLASS 0

#CLASS {Targetting|alias}
#ALIAS t2 {target2=%1;trefresh}
#ALIAS t1 {target1=%1;trefresh}
#ALIAS t3 {target3=%1;trefresh}
#ALIAS t4 {target4=%1;trefresh}
#ALIAS t5 {target5=%1;trefresh}
#ALIAS t6 {target6=%1;trefresh}
#ALIAS t7 {target7=%1;trefresh}
#ALIAS t8 {target8=%1;trefresh}
#ALIAS t9 {target9=%1;trefresh}
#ALIAS t10 {target10=%1;trefresh}
#ALIAS 1 {tt @target1;trefresh}
#ALIAS 2 {tt @target2;trefresh}
#ALIAS 3 {tt @target3;trefresh}
#ALIAS 4 {tt @target4;trefresh}
#ALIAS 5 {tt @target5;trefresh}
#ALIAS 6 {tt @target6;trefresh}
#ALIAS 7 {tt @target7;trefresh}
#ALIAS 8 {tt @target8;trefresh}
#ALIAS 9 {tt @target9;trefresh}
#ALIAS 0 {tt @target10;trefresh}
#CLASS 0

#CLASS {Targetting|variables}
#VAR target1 {}
#VAR target2 {}
#VAR target3 {}
#VAR target4 {}
#VAR target5 {}
#VAR target6 {}
#VAR target7 {}
#VAR target8 {}
#VAR target9 {}
#VAR target10 {}
#CLASS 0

#CLASS {Targetting}
#VAR showtar1 {}
#VAR showtar2 {}
#VAR showtar3 {}
#VAR tracker {1}
#ALIAS (trefresh) {#IF (@tracker =1) {showtar1=@target1;showtar2=@target2;showtar3=@target3};#IF (@tracker =2) {showtar1=@target4;showtar2=@target5;showtar3=@target6};#IF (@tracker =3) {showtar1=@target7;showtar2=@target8;showtar3=@target9}}
#BUTTON 47 {@showtar1} {tt @showtar1} {} {} {} {} {} {Size} {100} {25} {Pos} {205} {1} {15} {} {} {} "" {} {} {} {2}
#BUTTON 48 {@showtar2} {tt @showtar2} {} {} {} {} {} {Size} {100} {25} {Pos} {205} {100} {15} {} {} {} "" {} {} {} {2}
#BUTTON 49 {@showtar3} {tt @showtar3} {} {} {} {} {} {Size} {100} {25} {Pos} {231} {50} {15} {} {} {} "" {} {} {} {2}
#BUTTON 50 {} {#IF (@tracker =1) {tracker=3;showtar1=@target7;showtar2=@target8;showtar3=@target9} {#IF (@tracker =2) {tracker=1;showtar1=@target1;showtar2=@target2;showtar3=@target3} {#IF (@tracker =3) {tracker=2;showtar1=@target4;showtar2=@target5;showtar3=@target6}}}} {} {} {} {} {ARROW2L} {Size} {25} {25} {Pos} {231} {13} {15} {} {} {} "" {Explore} {} {left} {2}
#BUTTON 51 {} {#IF (@tracker =1) {tracker=2;showtar1=@target4;showtar2=@target5;showtar3=@target6} {#IF (@tracker =2) {tracker=3;showtar1=@target7;showtar2=@target8;showtar3=@target9} {#IF (@tracker =3) {tracker=1;showtar1=@target1;showtar2=@target2;showtar3=@target3}}}} {} {} {} {} {ARROW2R} {Size} {25} {25} {Pos} {231} {164} {15} {} {} {} "" {Explore} {} {right} {2}
#CLASS 0
Soll2005-03-14 15:39:24
Just one of those things.

CODE

#CLASS {Critical Hit}
#CLASS 0
#ALIAS criticalfull {#echo Critical Hit(s): @criticalhit;#echo Crushing Critical Hit(s): @crushingcrit;#echo Obliterating Critical Hit(s): @oblitcrit;#echo Annihiliatingly Powerful Critical Hit(s): @annihilcrit;#echo World-Shattering Critical Hit(s): @worldcrit} "Critical Hit"
#ALIAS cf {Criticalfull} "Critical Hit"
#TRIGGER {^You have scored a CRITICAL hit!} {#add criticalhit 1} "Critical Hit"
#TRIGGER {You have scored*} {#cw 123124314} "Critical Hit"
#TRIGGER {^You have scored a CRUSHING CRITICAL hit!} {#add crushingcrit 1} "Critical Hit"
#TRIGGER {^You have scored an OBLITERATING CRITICAL hit!} {#add oblitcrit 1} "Critical Hit"
#TRIGGER {^You have scored an ANNIHILATINGLY POWERFUL CRITICAL hit!} {#add annihilcrit 1} "Critical Hit"
#TRIGGER {^You have scored a WORLD-SHATTERING CRITICAL hit!} {#add worldcrit 1} "Critical Hit"
Unknown2005-03-15 08:14:13
Here's my gold thing from ages ago, I think it's got dust on it now:



Should I post the script of it, after I give it a little clean?
celahir2005-03-15 11:28:27
Yeah that'll be great
Unknown2006-02-19 22:52:54
QUOTE(celahir @ Mar 10 2005, 05:03 AM) 69472

This will track the score and also has the ability to gag it its how i track my experiance.

CODE

#CLASS {scoretracker}
#ALIAS score {#class score_counter 1;~score}
#ALIAS score_gag {#t+ le_counter;score}
#VAR health_current {2553}
#VAR mana_current {2635}
#VAR ego_current {3152}
#VAR experiance_current {55}
#VAR healthmax {3262}
#VAR manamax {3152}
#VAR egomax {3152}
#VAR level {62}
#VAR reserves {45}
#VAR power {10}
#var karma {0}
#TRIGGER {Your soul cries out in ecstasy as it reaches new heights of power. You have advanced to level (%d).$} {level=%1}
#TRIGGER {^You have slain} {score_gag}
#CLASS 0

#CLASS {scoretracker|score_counter} {disable}
#TRIGGER {Health : (%d)/(%d)} {healthmax=%2}}
#TRIGGER {Mana   : (%d)/(%d)} {manamax=%2}
#TRIGGER {Ego    : (%d)/(%d)} {egomax=%2}
#TRIGGER {Level  : (%d) (?)(%d)(?)(?)} {level=%1;experiance_current=%3}
#TRIGGER {Reserves  : (%d)%} {reserves=%1}
#TRIGGER {You are ranked (%d)(%w) in Lusternia.} {rank=%1;#class score_counter 0}
#TRIGGER {Karma%s~:%s(%d)} {karma=%1}
#CLASS 0

#CLASS {scoretracker|le_counter} {disable}
#TRIGGER {(%d)h, (%d)m,} {#gagoff;#alarm +1 {#T- le_counter}} "" {nocr|prompt}
#TRIGGER {(*) @name (*)$} {#gag;#gagon}
#TRIGGER {score} {#gag}
#CLASS 0



Has anyone else used this? It gags everything from the output when I use it and I cannot figure out why, unless I screwed something else up.
Strakc2006-02-20 22:12:49
#TRIGGER {(*) @name (*)$} {#gag;#gagon}

I think that is what is toying with you.
Unknown2006-02-21 02:20:58
I've been working on a new combat system, which I've dubbed Palisade, and I'm writing a whole host of add-in scripts for it now. A few of them are functional on their own and could be useful to others. For example, I re-wrote my Gear script which a few of you may have found and downloaded from my web site. Feel free to borrow this latest version.

CODE
#DELCLASS {Palisade|Gear}

#CLASS {Palisade|Gear} {enable}
#VAR belt_count {}
#VAR rift_count {}

#FUNC Belt {%if(%iskey(@belt_count, %1), %db(@belt_count, %1), 0)}
#FUNC Rift {%if(%iskey(@rift_count, %1), %db(@rift_count, %1), 0)}
#FUNC Inv  {%eval(@Belt(%1) + @Rift(%1))}

#REGEX {^You store \\d+ (\\w+)\\, bringing the total to (\\d+)} {#addkey rift_count %1 %2}
#REGEX {^You remove \\d+ (\\w+)\\, bringing the total in the Rift to (\\d+)\\.$} {#addkey rift_count %1 %2}
#REGEX {^You put (\\d+) (\\w+) in your pocketbelt\\.$} {#addkey belt_count %2 %eval(%1 + @Belt(%2))}
#REGEX {^You get (\\d+) (\\w+) from your pocketbelt\\.$} {#addkey belt_count %2 %eval(@Belt(%2) - %1)}
#REGEX {^You check the contents of your \\d+ pocketbelts\\:$} {#var belt_count "";#T+ Palisade|Gear|Pocketbelts}
#REGEX {^Glancing into the Rift\\, you see\\:$} {#var rift_count "";#T+ Palisade|Gear|Rift}
#CLASS 0

#CLASS {Palisade|Gear|Pocketbelts} {disable}
#REGEX {^\\s+(\\d+)\\s+(\\w+)(?:\\s+(\\d+)\\s+(\\w+))?(?:\\s+(\\d+)\\s+(\\w+))?$} {#addkey belt_count %2 %1;#if (!%null(%3)) {#addkey belt_count %4 %3};#if (!%null(%5)) {#addkey belt_count %6 %5}}
#REGEX {^\\d+h\\, \\d+m} {#T- Palisade|Gear|Pocketbelts} "" {nocr|prompt}
#CLASS 0

#CLASS {Palisade|Gear|Rift} {disable}
#REGEX {^  \\ (\\w+)(?:\\s+\\ (\\w+))?(?:\\s+\\ (\\w+))?$} {#addkey rift_count %2 %1;#if (!%null(%3)) {#addkey rift_count %4 %3};#if (!%null(%5)) {#addkey rift_count %6 %5}}
#REGEX {^\\d+h\\, \\d+m} {#T- Palisade|Gear|Rift} "" {nocr|prompt}
#CLASS 0

#ECHO {}
#ECHO {** Palisade Gear, version 1.0}


And, here's the script I use for tracking what I'm currently wielding in my hands. It requires configuring a database of wieldable items, so be sure to update the keys and values according to what you want to track.

CODE
#DELCLASS {Palisade|Wielding}

#CLASS {Palisade|Wielding}
#VAR wielded_left  {hammer}
#VAR wielded_right {hammer}
#VAR wieldables    {}
#ADDKEY wieldables {a mace with etchings of the Moonhart Mother Tree} {mace}
#ADDKEY wieldables {a tae'dae bearclaw flail}                         {flail}
#ADDKEY wieldables {a large darksteel round shield}                   {shield}
#ADDKEY wieldables {a regal dwarven battle hammer}                    {hammer}
#ADDKEY wieldables {a light battle hammer of silver}                  {hammer}

#FUNC Wielded {%if(@wielded_left == "%1" or @wielded_right == "%1", 1, 0)}

#REGEX "wieldtracker" {^You are wielding\\:$} {wielded_left = %null;wielded_right = %null}
#COND {\\s+(\\a+|\\a+\\s.\\a+)\\d+ : (.+)} {#if (!%pos("in your right", "%2")) {wielded_left = "%1"};#if (!%pos("in your left", "%2")) {wielded_right = "%1"};#if (@wielded_left and @wielded_right) {#state wieldtracker 0}} {looplines|param=2|regex}
#REGEX {^You aren\\'t wielding anything\\.$} {wielded_left = %null;wielded_right = %null}
#REGEX {^You start to wield (.+?) in your hands\\.$} {#if (%iskey(@wieldables, "%1")) {wielded_left = %db(@wieldables, "%1");wielded_right = @wielded_left}}
#REGEX {^You cease to wield .+?\\.$} {wielded_left = %null;wielded_right = %null}
#REGEX {^You begin to wield (.+?) in your (left|right)} {#if (%iskey(@wieldables, "%1")) {#if (%2 == right) {wielded_right = %db(@wieldables, "%1")} {wielded_left = %db(@wieldables, "%1")}}}
#REGEX {^You cease wielding (.+?) in your (left|right)} {#if (%2 == right) {wielded_right = %null} {wielded_left = %null}}
#REGEX {^You begin to wield (.+?) in your ?\\n(right|left) hand\\.$} {#if (%iskey(@wieldables, "%1")) {#if (%2 == right) {wielded_right = %db(@wieldables, "%1")} {wielded_left = %db(@wieldables, "%1")}}}
#REGEX {^You cease wielding (.+?) in your ?\\n(right|left) hand\\.$} {#if (%iskey(@wieldables, "%1")) {#if (%2 == right) {wielded_right = %null} {wielded_left = %null}}}

#BUTTON 0 {LH: @wielded_left%crlf~RH: @wielded_right} {wielded} {} {} {} {} {} {Size} {140} {35} {} {} {} {7} {} {} {} "" {Explore} {} {btnwielded}
#CLASS 0

#ECHO {}
#ECHO {** Palisade Wielding, version 1.0}
Strakc2006-02-21 03:23:10
Whats the difference between your new gear script and the old one?
Unknown2006-02-21 12:00:31
New one uses a single trigger each for the rift and pocketbelt, instead of the three it used before.