Re: House of Medakan cMUD Scripts
Posted: Sat Oct 12, 2019 6:12 pm
Type helpPractice to view help file in client.

Direct download: PracticeCMUD.txt
Direct download: PracticeCMUD.txt
Code: Select all
#CLASS {Practice}
#ALIAS helpPractice {
#PRINT {%crlf <C dodgerblue>-----Practice Help File-----</C>}
#PRINT { <C dodgerblue>[Updated: 9/23/19]</C>}
#PRINT { Practice %'s automatically save when viewing practices at any trainer or training a skill.}
#PRINT { Saves pracs for each character and automatically resets when a practice reset is detected.}
#PRINT {}
#PRINT { Type <C dodgerblue>showPracs</C> to view list of current practices and prac points remaining of current character.}
#PRINT { Note: will show practiced weaves and spell points remaining if character is a channeler.}
#PRINT {}
#PRINT { Type <C dodgerblue>savePracs</C> to save a .txt file of current character's current practices.}
#PRINT {}
#PRINT { Type <C dodgerblue>resetPracs</C> to reset practice data.}
#PRINT { Note: will automatically reset saved pracs when a practice reset is detected.}
#PRINT {}
#PRINT { All .txt files are saved in your package directory.}
#PRINT {}
}
#ALIAS showPracs {
#PRINT {%crlf}
#PRINT {You have %eval(%concat("@pracRemaining",%char)) practice points remaining.}
#IF (%null(%eval(%concat("@pracSpellRemaining",%char)))) {} {
#PRINT {You have %eval(%concat("@pracSpellRemaining",%char)) spell points remaining.}
}
#PRINT {You are skilled in the following:}
#PRINT {-------Warrior Pracs-------}
#FORALL @pracListWarrior {
#IF (%eval(%concat("@prac",%char,%i))>0) {
#PRINT {%i %repeat(" ",%eval(20-%len(%i))) ~(%eval(%concat("@prac",%char,%i))~%~)}
} {}
}
#PRINT {--------Rogue Pracs--------}
#FORALL @pracListRogue {
#IF (%eval(%concat("@prac",%char,%i))>0) {
#PRINT {%i %repeat(" ",%eval(20-%len(%i))) ~(%eval(%concat("@prac",%char,%i))~%~)}
} {}
}
#PRINT {-------Hunter Pracs--------}
#FORALL @pracListHunter {
#IF (%eval(%concat("@prac",%char,%i))>0) {
#PRINT {%i %repeat(" ",%eval(20-%len(%i))) ~(%eval(%concat("@prac",%char,%i))~%~) %if((%ismember(%i,@pracListHunterLevels)),Level" " %eval(%eval(%concat("@prac",%char,%i))/14),"")}
} {}
}
#IF (%null(%eval(%concat("@pracSpellRemaining",%char)))) {} {
#PRINT {------Channeler Pracs------}
}
#IF (%null(%eval(%concat("@pracSpellRemaining",%char)))) {} {
#PRINT {---------Elements----------}
}
#IF (%null(%eval(%concat("@pracSpellRemaining",%char)))) {} {
#FORALL @pracListElement {
#IF (%eval(%concat("@prac",%char,%i))>0) {
#PRINT {%i %repeat(" ",%eval(20-%len(%i))) ~(%eval(%concat("@prac",%char,%i))~%~) Level %eval(%eval(%concat("@prac",%char,%i))/14)}
} {}
}
}
#IF (%null(%eval(%concat("@pracSpellRemaining",%char)))) {} {
#PRINT { ----------Weaves-----------}
}
#IF (%null(%eval(%concat("@pracSpellRemaining",%char)))) {} {
#FORALL @pracListWeaves {
#IF (%eval(%concat("@prac",%char,%i))>0) {
#PRINT { %i %repeat(" ",%eval(20-%len(%i))) ~(%eval(%concat("@prac",%char,%i))~%~)}
} {}
}
}
}
#ALIAS savePracs {
#FILE 1 %concat("prac",%char,"Data.txt")
#WRITE 1 {}
#WRITE 1 {%char %time(c)}
#WRITE 1 {}
#WRITE 1 {-------Warrior Pracs-------}
#FORALL @pracListWarrior {
#IF (%eval(%concat("@prac",%char,%i))>0) {
#WRITE 1 {%i %repeat(" ",%eval(20-%len(%i))) %eval(%concat("@prac",%char,%i))}
}
} {}
#WRITE 1 {--------Rogue Pracs--------}
#FORALL @pracListRogue {
#IF (%eval(%concat("@prac",%char,%i))>0) {
#WRITE 1 {%i %repeat(" ",%eval(20-%len(%i))) %eval(%concat("@prac",%char,%i))}
}
} {}
#WRITE 1 {-------Hunter Pracs--------}
#FORALL @pracListHunter {
#IF (%eval(%concat("@prac",%char,%i))>0) {
#WRITE 1 {%i %repeat(" ",%eval(20-%len(%i))) %eval(%concat("@prac",%char,%i)) %if((%ismember(%i,@pracListHunterLevels)),Level" " %eval(%eval(%concat("@prac",%char,%i))/14),"")}
}
} {}
#IF (%null(%concat("@pracSpellRemaining",%char))) {} {
#WRITE {------Channeler Pracs------}
}
#IF (%null(%concat("@pracSpellRemaining",%char))) {} {
#WRITE {---------Elements----------}
}
#IF (%null(%concat("@pracSpellRemaining",%char))) {} {
#FORALL @pracListElement {
#IF (%eval(%concat("@prac",%char,%i))>0) {
#PRINT {%i %repeat(" ",%eval(20-%len(%i))) ~(%eval(%concat("@prac",%char,%i))~%~) Level %eval(%eval(%concat("@prac",%char,%i))/14)}
} {}
}
}
#IF (%null(%concat("@pracSpellRemaining",%char))) {} {
#WRITE {----------Weaves-----------}
}
#IF (%null(%concat("@pracSpellRemaining",%char))) {} {
#FORALL @pracListWeaves {
#IF (%eval(%concat("@prac",%char,%i))>0) {
#PRINT {%i %repeat(" ",%eval(20-%len(%i))) ~(%eval(%concat("@prac",%char,%i))~%~)}
} {}
}
}
#CLOSE 1
}
#ALIAS resetPracs {
#RAISE eventResetPractices
}
#VAR pracListRogue {steal|pick|hide|sneak|dodge|attack|backstab|palm|shortBlades|projectiles}
#VAR pracListWarrior {bash|kick|rescue|shieldParry|charge|longBlades|mediumBlades|fencingBlades|axes|clubs|staves|lances|spears|javelins|polearms|flails|bows|chains|crossbows|slings|whips}
#VAR pracListHunter {search|track|ride|wisdomLore|swim|notice|camouflage|rangerSneak|coverTracks|survival}
#VAR pracListHunterLevels {ride|wisdomlore|survival}
#VAR pracListElement {earth|air|fire|water|spirit}
#VAR pracListWeaves {armor|blind|callLightning|changeWeather|chill|contagion|createFog|createFood|createPhantomObject|createWater|cureBlindness|cureCriticalWounds|cureFear|cureLightWounds|curePoison|cureSeriousWounds|deafen|earthquake|elementalStaff|fear|fireball|flameStrike|freeze|gate|hailstorm|hammerOfAir|heal|hurricane|iceSpikes|incinerate|lightBall|locateLife|locateObject|poison|refresh|removeContagion|removeWarding|senseWarding|shield|silence|sleep|sliceWeaves|slow|sonicBoom|strength|swordOfFlame|travel|wardObject|wardingVsDamage|wardingVsEvil|whirlpool}
#VAR pracSkillInput {}
#TRIGGER "pracResetGuardian" {^Your skills have been reset by the Guardian!$} {
#RAISE eventResetPractices
} "" {case}
#TRIGGER "pracResetTrigger" {^You've forgotten everything you've learned!$} {
#RAISE eventResetPractices
} "" {case}
#ONINPUT "pracInput" {^{pr|pra|prac|pract|practi|practic|practice}(*)$} {
#VAR pracSkillInput {%replace(%1," ","")}
#T+ Practice|PracticeTriggers
}
#EVENT eventResetPractices {
#VAR %concat("pracRemaining",%char) {0} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
#FORALL @pracListRogue {
#VAR %concat("prac",%char,%proper(%i)) {0} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
}
#FORALL @pracListWarrior {
#VAR %concat("prac",%char,%proper(%i)) {0} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
}
#FORALL @pracListHunter {
#VAR %concat("prac",%char,%proper(%i)) {0} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
}
#IF (%null(%concat("@pracSpellRemaining",%char))) {} {
#VAR %concat("pracSpellRemaining",%char) {0} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
}
#IF (%null(%concat("@pracSpellRemaining",%char))) {} {
#FORALL @pracListElement {
#VAR %concat("prac",%char,%proper(%i)) {0} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
}
}
#IF (%null(%concat("@pracSpellRemaining",%char))) {} {
#FORALL @pracListWeaves {
#VAR %concat("prac",%char,%proper(%i)) {0} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
}
}
#PRINT {%crlf Practice data for <C dodgerblue>%char</C> is reset.}
}
#EVENT onConnect {
#IF (%class(Practice|%concat(%char,PracticeVariables))=-1) {
#CLASS {Practice|%concat(%char,PracticeVariables)} {disable}
#CLASS 0
#VAR %concat("pracRemaining",%char) {0} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
#FORALL @pracListRogue {
#VAR %concat("prac",%char,%proper(%i)) {0} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
}
#FORALL @pracListWarrior {
#VAR %concat("prac",%char,%proper(%i)) {0} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
}
#FORALL @pracListHunter {
#VAR %concat("prac",%char,%proper(%i)) {0} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
}
#VAR %concat("pracSpellRemaining",%char) {} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
#FORALL @pracListElement {
#VAR %concat("prac",%char,%proper(%i)) {0} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
}
#FORALL @pracListWeaves {
#VAR %concat("prac",%char,%proper(%i)) {0} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
}
} {
#T+ Practice|%concat(%char,PracticeVariables)
}
}
#CLASS 0
#CLASS {Practice|PracticeTriggers} {disable}
#TRIGGER "pracRemainingTrigger" {You have got (*) practice sessions left.$} {
#VAR %concat("pracRemaining",%char) {%1} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
} "" {case}
#TRIGGER "pracSpellRemainingTrigger" {You have got (*) spell practice sessions left.$} {
#VAR %concat("pracSpellRemaining",%char) {%1} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
} "" {case}
#TRIGGER "pracChannelerTrigger" {You have got (*) practice sessions, and (*) spell practice sessions left.$} {
#VAR %concat("pracRemaining",%char) {%1} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
#VAR %concat("pracSpellRemaining",%char) {%2} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
} "" {case}
#TRIGGER "pracSkillTrigger" {^You now have (*)~% knowledge of this skill and (*) practice sessions left.$} {
#IF (%class(%concat("prac",%char,@pracSkillInput))) {
#VAR %concat("prac",%char,@pracSkillInput) {%1} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
#VAR %concat("pracRemaining",%char) {%2} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
} {}
} "" {case}
#TRIGGER "pracSpellTrigger" {^You now have (*)~% knowledge of this weave and (*) spell practice sessions left.$} {
#IF (%class(%concat("prac",%char,@pracSkillInput))) {
#VAR %concat("prac",%char,@pracSkillInput) {%1} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
#VAR %concat("pracSpellRemaining",%char) {%2} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
} {}
} "" {case}
#TRIGGER "pracTrigger1" {^(%w)%s~((*)~%~)$} {
#VAR %concat("prac",%char,%1) {%trim(%2)} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
} "" {}
#TRIGGER "pracTrigger2" {^(%w)%s(%w)%s~((*)~%~)$} {
#VAR %concat("prac",%char,%1,%2) {%trim(%3)} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
} "" {}
#TRIGGER "pracTrigger3" {^(%w)%s(%w)%s(%w)%s~((*)~%~)$} {
#VAR %concat("prac",%char,%1,%2,%3) {%trim(%4)} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
} "" {}
#TRIGGER "pracTrigger4" {^(%w)%sLevel%s(%d)%s~((*)~%~)$} {
#VAR %concat("prac",%char,%1) {%trim(%3)} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
} "" {case}
#TRIGGER "pracTrigger5" {^(%w)%s(%w)%sLevel%s(%d)%s~((*)~%~)$} {
#VAR %concat("prac",%char,%1,%2) {%trim(%4)} {_nodef} {Practice|%concat(%char,"PracticeVariables")}
} "" {case}
#TRIGGER "pracTrigger6" {~* Press ~<Return~> to continue, q to quit ~*~>} {
#GAG
#CR
} "" {case|prompt|nocr}
#TRIGGER "pracTrigger7" {{o|*} * >} {
#ALARM "pracPromptAlarm" {+2} {
#T- Practice|PracticeTriggers
} "Practice"
} "" {case|prompt|nocr}
#CLASS 0