Code: Select all
#turbo
#define NPCini "stick-NPC.ini"
#define PCini "stick-PC.ini
|#include spellcast.inc
|===========|
| 02.14.04a |
|___________|
| |
| stick.mac |
| by m0nk |
|___________|
|
| -Syntax = /mac stick "NinjaLoot (0 or 1)" "MeleeAbility_1" "MeleeAbility_2" "MeleeAbility_3"
| example = /mac stick 0 "bash" (will not loot and only bash)
| example = /mac stick 1 "bash" (will not loot and only bash)
| example = /mac stick 1 "Flying Kick" "Disarm" (will loot, Flying Kick ,disarm)
| example = /mac stick (will do what the defaults are set to in the :editDefaults section)
|
#event EXP "experience!!"
#event RageON "has become ENRAGED."
#event RageOFF "is no longer enraged"
#event MobGate " Gates."
#event Invited "To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel"
#event StunON "You are stunned"
#event StunOFF "You are unstunned"
#event TauntThisRound "to ignore others and attack you!"
#event ToggleTaunt "[MQ2] tt"
Sub main
:setupDeclare
/zapvars
/declare MA_1 global
/declare MA_2 global
/declare MA_3 global
/declare MA_SB global
/declare TauntToggle global
/declare MA_Timer_SB global
/declare MobID global
/declare NinjaLewt global
/declare MeleeDistance global
/declare ChangeDistance global
/declare Time_MA_SB timer
/alias /distance /varset ChangeDistance
/alias /dist /varset ChangeDistance
:setupVarset
/varset MA_1 "@Param1"
/varset MA_2 "@Param2"
/varset MA_3 "@Param3"
/varset MA_SB "NULL"
/varset NinjaLewt @Param0
/varset TauntToggle NULL
:editDefaults
/varset MA_Timer_SB 60
/if $defined(Param0)!=TRUE /varset NinjaLewt 0
/if $defined(Param1)!=TRUE /varset MA_1 "Frenzy"
/if $defined(Param2)!=TRUE /varset MA_2 "NULL"
/if $defined(Param3)!=TRUE /varset MA_3 "NULL"
:setupCheck
/if ("@MA_1"=="bash" || "@MA_1"=="slam") {
/echo Auto @MA_1 every @MA_Timer_SB.
/varset MA_SB "@MA_1"
/varset MA_1 "NULL"
}
/if ("@MA_2"=="bash" || "@MA_2"=="slam") {
/echo Auto @MA_2 every @MA_Timer_SB
/varset MA_SB "@MA_2"
/varset MA_2 "NULL"
}
/if ("@MA_3"=="bash" || "@MA_3"=="slam") {
/echo Auto @MA_3 every @MA_Timer_SB
/varset MA_SB "@MA_1"
/varset MA_3 "NULL"
}
:start
/if "@MA_1"!="NULL" /echo Auto @MA_1 when availiable.
/if "@MA_2"!="NULL" /echo Auto @MA_2 when availiable.
/if "@MA_3"!="NULL" /echo Auto @MA_3 when availiable.
/if n @NinjaLewt==1 /echo Auto Ninja Loot
/echo @TauntToggle
:mainloop
/if $combat==TRUE /call Attack
/doevents
/goto :mainloop
/endmacro
Sub attack
:attackCheck
/varset MobID $target(id)
:attackSetup
/if $target(type)!=NPC {
/attack off
/delay 5
/return
}
/if n $target(distance)>150 {
/attack off
/delay 5
/return
}
:attackPreFight
/call ClearReturn
/if n $char(pet)!=0 /pet attack
/varset MeleeDistance $ini("NPCini","$zone","$target(name,clean).DistanceMelee")
/if "@MeleeDistance"=="NOTFOUND" {
/if n $target(race)=="Black and White Dragons" /echo Target is a dragon, Meleeing at max distance.
/if n $target(race)=="Dragon" {
/echo Target is a dragon, Meleeing at max distance.
/ini "NPCini" "$zone" "$target(name,clean).DistanceMelee" 45
}
/if n $target(race)=="Giant" {
/echo Target is a giant, Meleeing at max distance.
/ini "NPCini" "$zone" "$target(name,clean).DistanceMelee" 45
}
/if n $target(race)!="Dragon" {
/echo Normal Sized mob, edit range if it's bad.
/ini "NPCini" "$zone" "$target(name,clean).DistanceMelee" 17
}
/delay 0
/varset MeleeDistance $ini("NPCini","$zone","$target(name,clean).DistanceMelee")
}
/varset ChangeDistance @MeleeDistance
:attackMeleeLoop
/doevents exp
/doevents RageOn
/doevents MobGate
/doevents StunON
/doevents ToggleTaunt
/doevents TauntThisRound
/keypress hot1
/if @MeleeDistance=="NULL" /echo MeleeDistance NULL
/if "@ChangeDistance"!="@MeleeDistance" {
/varset MeleeDistance @ChangeDistance
/echo Changed Melee Distance to @ChangeDistance
/ini "NPCini" "$zone" "$target(name,clean).DistanceMelee" @MeleeDistance
}
/if $char(class)=="Berserker" /doability disarm
/if n $target(id)!=@MobID /goto :attackend
/if $return==EndATK /goto :attackEnd
/if $combat!=TRUE /goto :attackend
/if $char(casting)!=TRUE /if n $char(feetwet)!=0 /face fast
/if $char(casting)!=TRUE /if n $char(feetwet)==0 /face fast nolook
/if n $target(id)==@MobID /if $char(casting)!=TRUE /if n $target(distance)>@MeleeDistance /sendkey down up
/if n $target(id)==@MobID /if $char(casting)!=TRUE /if n $target(distance)<=@MeleeDistance /sendkey up up
/if n $target(id)==@MobID /if $char(casting)!=TRUE /if n $target(distance)<=$calc(@MeleeDistance-5) /press down
/if "@MA_SB"!="No" /if n "@Time_MA_SB"=="0" /if $char(casting)!=TRUE /if n $target(distance)<=@MeleeDistance {
/varset Time_MA_SB @MA_Timer_SB
}
/if "$char(class)"=="Shadow Knight" /if $target(id)==@MobID /if $char(casting)!=TRUE /if n $target(distance)<=@MeleeDistance /goto :attackSpellsSK
/goto :attackMeleeLoop
:attackSpellsSK
/if n $char(gem,"Zevfeer's Bite")>0 /if n $char(mana,pct)>20 /if n $target(hp,pct)<90 /call cast "Zevfeer's Bite"
/if n $char(gem,"Aura of Hate")>0 /if n $char(mana,pct)>20 /if n $target(hp,pct)<90 /call cast "Aura of Hate"
/if n $char(gem,"Spear of Decay")>0 /if n $char(mana,pct)>50 /if n $target(hp,pct)<90 /call cast "Spear of Decay"
/if n $char(gem,"Spear of Plague")>0 /if n $char(mana,pct)>50 /if n $target(hp,pct)<90 /call cast "Spear of Plague"
/goto :attackMeleeLoop
:attackend
/if n @NinjaLewt!=0 /doevents exp
/varset MobID NULL
/if @TauntToggle!=NULL /varset TauntToggle NULL
/attack off
/pet backoff
/pet hold
/sendkey up up
/return
Sub ClearReturn
/return NULL
Sub event_TauntThisRound
/if "@TauntToggle"!="Yes" {
/echo Taunting this round against %t
/varset TauntToggle Yes
}
/return
Sub event_exp
/if n $target(hp,pct)>0 /return
/if n @NinjaLewt==0 /return EndATK
/if $target(type)!=CORPSE /target id @MobID
/loot
/sendkey up up
/loot
/loot
/loot
/return EndATK
Sub event_RageOn
/if n $target(hp,pct)>15 /return
/if n $target(hp,pct)==0 /return
/if $target(id)==@MobID /if $char(casting)!=TRUE /sendkey up up
/call ClearReturn
/echo Rage On
/attack off
/pet back off
/pet hold
/call ClearReturn
:waitRage
/doevents
/if $target(id)!=@MobID /return EndATK
/if $return==EndATK /return EndATK
/if $return==RageOFF /return
/goto :waitRage
Sub event_RageOFF
/echo Rage OFF
/attack on
/return RageOFF
Sub event_MobGate
/echo MOB GATED!
/attack off
/return EndATK
Sub event_Invited
/invite
/return
Sub event_StunON
/doevents flush StunOFF
/call ClearReturn
:LoopStunOFF
/doevents StunOFF
/if "$return"=="StunOFF" {
/call ClearReturn
/return
}
/goto :LoopStunOFF
Sub event_StunOFF
/return StunOFF
Sub event_ToggleTaunt
/if "@MA_1"=="taunt" {
/varset MA_1 "NULL"
/echo Will no longer taunt.
/return
}
/if "@MA_2"=="taunt" {
/varset MA_2 "NULL"
/echo Will no longer taunt.
/return
}
/if "@MA_3"=="taunt" {
/varset MA_3 "NULL"
/echo Will no longer taunt.
/return
}
/if "@MA_1"=="NULL" {
/varset MA_1 "taunt"
/echo Auto @MA_1 when availiable.
/return
}
/if "@MA_2"=="NULL" {
/varset MA_2 "taunt"
/echo Auto @MA_2 when availiable.
/return
}
/if "@MA_3"=="NULL" {
/varset MA_3 "taunt"
/echo Auto @MA_3 when availiable.
/return
}
/return
