|**********************************************************
| Macro: Signets.mac
|
| Usage: /Mac Signets [mission]
| /Mac Signets sewers
| /Mac Signets catacombs
| The person getting the mission will do the
| command line with the Historian targeted
| The person zoning in to check for the mob will
| start the macro with nothing targeted, but
| needs to be close to the entrance
|
| Description: Automatically gets the sewers mission and has
| another character zone in and check for the
| signet mob being up.
|
| To Do: Use Spawn check instead of targeting the mob
|
| Permission: You may do what you will with this code,
| half of it is stolen from other sources anyways :)
|
|**********************************************************|
#turbo
#chat say
#chat Group
#Event SewersMission "#*#ukun known as the Ukun Sentinel#*#"
#Event CatacombsMission "#*#ukun known as the Master of the Watch#*#"
#Event WrongMission "#*#Wrong Mission - Get Another#*#"
#Event ZoneInAndCheck "#*#ZoneIn and Check#*#"
#Event MobFound "#*#MOB UP!! Zone IN AND KILL!!#*#"
#define DEBUG /squelch /echo
|#define DEBUG /echo
#include spell_routines.inc
#include move.inc
Sub main
/declare RightMission int outer 0
/declare ZoneInAndCheck int outer 0
/declare MeGetTask int outer 0
/declare MeZoner int outer 0
/if ( ${Group.Members} < 2 ) {
/echo You must have A Group of 3 or more to get this mission
/endmacro
}
/if (${Defined[Param0]} && ( ${Param0.Equal[sewers]} || ${Param0.Equal[catacombs]} ) ) {
/declare MissionName string outer
/varset MissionName ${Param0}
} else {
/echo You must start the macro with the name of the mission you want to run to on the command line
/endmac
}
:Loop
/if (!${Target.ID} || ${Target.ID}==${Me.ID}) {
| /setvar MeZoner 1
DEBUG Entering ZonerSub
/call ZonerSub
}
/if ( ${Target.ID} && ${Target.DisplayName.Find[Grand Historian]} ) {
/declare MissionGiver int outer ${Target.ID}
/declare MeGetTask int outer 1
DEBUG Entering GetMissionSub
/call GetMissionSub
}
DEBUG Doing Events
/doevents
/delay 5s
|/goto :Loop
/endm
/return
Sub GetMissionSub
:MissionLoop
/varset RightMission 0
/target ID ${MissionGiver}
/delay 1s
/dzkill all
/delay 3s
/say ${MissionName}
/doevents
/delay 3s
/doevents
/if ( ${RightMission} ) {
DEBUG Right Mission
/g ZoneIn and Check
:WaitMissionLoop
/doevents
/delay 3s
/doevents
/if ( ${RightMission} ) /goto :WaitMissionLoop
}
/doevents
/delay 3s
/goto :MissionLoop
/return
Sub ZonerSub
:ZonerLoop
/if ( ${ZoneInAndCheck} ) {
/if ( ${Zone.ShortName.Equal[Dranik]} || ${Zone.ShortName.Equal[DranikScar]} ) {
/call UseDoor
/delay 3s
}
/if ( ${Zone.ShortName.Find[draniksewersc]} && ${MissionName.Find[sewers]} ) {
/target clear
/delay 1s
/if ( ${MissionName.Find[sewers]} ) /target cunning
/if ( ${MissionName.Find[catacomb]} ) /target insidious
/delay 1s
/if ( !${Target.ID} ) {
:UseDoorAgain
DEBUG trying to use the door
/call UseDoor
/if ( ${Zone.ShortName.NotEqual[Dranik]} ) /goto :UseDoorAgain
/g Wrong Mission - Get Another
/varset ZoneInAndCheck 0
}
/if (${Target.Name.Find[Cunnng]} ) {
/g MOB UP!! Zone IN AND KILL!!
/endm
}
/if (${Target.Name.Find[Insidious]} ) {
/g MOB UP!! Zone IN AND KILL!!
/endm
}
}
/if ( ${Zone.ShortName.Find[dranikcatacombsc]} && ${MissionName.Find[catacomb]} ) {
/target clear
/delay 1s
/if ( ${MissionName.Find[sewers]} ) /target cunning
/if ( ${MissionName.Find[catacomb]} ) /target insidious
/delay 1s
/if ( !${Target.ID} ) {
:UseDoorAgain
DEBUG trying to use the door
/call UseDoor
/if ( ${Zone.ShortName.NotEqual[Dranik]} ) /goto :UseDoorAgain
/g Wrong Mission - Get Another
/varset ZoneInAndCheck 0
}
/if (${Target.Name.Find[Cunnng]} ) {
/g MOB UP!! Zone IN AND KILL!!
/endm
}
/if (${Target.Name.Find[Insidious]} ) {
/g MOB UP!! Zone IN AND KILL!!
/endm
}
}
}
/if ( !${ZoneInAndCheck} ) {
/if ( ${Zone.ShortName.Find[draniksewersc]} && ${MissionName.Find[sewers]} ) {
:UseDoorAgain2
/call UseDoor
/if ( ${Zone.ShortName.NotEqual[DranikScar]} ) /goto :UseDoorAgain2
/g Wrong Mission - Get Another
/varset ZoneInAndCheck 0
}
}
/doevents
/delay 3s
/goto :ZonerLoop
/return
Sub UseDoor
/target clear
|/call movetodoor
/squelch /doortarget
/squelch /face door
/keypress u hold
/delay 1s
/keypress u
/delay 3s
/return
Sub Event_CatacombsMission
DEBUG RightMission Event Fired
/if ( ${MissionName.Find[catacomb]} ) /varset RightMission 1
/return
Sub Event_SewersMission
DEBUG SewersMission Event Fired
/if ( ${MissionName.Find[sewers]} ) /varset RightMission 1
/return
Sub Event_ZoneInAndCheck
/varset ZoneInAndCheck 1
/return
Sub Event_WrongMission
/varset RightMission 0
/return
Sub Event_MobFound
DEBUG Mob Found Up - Zone IN
/endm
/return