would like any help on how to do a spell mem on tell sorta thing, and make it more spell dynamic.
right now you have to have the spells in the right slots, or it casts the wrong things. Can figure it out by lookin at the code.
Commands are Heal, sick pet, agility, hos, haste, follow, sit, stand, mana(checks mana/hp and sits/stands), stamina, sow, cancle(cancle spell casting), regen, think thats it, just change owner to the person you want the char to listen too. Be sure to put the right spells in the slotz till i make it more dynamic.
Code: Select all
|___________________________________________________________________
| petshaman.mac
|___________________________________________________________________
| 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 "Ownername"
#define BotName "botname"
#define Forward w
#define Backward s
#define /follow "/call followit"
Sub Main
/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 1 s
/goto :MainLoop
/return
Sub FollowIt
:LoopFollow
/if n $target(distance)>10 /sendkey down up
/if n $target(distance)<10 /sendkey up up
/face fast nopredict
/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
/if $p1=="owner" {
/if $arg(1,"$p2")==Heal me {
/sit off
/target $p1
/cast 4
/reply Healing $target(name)
/delay 5s
/varset v2 1
}
/if $arg(1,"$p2")==mana {
/reply Mana: $char(mana,pct)% $char(mana,cur)/$char(mana,max) Health: $char(hp,pct)% $char(hp,cur)/$char(hp,max).
/sit on
/varset v2 1
}
/if $arg(1,"$p2")==Sit {
/sit on
/reply I am now sitting
/varset v2 1
}
/if $arg(1,"$p2")==Stand {
/sit off
/reply I am now standing
/varset v2 1
}
/if $arg(1,"$p2")==Follow {
/sit off
/target "owner"
/reply Now following you $target(name)
/follow
/varset v2 1
}
/if $arg(1,"$p2")==Loot {
/sit off
/target id $arg(3,"$p2")
/reply Im going to loot $target(name)
/call Loot
/varset v2 1
}
/if $arg(1,"$p2")==stamina {
/sit off
/target $p1
/reply I am casting stamina on $target(name)
/cast 5
/delay 6s
/varset v2 1
}
/if $arg(1,"$p2")==regen {
/sit off
/target $p1
/reply I am casting Chloro on $target(name)
/cast 6
/delay 5s
/varset v2 1
}
/if $arg(1,"$p2")==sick pet {
/target $p1
/assist
/delay 5
/reply I am sicking my pet on $target(name)
/pet attack
/target $p1
/varset v2 1
}
/if $arg(1,"$p2")==cancle {
/target $p1
/press c
/delay 5
/reply canceling
/delay 5
/press c
/varset v2 1
}
/if $arg(1,"$p2")==agility {
/sit off
/target $p1
/reply I am casting agility on $target(name)
/cast 7
/delay 5s
/varset v2 1
}
/if $arg(1,"$p2")==hos {
/sit off
/target $p1
/reply I am casting Harnosing of Spirit on $target(name)
/cast 1
/delay 10s
/varset v2 1
}
/if $arg(1,"$p2")==Haste {
/sit off
/target $p1
/reply I am hasting $target(name)
/target $p1
/cast 2
/delay 4s
/varset v2 1
}
/if $arg(1,"$p2")==Back {
/reply Im comming back to the group "owner"
/call Back
/varset v2 1
}
/if $arg(1,"$p2")==Stop {
/reply Im not attacking $target(name) anymore.
/attack off
/varset v2 1
}
/if $arg(1,"$p2")==sow {
/sit off
/target $p1
/reply I am Sowing $target(name)
/target $p1
/cast 8
/delay 5s
/varset v2 1
}
}
/if $p1!="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 $p1
/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