Code: Select all
|** Functions:
SELFBUFFS
The script will self buff the toon. Self buffs / Items need to be spesified in the Buff function.
ASSIST
The script will attempt to assist someone (Parameter 0 <NAME or 0>). If the parameter is set to 0, it will not attempt to assist anyone
FOLLOW
The script will try to follow someone in between fights (Parameter 1 <NAME or 0>) If the parameter is set to 0, it will not attempt to Follow anyone
INIFILE
The script will save an ini file with the mobs it has fought while it has been running. This ini file can be used to spesify what mobs the macro is to handle automatically, and what mobs the user is supposed to deal with. Example would be, if you attempt to use the macro on Rallos Zek in Plane of Time as a warrior, the result will be fairly messy. To handle Rallos Zek manually, enter the ini file and set the value of Rallos Zek under "[Plane of Time]" to 1. Mode 0 is typically used on trash mobs that can be safely fought while AFK
MANUAL FIGHT MODE NOTIFICATION (extention of INI file functionality)
The macro will try to play a user defined MP3 whenever an ini defined mode 1 mob comes up, to notify the user of this in case he is AFK.
TAUNTOGGLE
The macro will try to dodge aggro by not taunting, until the user spesifically uses the Taunt skill.
Once Taunt has been used once, the Macro goes all out trying to keep aggro. Useful if main tank dies and you need to take over. **|
#turbo
#Event Taunt "to ignore others and attack you!"
#Event Zoned "LOADING, PLEASE WAIT..."
#Event MobGate " Gates."
#Event Enraged "has become ENRAGED"
#Event Offrage "is no longer enraged"
#Event Invited "To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel"
#Event Stunned "You are stunned"
#Event NoStun "You are unstunned"
#Define IniFile "mobs.ini"
#Define MP3File "Alert.mp3" | Use "NONE" here to not use the mp3 function.
Sub Main()
/if "@Param0"=="HELP" {
/echo Usage: /macro macroname <ASSISTNAME|0> <FOLLOWNAME|0>
/end
}
/zapvars
/declare TargetID global
/declare Taunting global
/declare vAttack global
/declare ManualMelee global
/declare pFollowID global
/declare vStunned global
/assist off
/mqpause chat on
| Load an MP3
/if "MP3File"!="NONE" {
/mp3 clear
/mp3 add MP3File
}
/if "@Param1"!="0" {
/target @Param1
/delay 2s
/varset pFollowID $target(id)
/press Esc
}
:Loop
/doevents
/delay 1s
/call Buff
/call Melee @Param0
/call Follow @Param1
/goto :Loop
/return
Sub Melee(Assist)
/if "@Assist"!="0" /assist @Assist
/if "$target(type)"!="NPC" /return
/if "$target(name,clean)"=="NULL" /return
/varset TargetID $target(id)
| Check if the Mob is to be melee'ed manually.
/varset ManualMelee $ini("IniFile","$zone","$target(name,clean)")
/if "@ManualMelee"=="NOTFOUND" {
/echo $target(name) was not found in the ini file. Wrote it...
/ini "IniFile" "$zone" "$target(name,clean)" 0
} else {
/echo $target(name) was found (Mode: @ManualMelee), proceeding...
}
| Until the mob is dead if mode = 1
/if n @ManualMelee==1 {
| Play a warning sound
/if "MP3File"!="NONE" /mp3 play 1
:ManualDelay
/if n @TargetID==$target(id) {
/delay 1s
| Tanks main tanking Vallon Zek in PoTime should appreciate this...
/if "$char(state)"=="FEIGN" /stand
/goto :ManualDelay
} else {
/varset ManualMelee 0
/return
}
}
/if n $target(hp,pct)>=99 /return
/attack on
:MeleeCycle
/doevents
/delay 0
| Mob might have gated if the distance is too large and the mob is hurt
/if n $target(distance)>100
/if n $target(hp,pct)<99 {
/attack off
/press Esc
/return
}
}
/if "$target(type)"!="NULL" {
/if "$char(state)"=="FEIGN" /stand
/if "$char(state)"=="SIT" /stand
/if n @vStunned==0 {
/if n $target(distance)>=5 {
/face nolook
}
}
/if n $target(distance)>=10 {
/if n $target(distance)<=15 {
/press up
/goto :NoTrack
}
}
/if n $target(distance)>15 /sendkey down up
/if n $target(distance)<=7 /sendkey up up
/if n $target(distance)<=5 /press down
:NoTrack
| Do combat skills if we're not stunned
/if @vStunned==0 {
/if n $char(ability,"Kick")>0 /doability "Kick"
}
/if n @Taunting==1 {
/if n $char(ability,"Taunt")>0 /doability "Taunt"
/if n $char(ability,"Disarm")>0 /doability "Disarm"
}
| Check if mob is dead
/if n $target(id)!=@TargetID {
/goto :FinishMelee
} else {
/goto :MeleeCycle
}
}
:FinishMelee
/attack off
/sendkey up up
/sendkey up down
/varset Taunting 0
/varset TargetID 0
/varset vStunned 0
/return
Sub Follow(pFollow)
/if "@pFollow"=="0" /return
:Retrack
/if n $spawn(@pFollowID,distance)>30 {
/face id @pFollowID
/sendkey down up
/delay 5
/goto :Retrack
} else {
/sendkey up up
}
/return
Sub Buff()
/if "$char(ismoving)"=="FALSE" {
/if n $char(buff,"Thorny Shield")==0 {
/stand
/delay 2s
/cast item "Cloak of Thorns"
/delay 3s
}
/if n $char(buff,"Pestilence Shock")==0 {
/stand
/delay 2s
/cast item "Symbol of the Planemasters"
/delay 5s
}
}
/return
Sub Event_MobGate()
/if $target(distance)>50
/press Esc
/attack off
}
/return
Sub Event_Enraged()
/if n $target(hp,pct)<=10 /attack off
/return
Sub Event_Offrage()
/if n $target(hp,pct)<=10 /attack on
/return
Sub Event_Taunt()
/varset Taunting 1
/return
Sub Event_Zoned()
/endmacro
/return
Sub Event_Invited
/delay 2s
/invite
/return
Sub Event_Stunned
/varset vStunned 1
/return
Sub Event_NoStun
/varset vStunned 0
/return

