var dpsLastHP = 0 var dmgHistory = [] func CalculateDPS() ?foe ! boss dmgHistory.Clear() dpsLastHP = 0 return var eHP = foe.armor + foe.hp ?eHP > dpsLastHP dmgHistory.Add(0) :?eHP = dpsLastHP ?dmgHistory.Count() ! 0 dmgHistory.Add(0) : dmgHistory.Add(dpsLastHP - eHP) var maxHist = 5 * 30 ?dmgHistory.Count() > maxHist dmgHistory.RemoveAt(0) var total = 0 for dmg : dmgHistory total += dmg dpsLastHP = eHP return total / (dmgHistory.Count() / 30.0) var vigorWands = [ "vigor wand D shiny", "vigor wand D -shiny"] var aetherWands = [ "aether wand D +12", "aether wand D +10"] var fireWands = [ "fire wand D +11", "fire wand D +10"] var iceWands = [ "ice wand D +8", "ice wand D +7"] var poisonWands = [ "poison wand D +8", "poison wand D +7"] var chillWands = [ "ice wand dI +11", "ice wand dI +8"] var armorHammers = [ "poison hammer D", "ice hammer D"] var stunlock = [ "stone hammer +9", "aether hammer"] var unmakeSwords = [ "aether sword dU +10", "aether sword dU +9"] var chillSwords = [ "ice sword dI shiny", "ice sword dI -shiny"] var healingSwords = [ "vigor sword dL +18", "vigor sword dL +13"] var poisonSwords = [ "poison sword D +10", "poison sword D +8"] var iceSwords = [ "ice sword D +9", "ice sword D +8"] var fireSwords = [ "fire sword D shiny", "fire sword D -shiny"] var vigorSwords = [ "vigor sword D shiny", "vigor sword D -shiny"] var aetherSwords = [ "aether sword D +11", "aether sword D +9"] var stoneSwords = [ "stone sword +15", "stone sword +14"] var elementalSwordDict = [ ["ice", iceSwords], ["fire", fireSwords], ["poison", poisonSwords], ["aether", aetherSwords], ["vigor", vigorSwords], ] var allAbilities = [ "mind","hammer","bardiche","blade", "skeleton_arm","mask","fire_talisman", "cinderwisp","quarterstaff","dash","bash", ] var abilityHUDNames = [ "mind","ham","bard", "bfg","arm","mask", "tali","wisp","qtr","dash","bash" ] var hasEncountedBoss = false var shouldPermaPot = false var toSummon = "wisp" var canChill canChill = CanApplyDebuf("debuff_chill") var canPoison canPoison = CanApplyDebuf("debuff_damage") var aiState = 0 var loopCount = 0 var foeDebuffs foeDebuffs = foe.debuffs.string var smiteStack = 0 smiteStack = buffs.GetCount("smite") func ResetGlobals() hasEncountedBoss = false aiState = 0 var weakRune = stone ?foe = vigor weakRune = poison ?foe = poison weakRune = ice ?foe = ice weakRune = fire ?foe = fire weakRune = aether ?foe = aether weakRune = vigor func Between(value, min, max) return value >= min & value <= max func ItemCD(itemName) return item.GetCooldown(itemName) func CanUse(itemName) return item.CanActivate(itemName) func CanUseItem() return item.CanActivate() func FormatTime(timeVal) return time.FormatCasual(timeVal) func FoeWithin(val) return FoeBetween(0, val) func FoeBetween(min, max) return foe.distance >= min & ^foe.distance <= max func PotionIs(pot) return item.potion = pot func HasBerserk() return buffs.GetCount("berserk") > 0 var toEquipL toEquipL = "" var toEquipR = "" toEquipR = "" var toEquip = "" toEquip = "" var shouldActivateR shouldActivateR = false var shouldActivateL shouldActivateL = false func SetEquipL(itemName) toEquipL = itemName toEquip = "" func SetEquipR(itemName) toEquipR = itemName toEquip = "" func SetEquip(itemName) toEquipL = "" toEquipR = "" toEquip = itemName func EquipSet(set) SetEquipL(set[0]) SetEquipR(set[1]) func ActivateItem() shouldActivateR = true func ActivateLeft() shouldActivateL = true func EquipItems() ?toEquipL equipL @toEquipL@ ?toEquipR equipR @toEquipR@ ?toEquip equip @toEquip@ func ActivateItems() ?shouldActivateR & CanUseItem() activate R ?shouldActivateL & CanUseItem() activate L var mdc = 0 func MoondialIf(set, condition) ?condition MoondialSet(set) : EquipSet(set) func MoondialSet(set) Moondial(set[0], set[1]) func Moondial(equip1,equip2) ?mdc = 1 SetEquipL("moon") SetEquipR(equip1) ?mdc = 2 SetEquipL("moon") SetEquipR(equip2) ?mdc = 3 SetEquipL(equip1) SetEquipR(equip2) mdc = 0 mdc++ func MoonjuggleSet(set) Moonjuggle(set[0], set[1]) func Moonjuggle(equip1,equip2) ?mdc = 0 SetEquipL(equip2) SetEquipR(equip1) ?mdc = 1 SetEquipL("moon") SetEquipR(equip1) ?mdc = 2 SetEquipL(equip2) SetEquipR(equip1) ?mdc = 3 SetEquipL(equip2) SetEquipR("moon") mdc = 0 mdc++ func xLookup(val, arr1, arr2) var index = arr1.IndexOf(val) ?index > -1 return arr2[index] : return false func DictVal(dict, dictKey) for i = 0 .. dict.Count()-1 var value = dict[i] ?value[0] = dictKey return value[1] func BrewBerserk() ?loc.begin brew wood + bronze func BrewLucky() ?loc.begin brew stone + bronze func BrewStrength() ?loc.begin brew stone func UseHealth(hp_threshold) ?loc.begin brew tar ?hp < hp_threshold activate potion func UsePot() ?item.potion ! empty activate potion func UsePotWhen(condition) ?item.potion ! empty & condition activate potion func EquipDash() ?ItemCD("bash") <= 0 SetEquipR("bashing shield") :?ItemCD("dash") <= 0 SetEquipR("dashing shield") func InDashRange() return FoeBetween(11,16) func EquipDashInRange() ?InDashRange() EquipDash() return true return false func EquipChillSwordsOr(set) ?CanApplyDebuf("debuff_chill") MoondialSet(chillSwords) : EquipSet(set) func EquipSwordSet(rune) EquipSet(DictVal(elementalSwordDict,rune)) func PickupWhenClose() ?pickup.distance < 10 ?loopCount = 0 & shouldPermaPot SetEquipL("star") : SetEquipR("star") func CanApplyDebuf(debuff) ?(foe = "immune_to_" + debuff) return false var stack = foe.debuffs.GetCount(debuff) ?debuff = "debuff_chill" return stack < 6 return foe.debuffs.string ! debuff func IsMushroomBoss() return foe = mushroom_boss | ^foe = mushroom_boss_fat | ^foe = mushroom_boss_skinny func BardicheAbility() var cooldown = ItemCD("bardiche") ?FoeWithin(10) & ^cooldown <= 0 | cooldown > 870 SetEquip("bardiche") ActivateItem() return true return false func HammerAbility() var cooldown = ItemCD("hammer") ?cooldown <= 0 | cooldown > 640 SetEquip("heavy hammer") ActivateItem() return true return false var qtrTimer = 0 func QtrDash() ?foe.distance <= 16 return var cooldown = ItemCD("quarterstaff") ?qtrTimer ! 0 SetEquip("quarterstaff") qtrTimer++ ?qtrTimer > 2 qtrTimer = 0 :?cooldown <= 0 & ^CanUseItem() SetEquip("quarterstaff") ActivateItem() qtrTimer++ var scrolling = 0 func DoubleBlade() var bladeReady = ItemCD("blade") <= 0 ?bladeReady & foe.count > 3 scrolling++ screen.Next() : scrolling = 0 screen.ResetOffset() ?bladeReady & ^FoeWithin(25) & ^(foe.count > 5 | scrolling > 15) SetEquip("blade") ActivateItem() return true return scrolling > 0 func FireTalisman(leftHand) var cooldown = ItemCD("fire_talisman") ?cooldown > 130 ?leftHand SetEquipL("fire talisman") : SetEquipR("fire talisman") return true ?(summon.count = 0 | ^summon.GetId() ! "cinderwisp") ^& cooldown <= 0 & CanUseItem() ?leftHand SetEquipL("fire talisman") ActivateLeft() : SetEquipR("fire talisman") ActivateItem() return true return false func AetherTalisman(leftHand) var cooldown = ItemCD("aether_talisman") ?cooldown > 130 ?leftHand SetEquipL("aether talisman") : SetEquipR("aether talisman") return true ?(summon.count = 0 | ^summon.GetId() ! "voidweaver") ^& cooldown <= 0 & CanUseItem() ?leftHand SetEquipL("aether talisman") ActivateLeft() : SetEquipR("aether talisman") ActivateItem() return true return false func SummonTheGuy() ?toSummon = "none" return :?toSummon = "wisp" FireTalisman(shouldPermaPot & ^ loopCount = 0) return :?toSummon = "voidweaver" AetherTalisman(shouldPermaPot & ^ loopCount = 0) return func MaskAbility() ?ItemCD("mask") <= 0 SetEquip("mask") ActivateItem() return true return false func RunAAC() ?item.left.state = 3 equipL *0 wand equipL @item.left@ ?item.right.state = 3 equipR *0 shield equip @item.right@ func Rocky() BrewLucky() shouldPermaPot = true ?loopCount = 0 UsePot() :?time > 2000 UsePot() SetEquipL("triskelion") ?!ai.enabled | ai.paused SetEquipL("quest") SetEquipR("compound shield") ?pickup.distance < 10 ?loopCount = 0 SetEquipL("star") : SetEquipR("star") ?loopCount ! 0 & (!foe | ^foe = acronian_scout | !FoeWithin(30)) QtrDash() ?FoeWithin(16) & foe = acronian_scout RockyMiniboss() :?(FoeWithin(18) & foe = dysangelos) | ^hasEncountedBoss hasEncountedBoss = true RockyBoss() func RockyMiniboss() ?EquipDashInRange() return ?canChill MoondialIf(chillSwords, loopCount ! 0) :?hp < maxhp EquipSet(healingSwords) : MoondialIf(fireSwords, loopCount ! 0) func RockyBoss() ?loopCount ! 0 var hammerStates = [100, 101, 102] ?hammerStates.Contains(foe.state) & ^FoeWithin(18) ?HammerAbility() return ?foe.state = 118 QtrDash() EquipDashInRange() BardicheAbility() return ?foe.state = -1 ?HammerAbility() return var transStates = [-1,102,124,117,127,116] ?transStates.Contains(foe.state) | ^foe.state = 107 & foe = elementalist SetEquipL("quest") return ?foe = dysangelos_bearer ?foe.state = 101 return ?EquipDashInRange() return ?canChill MoondialIf(chillSwords, loopCount ! 0) :?hp < maxhp - 40 EquipSet(healingSwords) : MoondialIf(fireSwords, loopCount ! 0) ?foe = dysangelos_elementalist ?EquipDashInRange() return ?weakRune = "fire" & loopCount ! 0 MoondialSet(fireSwords) : EquipSwordSet(weakRune) ?foe = dysangelos_perfected UsePot() ?foe.state = 115 & foe.time > 60 SetEquipL("mind") return ?foe.state = 32 & foe.time > 60 & ^foe.damage <= 1 SetEquipL("mind") return ?EquipDashInRange() return var weakness = FindDysaWeakness() ?canChill MoondialIf(chillSwords, loopCount ! 0) :?foe.armor > 0 EquipSet(armorHammers) :?hp < maxhp & foe.buffs.string ! vigor EquipSet(healingSwords) :?weakness = "fire" & loopCount ! 0 MoondialSet(fireSwords) : EquipSwordSet(weakness) ?foe.state = 32 & foe.time > 50 MaskAbility() func FindDysaWeakness() ?foe.buffs.string ! "fire" return "fire" :?foe.buffs.string ! "ice" return "ice" :?foe.buffs.string ! "aether" return "aether" :?foe.buffs.string ! "vigor" return "vigor" : return "poison" func Deadwood() shouldPermaPot = true toSummon = "voidweaver" BrewBerserk() ?shouldPermaPot ?loopCount = 0 UsePot() :?time > 2000 UsePot() SetEquipL("triskelion") SetEquipR("compound shield") PickupWhenClose() ?(foe = wasp | foe = wasp_nest) & ^FoeWithin(16) DeadwoodMinibosss() return ?foe = boss & FoeWithin(16) DeadwoodBoss() return ?FoeWithin(16) ?EquipDashInRange() return ?loopCount = 0 & shouldPermaPot ?foe = scarab SetEquipL("fire sword") : SetEquipL("stone wand") : DeadwoodStutterStep() func DeadwoodStutterStep() ?foe.distance <= 6 SetEquip("skeleton") :?foe.distance <= 10 ?time % 2 = 0 SetEquipR("triskelion") SetEquipL("sword") : SetEquipR("hatchet") SetEquipL("sword") : SetEquipL("triskelion") func DeadwoodMinibosss() ?EquipDashInRange() return ?loopCount = 0 activate voidweaver : DeadwoodStutterStep() func DeadwoodBoss() ?foe = poena DeadwoodWitchBoss() :?foe = tree_boss DeadwoodTreeBoss() func DeadwoodWitchBoss() ?foe.state = 1 ?MaskAbility() return ?BardicheAbility() return ?InDashRange() ?ItemCD("dash") <= 0 SetEquipR("dashing shield") return ?loopCount = 0 EquipSet(stunlock) : SetEquip("skeleton") func DeadwoodTreeBoss() ?EquipDashInRange() return ?loopCount = 0 ?canChill SetEquipL("ice sword dI") : SetEquipL("fire sword") : ?canChill MoondialSet(chillSwords) : SetEquip("skeleton") func Caves() BrewLucky() SetEquipL("triskelion") SetEquipR("ice shield") PickupWhenClose() ?foe = cool_bat & FoeWithin(16) CavesMiniBoss() return ?foe = spider_boss & FoeWithin(16) CavesBoss() return DoubleBlade() ?EquipDashInRange() return ?FoeWithin(16) ?smiteStack ! 0 EquipSet(chillWands) : EquipSet(iceWands) func CavesMiniBoss() ?EquipDashInRange() return MoondialSet(chillSwords) func CavesBoss() UsePot() ?foe.state = 142 & foe.time = 60 SetEquipL("mind") return MaskAbility() SetEquip("ice crossbow") func Mushroom() BrewLucky() toSummon = "voidweaver" SetEquipL("triskelion") SetEquipR("poison shield") ?EquipDashInRange() return ?IsMushroomBoss() & FoeWithin(16) hasEncountedBoss = true MushroomBoss() return ?foe = boss & FoeWithin(16) EquipChillSwordsOr(poisonSwords) return DoubleBlade() ?FoeWithin(16) EquipSet(poisonWands) func MushroomBoss() UsePot() ?foe = mushroom_boss_fat MaskAbility() EquipChillSwordsOr(poisonSwords) BardicheAbility() ?foe ! mushroom_boss QtrDash() var pallasStage = 0 func Halls() ?loc.loop pallasStage = 0 BrewBerserk() toSummon = "voidweaver" shouldPermaPot = true UsePot() SetEquipL("triskelion") ?foe.GetCount(30) = 0 SetEquipR("compound shield") : SetEquipR("vigor shield") PickupWhenClose() ?FoeWithin(16) ?foe = skeleton_boss_stage_2 pallasStage = 2 :?foe = skeleton_boss pallasStage = 1 ?pallasStage ! 0 & foe.count > 0 HallsBoss() return ?foe.count > 4 activate voidweaver ?HallsMiniboss() return ?EquipDashInRange() return ?FoeWithin(16) ?foe.count = 1 & foe ! immune_to_physical ^& !(shouldPermaPot & loopCount = 0) MoondialSet(vigorSwords) : EquipSet(vigorWands) var fightingRIP = false var oldKi = 0 func HallsMiniboss() ?shouldPermaPot & loopCount = 0 return ?foe = big_tomb & foe.distance < 10 oldKi = res.ki fightingRIP = true ?fightingRIP >h-1,-2,rip! ?EquipDashInRange() return ?res.ki = oldKi SetEquip("vigor crossbow") : fightingRIP = false ?foe.count = 0 | ^(foe.GetCount(10) = 1 & foe ! big_tomb) fightingRIP = false return true return false func HallsBoss() toSummon = "wisp" ?MaskAbility() return ?foe.count > 1 & pallasStage = 2 EquipSet(vigorWands) ?foe.distance < 6 & ItemCD("mind") <= 0 SetEquipL("mind") return ?EquipDashInRange() return ?canChill MoondialIf(chillSwords, loopCount ! 0) :?hp < maxhp EquipSet(healingSwords) : MoondialIf(vigorSwords, loopCount ! 0) func Mine() ?loc.stars <= 10 BrewBerserk() : BrewStrength() SetEquipL("triskelion") SetEquipR("aether shield") PickupWhenClose() ?foe = explode MineMiniboss() return ?foe = boss & FoeWithin(20) & ^foe = bronze_guardian MineBoss() return DoubleBlade() ?EquipDashInRange() return ?FoeWithin(16) ?foe.GetCount(10) = 1 & smiteStack = 0 EquipSet(unmakeSwords) return ?smiteStack ! 0 EquipSet(chillWands) : EquipSet(aetherWands) func MineMiniboss() ?FoeBetween(11,16) SetEquipR("dash") ?FoeWithin(8) SetEquipR("mind") func MineBoss() UsePot() MaskAbility() HammerAbility() ?foe.state = 32 ?foe.time > 15 SetEquipL("mind") SetEquipR("aether shield") aiState = 1 :?foe.state = 33 ?aiState = 1 EquipDash() ?ItemCD("dash") > 0 | ^ItemCD("bash") > 0 aiState = 2 : EquipSet(unmakeSwords) BardicheAbility() : aiState = 0 SetEquip("aether crossbow") func Icy() BrewLucky() SetEquipL("triskelion") SetEquipR("fire shield") ?!foe SetEquipR("mask") ?foe = yeti & FoeWithin(16) hasEncountedBoss = true ?hasEncountedBoss & FoeWithin(16) IceBoss() return ?foe = giant ice elemental & ^FoeWithin(16) IceMiniboss() return DoubleBlade() ?EquipDashInRange() return ?FoeWithin(16) ?(foe = ice_pillar | foe = ice_wall) EquipSet(unmakeSwords) return EquipSet(fireWands) func IceMiniboss() ?EquipDashInRange() return MoondialSet(fireSwords) func IceBoss() ?foe.armor > 0 ?EquipDashInRange() return MoondialSet(fireSwords) return UsePot() MaskAbility() ?foe.state = 133 EquipSet(fireWands) return ?EquipDashInRange() return ?debuffs.GetCount("debuff_yeti_chill") > 0 EquipSet(fireSwords) : MoondialSet(fireSwords) HammerAbility() BardicheAbility() func Temple() BrewLucky() SetEquipL("triskelion") SetEquipR("ice shield") ?foe = nagaraja & FoeWithin(16) TempleBoss() return DoubleBlade() ?EquipDashInRange() return ?FoeWithin(16) ?foe = acronian_cultist EquipChillSwordsOr(iceSwords) return ?smiteStack ! 0 EquipSet(chillWands) : EquipSet(iceWands) func TempleBoss() UsePot() ?foe.state ! 112 & InDashRange() EquipDash() return ?foe.state = 112 & foe.time = 45 SetEquipL("mind") return EquipChillSwordsOr(iceSwords) var bottom = screen.h - 2 func ColorCD(cd) ?cd > 0 return "red" return "green" var usedItems = [] var itemGPs = [] var runGP = 0 func ManageGP() ?!usedItems.Contains(item.right) usedItems.Add(item.right) itemGPs.Add([item.right, item.right.gp]) runGP += item.right.gp ?!usedItems.Contains(item.left) usedItems.Add(item.left) itemGPs.Add([item.left, item.left.gp]) runGP += item.left.gp ?loc.loop usedItems.Clear() itemGPs.Clear() runGP = 0 func ItemGPHUD() var y = 1 for itemGP : itemGPs >`10,@y@,@itemGP[0]@ - @itemGP[1]@ y++ var splitStart = 0 var splPhase = 0 func SaveSplit(splitKey) var old = storage.Get(splitKey, 99999) var newSpl = totaltime - splitStart ?newSpl < old storage.Set(splitKey, newSpl) storage.Set(splitKey + "Cur", newSpl) splitStart = 0 splPhase = 0 func DysaSplitHUD() ?loc ! Rocky return ?loc.begin | loc.loop storage.Delete("p1SplitCur") storage.Delete("p2SplitCur") storage.Delete("p3SplitCur") ?splPhase = 1 & foe ! dysangelos_bearer SaveSplit("p1Split") :?splPhase = 2 & foe ! dysangelos_elementalist SaveSplit("p2Split") :?splPhase = 3 & foe ! dysangelos_perfected SaveSplit("p3Split") ?foe = dysangelos_bearer ?splitStart = 0 splitStart = totaltime splPhase = 1 :?foe = dysangelos_elementalist ?splitStart = 0 splitStart = totaltime splPhase = 2 :?foe = dysangelos_perfected ?splitStart = 0 splitStart = totaltime splPhase = 3 var x = screen.w - 18 var y = bottom - 6 ?splitStart ! 0 var curSplit = ^TimeDisplay(totaltime - splitStart) >`@x@,@y@,Cur: @curSplit@ y++ for i = 1 .. 3 var splitName = "p" + i + "Split" var split = storage.Get(splitName, -1) var curSplit = storage.Get ^(splitName + "Cur", "-") var textCol = "#red" ?curSplit = "-" textCol = "#adadad" :?curSplit <= split textCol = "#green" >`@x@,@y@,P@i@: >`@x + 5@,@y@,@textCol@,@curSplit@F >`@x + 10@,@y@,| @split@F y++ var potionEffectNames = ["berserk", "lucky_crit"] func PotionHUD() for effect : potionEffectNames var x = buffs.GetTime(effect) ?x > 0 return string.Capitalize(effect) + ": " + ^x return "None" var oldAverages = [] func AverageIconHUD(average) ?loc.loop | loc.begin oldAverages.Add(loc.averageTime) var lastAverage = loc.averageTime ?oldAverages.Count() > 1 lastAverage = ^oldAverages[oldAverages.Count() - 2] var iconX = 8 + string.Size(average) ?loc.averageTime > lastAverage >`@iconX@,@bottom@,#red,▲ :?loc.averageTime < lastAverage >`@iconX@,@bottom@,#green,▼ : >`@iconX@,@bottom@,#blue,- func CooldownHUD() var x = screen.w - 10 var x2 = screen.w - 5 var y = 1 for abi : allAbilities var cd = ItemCD(abi) var text = xLookup(abi,allAbilities, ^abilityHUDNames) var textCol = ColorCD(cd) >`@x@,@y@,#@textCol@, ^@string.Capitalize(text)@ >`@x2@,@y@,#@textCol@, ^@time.FormatDigital(cd)@ y++ var lastTime = 0 var lastTimeTemp = 0 func TimeDisplay(value) return FormatTime(value) + " " + ^value + "F" func TimeHUD() ?lastTimeTemp > totaltime lastTime = lastTimeTemp lastTimeTemp = totaltime var current = TimeDisplay(totaltime) var last = TimeDisplay(lastTime) var best = TimeDisplay(loc.bestTime) var average = TimeDisplay(loc.averageTime) >`0,@bottom - 3@,Cur: >`7,@bottom - 3@,@current@ >`0,@bottom - 2@,Last: >`7,@bottom - 2@,@last@ >`0,@bottom - 1@,Best: >`7,@bottom - 1@,@best@ >`0,@bottom@,Avg: >`7,@bottom@,@average@ AverageIconHUD(average) var lastFPSTime = time.msbn var frameCount = 0 var fps = 0 func CalculateFPS() frameCount++ var nowTime = time.msbn var elapsed = int.Parse ^(nowTime.Sub(lastFPSTime).ToString()) ?elapsed >= 1000 fps = Math.RoundToInt(frameCount / ^(elapsed / 1000.0)) frameCount = 0 lastFPSTime = time.msbn func HUD() disable hud u CooldownHUD() >`0,6,foe: @foe.id@ >`0,7,State: @foe.state@ Time: @foe.time@ ^ Damage: @foe.damage@ >`0,8,Dist: @foe.distance@ >`0,9,X: @pos.x@ >`0,10,Foe Count: @foe.count@ >`0,11,Loop GP: @runGP@ >`0,12,Potion: @PotionHUD()@ >`0,13,DPS: @CalculateDPS()@ >`0,14,L: @toEquipL@ R: @toEquipR@ B: ^@toEquip@ CalculateFPS() >`28,@screen.h - 1@,@fps@ FPS TimeHUD() DysaSplitHUD() func Main() disable npcDialog RunAAC() ?loc.begin | loc.loop ResetGlobals() ?loc.loop loopCount++ ?loc = Rocky Rocky() :?loc = Deadwood Deadwood() :?loc = Caves Caves() :?loc = Mushroom Mushroom() :?loc = Halls Halls() :?loc = Mine Mine() :?loc = Icy Icy() :?loc = Temple Temple() var ppRun = shouldPermaPot & loopCount = 0 ?ppRun & totaltime > 2 SetEquipR("mask") : ?loc ! Rocky QtrDash() SummonTheGuy() EquipItems() ActivateItems() ManageGP() HUD() Main() var slimeFrames = [ ascii ##.——. #( • •) asciiend, ascii ###.—. ##(• •) asciiend, ascii #______ ( • • ) asciiend ] var jumpLength = 10.0 var jumpHeight = 5 var slimeTargetZ slimeTargetZ = pos.z + 1 var slimeTargetDist = 10 var slimeY = 0 var slimeZ = 0 var slimeX = 0 var slimeDrawY = 0 var lastPlayerX = 0 var lastPlayerZ = 0 var slimeTimer = 0 var slimeState = 0 var slimeFrame = 0 ?loc.loop | loc.begin slimeY = 0 slimeZ = 0 slimeX = -11 slimeDrawY = 0 lastPlayerX = 0 lastPlayerZ = 0 slimeState = 0 slimeTimer = 0 slimeZ = slimeTargetZ ?slimeState = 0 slimeFrame = 0 ?slimeX < -15 slimeState = 1 slimeTimer = 0 :?slimeState = 1 slimeTimer++ slimeFrame = ^math.FloorToInt(slimeTimer / 3) % 2 jumpLength = -(slimeX + slimeTargetDist) jumpLength = jumpLength * 1.0 ?slimeTimer > 15 slimeTimer = 0 slimeState = 2 :?slimeState = 2 slimeFrame = 1 slimeTimer++ slimeY = -math.Sin((slimeTimer / jumpLength) * ^math.pi) * jumpHeight slimeY = math.RoundToInt(slimeY) slimeX++ ?slimeTimer > jumpLength slimeState = 3 slimeTimer = 0 slimeY = 0 :?slimeState = 3 slimeFrame = 2 slimeTimer++ ?slimeTimer > 5 slimeState = 0 slimeTimer = 0 slimeX = slimeX - (pos.x - lastPlayerX) ?slimeX < -50 slimeX = -20 slimeDrawY = slimeZ - pos.z + slimeY lastPlayerX = pos.x lastPlayerZ = pos.z >o@slimeX@,@slimeDrawY@,#green, ^@slimeFrames[slimeFrame]@