diff --git a/EXAMPLE.env b/EXAMPLE.env index 05cca9e..e35e4b5 100644 --- a/EXAMPLE.env +++ b/EXAMPLE.env @@ -1,13 +1,67 @@ # Development settings #set this with the code you get from https://twitchapps.com/tmi/ -OAUTH=oauth:370sdjadskl38sbkEXAMPLEsdja213 +OAUTH=oauth:82hfhf394t5y4y9ghj4238833dhqhj -#channel the user will input commands in. +#channel the user will input commands in TARGETCHANNEL=ninja -#hopefully the bot posts this when it loads but currently it bugs +#prefix for your commands +PREFIX=# + +#message that the bot sends in chat when it successfully connects CONNECTIONMESSAGE=Successfully connected to NIBOR! PeepoHappy +#allow the crowd to use 'gotopoint' (warp to any checkpoint)? +ALLPOINTS=true + +#command cooldowns +COOLDOWNMESSAGE=true +rjto_cd=20 +superjump_cd=60 +superboosted_cd=60 +noboosteds_cd=120 +fastjak_cd=60 +slowjak_cd=180 +pacifist_cd=90 +trip_cd=20 +shortfall_cd=300 +ghostjak_cd=90 +getoff_cd=60 +flutspeed_cd=15 +freecam_cd=300 +enemyspeed_cd=5 +give_cd=360 +collected_cd=360 +eco_cd=20 +sucksuck_cd=30 +noeco_cd=120 +die_cd=150 +gotopoint_cd=600 +randompoint_cd=420 +tp_cd=60 +shift_cd=45 +movetojak_cd=60 +ouch_cd=60 +burn_cd=60 +hp_cd=30 +melt_cd=150 +endlessfall_cd=150 +iframes_cd=60 +invertcam_cd=240 +normalcam_cd=10 +deload_cd=300 +frickstorage_cd=10 +dark_cd=600 +dax_cd=60 +smallnet_cd=1 +widefish_cd=1 +lod_cd=90 +moveplantboss_cd=300 +moveplantboss2_cd=5 +basincell_cd=2 +resetactors_cd=1 +repl_cd=0 + #dont touch this one PATHTOAHK=C:\Program Files\AutoHotkey\AutoHotkey.exe diff --git a/resources/twitchcommands.py b/resources/twitchcommands.py index 1f964d9..c4c70a6 100644 --- a/resources/twitchcommands.py +++ b/resources/twitchcommands.py @@ -30,6 +30,8 @@ PATHTOGK = application_path + "\gk.exe -boot -fakeiso -debug -v" CONNECTIONMESSAGE = str(os.getenv("CONNECTIONMESSAGE")) +COOLDOWNMESSAGE = str(os.getenv("COOLDOWNMESSAGE")) +ALLPOINTS = str(os.getenv("ALLPOINTS")) MOTD = "u playing jak?" COMMANDMODS = ["zed_b0t", "mikegamepro", "water112", "barg034"] PREFIX = str(os.getenv("PREFIX")) @@ -44,6 +46,19 @@ def sendForm(form): print("Sent: " + form) return +def cd_check(id): + global message + if (time.time() - last_used[id]) > cooldowns[id]: + last_used[id] = time.time() + return True + elif COOLDOWNMESSAGE == "true": + sendMessage(irc, "@"+user+" Command "+command_names[id]+" is on cooldown ("+str(int(last_used[id]-(time.time()-cooldowns[id])))+"s left)") + message = "" + return False + else: + message = "" + return False + # #Launch REPL, connect bot, and mi # @@ -52,6 +67,8 @@ def sendForm(form): GKCOMMANDLINE = PATHTOGK GKCOMMANDLINElist = GKCOMMANDLINE.split() print("If it errors below that is O.K.") +print("Cooldown Message: "+COOLDOWNMESSAGE) +print("All Points: "+ALLPOINTS) subprocess.Popen("""taskkill /F /IM gk.exe""",shell=True) subprocess.Popen("""taskkill /F /IM goalc.exe""",shell=True) time.sleep(3) @@ -76,7 +93,17 @@ def sendForm(form): sendForm("(set! *debug-segment* #f)") #End Int block +command_names = ["rjto","superjump","superboosted","noboosteds","fastjak","slowjak","pacifist","trip", + "shortfall","ghostjak","getoff","flutspeed","freecam","enemyspeed","give","collected", + "eco","sucksuck","noeco","die","gotopoint","randompoint","tp","shift","movetojak","ouch", + "burn","hp","melt","endlessfall","iframes","invertcam","normalcam","deload","frickstorage", + "dark","dax","smallnet","widefish","lod","moveplantboss","moveplantboss2","basincell","resetactors", + "repl"] +cooldowns = [0] * len(command_names) +last_used = [0] * len(command_names) +for x in range(len(command_names)): + cooldowns[x]=float(os.getenv(command_names[x]+"_cd")) SERVER = "irc.twitch.tv" PORT = 6667 @@ -100,235 +127,235 @@ def sendForm(form): point_list = ["training-start", "game-start", "village1-hut", "village1-warp", "beach-start", "jungle-start", "jungle-tower", "misty-start", "misty-silo", "misty-bike", "misty-backside", "misty-silo2", "firecanyon-start", "firecanyon-end", "village2-start", "village2-warp", "village2-dock", "rolling-start", "sunken-start", "sunken1", "sunken2", "sunken-tube1", "sunkenb-start", "sunkenb-helix", "swamp-start", "swamp-dock1", "swamp-cave1", "swamp-dock2", "swamp-cave2", "swamp-game", "swamp-cave-3", "ogre-start", "ogre-race", "ogre-end", "village3-start", "village3-warp", "village3-farside", "maincave-start", "maincave-to-darkcave", "maincave-to-robocave", "darkcave-start", "robocave-start", "robocave-bottom", "snow-start snow-fort", "snow-snow-flut-flut", "snow-pass-to-fort", "snow-by-ice-lake", "snow-by-ice-lake-alt", "snow-outside-fort", "snow-outside-cave", "snow-across-from-flut"] -def gamecontrol(): +def sendMessage(irc, message): + messageTemp = "PRIVMSG #" + CHANNEL + " :" + message + irc.send((messageTemp + "\n").encode()) +def gamecontrol(): + global message while True: args = message.split(" ") - if PREFIX + "trip" == str(args[0]).lower(): - sendForm("(send-event *target* 'loading)") + if PREFIX + "rjto" == str(args[0]).lower() and len(args) >= 2 and cd_check(0): + sendForm("(set! (-> *TARGET-bank* wheel-flip-dist) (meters " + str(args[1]) + "))") message = "" - - if PREFIX + "superjump" == str(args[0]).lower(): + + if PREFIX + "superjump" == str(args[0]).lower() and cd_check(1): sendForm("(if (= (-> *TARGET-bank* jump-height-max)(meters 15.0))(begin (set! (-> *TARGET-bank* jump-height-max)(meters 3.5))(set! (-> *TARGET-bank* jump-height-min)(meters 1.01))(set! (-> *TARGET-bank* double-jump-height-max)(meters 2.5))(set! (-> *TARGET-bank* double-jump-height-min)(meters 1)))(begin (set! (-> *TARGET-bank* jump-height-max)(meters 15.0))(set! (-> *TARGET-bank* jump-height-min)(meters 5.0))(set! (-> *TARGET-bank* double-jump-height-max)(meters 15.0))(set! (-> *TARGET-bank* double-jump-height-min)(meters 5.0))))") message = "" - - if PREFIX + "pacifist" == str(args[0]).lower(): - sendForm("(if(=(-> *TARGET-bank* punch-radius) -1.0)(begin(set! (-> *TARGET-bank* punch-radius) (meters 1.3))(set! (-> *TARGET-bank* spin-radius) (meters 2.2))(set! (-> *TARGET-bank* flop-radius) (meters 1.4))(set! (-> *TARGET-bank* uppercut-radius) (meters 1)))(begin(set! (-> *TARGET-bank* punch-radius) (meters -1.0))(set! (-> *TARGET-bank* spin-radius) (meters -1.0))(set! (-> *TARGET-bank* flop-radius) (meters -1.0))(set! (-> *TARGET-bank* uppercut-radius) (meters -1.0))))") - message = "" - if PREFIX + "ghostjak" == str(args[0]).lower(): - sendForm("(set! (-> *TARGET-bank* body-radius) (meters -1.0))") - time.sleep(3) - sendForm("(set! (-> *TARGET-bank* body-radius) (meters 0.7))") - message = "" - - if PREFIX + "superboosted" == str(args[0]).lower(): + if (PREFIX + "superboosted" == str(args[0]).lower() or PREFIX + "superboosteds" == str(args[0]).lower()) and cd_check(2): sendForm("(if (not(=(-> *edge-surface* fric) 1.0))(set! (-> *edge-surface* fric) 1.0)(set! (-> *edge-surface* fric) 30720.0))") message = "" - if PREFIX + "noboosteds" == str(args[0]).lower(): + if (PREFIX + "noboosteds" == str(args[0]).lower() or PREFIX + "noboosted" == str(args[0]).lower()) and cd_check(3): sendForm("(if (not(=(-> *edge-surface* fric) 1530000.0))(set! (-> *edge-surface* fric) 1530000.0)(set! (-> *edge-surface* fric) 30720.0))") message = "" - - if PREFIX + "smallnet" == str(args[0]).lower(): - sendForm("(if (=(-> *FISHER-bank* net-radius)(meters 0.0))(set!(-> *FISHER-bank* net-radius)(meters 0.7))(set! (-> *FISHER-bank* net-radius)(meters 0.0)))") - message = "" - - if PREFIX + "widefish" == str(args[0]).lower(): - sendForm("(if (=(-> *FISHER-bank* width)(meters 10.0))(set! (-> *FISHER-bank* width)(meters 3.3))(set! (-> *FISHER-bank* width)(meters 10.0)))") + + if PREFIX + "fastjak" == str(args[0]).lower() and cd_check(4): + sendForm("(if (not(=(-> *jump-attack-mods* target-speed) 99999.0))(begin(if (=(-> *walk-mods* target-speed) 20000.0)(pc-cheat-toggle-and-tune *pc-settings* eco-yellow))(set! (-> *walk-mods* target-speed) 99999.0)(set! (-> *double-jump-mods* target-speed) 99999.0)(set! (-> *jump-mods* target-speed) 99999.0)(set! (-> *jump-attack-mods* target-speed) 99999.0)(set! (-> *attack-mods* target-speed) 99999.0)(set! (-> *forward-high-jump-mods* target-speed) 99999.0)(set! (-> *jump-attack-mods* target-speed) 99999.0))(begin(set! (-> *walk-mods* target-speed) 40960.0)(set! (-> *double-jump-mods* target-speed) 32768.0)(set! (-> *jump-mods* target-speed) 40960.0)(set! (-> *jump-attack-mods* target-speed) 24576.0)(set! (-> *attack-mods* target-speed) 40960.0)(set! (-> *forward-high-jump-mods* target-speed) 45056.0)(set! (-> *jump-attack-mods* target-speed) 24576.0)))(set! (-> *TARGET-bank* wheel-flip-dist) (meters 17.3))") message = "" - if PREFIX + "die" == str(args[0]).lower(): - sendForm("(initialize! *game-info* 'die (the-as game-save #f) (the-as string #f))") - message = "" - - if PREFIX + "melt" == str(args[0]).lower(): - sendForm("(target-attack-up *target* 'attack 'melt)") + if PREFIX + "slowjak" == str(args[0]).lower() and cd_check(5): + sendForm("(if (not(=(-> *jump-attack-mods* target-speed) 20000.0))(begin(set! (-> *walk-mods* target-speed) 20000.0)(set! (-> *double-jump-mods* target-speed) 20000.0)(set! (-> *jump-mods* target-speed) 20000.0)(set! (-> *jump-attack-mods* target-speed) 20000.0)(set! (-> *attack-mods* target-speed) 20000.0)(set! (-> *TARGET-bank* wheel-flip-dist) (meters 0)))(begin(set! (-> *walk-mods* target-speed) 40960.0)(set! (-> *double-jump-mods* target-speed) 32768.0)(set! (-> *jump-mods* target-speed) 40960.0)(set! (-> *jump-attack-mods* target-speed) 24576.0)(set! (-> *attack-mods* target-speed) 40960.0)(set! (-> *TARGET-bank* wheel-flip-dist) (meters 17.3))))(pc-cheat-toggle-and-tune *pc-settings* eco-yellow)") message = "" - - if PREFIX + "endlessfall" == str(args[0]).lower(): - sendForm("(target-attack-up *target* 'attack 'endlessfall)") + + if PREFIX + "pacifist" == str(args[0]).lower() and cd_check(6): + sendForm("(if(=(-> *TARGET-bank* punch-radius) -1.0)(begin(set! (-> *TARGET-bank* punch-radius) (meters 1.3))(set! (-> *TARGET-bank* spin-radius) (meters 2.2))(set! (-> *TARGET-bank* flop-radius) (meters 1.4))(set! (-> *TARGET-bank* uppercut-radius) (meters 1)))(begin(set! (-> *TARGET-bank* punch-radius) (meters -1.0))(set! (-> *TARGET-bank* spin-radius) (meters -1.0))(set! (-> *TARGET-bank* flop-radius) (meters -1.0))(set! (-> *TARGET-bank* uppercut-radius) (meters -1.0))))") message = "" - - if PREFIX + "burn" == str(args[0]).lower(): - sendForm("(target-attack-up *target* 'attack 'burnup)") + + if PREFIX + "trip" == str(args[0]).lower() and cd_check(7): + sendForm("(send-event *target* 'loading)") message = "" - if PREFIX + "hp" == str(args[0]).lower() and len(args) >= 2: - sendForm("(set! (-> (the-as fact-info-target (-> *target* fact))health) (+ 0.0 " + str(args[1]) + "))") + if PREFIX + "shortfall" == str(args[0]).lower() and cd_check(8): + sendForm("(if (= (-> *TARGET-bank* fall-far) (meters 1))(begin(set! (-> *TARGET-bank* fall-far) (meters 30))(set! (-> *TARGET-bank* fall-far-inc) (meters 20)))(begin (set! (-> *TARGET-bank* fall-far) (meters 1))(set! (-> *TARGET-bank* fall-far-inc) (meters 1))))") message = "" - - if PREFIX + "moveplantboss" == str(args[0]).lower(): - sendForm("(set! (-> *pc-settings* force-actors?) #t)") - time.sleep(0.050) - sendForm("(when (process-by-ename \"plant-boss-3\")(set-vector! (-> (-> (the process-drawable (process-by-ename \"plant-boss-3\"))root)trans) (meters 436.97) (meters -43.99) (meters -347.09) 1.0))") - sendForm("(set! (-> (the-as fact-info-target (-> *target* fact))health) 1.0)") - time.sleep(2) - sendForm("(set! (-> (target-pos 0) x) (meters 431.47)) (set! (-> (target-pos 0) y) (meters -44.00)) (set! (-> (target-pos 0) z) (meters -334.09))") + + if PREFIX + "ghostjak" == str(args[0]).lower() and cd_check(9): + sendForm("(set! (-> *TARGET-bank* body-radius) (meters -1.0))") + time.sleep(3) + sendForm("(set! (-> *TARGET-bank* body-radius) (meters 0.7))") message = "" - - if PREFIX + "moveplantboss2" == str(args[0]).lower(): - sendForm("(set! (-> *pc-settings* force-actors?) #t)") - time.sleep(0.050) - sendForm("(when (process-by-ename \"plant-boss-3\")(set-vector! (-> (-> (the process-drawable (process-by-ename \"plant-boss-3\"))root)trans) (meters 436.97) (meters -43.99) (meters -347.09) 1.0))") + + if PREFIX + "getoff" == str(args[0]).lower() and cd_check(10): + sendForm("(send-event *target* 'end-mode)") message = "" - - if PREFIX + "nopunching" == str(args[0]).lower(): - sendForm("(set! (-> *FACT-bank* eco-full-timeout) (seconds 20 ))(pc-cheat-toggle-and-tune *pc-settings* eco-yellow)") + + if (PREFIX + "setflutflut" == str(args[0]).lower() or PREFIX + "flutspeed" == str(args[0]).lower()) and len(args) >= 2 and cd_check(11): + sendForm("(set! (-> *flut-walk-mods* target-speed)(meters " + str(args[1]) + "))") message = "" - - if PREFIX + "deload" == str(args[0]).lower(): - sendForm("(set! (-> *load-state* want 0 display?) #f)") + + if PREFIX + "freecam" == str(args[0]).lower() and cd_check(12): + sendForm("(stop 'debug)") + time.sleep(6) + sendForm("(start 'play (get-or-create-continue! *game-info*))") message = "" - - if PREFIX + "noeco" == str(args[0]).lower(): - sendForm("(if (> (-> *FACT-bank* eco-full-timeout) 0.0)(set! (-> *FACT-bank* eco-full-timeout) (seconds 0.0))(set! (-> *FACT-bank* eco-full-timeout) (seconds 20.0)))") + + if PREFIX + "enemyspeed" == str(args[0]).lower() and len(args) >= 3 and cd_check(13): + sendForm("(set! (-> *" + str(args[1]) + "-nav-enemy-info* run-travel-speed) (meters " + str(args[2]) + "))") message = "" - if PREFIX + "randomcheckpoint" == str(args[0]).lower(): - sendForm("") + if PREFIX + "give" == str(args[0]).lower() and len(args) >= 3 and cd_check(14): + sendForm("(set! (-> *game-info* " + str(args[1]) + ") (+ (-> *game-info* " + str(args[1]) + ") " + str(args[2]) + "))") message = "" - - if PREFIX + "getoff" == str(args[0]).lower(): - sendForm("(send-event *target* 'end-mode)") + + if (PREFIX + "setcollected" == str(args[0]).lower() or PREFIX + "collected" == str(args[0]).lower()) and len(args) >= 3 and cd_check(15): + sendForm("(set! (-> *game-info* " + str(args[1]) + ") (+ 0.0 " + str(args[2]) + "))") message = "" - - if PREFIX + "dax" == str(args[0]).lower(): - sendForm("(send-event *target* 'sidekick (not (not (send-event *target* 'sidekick #t))))") + + if PREFIX + "eco" == str(args[0]).lower() and len(args) >= 2 and cd_check(16): + sendForm("(send-event *target* 'get-pickup (pickup-type eco-" + str(args[1]) + ") 5.0)") message = "" - - if PREFIX + "ouch" == str(args[0]).lower(): - sendForm("(send-event *target* 'attack #t (new 'static 'attack-info))") + + if (PREFIX + "sucksuck" == str(args[0]).lower() or PREFIX + "setsucksuck" == str(args[0]).lower()) and len(args) >= 2 and cd_check(17): + sendForm("(set! (-> *FACT-bank* suck-suck-dist) (meters " + str(args[1]) + "))(set! (-> *FACT-bank* suck-bounce-dist) (meters " + str(args[1]) + "))") message = "" - - if PREFIX + "lod" == str(args[0]).lower(): - sendForm("(if (= (-> *pc-settings* lod-force-tfrag) 2)(begin(set! (-> *pc-settings* lod-force-tfrag) 0)(set! (-> *pc-settings* lod-force-tie) 0)(set! (-> *pc-settings* lod-force-ocean) 0)(set! (-> *pc-settings* lod-force-actor) 0))(begin(set! (-> *pc-settings* lod-force-tfrag) 2)(set! (-> *pc-settings* lod-force-tie) 3)(set! (-> *pc-settings* lod-force-ocean) 2)(set! (-> *pc-settings* lod-force-actor) 3)))") + + if PREFIX + "noeco" == str(args[0]).lower() and cd_check(18): + sendForm("(if (> (-> *FACT-bank* eco-full-timeout) 0.0)(set! (-> *FACT-bank* eco-full-timeout) (seconds 0.0))(set! (-> *FACT-bank* eco-full-timeout) (seconds 20.0)))") message = "" - - if PREFIX + "dark" == str(args[0]).lower(): - sendForm("(if (not (= (-> (level-get-target-inside *level*) mood-func)update-mood-finalboss)) (set! (-> (level-get-target-inside *level*) mood-func)update-mood-finalboss) (set! (-> (level-get-target-inside *level*) mood-func)update-mood-training))") + + if PREFIX + "die" == str(args[0]).lower() and cd_check(19): + sendForm("(initialize! *game-info* 'die (the-as game-save #f) (the-as string #f))") message = "" - - if PREFIX + "heal" == str(args[0]).lower(): - sendForm("(send-event *target* 'get-pickup 4 1.0)") + + if (PREFIX + "gotolevel" == str(args[0]).lower() or PREFIX + "gotopoint" == str(args[0]).lower()) and len(args) >= 2 and cd_check(20) and ALLPOINTS == "true": + sendForm("(start 'play (get-continue-by-name *game-info* \"" + str(args[1]) + "\"))") message = "" - - if PREFIX + "fastjak" == str(args[0]).lower(): - sendForm("(if (not(=(-> *jump-attack-mods* target-speed) 99999.0))(begin(if (=(-> *walk-mods* target-speed) 20000.0)(pc-cheat-toggle-and-tune *pc-settings* eco-yellow))(set! (-> *walk-mods* target-speed) 99999.0)(set! (-> *double-jump-mods* target-speed) 99999.0)(set! (-> *jump-mods* target-speed) 99999.0)(set! (-> *jump-attack-mods* target-speed) 99999.0)(set! (-> *attack-mods* target-speed) 99999.0)(set! (-> *forward-high-jump-mods* target-speed) 99999.0)(set! (-> *jump-attack-mods* target-speed) 99999.0))(begin(set! (-> *walk-mods* target-speed) 40960.0)(set! (-> *double-jump-mods* target-speed) 32768.0)(set! (-> *jump-mods* target-speed) 40960.0)(set! (-> *jump-attack-mods* target-speed) 24576.0)(set! (-> *attack-mods* target-speed) 40960.0)(set! (-> *forward-high-jump-mods* target-speed) 45056.0)(set! (-> *jump-attack-mods* target-speed) 24576.0)))(set! (-> *TARGET-bank* wheel-flip-dist) (meters 17.3))") + + if (PREFIX + "randompoint" == str(args[0]).lower() or PREFIX + "randomcheckpoint" == str(args[0]).lower()) and cd_check(21): + sendForm("(start 'play (get-continue-by-name *game-info* \"" + str(random.choice(point_list)) + "\"))") message = "" - - if PREFIX + "slowjak" == str(args[0]).lower(): - sendForm("(if (not(=(-> *jump-attack-mods* target-speed) 20000.0))(begin(set! (-> *walk-mods* target-speed) 20000.0)(set! (-> *double-jump-mods* target-speed) 20000.0)(set! (-> *jump-mods* target-speed) 20000.0)(set! (-> *jump-attack-mods* target-speed) 20000.0)(set! (-> *attack-mods* target-speed) 20000.0)(set! (-> *TARGET-bank* wheel-flip-dist) (meters 0)))(begin(set! (-> *walk-mods* target-speed) 40960.0)(set! (-> *double-jump-mods* target-speed) 32768.0)(set! (-> *jump-mods* target-speed) 40960.0)(set! (-> *jump-attack-mods* target-speed) 24576.0)(set! (-> *attack-mods* target-speed) 40960.0)(set! (-> *TARGET-bank* wheel-flip-dist) (meters 17.3))))(pc-cheat-toggle-and-tune *pc-settings* eco-yellow)") + + if PREFIX + "tp" == str(args[0]).lower() and len(args) >= 4 and cd_check(22): + sendForm("(set! (-> (target-pos 0) x) (meters " + str(args[1]) + ")) (set! (-> (target-pos 0) y) (meters " + str(args[2]) + ")) (set! (-> (target-pos 0) z) (meters " + str(args[3]) + "))") message = "" - - if PREFIX + "actorson" == str(args[0]).lower(): - sendForm("(set! (-> *pc-settings* force-actors?) #t)") + + if PREFIX + "shift" == str(args[0]).lower() and len(args) >= 4 and cd_check(23): + sendForm("(set! (-> (target-pos 0) x) (+ (-> (target-pos 0) x)(meters " + str(args[1]) + "))) (set! (-> (target-pos 0) y) (+ (-> (target-pos 0) y)(meters " + str(args[2]) + "))) (set! (-> (target-pos 0) z) (+ (-> (target-pos 0) z)(meters " + str(args[3]) + ")))") message = "" - - if PREFIX + "actorsoff" == str(args[0]).lower(): - sendForm("(set! (-> *pc-settings* force-actors?) #f)") + + if PREFIX + "movetojak" == str(args[0]).lower() and len(args) >= 2 and cd_check(24): + sendForm("(when (process-by-ename \"" + str(args[1]) + "\")(set-vector! (-> (-> (the process-drawable (process-by-ename \"" + str(args[1]) + "\"))root)trans) (-> (target-pos 0) x) (-> (target-pos 0) y) (-> (target-pos 0) z) 1.0))") message = "" - - if PREFIX + "debug" == str(args[0]).lower(): - sendForm("(set! *debug-segment* (not *debug-segment*))(set! *cheat-mode* (not *cheat-mode*))") + + if PREFIX + "ouch" == str(args[0]).lower() and cd_check(25): + sendForm("(send-event *target* 'attack #t (new 'static 'attack-info))") message = "" - - if PREFIX + "shortfall" == str(args[0]).lower(): - sendForm("(if (= (-> *TARGET-bank* fall-far) (meters 1))(begin(set! (-> *TARGET-bank* fall-far) (meters 30))(set! (-> *TARGET-bank* fall-far-inc) (meters 20)))(begin (set! (-> *TARGET-bank* fall-far) (meters 1))(set! (-> *TARGET-bank* fall-far-inc) (meters 1))))") + + if PREFIX + "burn" == str(args[0]).lower() and cd_check(26): + sendForm("(target-attack-up *target* 'attack 'burnup)") message = "" - - if PREFIX + "basincell" == str(args[0]).lower(): - sendForm("(if (when (process-by-ename \"fuel-cell-45\") (= (-> (->(the process-drawable (process-by-ename \"fuel-cell-45\"))root)trans x) (meters -266.54)))(when (process-by-ename \"fuel-cell-45\")(set-vector! (-> (-> (the process-drawable (process-by-ename \"fuel-cell-45\"))root)trans) (meters -248.92) (meters 52.11) (meters -1515.66) 1.0))(when (process-by-ename \"fuel-cell-45\")(set-vector! (-> (-> (the process-drawable (process-by-ename \"fuel-cell-45\"))root)trans) (meters -266.54) (meters 52.11) (meters -1508.48) 1.0)))") + + if PREFIX + "hp" == str(args[0]).lower() and len(args) >= 2 and cd_check(27): + sendForm("(set! (-> (the-as fact-info-target (-> *target* fact))health) (+ 0.0 " + str(args[1]) + "))") message = "" - - if PREFIX + "frickstorage" == str(args[0]).lower(): - sendForm("(stop 'debug)") - time.sleep(0.001) - sendForm("(start 'debug (get-or-create-continue! *game-info*))") + + if PREFIX + "melt" == str(args[0]).lower() and cd_check(28): + sendForm("(target-attack-up *target* 'attack 'melt)") message = "" - - if PREFIX + "freecam" == str(args[0]).lower(): - sendForm("(stop 'debug)") - time.sleep(6) - sendForm("(start 'play (get-or-create-continue! *game-info*))") + + if PREFIX + "endlessfall" == str(args[0]).lower() and cd_check(29): + sendForm("(target-attack-up *target* 'attack 'endlessfall)") message = "" - - if PREFIX + "invertcam" == str(args[0]).lower() and len(args) >= 3: + + if PREFIX + "iframes" == str(args[0]).lower() and len(args) >= 2 and cd_check(30): + sendForm("(set! (-> *TARGET-bank* hit-invulnerable-timeout) (seconds " + str(args[1]) + "))") + message = "" + + if PREFIX + "invertcam" == str(args[0]).lower() and len(args) >= 3 and cd_check(31): sendForm("(set! (-> *pc-settings* " + str(args[1]) + "-camera-" + str(args[2]) + "-inverted?) (not (-> *pc-settings* " + str(args[1]) + "-camera-" + str(args[2]) + "-inverted?)))") message = "" - if PREFIX + "normalcam" == str(args[0]).lower(): + if PREFIX + "normalcam" == str(args[0]).lower() and cd_check(32): sendForm("(set! (-> *pc-settings* third-camera-h-inverted?) #t)(set! (-> *pc-settings* third-camera-v-inverted?) #t)(set! (-> *pc-settings* first-camera-v-inverted?) #t)(set! (-> *pc-settings* first-camera-h-inverted?) #f)") message = "" - if PREFIX + "randompoint" == str(args[0]).lower() or PREFIX + "randomcheckpoint" == str(args[0]).lower(): - sendForm("(start 'play (get-continue-by-name *game-info* \"" + str(random.choice(point_list)) + "\"))") + if PREFIX + "deload" == str(args[0]).lower() and cd_check(33): + sendForm("(set! (-> *load-state* want 0 display?) #f)") message = "" - if (PREFIX + "gotolevel" == str(args[0]).lower() or PREFIX + "gotopoint" == str(args[0]).lower()) and len(args) >= 2: - sendForm("(start 'play (get-continue-by-name *game-info* \"" + str(args[1]) + "\"))") + if PREFIX + "frickstorage" == str(args[0]).lower() and cd_check(34): + sendForm("(stop 'debug)", 34) + time.sleep(0.001) + sendForm("(start 'debug (get-or-create-continue! *game-info*))") + message = "" + + if PREFIX + "dark" == str(args[0]).lower() and cd_check(35): + sendForm("(if (not (= (-> (level-get-target-inside *level*) mood-func)update-mood-finalboss)) (set! (-> (level-get-target-inside *level*) mood-func)update-mood-finalboss) (set! (-> (level-get-target-inside *level*) mood-func)update-mood-training))") message = "" - if PREFIX + "rjto" == str(args[0]).lower() and len(args) >= 2: - sendForm("(set! (-> *TARGET-bank* wheel-flip-dist) (meters " + str(args[1]) + "))") + if PREFIX + "dax" == str(args[0]).lower() and cd_check(36): + sendForm("(send-event *target* 'sidekick (not (not (send-event *target* 'sidekick #t))))") message = "" - if PREFIX + "movetojak" == str(args[0]).lower() and len(args) >= 2: - sendForm("(when (process-by-ename \"" + str(args[1]) + "\")(set-vector! (-> (-> (the process-drawable (process-by-ename \"" + str(args[1]) + "\"))root)trans) (-> (target-pos 0) x) (-> (target-pos 0) y) (-> (target-pos 0) z) 1.0))") + if PREFIX + "smallnet" == str(args[0]).lower() and cd_check(37): + sendForm("(if (=(-> *FISHER-bank* net-radius)(meters 0.0))(set!(-> *FISHER-bank* net-radius)(meters 0.7))(set! (-> *FISHER-bank* net-radius)(meters 0.0)))") message = "" - - if PREFIX + "eco" == str(args[0]).lower() and len(args) >= 2: - sendForm("(send-event *target* 'get-pickup (pickup-type eco-" + str(args[1]) + ") 5.0)") + + if PREFIX + "widefish" == str(args[0]).lower() and cd_check(38): + sendForm("(if (=(-> *FISHER-bank* width)(meters 10.0))(set! (-> *FISHER-bank* width)(meters 3.3))(set! (-> *FISHER-bank* width)(meters 10.0)))") message = "" - if PREFIX + "heatmax" == str(args[0]).lower() and len(args) >= 2: - sendForm("(set! (-> *RACER-bank* heat-max) " + str(args[1]) + ")") - message = "" - - if PREFIX + "iframes" == str(args[0]).lower() and len(args) >= 2: - sendForm("(set! (-> *TARGET-bank* hit-invulnerable-timeout) (seconds " + str(args[1]) + "))") + if PREFIX + "lod" == str(args[0]).lower() and cd_check(39): + sendForm("(if (= (-> *pc-settings* lod-force-tfrag) 2)(begin(set! (-> *pc-settings* lod-force-tfrag) 0)(set! (-> *pc-settings* lod-force-tie) 0)(set! (-> *pc-settings* lod-force-ocean) 0)(set! (-> *pc-settings* lod-force-actor) 0))(begin(set! (-> *pc-settings* lod-force-tfrag) 2)(set! (-> *pc-settings* lod-force-tie) 3)(set! (-> *pc-settings* lod-force-ocean) 2)(set! (-> *pc-settings* lod-force-actor) 3)))") message = "" - - if PREFIX + "give" == str(args[0]).lower() and len(args) >= 3: - sendForm("(set! (-> *game-info* " + str(args[1]) + ") (+ (-> *game-info* " + str(args[1]) + ") " + str(args[2]) + "))") + + if PREFIX + "moveplantboss" == str(args[0]).lower() and cd_check(40): + sendForm("(set! (-> *pc-settings* force-actors?) #t)") + time.sleep(0.050) + sendForm("(when (process-by-ename \"plant-boss-3\")(set-vector! (-> (-> (the process-drawable (process-by-ename \"plant-boss-3\"))root)trans) (meters 436.97) (meters -43.99) (meters -347.09) 1.0))") + sendForm("(set! (-> (the-as fact-info-target (-> *target* fact))health) 1.0)") + time.sleep(2) + sendForm("(set! (-> (target-pos 0) x) (meters 431.47)) (set! (-> (target-pos 0) y) (meters -44.00)) (set! (-> (target-pos 0) z) (meters -334.09))") message = "" - - if (PREFIX + "setcollected" == str(args[0]).lower() or PREFIX + "collected" == str(args[0]).lower()) and len(args) >= 3: - sendForm("(set! (-> *game-info* " + str(args[1]) + ") (+ 0.0 " + str(args[2]) + "))") + + if PREFIX + "moveplantboss2" == str(args[0]).lower() and cd_check(41): + sendForm("(set! (-> *pc-settings* force-actors?) #t)") + time.sleep(0.050) + sendForm("(when (process-by-ename \"plant-boss-3\")(set-vector! (-> (-> (the process-drawable (process-by-ename \"plant-boss-3\"))root)trans) (meters 436.97) (meters -43.99) (meters -347.09) 1.0))") message = "" - if PREFIX + "enemyspeed" == str(args[0]).lower() and len(args) >= 3: - sendForm("(set! (-> *" + str(args[1]) + "-nav-enemy-info* run-travel-speed) (meters " + str(args[2]) + "))") + if PREFIX + "basincell" == str(args[0]).lower() and cd_check(42): + sendForm("(if (when (process-by-ename \"fuel-cell-45\") (= (-> (->(the process-drawable (process-by-ename \"fuel-cell-45\"))root)trans x) (meters -266.54)))(when (process-by-ename \"fuel-cell-45\")(set-vector! (-> (-> (the process-drawable (process-by-ename \"fuel-cell-45\"))root)trans) (meters -248.92) (meters 52.11) (meters -1515.66) 1.0))(when (process-by-ename \"fuel-cell-45\")(set-vector! (-> (-> (the process-drawable (process-by-ename \"fuel-cell-45\"))root)trans) (meters -266.54) (meters 52.11) (meters -1508.48) 1.0)))") message = "" - if PREFIX + "tp" == str(args[0]).lower() and len(args) >= 4: - sendForm("(set! (-> (target-pos 0) x) (meters " + str(args[1]) + ")) (set! (-> (target-pos 0) y) (meters " + str(args[2]) + ")) (set! (-> (target-pos 0) z) (meters " + str(args[3]) + "))") + if PREFIX + "resetactors" == str(args[0]).lower() and cd_check(43): + sendForm("(reset-actors 'debug)") message = "" - - if PREFIX + "shift" == str(args[0]).lower() and len(args) >= 4: - sendForm("(set! (-> (target-pos 0) x) (+ (-> (target-pos 0) x)(meters " + str(args[1]) + "))) (set! (-> (target-pos 0) y) (+ (-> (target-pos 0) y)(meters " + str(args[2]) + "))) (set! (-> (target-pos 0) z) (+ (-> (target-pos 0) z)(meters " + str(args[3]) + ")))") + + #if PREFIX + "nopunching" == str(args[0]).lower(): + # sendForm("(set! (-> *FACT-bank* eco-full-timeout) (seconds 20 ))(pc-cheat-toggle-and-tune *pc-settings* eco-yellow)") + # message = "" + + if PREFIX + "actorson" == str(args[0]).lower(): + sendForm("(set! (-> *pc-settings* force-actors?) #t)") message = "" - if PREFIX + "loadlevel" == str(args[0]).lower() and len(args) >= 2: - sendForm("(set! (-> *load-state* want 1 name) '" + str(args[1]) + ")(set! (-> *load-state* want 1 display?) 'display)") + if PREFIX + "actorsoff" == str(args[0]).lower(): + sendForm("(set! (-> *pc-settings* force-actors?) #f)") message = "" + + #if PREFIX + "debug" == str(args[0]).lower(): + # sendForm("(set! *debug-segment* (not *debug-segment*))(set! *cheat-mode* (not *cheat-mode*))") + # message = "" - if (PREFIX + "sucksuck" == str(args[0]).lower() or PREFIX + "setsucksuck" == str(args[0]).lower()) and len(args) >= 2: - sendForm("(set! (-> *FACT-bank* suck-suck-dist) (meters " + str(args[1]) + "))(set! (-> *FACT-bank* suck-bounce-dist) (meters " + str(args[1]) + "))") - message = "" + #if PREFIX + "heatmax" == str(args[0]).lower() and len(args) >= 2: + # sendForm("(set! (-> *RACER-bank* heat-max) " + str(args[1]) + ")") + # message = "" - if (PREFIX + "setecotime" == str(args[0]).lower() or PREFIX + "ecotime" == str(args[0]).lower()) and len(args) >= 2: - sendForm("(set! (-> *FACT-bank* eco-full-timeout) (seconds " + str(args[1]) + "))") - message = "" + #if PREFIX + "loadlevel" == str(args[0]).lower() and len(args) >= 2: + # sendForm("(set! (-> *load-state* want 1 name) '" + str(args[1]) + ")(set! (-> *load-state* want 1 display?) 'display)") + # message = "" - if (PREFIX + "setflutflut" == str(args[0]).lower() or PREFIX + "flutspeed" == str(args[0]).lower()) and len(args) >= 2: - sendForm("(set! (-> *flut-walk-mods* target-speed)(meters " + str(args[1]) + "))") - message = "" + #if (PREFIX + "setecotime" == str(args[0]).lower() or PREFIX + "ecotime" == str(args[0]).lower()) and len(args) >= 2: + # sendForm("(set! (-> *FACT-bank* eco-full-timeout) (seconds " + str(args[1]) + "))") + # message = "" - if str(args[0]) == PREFIX + "repl" and len(args) >= 2: + if str(args[0]) == PREFIX + "repl" and len(args) >= 2 and cd_check(44): if COMMANDMODS.count(user) == 1: args = message.split(" ", 1) sendForm(str(args[1])) @@ -360,9 +387,6 @@ def loadingComplete(line): else: return True - def sendMessage(irc, message): - messageTemp = "PRIVMSG #" + CHANNEL + " :" + message - irc.send((messageTemp + "\n").encode()) def getUser(line): #global user