Usage: macro airship -- startTown endTown
Example: macro airship -- Izlude Lighthalzen
(It transfers airships)
(All portal and npcs are based on KoreRO)
And the really long macro:
Code: Select all
macro airship {
# Izlude, Yuno and Rachel
# Yuno, Hugel, Einbroch and Lighthalzen - airplane
$checkTransfer = True
if ($.param2 == "Einbroch") goto destEinbroch
if ($.param2 == "einbroch") goto destEinbroch
if ($.param2 == "Hugel") goto destHugel
if ($.param2 == "hugel") goto destHugel
if ($.param2 == "Izlude") goto destIzlude
if ($.param2 == "izlude") goto destIzlude
if ($.param2 == "Lighthalzen") goto destLighthalzen
if ($.param2 == "lighthalzen") goto destLighthalzen
if ($.param2 == "Rachel") goto destRachel
if ($.param2 == "rachel") goto destRachel
if ($.param2 == "Yuno") goto destYuno
if ($.param2 == "yuno") goto destYuno
if ($.param2 == "Juno") goto destYuno
if ($.param2 == "juno") goto destYuno
goto errorDest
:destEinbroch
$airportDest = Einbroch
goto checkStart
:destHugel
$airportDest = Hugel
goto checkStart
:destIzlude
$airportDest = Izlude
goto checkStart
:destLighthalzen
$airportDest = Lighthalzen
goto checkStart
:destRachel
$airportDest = Rachel
goto checkStart
:destYuno
$airportDest = Yuno
goto checkStart
:checkStart
if ($.param1 == "Einbroch") goto airport
if ($.param1 == "einbroch") goto airport
if ($.param1 == "Izlude") goto izlude
if ($.param1 == "izlude") goto izlude
if ($.param1 == "Hugel") goto hugel
if ($.param1 == "hugel") goto hugel
if ($.param1 == "Lighthalzen") goto lhzAirport
if ($.param1 == "lighthalzen") goto lhzAirport
if ($.param1 == "Rachel") goto raFild12
if ($.param1 == "rachel") goto raFild12
if ($.param1 == "Yuno") goto yAirport
if ($.param1 == "yuno") goto yAirport
if ($.param1 == "Juno") goto yAirport
if ($.param1 == "Juno") goto yAirport
goto errorStart
:checkIzludeRachel
if ($airportDest == "Izlude") goto airshipTransfer
if ($airportDest == "Rachel") goto airshipTransfer
$checkTransfer = $emptyVar
goto checkStart
:checkEinbrochHugelLighthalzen
if ($airportDest == "Einbroch") goto airshipTransfer
if ($airportDest == "Hugel") goto airshipTransfer
if ($airportDest == "Lighthalzen") goto airshipTransfer
$checkTransfer = $emptyVar
goto checkStart
:airport
if ($checkTransfer == "True") goto checkIzludeRachel
do move airport
goto quit
:hugel
if ($checkTransfer == "True") goto checkIzludeRachel
do move 182 150 hugel
do talk @npc (182 150)
pause 2
do talk resp 0
pause 2
do talk resp 0
goto quit
:izlude
if ($checkTransfer == "True") goto checkEinbrochHugelLighthalzen
do move 202 56 izlude
do talk @npc (201 54)
pause 2
do talk resp 0
pause 2
do talk resp 0
goto quit
:lhzAirport
if ($checkTransfer == "True") goto checkIzludeRachel
do move lhz_airport
goto quit
:raFild12
if ($checkTransfer == "True") goto checkEinbrochHugelLighthalzen
do move 295 208 ra_fild12
pause 2
do talk resp 0
goto quit
:yAirport
do move y_airport
goto quit
:airshipTransfer
$airshipTransfer = True
$checkTransfer = $emptyVar
goto checkStart
:errorStart
log Error: Unknown starting point!
goto quit
:errorDest
log Error: Unknown destination!
:quit
}
automacro airshipEinbrochAirport {
location airport 90 45 193 13
timeout 90
delay 5
call {
if ($airportDest == "Einbroch") goto leaveAirport
if ($airportDest != "") goto enterTerminal
goto quit
:enterTerminal
do move 143 38 airport
do talk @npc (143 43)
pause 2
do talk resp 0
pause 2
do talk resp 0
goto quit
:leaveAirport
$airportDest = $emptyVar
do move einbroch
:quit
}
}
automacro airshipEinbrochTerminal {
location airport 116 74 167 50
timeout 90
delay 5
call {
if ($airportDest == "Einbroch") goto leaveTerminal
if ($airportDest != "") goto enterGate
goto quit
:enterGate
do move 142 61 airport
goto quit
:leaveTerminal
do talk @npc(143 51)
pause 2
do talk resp 0
pause 2
do talk resp 0
:quit
}
}
automacro airshipEinbrochGate {
location einbroch 55 281 94 234
timeout 90
delay 5
call {
if ($airportDest == "Einbroch") goto exitGate
if ($airportDest != "") goto enterAirship
goto quit
:enterAirship
do move 92 280 einbroch
goto quit
:exitGate
do move 64 234 airport
:quit
}
}
automacro airshipHugel {
location hugel
timeout 90
delay 5
call {
if ($airportDest == "Hugel") goto arrived
goto quit
:arrived
$airportDest = $emptyVar
:quit
}
}
automacro airshipIzlude {
location izlude
timeout 90
delay 5
call {
if ($airportDest == "Izlude") goto arrived
goto quit
:arrived
$airportDest = $emptyVar
:quit
}
}
automacro airshipLighthalzenAirport {
location lhz_airport 90 45 193 13
timeout 90
delay 5
call {
if ($airportDest == "Lighthalzen") goto leaveAirport
if ($airportDest != "") goto enterTerminal
goto quit
:enterTerminal
do move 143 38 lhz_airport
do talk @npc (143 43)
pause 2
do talk resp 0
pause 2
do talk resp 0
goto quit
:leaveAirport
$airportDest = $emptyVar
do move lighthalzen
:quit
}
}
automacro airshipLighthalzenTerminal {
location lhz_airport 116 74 167 50
timeout 90
delay 5
call {
if ($airportDest == "Lighthalzen") goto leaveTerminal
if ($airportDest != "") goto enterGate
goto quit
:enterGate
do move 143 63 lhz_airport
goto quit
:leaveTerminal
do talk @npc(143 51)
pause 2
do talk resp 0
pause 2
do talk resp 0
:quit
}
}
automacro airshipLighthalzenGate {
location lighthalzen 294 79 309 72
timeout 90
delay 5
call {
if ($airportDest == "Lighthalzen") goto exitGate
if ($airportDest != "") goto enterAirship
goto quit
:enterAirship
do move 308 76 lighthalzen
goto quit
:exitGate
do move 294 76 lighthalzen
:quit
}
}
automacro airshipraFild12 {
location ra_fild12
timeout 90
delay 5
call {
if ($airportDest == "Rachel") goto arrived
goto quit
:arrived
$airportDest = $emptyVar
:quit
}
}
automacro airshipYunoAirport {
location y_airport 90 45 193 13
timeout 90
delay 5
call {
if ($airportDest == "Yuno") goto leaveAirport
if ($airportDest != "") goto enterTerminal
goto quit
:enterTerminal
do move 143 38 y_airport
do talk @npc (143 43)
pause 2
do talk resp 0
pause 2
do talk resp 0
goto quit
:leaveAirport
$airportDest = $emptyVar
do move yuno
:quit
}
}
# Left 141 63: Izlude Yuno Rachel
# Right 144 63 : Yuno Hugel Einbroch Lighthalzen
automacro airshipYunoTerminal {
location y_airport 116 74 167 50
timeout 90
delay 5
call {
if ($airportDest == "Yuno") goto leaveTerminal
if ($airportDest != "") goto enterGate
goto quit
:enterGate
if ($airportDest == "Izlude") goto leftGate
if ($airportDest == "Rachel") goto leftGate
if ($airportDest == "Hugel") goto rightGate
if ($airportDest == "Einbroch") goto rightGate
if ($airportDest == "Lighthalzen") goto rightGate
goto quit
:leftGate
do talk @npc (141 63)
pause 2
do talk resp 0
goto quit
:rightGate
do talk @npc (144 63)
pause 2
do talk resp 0
goto quit
:leaveTerminal
do talk @npc(143 51)
pause 2
do talk resp 0
pause 2
do talk resp 0
:quit
}
}
automacro airshipYunoLeftGate {
location yuno 5 279 51 238
timeout 90
delay 5
call {
if ($airportDest == "Yuno") goto exitGate
if ($airshipTransfer == "True") goto transferedAirships
if ($airportDest != "") goto enterAirship
goto quit
:enterAirship
do move 8 261 yuno
goto quit
:transferedAirships
$airshipTransfer = "False"
:exitGate
do move 52 238 yuno
:quit
}
}
automacro airshipYunoRightGate {
location yuno 56 279 97 238
timeout 90
delay 5
call {
if ($airportDest == "Yuno") goto exitGate
if ($airshipTransfer == "True") goto transferedAirships
if ($airportDest != "") goto enterAirship
goto quit
:enterAirship
do move 97 260 yuno
goto quit
:transferedAirships
$airshipTransfer = "False"
:exitGate
do move 55 238 yuno
:quit
}
}
automacro airshipLanded {
#console /The Airship is leaving the ground. Our next destination is (.*)./
#console /We are heading to (.*)./
console /We will arrive in (.*) shortly./
#console /Welcome to (.*). Have a safe trip./
call {
if ($airportDest == $.lastMatch1) goto exitAirport
if ($.lastMatch1 == "Juno") goto checkYuno
if ($airshipTransfer == "True") goto checkTransfer
goto quit
:checkTransfer
if ($.lastMatch1 == "Yuno") goto exitAirport
if ($.lastMatch1 == "Juno") goto exitAirport
goto quit
:checkYuno
if ($airportDest == "Yuno") goto exitAirport
if ($airshipTransfer == "True") goto checkTransfer
goto quit
:exitAirport
do move 243 74
:quit
}
}