Moderator: MacroQuest Developers
Code: Select all
#chat tell
Sub Main
:MainLoop
/doevents
/goto :MainLoop
/return
Sub Event_Chat
/if "@Param1"!="MastersName" /return
/if "@Param2"~~"sit" /sit
/if "@Param2"~~"stand" /stand
/return
Code: Select all
EG:
/macro healmebitch.mac DoofusCode: Select all
#chat tell
Sub Main
/declare MastersName global
/varset MastersName "@Param0"
:MainLoop
/doevents
/goto :MainLoop
/return
Sub Event_Chat
/if "@Param1"!="@MastersName" /return
/if "@Param2"~~"sit" /sit
/if "@Param2"~~"stand" /stand
/return


Code: Select all
|___________________________________________________________________
| petshaman.mac Edited by Icepick912
|___________________________________________________________________
| Normal commands
|________________
| Attack
| Example: /tell a_little_warrior_01 Attack the $target(id)
|
| Sit
| Example: /tell a_little_warrior_01 Sit
|
| Follow
| Example: /tell a_little_warrior_01 Follow
|
| Loot
| Example: /tell a_little_warrior_01 Loot the $target(id)
|
| Taunt
| Example: /tell a_little_warrior_01 Taunt the $target(id)
|___________________________________________________________________
| Commands for use while attacking
|__________________________________
| Pet Back Off
| Example: /tell a_little_warrior_01 Back
|
| Stop
| Example: /tell a_little_warrior_01 Stop Attacking the $target(id)
|___________________________________________________________________
|TO DO:
|Set the #define Parameters Owner and BotName
|___________________________________________________________________
|#include core.mac
#chat tell
#turbo
#Event Loading "LOADING, PLEASE WAIT..."
#Event Loading "LOADING, PLEASE WAIT..."
#Event Enrage "has become ENRAGED."
#Event UnEnrage "is no longer enraged."
#define owner "Owners name"
#define BotName "Botsname"
#define Forward w
#define Backward s
#define /follow "/call followit"
Sub Main
/declare v0 global
/declare v1 global
/declare v2 global
/declare v3 global
/declare SpellSlot global
/declare PCommand0 global
/declare PCommand1 global
/declare PCommand2 global
/declare PCommand3 global
/declare PCommand4 global
/varset v0 $target(name)
/varset v1 $target(id)
/varset v2 0 |Variable used to determine wether or not to return to main loop
:MainLoop
/if $gm=="TRUE" /tell owner There is a GM in the Zone
/varset v2 0
/doevents
/delay 1s
/goto :MainLoop
/return
Sub FollowIt
:LoopFollow
/if n $target(distance)>10 /sendkey down up
/if n $target(distance)<10 /sendkey up up
/face fast
/doevents
/goto :LoopFollow
/return
Sub Event_Loading
/sendkey up Forward
/sendkey up Backward
/attack off
/varset v0 0
/varset v1 0
/return
Sub Event_Chat(ChatType,Sender,ChatText)
/if @Sender=="owner" {
/if "@ChatText"~~Command {
/varset PCommand0 $arg(2,"@ChatText")
/varset PCommand1 $arg(3,"@ChatText")
/varset PCommand2 $arg(4,"@ChatText")
/varset PCommand3 $arg(5,"@ChatText")
/varset PCommand4 $arg(6,"@ChatText")
/@PCommand0 @PCommand1 @PCommand2 @PCommand3 @PCommand4
}
/if "@ChatText"==Heal {
/varset SpellSlot $char(gem,Chloroblast)
/if n "@SpellSlot"=="0" {
/if "$char(state)"!="SIT" {
/sit
}
/memspell 4 Chloroblast
}
:SpellWait0
/if n "@SpellSlot"<"1" {
/varset SpellSlot $char(gem,Chloroblast)
/goto :SpellWait0
}
/sit off
/target owner
/cast @SpellSlot
/tell owner Healing $target(name)
/delay 4s
/varset v2 1
/varset SpellSlot 0
}
/if "@ChatText"==mana {
/tell owner Mana: $char(mana,pct)% $char(mana,cur)/$char(mana,max) Health: $char(hp,pct)% $char(hp,cur)/$char(hp,max).
/varset v2 1
}
/if "@ChatText"==Sit {
/sit on
/tell owner I am now sitting
/varset v2 1
}
/if "@ChatText"==Stand {
/sit off
/tell owner I am now standing
/varset v2 1
}
/if "@ChatText"==Follow {
/sit off
/target "owner"
/tell owner Now following you $target(name)
/follow
/varset v2 1
}
/if "@ChatText"==Loot {
/sit off
/target id $arg(3,"$p2")
/tell owner Im going to loot $target(name)
/call Loot
/varset v2 1
}
/if "@ChatText"==stamina {
/varset SpellSlot $char(gem,"Riotous Health")
/if n "@SpellSlot"=="0" {
/if "$char(state)"!="SIT" {
/sit
}
/memspell 5 "Riotous Health"
}
:SpellWait1
/if n "@SpellSlot"<"1" {
/varset SpellSlot $char(gem,"Riotous Health")
/goto :SpellWait1
}
/sit off
/target owner
/tell owner I am casting stamina on $target(name)
/cast @SpellSlot
/delay 6s
/varset v2 1
/varset SpellSlot 0
}
/if "@ChatText"==regen {
/varset SpellSlot $char(gem,"Regrowth")
/if n "@SpellSlot"=="0" {
/if "$char(state)"!="SIT" {
/sit
}
/memspell 5 "Regrowth"
}
:SpellWait2
/if n "@SpellSlot"<"1" {
/varset SpellSlot $char(gem,"Regrowth")
/goto :SpellWait2
}
/sit off
/target owner
/tell owner I am casting Chloro on $target(name)
/cast @SpellSlot
/delay 6.5s
/varset v2 1
/varset SpellSlot 0
}
/if "@ChatText"=="sick pet" {
/target owner
/assist
/delay 5
/tell owner I am sicking my pet on $target(name)
/pet attack
/attack off
/target owner
/varset v2 1
}
/if "@ChatText"==cancle {
/target owner
/press c
/delay 5
/tell owner canceling
/delay 5
/press c
/varset v2 1
}
/if "@ChatText"==agility {
/varset SpellSlot $char(gem,"Deliriously Nimble")
/if n "@SpellSlot"=="0" {
/if "$char(state)"!="SIT" {
/sit
}
/memspell 5 "Deliriously Nimble"
}
:SpellWait3
/if n "@SpellSlot"<"1" {
/varset SpellSlot $char(gem,"Deliriously Nimble")
/goto :SpellWait3
}
/sit off
/target owner
/tell owner I am casting agility on $target(name)
/cast @SpellSlot
/delay 6.5s
/varset v2 1
/varset SpellSlot 0
}
/if "@ChatText"==Hos {
/varset SpellSlot $char(gem,"Harnessing of Spirit")
/if n "@SpellSlot"=="0" {
/if "$char(state)"!="SIT" {
/sit
}
/memspell 5 "Harnessing of Spirit"
}
:SpellWait4
/if n "@SpellSlot"<"1" {
/varset SpellSlot $char(gem,"Harnessing of Spirit")
/goto :SpellWait4
}
/sit off
/target owner
/tell owner I am casting Harnessing of Spirit on $target(name)
/cast @SpellSlot
/delay 10s
/varset v2 1
/varset SpellSlot 0
}
/if "@ChatText"==Haste {
/varset SpellSlot $char(gem,"Celerity")
/if n "@SpellSlot"=="0" {
/if "$char(state)"!="SIT" {
/sit
}
/memspell 5 "Celerity"
}
:SpellWait5
/if n "@SpellSlot"<"1" {
/varset SpellSlot $char(gem,"Celerity")
/goto :SpellWait5
}
/sit off
/target owner
/tell owner I am hasting $target(name)
/target owner
/cast @SpellSlot
/delay 4s
/varset v2 1
/varset SpellSlot 0
}
/if "@ChatText"==Back {
/tell owner Im comming back to the group "owner"
/call Back
/varset v2 1
}
/if "@ChatText"==Stop {
/tell owner Im not attacking $target(name) anymore.
/attack off
/varset v2 1
}
/if "@ChatText"==sow {
/varset SpellSlot $char(gem,"Spirit of Wolf")
/if n "@SpellSlot"=="0" {
/if "$char(state)"!="SIT" {
/sit
}
/memspell 8 "Spirit of Wolf"
}
:SpellWait6
/if n "@SpellSlot"<"1" {
/varset SpellSlot $char(gem,"Spirit of Wolf")
/goto :SpellWait6
}
/sit off
/target owner
/tell owner I am Sowing $target(name)
/target owner
/cast @SpellSlot
/delay 5s
/varset v2 1
/varset SpellSlot 0
}
/if "@ChatText"==str {
/varset SpellSlot $char(gem,"Strength")
/if n "@SpellSlot"=="0" {
/if "$char(state)"!="SIT" {
/sit
}
/memspell 5 "Strength"
}
:SpellWait7
/if n "@SpellSlot"<"1" {
/varset SpellSlot $char(gem,"Strength")
/goto :SpellWait7
}
/sit off
/target owner
/tell owner I am making $target(name) Stronger!
/target owner
/cast @SpellSlot
/delay 5s
/varset v2 1
/varset SpellSlot 0
}
/if "@ChatText"==dex {
/varset SpellSlot $char(gem,"Dexterity")
/if n "@SpellSlot"=="0" {
/if "$char(state)"!="SIT" {
/sit
}
/memspell 5 "Dexterity"
}
:SpellWait8
/if n "@SpellSlot"<"1" {
/varset SpellSlot $char(gem,"Dexterity")
/goto :SpellWait8
}
/sit off
/target owner
/tell owner I am Giving $target(name) Accuracy!
/target owner
/cast @SpellSlot
/delay 5s
/varset v2 1
/varset SpellSlot 0
}
/if "@ChatText"==Ios {
/varset SpellSlot $char(gem,"Infusion of Spirit")
/if n "@SpellSlot"=="0" {
/if "$char(state)"!="SIT" {
/sit
}
/memspell 5 "Infusion of Spirit"
}
:SpellWait9
/if n "@SpellSlot"<"1" {
/varset SpellSlot $char(gem,"Infusion of Spirit")
/goto :SpellWait9
}
/sit off
/target owner
/tell owner I am casting Infusion of Spirit on $target(name)
/cast @SpellSlot
/delay 10s
/varset v2 1
/varset SpellSlot 0
}
}
/if @Sender!=owner {
/tell owner BotName has a private tell.
}
/return
|**----------------------------------------------------------------------------**|
|** Tell pet to attack **|
|**----------------------------------------------------------------------------**|
Sub Attack
/attack on
/sendkey down s
/sendkey up s
/varset v1 $target(id)
:TrackLoop
/doevents
/delay 0
/face afast
/if n $target(distance)>14 /sendkey down Forward
/if n $target(distance)<16 {
/sendkey up Forward
/goto :AttackLoop
}
/goto :TrackLoop
:AttackLoop
/if "$target(id)"!="$v1" /goto :EndAttack
/doevents
/if n $v2==1 /return
/if n $v3==1 /return
/delay 0
/face nopredict fast
/if n $target(distance)>10 /sendkey down Forward
/if n $target(distance)<11 /sendkey up Forward
/if n $target(hp,pct)>0 /press 3
|/if n $char(ability,bash)>0 /doability bash
|/if n $char(ability,disarm)>0 /doability disarm
|/if n $char(ability,kick)>0 /doability kick
/if $target(hp,pct)>0 {
/press 7
}
/goto :AttackLoop
:EndAttack
/target owner
/follow
/return
Sub Back
/attack off
/target "owner"
/follow
/return
Sub Loot
| yet to be implemented
/return
Sub Haste
/target owner
/cast 2
/delay 4s
/return
Sub Event_Enrage
/if "$p0"~~"BotName" /return
/attack off
/varset v3 1
/return
Sub Event_UnEnrage
/attack on
/varset v3 0
/return