#Include chathandler.inc
#Include routines.inc
#Include Wait4Rez.inc
#Include spell_routines.inc
#Include wizard.inc
#Event ShacklesOff "#*#Shackles spell has worn off of#*#"
#Event Slain "You have been slain by#*#"
Sub Main
/echo Starting Wiz auto grind
/declare ShackleStatus int outer 1
/declare ShackleTimer timer outer 3000
/declare DeadTimer timer outer 360m
/declare InstanceExpireTimer timer outer 330m
/declare EngageCheckCounter int outer 0
/call InitExpInfo
/if (${Zone.ShortName.Equal[GuildHall]}) {
:WaitForFull
/delay 3
/if (${Me.PctMana}<=99 || ${Me.PctHPs}<=90) /goto :WaitForFull
/call TravelGH2TI
}
:Restart
/varset ShackleStatus 1
/varset ShackleTimer 3000
/varset DeadTimer 360m
/varset EngageCheckCounter 0
/dismount
/squelch /warp wp hop0
/call MoveHigh
/delay 4
/call TargetNearestLOSMob
/delay 1s
/if (!${Target.ID} || ${Target.ID}==${Me.ID}) /goto :Restart
/call MoveToTarget
/delay 1s
/if (!${Target.LineOfSight}) {
/call MoveHigh
/delay 1s
}
:WaitForLanding
/call cast "Atol's Spectral Shackles" gem5
/if (${castReturn.Equal[CAST_OUTOFRANGE]}) /goto :WaitForLanding
/delay 4
/if (${castReturn.Equal[CAST_SUCCESS]}) /call ResetShackleTimer
/squelch /warp wp hop0
/delay 4
/doevents
/delay 1s
:EngageCheckLoop
/if (!${Me.TargetOfTarget.ID}) {
/varcalc EngageCheckCounter ${EngageCheckCounter}+1
/delay 1s
/doevents
/if (${EngageCheckCounter}>=30) /goto :Restart
/goto :EngageCheckLoop
}
:Loop
/if (!${Target.ID}) {
/if (${Me.HPBonus}<100 && ${Me.ManaBonus}<100 && ${Me.FreeInventory}==8) {
/call Event_Slain
} else {
/call Recoup
}
/goto :Restart
}
/call CastNukePlus
:WaitForHop1
/if (${Target.Distance}<=65) {
/squelch /warp wp hop1
/delay 2
/face fast
} else {
/delay 1
/call CheckFleeStatus
/goto :WaitForHop1
}
/if (!${Target.ID}) {
/if (${Me.HPBonus}<100 && ${Me.ManaBonus}<100 && ${Me.FreeInventory}==8) {
/call Event_Slain
} else {
/call Recoup
}
/goto :Restart
}
/call CastNukePlus
:WaitForHop2
/if (${Target.Distance}<=65) {
/squelch /warp wp hop2
/delay 2
/face fast
} else {
/delay 1
/call CheckFleeStatus
/goto :WaitForHop2
}
/goto :Loop
/return
Sub CastNukePlus
/doevents
/if (${ShackleStatus}==0 && ${Target.Speed}<=130) {
:CastWaitLoop1
/if (${Target.Distance}>=220) {
/delay 1
/call CheckFleeStatus
/goto :CastWaitLoop1
}
/if (${Target.PctHPs}<=10) {
/call cast "Spark of Thunder" gem1 0 CheckDistance
} else {
/if (${Me.SpellReady[Thundaka]}) {
/call cast "Thundaka" gem3 0 CheckDistance
} else {
/call cast "Spark of Thunder" gem1 0 CheckDistance
}
}
} else {
:CastWaitLoop2
/if (${Target.Distance}>=220) {
/delay 1
/call CheckFleeStatus
/goto :CastWaitLoop2
}
/call cast "Atol's Spectral Shackles" gem5 0 CheckDistance
/delay 1
/if (${castReturn.Equal[CAST_SUCCESS]}) /call ResetShackleTimer
}
/return
Sub CheckDistance
/if (${Target.Distance}<=65) /call Interrupt
/return
Sub CheckFleeStatus
/doevents
/if (${Me.PctHPs}<=70 || ${SpawnCount[NPC los Radius 130]}>=2) {
/if (${Target.ID}) {
/succor
/delay 3s
/return
}
}
/if (${ShackleStatus}==1 && ${Target.Speed}<=100 && ${Target.PctHPs}<=20) {
/call FinishMob
} else /if (${ShackleStatus}==0 && ${Target.Speed}<=5 && ${Target.PctHPs}<=20) {
/call FinishMob
}
/return
Sub FinishMob
/call MoveToTarget
/delay 1s
/call cast "Black Rope Bridle" item
/delay 1s
:NukeAgain
/call MoveToTarget
/if (!${Target.LineOfSight}) {
/varset TempID ${Target.ID}
/call MoveHigh
/target id ${TempID}
/delay 4
}
/call CastNukePlus
/if (${Target.Distance}<=65) /return
/delay 2s
/if (${Target.ID}) /goto :NukeAgain
/varset FinishMode 0
/return
Sub MoveToTarget
/if (${Target.Distance}>=150) {
/declare v91 int local
/varcalc v91 ${Math.Rand[5]}+105
:GotoTargLoop
/if (${Target.Distance}>=200) {
/face nolook
} else {
/face fast nolook
}
/call AutoRun 1
/if (${Target.Distance}>=${v91}) /goto :GotoTargLoop
/call AutoRun 0
}
/return
Sub MoveHigh
/if (${Me.Buff[Levitation].Duration}<=10) {
/target MySelf
/delay 4
/call cast "Levitation" gem6
/delay 1s
}
/declare MyLocX float local ${Me.X}
/declare MyLocY float local ${Me.Y}
/declare MyLocZ float local ${Me.Z}
/varcalc MyLocZ ${MyLocZ}+100
/squelch /warp loc ${MyLocY} ${MyLocX} ${MyLocZ}
/return
Sub Event_Slain
/delay 10s
/varset DeadTimer 60m
:TryPOKAgain
/call cast "Knowledge Gate" gem7
/delay 1s
/if (!${castReturn.Equal[CAST_SUCCESS]}) /goto :TryPOKAgain
/delay 5s
/call TravelPOK2GHDoor
/call TravelGL2GH
/call GH2SummonCorpse
/delay 3s
/chat #mycleric clr GLRez pls
/vg 7
/delay 3s
/vg 7
/call Wait4Rez
/varset DeadTimer 360m
/call cast "Black Rope Bridle" item
/call Recoup
/return
Sub Recoup
/if (${Me.PctMana}>=95 && ${Me.PctHPs}>=90) /return
/if (${Zone.ShortName.Equal[GuildLobby]}) /goto :AtGuildHallDoor
/delay 1s
/squelch /warp wp hop3
/call RemoveBuff Levitation
/delay 1s
/doevents
:TryPOKAgain
/call cast "Knowledge Gate" gem7
/delay 1s
/if (!${castReturn.Equal[CAST_SUCCESS]}) /goto :TryPOKAgain
/delay 5s
/call TravelPOK2GHDoor
:AtGuildHallDoor
/call TravelGL2GH
/call cast "Black Rope Bridle" item
/pet get lost
/delay 2s
/call DisplayExpInfo
/beep
/declare RebuffFlag int local 1
:HarvestLoop
/if (${Me.PctMana}<=99 || ${Me.PctHPs}<=90) {
/if (${Me.AltAbilityReady[Harvest of Druzzil]} && ${Me.PctMana}<=95) {
/call cast "Harvest of Druzzil" alt
/delay 4
}
/if (${Me.SpellReady[Harvest]} && ${Me.PctMana}<=95) {
/call cast Harvest
}
/if (${Me.PctMana}>=40 && ${RebuffFlag}==1) {
/target
/delay 4
/call BuffTarg
/chat #mycleric buff
/chat #mychanter buff
/varset RebuffFlag 0
}
/delay 1
/goto :HarvestLoop
}
/call TravelGH2TI
/return
Sub TravelGH2TI
/call RemoveBuff Levitation
| /call cast "Secondary Bind" AA (gate back to TI entrance area)
:CastGateAgain
/call cast gate gem2
/delay 1s
/if (!${castReturn.Equal[CAST_SUCCESS]}) /goto :CastGateAgain
/delay 5s
/call cast "Improved Invisibility" gem6
/delay 1s
/declare ThisZoneID int local ${Zone.ID}
/delay 4
:TIEntrance
/if (${Zone.ID}==${ThisZoneID}) /call GotoLoc 460,1279
/if (${Zone.ID}==${ThisZoneID}) /call GotoLoc 509,1241
/delay 5s
/if (${Zone.ID}==${ThisZoneID}) /goto :TIEntrance
/pet get lost
/return
Sub TravelPOK2GHDoor
/call GotoLoc -320,1350
/call UseZoningDoor FACADE
/delay 1s
/declare RandPath int local
/varcalc RandPath ${Math.Rand[4]}+1
/echo Random path ${RandPath} chosen
/if (${RandPath}==1) {
/call SmoothRunToLoc -1,-1:49,0:70,-25:218,0:320,-136:509,-136:583,-70
} else /if (${RandPAth}==2) {
/call SmoothRunToLoc -1,-1:49,0:70,-25:218,0:316,135:514,132:580,69
} else /if (${RandPAth}==3) {
/call SmoothRunToLoc -1,-1:49,0:70,-25:218,0:275,0:447,-46:584,19
} else {
/call SmoothRunToLoc -1,-1:49,0:70,-25:218,0:270,0:410,55:560,-1
}
/return
Sub TravelGL2GH
/call UseZoningDoor GUILD_DOOR
/delay 10s
/call SmoothRunToLoc 54,-58:69,-118
/delay 1s
/return
Sub Event_Timer(Timer,OriginalValue)
/if (${Timer.Equal[ShackleTimer]}) /varset ShackleStatus 1
/if (${Timer.Equal[DeadTimer]}) /camp desktop
/if (${Timer.Equal[InstanceExpireTimer]}) {
/gate
/delay 20s
/call cast "Improved Invisibility" gem6
/camp desktop
/endmacro
}
/return
Sub Event_ShacklesOff
/varset ShackleStatus 1
/return
Sub ResetShackleTimer
/varset ShackleTimer 140s
/varset ShackleStatus 0
/return
Sub GH2SummonCorpse
| must be standing in center of pool and have plat for soulstone in shared bank
/call GotoLoc 55,-67
/call GotoLoc -4,30
/targ Bank
/delay 4
/call WithdrawBankMoney 190
/delay 1s
/call GotoLoc -73,0
/call GotoLoc -160,-4
/keypress u
/delay 15s
/call GotoLoc 588,65
/call GotoLoc 507,143
/call GotoLoc 418,141
/call GotoLoc 410,217
/call GotoLoc 357,195
/targ disciple
/delay 4
/call Buy "Pristine Soulstone" 1
/call GotoLoc 316,262
/targ Priest
/delay 4
/call GiveTargetNPCItem "Pristine Soulstone"
/delay 5s
/call GotoLoc 347,230
/corpse
/delay 4
/call GotoLoc 365,224
/corpse
/delay 4
/call GotoLoc 414,182
/corpse
/delay 4
/call GotoLoc 426,140
/corpse
/delay 4
/call GotoLoc 487,137
/corpse
/delay 4
/call GotoLoc 543,106
/corpse
/delay 4
/call GotoLoc 583,71
/corpse
/delay 4
/call GotoLoc 623,49
/corpse
/delay 3s
/call UseZoningDoor GUILD_DOOR
/delay 5s
/return
Sub GLDor2GH
/declare ThisZoneID int local ${Zone.ID}
/squelch /doortarget GUILD_DOOR_
/squelch /face door
/delay 1s
/keypress up hold
:GLDoorAgain
/squelch /face door
/delay 2
/keypress u
/if (${Zone.ID}==${ThisZoneID}) /goto :GLDoorAgain
/keypress up
/return
sub POkDor2GL
/declare ThisZoneID int local ${Zone.ID}
/squelch /doortarget FACADE
:POKDoorAgain
/squelch /face door
/delay 5
/keypress up hold
/if (${Zone.ID}==${ThisZoneID}) /goto :POKDoorAgain
/keypress up
/return