Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias inv {
- if (!%DLwritten) {
- if (!$findfile($mircdir,districtlist.txt,1)) {
- write districtlist.txt Acrylic Acres
- write districtlist.txt Avant Gardens
- write districtlist.txt Baroque Bluffs
- write districtlist.txt Bliss Bayou
- write districtlist.txt Brush Bay
- write districtlist.txt Colorful Canvas
- write districtlist.txt Eraser Oasis
- write districtlist.txt Graphite Gulch
- write districtlist.txt Paintbrush Field
- write districtlist.txt Pastel Plains
- write districtlist.txt Pianissimo Plateau
- write districtlist.txt Pigment Point
- write districtlist.txt Renaissance River
- write districtlist.txt Stencil Steppe
- write districtlist.txt Vibrant Valley
- write districtlist.txt Watercolor Woods
- set %DLwritten 1
- }
- else { set %DLwritten 1 }
- }
- if (!%MLwritten) {
- if (!$findfile($mircdir,invmessages.txt,1)) {
- write invmessages.txt Get out there and bust some baddies!
- set %MLwritten 1
- }
- else { set %MLwritten 1 }
- }
- var %invSellbots Cold Caller Telemarketer Name Dropper Glad Hander Two-Face The Mingler Mr. Hollywood
- var %invCashbots Short Change Penny Pincher Tightwad Bean Counter Number Cruncher Money Bags Loan Shark Robber Baron
- var %invLawbots Bottom Feeder Bloodsucker Double Talker Ambulance Chaser Back Stabber Spin Doctor Legal Eagle Big Wig
- var %invBossbots Flunky Pencil Pusher Yesman Micromanager Downsizer Head Hunter Corporate Raider The Big Cheese
- var %CurrentDistrictNumber 0
- jsonopen -ud inv https://www.toontownrewritten.com/api/invasions
- :ds
- if (%CurrentDistrictNumber <= $lines(districtlist.txt)) { var %CurrentDistrictNumber $calc(%CurrentDistrictNumber + 1) }
- else { goto ads }
- var %CurrentDistrict $read(districtlist.txt, %CurrentDistrictNumber)
- var %CurrentType $remove($json(inv, invasions, %CurrentDistrict, type),)
- var %CurrentProgress $json(inv, invasions, %CurrentDistrict, progress)
- if ( %CurrentType ) {
- var %CurrentProgress $remove($calc($replace(%CurrentProgress,/,-)),-)
- if ( Version 2.0 isin %CurrentType ) {
- var %CurrentType $remove(%CurrentType,Version 2.0 $+ $chr(32))
- var %CurrentSpecial 2.0
- }
- elseif ( Skelecogs isin %CurrentType ) {
- var %CurrentType $remove(%CurrentType,$chr(32) $+ (Skelecogs))
- var %CurrentSpecial Skelecogs
- }
- if ( %CurrentType isin %invSellbots ) { var %CurrentColor 5 }
- elseif ( %CurrentType isin %invCashbots ) { var %CurrentColor 3 }
- elseif ( %CurrentType isin %invLawbots ) { var %CurrentColor 2 }
- elseif ( %CurrentType isin %invBossbots ) { var %CurrentColor 7 }
- if ( Mover*Shaker iswm %CurrentType ) { var %CurrentType2 Movers and Shakers | var %CurrentColor 5 }
- elseif ( %CurrentType == Flunky ) { var %CurrentType2 Flunkies }
- elseif ( %CurrentType == Yesman ) { var %CurrentType2 Yesmen }
- elseif ( %CurrentType == Money Bags ) { var %CurrentType2 %CurrentType }
- else { var %CurrentType2 %CurrentType $+ s }
- if ( !%InvSaidYet ) {
- var %InvSaidYet 1
- echo -at <HeadHunter> Here are the current invasions!
- }
- if ( %CurrentProgress == 1000000 ) {
- if ( !%CurrentSpecial ) { echo -at <HeadHunter> Watch out, there's a Mega Invasion! %CurrentColor $+ %CurrentType2 have taken over $+ %CurrentDistrict $+ ! $read(invmessages.txt) }
- elseif ( %CurrentSpecial == Skelecogs ) { echo -at <HeadHunter> Watch out, there's a Mega Invasion!14 %CurrentType Skelecogs have taken over $+ %CurrentDistrict $+ ! $read(invmessages.txt) }
- elseif ( %CurrentSpecial == 2.0 echo -at <HeadHunter> Watch out, there's a Mega Invasion! %CurrentColor %+ Version 2.0 %CurrentType2 have taken over $+ %CurrentDistrict $+ ! $read(invmessages.txt) )
- }
- elseif ( %CurrentSpecial == Skelecogs ) { echo -at <HeadHunter> Looks like there are 14 $+ %CurrentType Skelecogs invading $+ %CurrentDistrict $+ ! There are %CurrentProgress of them left! $read(invmessages.txt) }
- elseif ( %CurrentSpecial == 2.0 ) { echo -at <HeadHunter> Watch out, there are %CurrentColor $+ Version 2.0 %CurrentType2 invading $+ %CurrentDistrict $+ ! There are %CurrentProgress of them left! $read(invmessages.txt) }
- else { echo -at <HeadHunter> Looks like there are %CurrentColor $+ %CurrentType2 invading $+ %CurrentDistrict $+ ! There are %CurrentProgress of them left! $read(invmessages.txt) }
- }
- goto ds
- :ads
- if ( !%InvSaidYet ) {
- echo -at <HeadHunter> Looks like there are currently no invasions! Toontown is safe!
- }
- }
- ;That's the end of my part of the script. Now begins Hawkee's JSON for mIRC script.
- alias JSONVersion {
- if ($isid) {
- return $iif($1 != short,JSONForMirc v,v) $+ 0.2.4
- }
- }
- alias JSONError {
- if ($isid) {
- return %JSONError
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement