New Version # 6
* Ini Support
* Mount on / Mount off command *NEW
* Give heal command (heals masters target to an ammount you set)
* 7 custom Buff slots
* Heal to full command
* Auto Healing
* Give buff command
* Auto follow
* Camp command
* List buffs and Hp / Mana
* Ability to reset macro from Masters computer should need arise
* Tell forwarding
* Fizzleproof casting
EDIT: New code, added features, Edit Plassist.INI to edit spells, will create after first load.
Code: Select all
| Plassist.mac
|
| syntax:
| /macro Plassist <Masters Name>
| Example:
| /macro Plassist Newbie
|
| Syntax for Buffs { just say into channel you have choosen }
| "Need Buff 1", "Need Buff 2" , Ect to cast buffs 1-7.
| "Give Buff 1 soandso", "Give Buff 2 soandso", Ect to cast buffs 1-7 on soandso
| "Need Heal" : to have bot heal master to full
| "Give heal" : to have bot heal the masters target
|
| ------------------------------------------------------
| Syntax for misc stuff...
| "Camp Now" : to have bot camp and end the macro
| "Need Info" : to have bot display HP and Mana %,and current buff list.
| "Sit Now" : to have bot sit down
| "Reset mac" : to restart the macro
| "Follow me" : to have Bot follow you
| "Stop Follow" : to have Bot stop following you
| "Mount on" : to have Bot cast its Mount
| "Mount off" : to have Bot dismount
|
| Notes
|
| * Must Include spellcast.inc
| * Bot MUST have your channel set as number 1, or it will not work.
| * Any tells sent to the Bot will be forwarded to the chat channel.
| * Must have MQ2MoveUtils for follow command to work
| * If you change the name of the macro you must edit the macname var
| for the reset command to work.
|-------------------------------------------------------
#event Buffs "#*#Need Buff #1#"
#event Buffother "#*#Give Buff #1# #2#'"
#event Heal "#*#Need Heal#*#"
#event healother "#*#Give heal#*#"
#event sit "#*#Sit down#*#"
#event camp "#*#Camp now#*#"
#event Info "#*#Need Info#*#"
#event reset "#*#Reset mac#*#"
#event Follow "#*#Follow me#*#"
#event Stop "#*#Stop Follow#*#"
#event mountfail "You can not summon a mount here."
#event mountup "#*#Mount on#*#"
#event dismount "#*#Mount off#*#"
#chat tell
#include spellcast.inc
Sub Main
/deletevar Master
/deletevar Buff
/deletevar Healspell
/deletevar macname
/deletevar healat
/deletevar healto
/deletevar sit
/deletevar channel
/deletevar havemount
/deletevar mount
/declare Master string Global
/declare Buff[7] string Global
/declare Healspell string Global
/declare macname string Global
/declare healat int Global
/declare healto int Global
/declare sit string Global
/declare channel string Global
/declare havemount string Global
/declare mount string Global
/varset Master ${Param0}
|-----------------------
|Load INI
|-----------------------
/1 Loading Configuration File
/call Load_Config
/1 Configuration File Loaded Version ${Ini[plassist.ini,Configuration,VERSION]} online
|-----------------------
| Edit chat channel
|-----------------------
/join plassist:plassist
| |
|------------------------------------------|
| |
/echo Pl Assistant Started
| |
|------------------------------------------|
| |
/delay 1s
/1 Booted and ready to run...
:loop
/doevents
/tar ${Master}
/if (${Target.PctHPs}<= ${healat}) {
/goto :heal
} else {
/goto :loop
}
/return
| |
|------------------------------------------|
| |
:heal
/tar ${Master}
/if (${Target.PctHPs}< ${healto}) {
/call Cast "${Healspell}"
/goto :heal
} else {
/if (${sit}) /sit
/goto :loop
}
| |
|------------------------------------------|
| |
Sub Event_camp
/camp
/1 Camping, Macro is now disabled
/endmac
/return
| |
|------------------------------------------|
| |
Sub Event_Info
/1 Buff1 = ${Buff[1]}
/1 Buff2 = ${Buff[2]}
/1 Buff3 = ${Buff[3]}
/1 Buff4 = ${Buff[4]}
/1 Buff5 = ${Buff[5]}
/1 Buff6 = ${Buff[6]}
/1 Buff7 = ${Buff[7]}
/1 Heal Spell = ${Healspell}
/1 Current HP = ${Me.PctHPs}
/1 Current Mana = ${Me.PctMana}
/return
| |
|------------------------------------------|
| |
Sub Event_sit
/if (${Me.State.NotEqual[SIT]}) {
/sit
/delay 5
}
/return
| |
|------------------------------------------|
| |
Sub Event_Buffs(string line, int buffnumber)
/stand
/tar ${Master}
/1 Casting ${Buff[${buffnumber}]} on %t...
/call Cast "${Buff[${buffnumber}]}"
/delay 1s
/if (${sit}) /sit
/return
| |
|------------------------------------------|
| |
Sub Event_Buffother(string line, int buffnumber,string casttarget)
/stand
| Removed /delay no need for it
/if ( ${casttarget.Equal[NULL]} ) {
| If they didnt give a target it is for Master
/target ${Master}
} else {
| They gave a target. So lets target them
/target ${casttarget}
}
| If we dont have a target something is wrong. Just announce it and return
/if ( ${Target.CleanName.Equal[NULL]} ) {
/1 Could not target ${casttarget} aborting
/return
}
| Otherwise lets slap them with the buff
/1 Casting ${Buff[${buffnumber}]} on ${Target.CleanName}...
/call Cast "${Buff[${buffnumber}]}"
/delay 1s
/if (${sit}) /sit
/return
| |
|------------------------------------------|
| |
Sub Event_Chat(ChatType,Sender,ChatText)
/1 ${Sender} told Me, '${ChatText}'
/return
| |
|------------------------------------------|
| |
Sub Event_reset
/1 reseting in 5s
/delay 5s
/deletevar Buff[7]
/deletevar Healspell
/macro ${macname} ${Master}
| |
|------------------------------------------|
| |
Sub Event_Follow
/stand
/delay 5
/tar ${Master}
/1 Following you ${Master}
/stick
/return
| |
|------------------------------------------|
|
Sub Event_Stop
/1 No longer Following ${Master}
/stick off
/delay 1
/return
| |
|------------------------------------------|
|
|-----------------------
|Load_Config
|-----------------------
Sub Load_Config()
| If there isnt a config lets make one for them
/if (!${Ini[plassist.ini,Configuration,VERSION]} ) /call Save_New_Config
/varset macname ${Ini[plassist.ini,Configuration,MACRONAME]}
/varset Buff[1] ${Ini[plassist.ini,Configuration,Buff1]}
/varset Buff[2] ${Ini[plassist.ini,Configuration,Buff2]}
/varset Buff[3] ${Ini[plassist.ini,Configuration,Buff3]}
/varset Buff[4] ${Ini[plassist.ini,Configuration,Buff4]}
/varset Buff[5] ${Ini[plassist.ini,Configuration,Buff5]}
/varset Buff[6] ${Ini[plassist.ini,Configuration,Buff6]}
/varset Buff[7] ${Ini[plassist.ini,Configuration,Buff7]}
/varset Healspell ${Ini[plassist.ini,Configuration,HealSpell]}
/varset healat ${Ini[plassist.ini,Autoheal,healat]}
/varset healto ${Ini[plassist.ini,Autoheal,healto]}
/varset havemount ${Ini[plassist.ini,Mount,havemount]}
/varset mount ${Ini[plassist.ini,Mount,mount]}
/varset sit ${Ini[plassist.ini,Sit?,sit]}
/return
|-----------------------
|Save_New_Config
|-----------------------
Sub Save_New_Config()
/ini "plassist.ini" "Configuration" "VERSION" "6"
/ini "plassist.ini" "Configuration" "MACRONAME" "Plassist.mac"
/ini "plassist.ini" "Configuration" "Buff1" "Shield of Thistles"
/ini "plassist.ini" "Configuration" "Buff2" "Riftwind's Protection"
/ini "plassist.ini" "Configuration" "Buff3" "Skin like Steel" "
/ini "plassist.ini" "Configuration" "Buff4" "Spirit of Wolf""
/ini "plassist.ini" "Configuration" "Buff5" "Strength of Earth"
/ini "plassist.ini" "Configuration" "Buff6" ""
/ini "plassist.ini" "Configuration" "Buff7" ""
/ini "plassist.ini" "Configuration" "HealSpell" "Healing"
/ini "plassist.ini" "Autoheal" "healat" "50"
/ini "plassist.ini" "Autoheal" "healto" "80"
/ini "plassist.ini" "Mount" "havemount" "FALSE"
/ini "plassist.ini" "Mount" "mount" "Small Black Drum"
/ini "plassist.ini" "Sit?" "sit" "TRUE"
/return
| |
|------------------------------------------|
| |
Sub Event_healother
/assist ${Master}
/delay 2s
/1 Casting ${Healspell} on %t untill ${healto}
:healtar
/if (${Target.PctHPs}< ${healto}) {
/call Cast "${Healspell}"
/goto :healtar
} else {
/if (${sit}) /sit
/return
}
| |
|------------------------------------------|
| |
Sub Event_mountfail
/1 Cant cast a mount here moving on..
/return
| |
|------------------------------------------|
| |
Sub Event_Mountup
/if (${havemount}) {
/1 Mounting my horse/drogmor
/call Cast "${mount}" item 3s
/return
}
/1 Sorry I dont have a mount/drogmor edit ini to reflect if I do
/return
| |
|------------------------------------------|
| |
Sub Event_Dismount
/1 Dismount my horse/drogmor
/dismount
/return
| |
|------------------------------------------|
| |
Sub Event_Heal
/tar ${Master}
/stand
/1 Casting ${Healspell} on %t untill %100
:CheckHealAgain
/if (${Target.PctHPs}<100) {
/call Cast "${Healspell}"
/goto :CheckHealAgain
} else {
/1 %t is at %100
/delay 1s
/if (${sit}) /sit
}
/return



