taz982 Newbie
Joined: 16 Oct 2003 Posts: 2 Location: USA
|
Posted: Sat Oct 15, 2005 12:31 am
ANSI Trigger - Import Problems |
I am having an extremely frusterating time trying to import some triggers I have from a .txt file. ANSI triggers just seem to disappear or move, or get split up creating strange new classes. Here is my latest script i'm trying to import.
#CLASS {Credits}
#VAR skillPerc {0}
#VAR miniRankName {Constitution|Thermology|Frost|Antidotes|Fitness|Galvanism|Philosophy|Tailoring}
#VAR rankName {Vision|Avoidance|Tattoos|Survival|Riding|Weaponry|Groves|Metamorphosis|Concoctions}
#VAR skillChart {VisionSkilledAvoidanceApprenticetattoosjustSurvivalVirtuosoRidingCapableWeaponryApprenticeGrovesTranscendentMetamorphosisTranscendentConcoctionsTranscendent}
#VAR creditList {NOVICE9APPRENTICE9CAPABLE18ADEPT54SKILLED90GIFTED111EXPERT132VIRTUOSO180FABLED312MYTHICAL375TRANSCENDENT450}
#VAR miniSkillChart {ConstitutionCapableThermologyApprenticeFrostApprenticeAntidotesCapableFitnessTranscendentGalvanismApprenticePhilosophyCapableTailoringTranscendent}
#VAR skillPercentChart {Vision71Avoidance87Tattoos70Survival3Riding20Weaponry72Groves0Metamorphosis0Concoctions0}
#VAR miniSkillPercentChart {Constitution4Thermology12Frost62Antidotes28Fitness0Galvanism12Philosophy20Tailoring0}
#VAR rankList {NOVICE|APPRENTICE|CAPABLE|ADEPT|SKILLED|GIFTED|EXPERT|VIRTUOSO|FABLED|MYTHICAL|TRANSCENDENT}
#VAR toTrans {1740}
#CLASS 0
#CLASS {Credits|AutoUpdateSkills}
#ALIAS fullSkillUpdate {skillUpdate;miniSkillUpdate}
#ALIAS skillUpdate {#LOOP 1,9 {ask jallah about %item( @rankName, %i)}}
#ALIAS miniSkillUpdate {#LOOP 1,8 {ask jallah about %item( @miniRankName, %i)}}
#TRIGGER {({@rankName})%s(%w)} {#ADDKEY skillChart %1 %2}
#TRIGGER {({@miniRankName})%s(%w)} {#ADDKEY miniSkillChart %1 %2}
#TRIGGER {%e[1;31mJallah, Eldest of the Druids tells you, "You appear to be (%d)~% of the way to the} {#T+ skillLine;skillPerc = %1} "" {color}
#CLASS 0
#CLASS {Credits|AutoUpdateSkills|skillLine}
#TRIGGER {%e[1;31mnext skill level in the skill of ({@rankName})."} {#ADDKEY skillPercentChart %1 @skillPerc;#T- skillLine} "" {color}
#TRIGGER {%e[1;31mnext skill level in the skill of ({@miniRankName})."} {#ADDKEY miniSkillPercentChart %1 @skillPerc;#T- skillLine} "" {color}
#CLASS 0
#CLASS {Credits|CreditCalculations}
#ALIAS credCalc {#IF (%iskey( @skillChart, %1)) {skillCredCheck %1} {#IF (%iskey( @miniSkillChart, %1)) {miniCredCheck %1} {#SHOW %1 is not a skill}}}
#ALIAS skillCredCheck {cSkillName = %1;skillPercentage = %db( @skillPercentChart, @cSkillName);skillRankName = %db( @skillChart, @cSkillName);skillRankPosition = %iskey( @creditList, @skillRankName);preLessonTotal = 0;#LOOP 1,@skillRankPosition {#ADD preLessonTotal %db( @creditList, %item( @rankList, %i)))};#ADD preLessonTotal @skillPercentage*%db( @creditList, %item( @rankList, %eval( skillRankPosition+1)))/100;toTrans = 0;#FO @ranklist {#ADD toTrans %db( @creditList, %i)};lessonTotal = %eval( @toTrans - @preLessonTotal);creditTotal = %eval( @lessonTotal / 6);costTotal = %eval( @creditTotal * 3700);#SHOW It will cost @lessonTotal lessons, @creditTotal credits, or @costTotal gold to gain trans in %proper( @cSkillName)}
#ALIAS miniCredCheck {}
#VAR cSkillName {Vision}
#VAR creditTotal {260}
#VAR skillRankPosition {5}
#VAR skillRankName {Skilled}
#VAR skillPercentage {71}
#VAR lessonTotal {1560}
#VAR preLessonTotal {180}
#VAR costTotal {962000}
#CLASS 0
This is after I removed the blank lines, which helped a little, the classes were showing up at least. However the ansi triggers were screwed up royally. The second in skillLine doesn't show up at all. To note i have tried importing via settings->Import->Script (ASCII), importing directly from the Settings window, importing via command line, and importing via copy and paste to the class folder in the settings window. In most cases (except where i replace the ";" with something else with plans to change it back after import) only 2 of the ansi triggers show up but neither with anything in their value box, and this prints out to the mud window (when nothing should print out if the import was successful):
31mnext skill level in the skill of ({@miniRankName})."} {#ADDKEY miniSkillPercentChart %1 @skillPerc;#T- skillLine} "" {color}
Any help in getting this mess to work would be immensely appreciated. I just thank the gods that I don't have a gun anywhere near here because i'm pretty sure something valuable would get shot (screams obscenities at the computer). Thank you. Oh and any input on how i do things is also appreciated. |
|