Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- debug 10
- eval DATE replacere("@date@","\/","")
- put #log >training_%DATE.log @time@ ~ **********************************************************
- put #log >training_%DATE.log @time@ ~ Training script launched
- put #statusbar 3
- action (emergency) put #log >training_%DATE.log @time@ ~ detected low health -- health at $health;goto dying when eval $health < 20
- action (emergency) put #log >training_%DATE.log @time@ ~ detected small health drop -- health at $health;goto health_drop when eval $health < 94
- action (emergency) put #log >training_%DATE.log @time@ ~ detected stunned;goto stunned when eval $stunned = 1
- action (universal) var SPELL.PREPPED 1 when ^You feel fully prepared
- action (universal) send 3 $lastcommand when ^\.\.\.wait \d+ seconds.$
- action (research) var RESEARCH.COMPLETE 1;var RESEARCH.INVESTED.SECONDS null;var RESEARCH.START.TIME null;put #statusbar 3 Research Complete. when Breakthrough\!
- action (research) var RESEARCH.MORE 1;evalmath RESEARCH.INVESTED.SECONDS %RESEARCH.INVESTED.SECONDS + %RESEARCH.SECONDS;put #statusbar 3 Research Pending. when However\, there is still more to learn before you arrive at a breakthrough\.
- action (magic) send 1 cast when ^Sorry\, you may only type ahead \d+ command\.
- action (climb) goto climb_pre_end when eval $Athletics.LearningRate = 34
- action (FA) var BODY.PART $1 $2|%BODY.PART when ^\s+(right|left) (arm|leg|hand|eye)\s+\w+$
- action (FA) var BODY.PART $1|%BODY.PART when ^\s+(head|neck|chest|back|abdomen)\s+\w+$
- action (wealth) var KRONARS 0 when ^\s+No Kronars\.$
- action (wealth) var KRONARS $1 when \((\d+) copper Kronars\)\.$
- action (mech) var PAPER.COUNT $1 when As you thumb through the envelope\, you guess that there are (\d+) sheets of .+ origami paper remaining\.$
- action (mech) var PAPER.COUNT 1 when you see that there is but a single sheet of origami paper remaining\.$
- action (mech) var PAPER.COUNT 0 when As you thumb through the envelope\, you see it is empty\.
- action (mech) var TEMP $1 when ^You are wearing (.+)\.$
- action (mech) var TEMP $1 when ^You rummage through .+ and see (.+)\.$
- action (emergency) on
- action (universal) on
- action (research) off
- action (magic) off
- action (climb) off
- action (FA) off
- action (wealth) off
- action (mech) off
- # VV global variables VV
- if $EMPATHY.TRAINING.TIME > 0 then
- else
- {
- put #var EMPATHY.TRAINING.TIME 90|90|90|90|90
- var TEMP 1
- }
- if $ORIGAMI.FOLDS.HISTORY > 0 then
- else
- {
- put #var ORIGAMI.FOLDS.HISTORY 11|11|11|11|11|11|11|11|11|11
- var TEMP 1
- }
- if %TEMP = 1 then
- {
- put #vars save
- unvar TEMP
- }
- # ^^ global variables ^^
- # vv Character specific variables vv
- var STORAGE.CONTAINER haversask
- var GEMCONTAINER green pouch
- var GEMCONTAINERSTORAGE ashcloak
- var CAMB.LOWCAP.ITEM armband
- var CAMB.LOWCAP.WORN 1
- var CAMB.HIGHCAP.ITEM orb
- var CAMB.HIGHCAP.WORN 0
- var SPELL.MESSAGING Your eyes darken to black as a starless night
- var GAF.PREP 20
- var VIGOR.PREP 22
- var ORIGAMI.AVG.OFFSET 3
- # ^^ Character specific variables ^^
- counter set 0
- var ALPHA.NUMBER first|second|third|fourth|fifth|sixth|seventh|eighth|ninth
- var APP.TIMER 0
- var EMPATHY.PATH w|w|s|s|e|s|w|w|n|w|w|s|s|s|s|s|s|se|e|e|e|n|n|n|ne|n|n|n|n
- var EMPATHY.TIMER 0
- var LEARNINGRATE.MIN 28
- var LEARNINGRATE.SECONDARY 20
- var MECH.TIMER 0
- var NEED.PAPER 0
- var PAPER.COUNT
- var RESEARCH.CHECK.TIME 0
- var RESEARCH.COMPLETE 0
- var RESEARCH.COUNTER 0
- var RESEARCH.DISABLE null
- var RESEARCH.INVESTED.SECONDS null
- var RESEARCH.LEARNINGRATE.MIN 12
- var RESEARCH.MORE 0
- var RESEARCH.PLAN
- var RESEARCH.PROJECT.COMPLETE null
- var RESEARCH.RETRY 0
- var RESEARCH.RETRY 0
- var RESEARCH.SECONDS 300
- var RESEARCH.SKILLMIN
- var RESEARCH.SKIP null
- var RESEARCH.START.TIME null
- var RESEARCH.STEPS null
- var SPELL.PREPPED 0
- var TRACK.EMPATHY 0
- var TRACK.MECH 0
- # var CLIMB.TIME 0
- # var REPLACE.ARMOR 0
- eval TOTAL.ROOMS count("%EMPATHY.PATH","|")
- evalmath EMPATHY.TRAINING.AVG round(($EMPATHY.TRAINING.TIME(0) +$EMPATHY.TRAINING.TIME(1) + $EMPATHY.TRAINING.TIME(2) + $EMPATHY.TRAINING.TIME(3) + $EMPATHY.TRAINING.TIME(4)) / 5)
- evalmath ORIGAMI.FOLDS.AVG ($ORIGAMI.FOLDS.HISTORY(0) + $ORIGAMI.FOLDS.HISTORY(1) + $ORIGAMI.FOLDS.HISTORY(2) + $ORIGAMI.FOLDS.HISTORY(3) + $ORIGAMI.FOLDS.HISTORY(4) + $ORIGAMI.FOLDS.HISTORY(5) + $ORIGAMI.FOLDS.HISTORY(6) + $ORIGAMI.FOLDS.HISTORY(7) + $ORIGAMI.FOLDS.HISTORY(8) + $ORIGAMI.FOLDS.HISTORY(9)) / 10
- put research cancel
- pause .25
- pause .25
- put research cancel
- pause .25
- pause .25
- put research cancel
- pause .25
- pause .25
- timer start
- start:
- put #statusbar 2
- if $bleeding = 1 then gosub sub_tend
- check_athletics:
- put #log >training_%DATE.log @time@ ~ evaluating athletics
- if $Athletics.LearningRate < %LEARNINGRATE.SECONDARY then
- {
- var LEARNINGRATE.SECONDARY 20
- action (climb) on
- put #statusbar 2 Athletics
- gosub sub_move NEGATE2OLDIMPERIALROAD
- goto climb
- }
- if $Athletics.LearningRate !< %LEARNINGRATE.SECONDARY then
- {
- put #log >training_%DATE.log @time@ ~ skipping athletics -- learning rate ($Athletics.LearningRate) is not < %LEARNINGRATE.SECONDARY
- }
- put #log >training_%DATE.log @time@ ~ evaluating empathy
- if $Empathy.LearningRate < %LEARNINGRATE.MIN then
- {
- put #statusbar 2 Empathy
- action (research) on
- action (universal) on
- var RESEARCH.SKILLMIN Empathy|26
- gosub define_research_plan
- if $Empathy.LearningRate = 0 then
- {
- var EMPATHY.TIMER %t
- var TRACK.EMPATHY 1
- }
- goto empathy
- }
- if $Empathy.LearningRate !< %LEARNINGRATE.MIN then
- {
- put #log >training_%DATE.log @time@ ~ skipping empathy -- learning rate ($Empathy.LearningRate) is not < %LEARNINGRATE.MIN
- }
- check_mech:
- put #log >training_%DATE.log @time@ ~ evaluating Mechanical Lore
- if $Mechanical_Lore.LearningRate < %LEARNINGRATE.SECONDARY then
- {
- var LEARNINGRATE.SECONDARY 20
- put #statusbar 2 Mech
- action (mech) on
- put inv
- waitfor INVENTORY HELP
- if !matchre("%TEMP","an origami\-paper envelope") then
- {
- put get my ori envelope
- waitfor You get an
- }
- else
- {
- put remove my ori envelope
- waitfor You remove an
- }
- unvar TEMP
- put look in my origami envelope
- waitfor As you thumb through the envelope,
- if %PAPER.COUNT > 0 then
- {
- put wear my origami envelope
- waitfor You attach an
- gosub sub_move NEGATE2WILLOWPONDPIER
- action (research) on
- action (universal) on
- var RESEARCH.SKILLMIN Mechanical_Lore|26
- gosub define_research_plan
- evalmath RESEARCH.SECONDS (%ORIGAMI.FOLDS.AVG * 10) - %ORIGAMI.AVG.OFFSET
- if $Mechanical_Lore.LearningRate = 0 then
- {
- var TRACK.MECH 1
- var MECH.TIMER %t
- }
- goto mech
- }
- if %PAPER.COUNT = 0 then
- {
- put poke my origami envelope
- waitfor You tear up the empty envelope and toss it away.
- goto origami_get_paper
- }
- }
- if $Mechanical_Lore.LearningRate !< %LEARNINGRATE.SECONDARY then
- {
- put #log >training_%DATE.log @time@ ~ skipping mech -- learning rate ($Mechanical_Lore.LearningRate) is not < %LEARNINGRATE.SECONDARY
- }
- # Check magic
- put #log >training_%DATE.log @time@ ~ evaluating Magic skills
- if $Primary_Magic.LearningRate < %RESEARCH.LEARNINGRATE.MIN or $Arcana.LearningRate < %RESEARCH.LEARNINGRATE.MIN or $Augmentation.LearningRate < %RESEARCH.LEARNINGRATE.MIN or $Utility.LearningRate < %RESEARCH.LEARNINGRATE.MIN or $Warding.LearningRate < %RESEARCH.LEARNINGRATE.MIN then
- {
- put #statusbar 2 Magic
- gosub sub_move NEGATE2WILLOWPONDPIER
- action (research) on
- action (universal) on
- gosub define_research_plan
- var RESEARCH.SECONDS 65
- goto magic
- }
- else put #log >training_%DATE.log @time@ ~ skipping magic -- no magical learning rates are below the minimum training level
- put #log >training_%DATE.log @time@ ~ evaluating Perception and Outdoorsmanship
- if $Perception.LearningRate < %LEARNINGRATE.MIN or $Outdoorsmanship.LearningRate < %LEARNINGRATE.MIN then
- {
- put #statusbar 2 Perception
- gosub sub_move NEGATE2WILLOWPONDPIER
- action (research) on
- action (universal) on
- var RESEARCH.SKILLMIN Perception|26
- gosub define_research_plan
- goto perception
- }
- else put #log >training_%DATE.log @time@ ~ skipping perception -- learning rates ($Perception.LearningRate or $Outdoorsmanship.LearningRate) are not < %LEARNINGRATE.MIN
- put #log >training_%DATE.log @time@ ~ primary training completed
- # Evaluate secondary skills
- put #log >training_%DATE.log @time@ ~ evaluating secondary skills
- var LEARNINGRATE.SECONDARY %LEARNINGRATE.MIN
- put #log >training_%DATE.log @time@ ~ evaluating Athletics as a secondary skill
- if $Athletics.LearningRate < %LEARNINGRATE.MIN then goto check_athletics
- put #log >training_%DATE.log @time@ ~ evaluating Mechanical Lore as a secondary skill
- if $Mechanical_Lore.LearningRate < %LEARNINGRATE.MIN then goto check_mech
- put #log >training_%DATE.log @time@ ~ Primary and secondary training completed
- soaking:
- put #log >training_%DATE.log @time@ ~ Soaking experience for 61 seconds
- put #log >training_%DATE.log @time@ ~ Appraisal maintenance is enabled
- var RESEARCH.LEARNINGRATE.MIN 25
- put #statusbar 2 Soaking
- pause 61
- gosub app
- put #log >training_%DATE.log @time@ ~ Soaking exp completed
- goto start
- ########################################################################################################
- empathy:
- put #log >training_%DATE.log @time@ ~ *** beginning health walking at %t seconds
- var START.TIME %t
- put #log >training_%DATE.log @time@ ~ starting empathy = $Empathy.Ranks ($Empathy.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ starting appraisal = $Appraisal.Ranks ($Appraisal.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ starting attunement = $Attunement.Ranks ($Attunement.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ starting perception = $Perception.Ranks ($Perception.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ starting outdoorsmanship = $Outdoorsmanship.Ranks ($Outdoorsmanship.LearningRate/34)
- counter set 0
- move go gate
- move w
- walking_loop:
- if $Empathy.LearningRate = 34 then
- {
- evalmath SECTION.RUNTIME %t - %START.TIME
- put #log >training_%DATE.log @time@ ~ *** completed health walking in %SECTION.RUNTIME seconds
- unvar SECTION.RUNTIME
- put #log >training_%DATE.log @time@ ~ ending empathy = $Empathy.Ranks ($Empathy.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ ending appraisal = $Appraisal.Ranks ($Appraisal.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ ending attunement = $Attunement.Ranks ($Attunement.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ ending perception = $Perception.Ranks ($Perception.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ ending outdoorsmanship = $Outdoorsmanship.Ranks ($Outdoorsmanship.LearningRate/34)
- action (research) off
- action (universal) off
- var RESEARCH.DISABLE null
- if %TRACK.EMPATHY = 1 then
- {
- var TRACK.EMPATHY 0
- evalmath TEMP round((%t - %EMPATHY.TIMER) / 34)
- put #var EMPATHY.TRAINING.TIME $EMPATHY.TRAINING.TIME|%TEMP
- put #var EMPATHY.TRAINING.TIME {#eval replacere("$EMPATHY.TRAINING.TIME","^\d+\|","")}
- evalmath EMPATHY.TRAINING.AVG round(($EMPATHY.TRAINING.TIME(0) + $EMPATHY.TRAINING.TIME(1) + $EMPATHY.TRAINING.TIME(2) + $EMPATHY.TRAINING.TIME(3) + $EMPATHY.TRAINING.TIME(4)) / 5)
- unvar TEMP
- }
- put #goto ntr
- waitfor You are before the Northeast Gate of the Crossing, surrounded
- var RESEARCH.SKILLMIN
- gosub finish_research
- goto start
- }
- if %c <= %TOTAL.ROOMS then
- {
- move %EMPATHY.PATH(%c)
- counter add 1
- }
- else
- {
- counter set 0
- goto walking_loop
- }
- var RETURN.POINT empathy_return
- goto eval_research
- empathy_return:
- unvar RETURN.POINT
- gosub app
- perc_health_retry:
- pause .5
- match perc_health_complete You close your eyes, drawing all your thoughts inward
- match perc_health_retry You're not ready to do that again, yet.
- put perc health
- matchwait
- perc_health_complete:
- pause
- pause .1
- put collect rock
- pause
- pause .1
- put kick pile
- match eval_standing Bringing your foot smashing down onto the pile,
- match eval_standing I could not find what you were referring to.
- matchwait
- eval_standing:
- if $standing != 1 then
- {
- put stand
- pause .25
- pause .25
- goto eval_standing
- }
- goto walking_loop
- ########################################################################################################
- magic:
- pause .25
- pause .25
- if %RESEARCH.STEPS != null then
- {
- if %RESEARCH.COMPLETE = 1 then
- {
- gosub research_loop_complete
- goto magic
- }
- if %RESEARCH.MORE = 1 then
- {
- gosub app
- gosub research_more
- }
- }
- else
- {
- var RESEARCH.SECONDS 300
- action (universal) off
- put rel gaf
- pause .25
- pause .25
- gosub sub_move WILLOWPONDPIER2NEGATE
- goto start
- }
- match magic Breakthrough!
- match magic However, there is still more to learn before you arrive at a breakthrough.
- matchwait
- ########################################################################################################
- climb:
- put #log >training_%DATE.log @time@ ~ *** beginning athletics at %t seconds
- var START.TIME %t
- put #log >training_%DATE.log @time@ ~ starting athletics = $Athletics.Ranks ($Athletics.LearningRate/34)
- climb_loop:
- put climb practice rock
- waitfor You finish practicing your climbing skill and take a well-earned break.
- if $bleeding = 1 then gosub sub_tend
- if $Athletics.LearningRate = 34 then
- {
- goto climb_end
- }
- goto climb_loop
- climb_pre_end:
- put stop climb
- climb_end:
- action (universal) off
- action (climb) off
- evalmath SECTION.RUNTIME %t - %START.TIME
- put #log >training_%DATE.log @time@ ~ *** completed athletics in %SECTION.RUNTIME seconds
- unvar SECTION.RUNTIME
- put #log >training_%DATE.log @time@ ~ ending athletics = $Athletics.Ranks ($Athletics.LearningRate/34)
- gosub sub_move GROVE2NEGATE
- goto start
- ########################################################################################################
- mech:
- put prep vigor %VIGOR.PREP
- waitfor %SPELL.MESSAGING
- put charge my %CAMB.LOWCAP.ITEM 16
- pause
- pause .1
- put charge my %CAMB.LOWCAP.ITEM 16
- pause
- pause .1
- put charge my %CAMB.LOWCAP.ITEM 16
- pause
- pause .1
- put invoke my %CAMB.LOWCAP.ITEM
- pause 5
- put cast
- waitfor You gesture
- put #log >training_%DATE.log @time@ ~ *** beginning mech at %t seconds
- var START.TIME %t
- put #log >training_%DATE.log @time@ ~ starting mechanical lore = $Mechanical_Lore.Ranks ($Mechanical_Lore.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ starting training with %PAPER.COUNT sheets of origami paper
- mech_start:
- if $Empathy.LearningRate < 15 or $Athletics.LearningRate < 10 then
- {
- put #log >training_%DATE.log @time@ ~ stopping mech early
- var TRACK.MECH 0
- goto mech_end
- }
- if $Mechanical_Lore.LearningRate = 34 then goto mech_end
- evalmath ORIGAMI.FOLDS.AVG ($ORIGAMI.FOLDS.HISTORY(0) + $ORIGAMI.FOLDS.HISTORY(1) + $ORIGAMI.FOLDS.HISTORY(2) + $ORIGAMI.FOLDS.HISTORY(3) + $ORIGAMI.FOLDS.HISTORY(4) + $ORIGAMI.FOLDS.HISTORY(5) + $ORIGAMI.FOLDS.HISTORY(6) + $ORIGAMI.FOLDS.HISTORY(7) + $ORIGAMI.FOLDS.HISTORY(8) + $ORIGAMI.FOLDS.HISTORY(9)) / 10
- evalmath RESEARCH.SECONDS (%ORIGAMI.FOLDS.AVG * 10) - %ORIGAMI.AVG.OFFSET
- put pull my origami envelope
- waitfor You get a sheet of
- evalmath PAPER.COUNT %PAPER.COUNT - 1
- if %PAPER.COUNT = 0 then
- {
- put #log >training_%DATE.log @time@ ~ using last sheet of origami paper
- var NEED.PAPER 1
- }
- mech_research_wait:
- if %RESEARCH.COMPLETE = 1 or %RESEARCH.MORE = 1 or %RESEARCH.PROJECT.COMPLETE = 1 or %RESEARCH.SKIP = 1 then
- {
- var ORIGAMI.FOLDS.TMP 1
- put study my instructions
- pause
- pause .1
- }
- else
- {
- waitforre (B|b)reakthrough(\.|\!)$
- pause 1
- goto mech_research_wait
- }
- var RETURN.POINT mech_return
- goto eval_research
- mech_return:
- unvar RETURN.POINT
- folding_loop:
- pause
- pause .1
- gosub app
- evalmath ORIGAMI.FOLDS.TMP %ORIGAMI.FOLDS.TMP + 1
- match paper_complete You make the final fold and gaze proudly at your new
- match folding_loop Roundtime:
- put fold my paper
- matchwait
- paper_complete:
- pause
- pause .1
- put exhale my $righthandnoun
- waitforre ^You exhale into your|^You find a hole in your
- var ORIGAMI.FOLDS.TMP $ORIGAMI.FOLDS.HISTORY|%ORIGAMI.FOLDS.TMP
- eval ORIGAMI.FOLDS.TMP replacere("%ORIGAMI.FOLDS.TMP","^\d+\|","")
- put #var ORIGAMI.FOLDS.HISTORY %ORIGAMI.FOLDS.TMP
- if %NEED.PAPER = 1 then
- {
- put #log >training_%DATE.log @time@ ~ origami paper needed
- put #log >training_%DATE.log @time@ ~ discarding old origami envelope
- put rem my origami envelope
- waitfor You remove an
- put poke my origami envelope
- waitfor You tear up the empty envelope and toss it away.
- put rummage my haversack
- waitfor You rummage through
- if matchre("%TEMP","an origami\-paper envelope") then
- {
- put #log >training_%DATE.log @time@ ~ found more paper in inventory
- put get my origami envelope
- waitfor You get
- put look in my origami envelope
- waitfor As you thumb through the envelope,
- put wear my origami envelope
- waitfor You attach an
- var NEED.PAPER 0
- }
- unvar TEMP
- }
- if %NEED.PAPER = 1 then
- {
- put #log >training_%DATE.log @time@ ~ out of origami paper
- var NEED.PAPER 0
- gosub finish_research
- var RESEARCH.SECONDS 300
- var RESEARCH.SKIP null
- gosub sub_move WILLOWPONDPIER2NEGATE
- goto origami_get_paper
- }
- goto mech_start
- mech_end:
- evalmath SECTION.RUNTIME %t - %START.TIME
- put #log >training_%DATE.log @time@ ~ *** completed mech in %SECTION.RUNTIME seconds
- unvar SECTION.RUNTIME
- put #log >training_%DATE.log @time@ ~ ending mechanical lore = $Mechanical_Lore.Ranks ($Mechanical_Lore.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ ending training with %PAPER.COUNT sheets of origami paper
- action (mech) off
- action (universal) off
- action (research) off
- if %TRACK.MECH = 1 then
- {
- var TRACK.MECH 0
- evalmath TEMP round((%t - %MECH.TIMER) / 34)
- put #var MECH.TRAINING.TIME $MECH.TRAINING.TIME|%TEMP
- put #var MECH.TRAINING.TIME {#eval replacere("$MECH.TRAINING.TIME","^\d+\|","")}
- unvar TEMP
- }
- var RESEARCH.SKILLMIN
- gosub finish_research
- put #statusbar 3
- var RESEARCH.SECONDS 300
- var RESEARCH.SKIP null
- gosub sub_move WILLOWPONDPIER2NEGATE
- goto start
- }
- ########################################################################################################
- perception:
- put #log >training_%DATE.log @time@ ~ *** beginning colleting at %t seconds
- var START.TIME %t
- put #log >training_%DATE.log @time@ ~ starting perception = $Perception.Ranks ($Perception.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ starting outdoorsmanship = $Outdoorsmanship.Ranks ($Outdoorsmanship.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ starting appraisal = $Appraisal.Ranks ($Appraisal.LearningRate/34)
- perception_start:
- var RETURN.POINT perception_return
- goto eval_research
- perception_return:
- unvar RETURN.POINT
- gosub app
- put collect rock
- pause
- pause .1
- perception_standing:
- if $standing != 1 then
- {
- put stand
- pause .25
- pause .25
- goto perception_standing
- }
- put kick pile
- pause .25
- pause .25
- if $Empathy.LearningRate < 20 or $Athletics.LearningRate < 15 then
- {
- goto perception_end
- }
- if $Perception.LearningRate > 32 and $Outdoorsmanship.LearningRate > 32 then
- {
- goto perception_end
- }
- goto perception_start
- perception_end:
- evalmath SECTION.RUNTIME %t - %START.TIME
- put #log >training_%DATE.log @time@ ~ *** completed collecting in %SECTION.RUNTIME seconds
- unvar SECTION.RUNTIME
- put #log >training_%DATE.log @time@ ~ ending perception = $Perception.Ranks ($Perception.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ ending outdoorsmanship = $Outdoorsmanship.Ranks ($Outdoorsmanship.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ ending appraisal = $Appraisal.Ranks ($Appraisal.LearningRate/34)
- action (research) off
- action (universal) off
- var RESEARCH.SKILLMIN
- gosub finish_research
- gosub sub_move WILLOWPONDPIER2NEGATE
- goto start
- ########################################################################################################
- app:
- if %t >= %APP.TIMER and $Appraisal.LearningRate < 34 then
- {
- put get my %GEMCONTAINER from my %GEMCONTAINERSTORAGE
- waitfor You get
- put open my %GEMCONTAINER
- waitforre ^(You open your|That is already open\.)
- put app my %GEMCONTAINER quick
- pause
- pause .1
- evalmath APP.TIMER %t + 61
- put close my %GEMCONTAINER
- waitfor You close your
- put put my %GEMCONTAINER in my %GEMCONTAINERSTORAGE
- waitfor You put
- }
- return
- ########################################################################################################
- ###
- origami_get_paper:
- put #log >training_%DATE.log @time@ ~ buying more origami paper
- action (wealth) on
- put wealth
- waitfor Wealth:
- action (wealth) off
- if %KRONARS >= 20000 then
- {
- gosub sub_move NEGATE2FERRY
- }
- if %KRONARS < 20000 then
- {
- gosub sub_move NEGATE2TELLER
- put dep all
- put with 20 gold
- waitfor The clerk counts out 20 gold Kronars
- gosub sub_move TELLER2FERRY
- }
- unvar KRONARS
- gosub crossing_ferry
- gosub sub_move FERRY2ORIGAMI
- counter set 0
- origami_buy_loop:
- match origami_buy Cost: 12500 Kronars
- match origami_next You can buy this item if you like.
- put shop %ALPHA.NUMBER(%c) envelope on table
- matchwait
- origami_next:
- counter add 1
- goto origami_buy_loop
- origami_buy:
- put buy %ALPHA.NUMBER(%c) envelope on table
- waitfor The sales clerk hands you your origami-paper envelope.
- put put my origami envelope in my haversack
- waitfor You put your
- gosub sub_move ORIGAMI2FERRY
- gosub crossing_ferry
- gosub sub_move FERRY2NEGATE
- put #log >training_%DATE.log @time@ ~ buying more origami paper complete
- goto start
- ###
- ########################################################################################################
- # subs and functions related to movement around the city.
- ###
- sub_move:
- var NEGATE2OLDIMPERIALROAD n|n|n|ne|ne|n|nw|nw|n|n|ne|nw|n|n|nw|nw|n|n|n|ne|ne|ne|e|e|e|n|n|n|n|n|n|ne|go gate|n|ne|go gate|nw|nw|n|e|e|n|n|ne|n|e|e|ne|ne|nw|n|n|n|n|n|n|go bridge|n|n|ne|n|nw|nw|n|n|ne|ne|ne|n|n|ne|nw|n|n|n|ne|ne|ne|ne|n|nw|nw|nw|nw|go track|e|ne|e|ne|climb crater|go tube|ne|e|go tube|ne|go column|se
- var FERRY2NEGATE go square|ne|e|e|e|e|ne|go bridge|ne|e|n|n|n|e|e|ne|n|n|n|n|e|go gate
- var FERRY2ORIGAMI s|s|s|s|sw|sw|sw|sw|s|se|se|s|s|sw|sw|sw|s|se|sw|s|sw|s|s|se|se|sw|sw|sw|sw|s|sw|se|se|s|s|se|se|s|s|se|go gate|se|se|se|se|sw|sw|se|go tent
- var GROVE2NEGATE w|sw|s|go gate|e|e|e|e|e|e|e|e|e|e|e|n|e|n|n|e|e|e|go gate
- var NEGATE2FERRY go gate|w|s|s|s|s|sw|s|s|s|w|w|w|sw|go bridge|sw|w|w|w|w|sw|go pier
- var NEGATE2GROVE go gate|w|s|w|s|w|w|s|w|w|w|w|w|w|go bridge|w|w|w|w|go gate|go trail|ne|e
- var NEGATE2TELLER go gate|w|s|s|s|s|sw|s|s|s|w|w|w|go bank|go window
- var NEGATE2WILLOWPONDPIER n|n|n|ne|ne|n|nw|nw|n|n|ne|nw|n|n|e|down|down|go gate|n|n|n|n|e|e|e|ne|ne|e|n|e|e|ne|go pier
- var ORIGAMI2FERRY out|nw|ne|ne|nw|nw|nw|nw|go gate|nw|n|n|nw|nw|n|n|nw|nw|ne|n|ne|ne|ne|ne|nw|nw|n|n|ne|n|ne|nw|n|ne|ne|ne|n|n|nw|nw|n|ne|ne|ne|ne|n|n|n|n
- var TELLER2FERRY out|out|sw|go bridge|sw|w|w|w|w|sw|go pier
- var WILLOWPONDPIER2NEGATE sw|sw|w|w|s|w|sw|sw|w|w|w|s|s|s|s|go gate|up|up|w|s|s|se|sw|s|s|se|se|s|sw|sw|s|s|s
- var ROUTECOUNTER 0
- var ROUTE %$1|%$2|%$3|%$4|%$5|%$6|%$7|%$8|%$9
- eval ROUTE replacere("%ROUTE","\|\%","")
- eval ROUTEROOMS count("%ROUTE","|")
- pause .25
- move_loop:
- if %ROUTECOUNTER <= %ROUTEROOMS then
- {
- move %ROUTE(%ROUTECOUNTER)
- evalmath ROUTECOUNTER %ROUTECOUNTER + 1
- goto move_loop
- }
- sub_move_cleanup:
- unvar NEGATE2OLDIMPERIALROAD
- unvar FERRY2NEGATE
- unvar FERRY2ORIGAMI
- unvar GROVE2NEGATE
- unvar NEGATE2FERRY
- unvar NEGATE2GROVE
- unvar NEGATE2TELLER
- unvar NEGATE2WILLOWPONDPIER
- unvar ORIGAMI2FERRY
- unvar TELLER2FERRY
- unvar WILLOWPONDPIER2NEGATE
- unvar ROUTECOUNTER
- unvar ROUTE
- unvar ROUTEROOMS
- return
- ###
- ###
- crossing_ferry:
- match ferry_wait You will have to wait for the next one.
- match ferry_wait There is no ferry here to go aboard.
- match ferry_boarded You hand him your kronars and climb aboard.
- put go ferry
- matchwait
- ferry_wait:
- matchre crossing_ferry ^The ferry (Kertigen\'s Honor|Hodierna\'s Grace) pulls into the dock\.$
- match crossing_ferry You hear a bell ring out and a voice calling, "Next departure in 1 minute!"
- match crossing_ferry You hear a bell ring out three times and a voice calling, "All aboard who's going aboard!"
- matchwait
- ferry_boarded:
- waitforre ^The ferry (Kertigen\'s Honor|Hodierna\'s Grace) reaches the dock and its crew ties the ferry off\.$
- move go dock
- return
- ###
- ########################################################################################################
- ###
- sub_tend:
- var BODY.PART
- var BODY.COUNTER 0
- action (FA) on
- put health
- waitfor Your body
- eval BODY.PART replacere("%BODY.PART","\|$","")
- eval BODY.MAX count("%BODY.PART","|")
- tend_loop:
- if %BODY.COUNTER <= %BODY.MAX then
- {
- put tend my %BODY.PART(%BODY.COUNTER)
- waitfor You work carefully at tending your wound.
- evalmath BODY.COUNTER %BODY.COUNTER + 1
- goto tend_loop
- }
- action (FA) off
- unvar BODY.PART
- unvar BODY.COUNTER
- unvar BODY.MAX
- return
- ###
- ########################################################################################################
- # subs and functions related to emergency situations.
- # All outcomes for emergency current result in existing character from the game.
- ###
- stunned:
- ###
- ###
- health_drop:
- action (emergency) off
- pause .1
- pause .1
- pause .1
- retreat:
- matchre retreat ^You retreat back to pole range\.$|are unable to get away|You try to back away
- matchre outofcombat ^You retreat from combat\.$|^You are already as far away as you can get\!$
- matchre health_drop \.\.\.wait|Roundtime|^You are still stunned\.$
- match abort_climbing You should stop practicing your Athletics skill before you do that.
- put retreat
- matchwait
- abort_climbing:
- put stop climb
- goto retreat
- outofcombat:
- ###
- ###
- dying:
- action (emergency) off
- put #queue clear
- put #send 1 exit
- put #script abort all
- pause 2
- exit
- ###
- ########################################################################################################
- ########################################################################################################
- # subs and functions related to researching.
- ###
- research_more:
- put research %RESEARCH.PLAN(%RESEARCH.COUNTER) %RESEARCH.SECONDS
- var RESEARCH.START.TIME %t
- put #statusbar 3 Researching - "%RESEARCH.PLAN(%RESEARCH.COUNTER)" for %RESEARCH.SECONDS seconds: @time@
- pause .25
- pause .25
- var RESEARCH.MORE 0
- return
- ###
- ###
- research_loop_complete:
- evalmath RESEARCH.COUNTER %RESEARCH.COUNTER + 1
- if %RESEARCH.COUNTER <= %RESEARCH.STEPS then
- {
- var RESEARCH.MORE 1
- var RESEARCH.COMPLETE 0
- return
- }
- else
- {
- put #log >training_%DATE.log @time@ ~ research project completed
- put #log >training_%DATE.log @time@ ~ primary magic = $Primary_Magic.Ranks ($Primary_Magic.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ arcana = $Arcana.Ranks ($Arcana.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ augmentation = $Augmentation.Ranks ($Augmentation.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ utility = $Utility.Ranks ($Utility.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ warding = $Warding.Ranks ($Warding.LearningRate/34)
- var RESEARCH.PROJECT.COMPLETE 1
- var RESEARCH.COUNTER 0
- var RESEARCH.STEPS null
- var RESEARCH.MORE null
- var RESEARCH.COMPLETE null
- var RESEARCH.SKIP null
- put #statusbar 3
- return
- }
- ###
- ###
- define_research_plan:
- put #log >training_%DATE.log @time@ ~ evaluating magic skills for research
- put #log >training_%DATE.log @time@ ~ primary magic = $Primary_Magic.Ranks ($Primary_Magic.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ arcana = $Arcana.Ranks ($Arcana.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ augmentation = $Augmentation.Ranks ($Augmentation.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ utility = $Utility.Ranks ($Utility.LearningRate/34)
- put #log >training_%DATE.log @time@ ~ warding = $Warding.Ranks ($Warding.LearningRate/34)
- var RESEARCH.PLAN
- var RESEARCH.RETRY 0
- redefine_research_plan:
- if $Primary_Magic.LearningRate < %RESEARCH.LEARNINGRATE.MIN or $Arcana.LearningRate < %RESEARCH.LEARNINGRATE.MIN then
- {
- var RESEARCH.PLAN %RESEARCH.PLAN|fundamental
- put #log >training_%DATE.log @time@ ~ flagging fundamental(1)
- }
- if $Augmentation.LearningRate < %RESEARCH.LEARNINGRATE.MIN then
- {
- var RESEARCH.PLAN %RESEARCH.PLAN|augmentation
- put #log >training_%DATE.log @time@ ~ flagging augmentation
- }
- if $Utility.LearningRate < %RESEARCH.LEARNINGRATE.MIN then
- {
- var RESEARCH.PLAN %RESEARCH.PLAN|utility
- put #log >training_%DATE.log @time@ ~ flagging utility
- }
- if $Primary_Magic.LearningRate < 18 or $Arcana.LearningRate < 18 then
- {
- var RESEARCH.PLAN %RESEARCH.PLAN|fundamental
- put #log >training_%DATE.log @time@ ~ flagging fundamental(2)
- }
- if $Warding.LearningRate < %RESEARCH.LEARNINGRATE.MIN then
- {
- var RESEARCH.PLAN %RESEARCH.PLAN|warding
- put #log >training_%DATE.log @time@ ~ flagging warding
- }
- var RESEARCH.CHECK.TIME %t
- if matchre("%RESEARCH.PLAN","\|") then
- {
- var RESEARCH.LEARNINGRATE.MIN 12
- var RESEARCH.PROJECT.COMPLETE 0
- var RESEARCH.MORE 1
- var RESEARCH.COMPLETE 0
- var RESEARCH.COUNTER 0
- var RESEARCH.SKIP 0
- var RESEARCH.INVESTED.SECONDS 0
- if %RESEARCH.RETRY = 1 then
- {
- var RESEARCH.LEARNINGRATE.MIN 12
- put #log >training_%DATE.log @time@ ~ resetting default RESEARCH.LEARNINGRATE.MIN value
- }
- }
- else
- {
- put #log >training_%DATE.log @time@ ~ nothing to research
- var RESEARCH.STEPS null
- var RESEARCH.MORE null
- var RESEARCH.COMPLETE null
- var RESEARCH.PROJECT.COMPLETE null
- var RESEARCH.SKIP 1
- var RESEARCH.INVESTED.SECONDS null
- if %RESEARCH.RETRY != 1 then
- {
- var RESEARCH.LEARNINGRATE.MIN 24
- var RESEARCH.RETRY 1
- put #log >training_%DATE.log @time@ ~ trying again with higher RESEARCH.LEARNINGRATE.MIN value
- goto redefine_research_plan
- }
- put #log >training_%DATE.log @time@ ~ skipping research due to existing high training state
- var RESEARCH.LEARNINGRATE.MIN 12
- put #log >training_%DATE.log @time@ ~ resetting default RESEARCH.LEARNINGRATE.MIN value
- return
- }
- eval RESEARCH.PLAN replacere("%RESEARCH.PLAN","^\|","")
- put #log >training_%DATE.log @time@ ~ new research plan created: %RESEARCH.PLAN
- eval RESEARCH.STEPS count("%RESEARCH.PLAN","|")
- gaf:
- if %CAMB.HIGHCAP.WORN = 0 then
- {
- put get my %CAMB.HIGHCAP.ITEM
- waitfor You get a
- }
- gaf_cast_fail:
- put charge my %CAMB.HIGHCAP.ITEM 20
- pause
- pause .1
- put charge my %CAMB.HIGHCAP.ITEM 20
- pause
- pause .1
- put charge my %CAMB.HIGHCAP.ITEM 20
- pause
- pause .1
- put prep gaf %GAF.PREP
- waitfor %SPELL.MESSAGING
- var SPELL.PREPPED 0
- put charge my %CAMB.HIGHCAP.ITEM 20
- pause
- pause .1
- put invoke my %CAMB.HIGHCAP.ITEM 80
- pause
- pause .1
- if %SPELL.PREPPED = 1 then goto gaf_cast
- else
- {
- waitfor You feel fully prepared
- }
- gaf_cast:
- match gaf_cast_success A distracting flurry of blue and white mana momentarily blinds you.
- match gaf_cast_fail backfires
- put cast
- matchwait
- gaf_cast_success:
- if %CAMB.HIGHCAP.WORN = 0 then
- {
- put stow my %CAMB.HIGHCAP.ITEM
- waitfor You put
- }
- return
- ###
- ###
- finish_research:
- put #log >training_%DATE.log @time@ ~ evaluating research project progress
- if %RESEARCH.PROJECT.COMPLETE = 1 or %RESEARCH.SKIP = 1 then goto finish_research_done
- if %RESEARCH.COMPLETE != 1 then
- {
- evalmath TEMP %RESEARCH.INVESTED.SECONDS + (%t - %RESEARCH.START.TIME)
- if %TEMP >= 320 then
- {
- put #log >training_%DATE.log @time@ ~ invested too much time (%TEMP seconds) to abort -- completing research project
- put #statusbar 3 Finishing research project - %RESEARCH.PLAN(%RESEARCH.COUNTER)
- unvar TEMP
- goto complete_research
- }
- if %TEMP < 320 then
- {
- put #log >training_%DATE.log @time@ ~ insufficient time invested in to project -- aborting
- unvar TEMP
- goto abort_research
- }
- }
- else goto finish_research_done
- complete_research:
- if %RESEARCH.MORE = 1 then
- {
- var RESEARCH.MORE 0
- goto complete_research_more
- }
- match finish_research_done Breakthrough!
- match complete_research_more However, there is still more to learn before you arrive at a breakthrough.
- matchwait
- complete_research_more:
- var RESEARCH.SECONDS 300
- put research %RESEARCH.PLAN(%RESEARCH.COUNTER) %RESEARCH.SECONDS
- pause .1
- goto complete_research
- abort_research:
- put research cancel
- pause .25
- pause .25
- put research cancel
- pause .25
- pause .25
- put research cancel
- pause .25
- pause .25
- finish_research_done:
- put #log >training_%DATE.log @time@ ~ research completed
- return
- ###
- ###
- eval_research:
- if %RESEARCH.STEPS != null then
- {
- if %RESEARCH.COMPLETE = 1 then gosub research_loop_complete
- if %RESEARCH.MORE = 1 then gosub research_more
- }
- if %RESEARCH.PROJECT.COMPLETE = 1 or %RESEARCH.SKIP = 1 then
- {
- evalmath TEMP %RESEARCH.CHECK.TIME + 200
- if $%RESEARCH.SKILLMIN(0).LearningRate < %RESEARCH.SKILLMIN(1) and %t >= %TEMP then
- {
- gosub define_research_plan
- if %RESEARCH.MORE = 1 then gosub research_more
- }
- unvar TEMP
- }
- goto %RETURN.POINT
- ###
- ########################################################################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement