Code: Select all
|======================================================================|
| MonkHunter.mac - Template |
| Version 3.1 - Originly Gnolls.mac |
| Created by: kirre |
| |
| This is my 2nd Real script, put together of parts of other scripts |
| and some stuff I managed to come up with. This Version is made |
| Specificly for Monks In Open Area's. This script will work for any |
| Level w/ Lil Modification. By Default it uses Mend and Bindwound |
| when HP is low, and Disarm and Flying kick durring Combat. That |
| Can be Changed Below. |
| |
| Would Like to Thank and say Sorry to the Poor Basterds that had |
| To Listen to me in the Chat today while i worked on this script. |
| Approx 6-8 hours to make this script, and Get the buggs out. Yes |
| It took that long again for this n00b to do it. So thank you to |
| those Of you that put up with me durring that time. |
| |
| This Script Best Works in open Area's rather then with places |
| where you bust Turn. When returning to Anchor it Runs in a |
| Straight Line to get thier. Also Don't use near water or lava. |
| You have Been Warned! |
| |
| WARNING: You must edit parts of this script. |
| If you are getting to much spam do-to Spawn Times being slow |
| Comment out the /echo regarding No Mobs Within Said Searchsphere |
| |
| Chow |
| Kirre |
|======================================================================|
#turbo 50 | Turbo Speed - Don't touch
#define ENEMY "#####" | What you want to hunt. Name or Partial Name.
#define AnchorX "######.##" | LOC for your Anchor Point X
#define AnchorY "######.##" | LOC for your Anchor Point Y
#define SearchSphere "Radius ## ZRadius ##" | This is the Radius in which it searchs for Said NPC's
#define MaxBW "50" | Max you can Bind Wound to.
Sub Main
/declare Keeper1 Global | Loot Settings.
/declare Keeper2 Global | Loot Settings.
/declare Keeper3 Global | Loot Settings.
/declare AnchorX Global | Achor Setting. Don't Touch
/declare AnchorY Global | Achor Setting. Don't Touch
/declare LootSlot Global | Loot Settings. Don't Touch
/varset Keeper1 "Item Name Here" | Item to Keep. Edit Here or ingame with /varset
/varset Keeper2 "Item Name Here" | Item to Keep. Edit Here or ingame with /varset
/varset Keeper3 "Item Name Here" | Item to Keep. Edit Here or ingame with /varset
/varset LootSlot 0 | Loot Settings. Don't Touch
:MainLoop
/call CheckHP | Checks to Make sure your not almost dead.
/call GMCheck | Checks if GM's in the Zone. Camps if thier are.
/call GetTarget | Target closest Enemy within Said Radius.
/call KillMob | Walks to and kills Mob. Will follow it the best it can.
/call LootMob | Loots Mob You Just killed
/call MoveToAnchor | Returns to Anchor Point Defined above.
/goto :MainLoop
/return
Sub CheckHP
/if n $char(hp,pct)<=25 {
/doability "Mend"
/echo Used Mend skill Do to Low Hit Points
/echo [HP: $char(hp,pct)%]
/if n $char(hp,pct)<MaxBW
/call BindWound
}
/return
Sub GMCheck
:GMChecker
/if $GM=="TRUE" { /sit on /camp }
/return
Sub GetTarget
:TargetLoop
/cleanup
/echo Searching for a ENEMY
/target npc ENEMY SearchSphere
/if ("$target()"=="FALSE" || n $target(hp,pct)<=95) {
/echo Unable to locate any targets nearby... Will try again in 10 seconds.
/delay 10s
/goto :TargetLoop
}
/return
Sub KillMob
/face fast
/echo killing $target(name,clean)
/attack $target(name,clean)
| /if "$combat"=="TRUE" {
:kickinass
/if "$combat"=="TRUE" {
/if n $target(distance)>=15 /sendkey down up | 20 for Regular Mobs, 30 for Giant Size
/face fast
/if n $target(distance)>=13 /sendkey down up | 18 for Regular Mobs, 28 for Giant Size
/face fast
/if n $target(distance)<=10 /sendkey up up | 10 for Regular Mobs, 15 for Giant Size
/face fast
/if n $target(distance)<=8 /sendkey up up | 8 for Regular Mobs, 13 for Giant Size
/face fast
/if $char(ability,"Flying Kick")>0 /doability "Flying Kick"
/if $char(ability,"Disarm")>0 /doability "Disarm" }
/if "$target()"=="TRUE" /goto :kickinass
/return
sub LootMob
:LootMob
/target npc corpse
/loot
/delay 1s
:lootloop
/if n LootSlot>=10 /call DoneLooting
/click left corpse @LootSlot
/delay 1s
:itemchecker
/if "$cursor()"!="TRUE" /call DoneLooting
/if "$cursor()"!="NULL" {
/if "$cursor(name)"=="@Keeper1" {
/echo Keeping $cursor(name)
/autoinventory }
/if "$cursor(name)"=="@Keeper2" {
/echo Keeping $cursor(name)
/autoinventory }
/if "$cursor(name)"=="@Keeper3" {
/echo Keeping $cursor(name)
/autoinventory }
| /echo Destroying $cursor(name) | this was causing a minor Echo problem
/destroy
/varadd LootSlot 1
/goto :lootloop
}
/return
Sub MoveToAnchor
:AnchorMoveLoop
/if "$char(state)"=="SIT" /stand
/face nolook loc AnchorX,AnchorY
/if n $distance(AnchorX,AnchorY)>11 /sendkey down up
/if n $distance(AnchorX,AnchorY)<=11 {
/sendkey up up
/return }
/goto :AnchorMoveLoop
/return
| ########## Subroutines ##########
sub BindWound
:BW
/target myself
/doability "Bind Wound"
/if n $char(hp,pct)<MaxBW {
/goto :BW }
/call Main
/return
Sub DoneLooting
:DoneLooting
/varset LootSlot 0
/cleanup
/return
| EOF |
I will Now Break Down Each part and Explain it.
#turbo: This will prevent bad macros from locking up the client by allowing you to limit the number of commands per iteration.#turbo 50
#define ENEMY "#####"
#define AnchorX "######"
#define AnchorY "######"
#define SearchSphere "Radius ## ZRadius ##"
The default is 500. A value of 1 will essentially disable #turbo (Script is based on 50). -- Taken from the Manual.
ENEMY "#####": This Defines what you are attacking. An Example #define ENEMY "giant" will attack anything with Giant in the name.
If you wish to attack anything within a certain range then remove #Define ENEMY Line from you script and just use /target npc SEARCHSPHERE
AnchorX "####.##": This is the X location that you will return to after each kill. Use /loc to get this information.
If your X LOC is a Negitive number then put the -####.##. It should include Decimal places even if they are just ####.00
AnchorY "####.##": This is the Y location that you will return to after each kill. Use /loc to get this information.
If your Y LOC is a Negitive number then put the -####.##. It should include Decimal places even if they are just ####.00
SearchSphere "Radius ## ZRadius ##": This is the distance out it searches for a MOB. Radius is Distance around you. ZRadius
is how high or low you want it to check. Lower Zradius is better in places with multiple floors or ramps (such as towers)
MaxBW: Max HP you can Bind wound upto. Default is 50%
NOTHING... should be touched here with the exception of:Sub Main
/declare Keeper1 Global
/declare Keeper2 Global
/declare Keeper3 Global
/declare AnchorX Global
/declare AnchorY Global
/declare LootSlot Global
/varset Keeper1 "Item Name Here"
/varset Keeper2 "Item Name Here"
/varset Keeper3 "Item Name Here"
/varset LootSlot 0
/varset Keeper1 "Item Name Here"
/varset Keeper2 "Item Name Here"
/varset Keeper3 "Item Name Here"
This is what we call fill in the blanks. "ITEM NAME HERE" is that you want to loot. this script is setup to loot only 3 items.
I will post a small tutorial on adding more for the scripting impaired. The Item names are case sensitive. One way to do it
is to have an item you want looted on you already. Pick the item up in your cursor while the script is running and type
/varset Keeper# $cursor("name")
Nothing needs to be changed here at all. This is your basic run of the mill Loop. If you want somthing here to not run:MainLoop
/call CheckHP
/call GMCheck
/call GetTarget
/call KillMob
/call LootMob
/call MoveToAnchor
/goto :MainLoop
/return
you can comment it out.
Example: | /call LootMob
That would stop the script from doing any looting, thus leaving all corpses alone.
The only things here that may need changing isSub CheckHP
/if n $char(hp,pct)<=25 {
/doability "Mend"
/echo Used Mend skill Do to Low Hit Points
/echo [HP: $char(hp,pct)%]
/if n $char(hp,pct)<MaxBW
/call BindWound
}
/return
/if n $char(hp,pct)<=25 {
This is a setting for when to use your MEND ability.
This is basicly an "If thier is a GM in the zone sit and camp so you don't get your ass Banned."Sub GMCheck
:GMChecker
/if $GM=="TRUE" { /sit on /camp }
/return
This only needs to be changed if You want to hunt EVERYTHING in said Radius. Read under #define ENEMY for changing to do so.Sub GetTarget
:TargetLoop
/cleanup
/echo Searching for a ENEMY
/target npc ENEMY SearchSphere
/if ("$target()"=="FALSE" || n $target(hp,pct)<=95) {
/echo Unable to locate any targets nearby... Will try again in 10 seconds.
/delay 10s
/goto :TargetLoop
}
/return
Listed above commented out lists the numbers used based on Mob size. The only other thing that may need changing isSub KillMob
/face fast
/echo killing $target(name,clean)
/attack $target(name,clean)
:kickinass
/if "$combat"=="TRUE" {
/if n $target(distance)>=15 /sendkey down up | 15 for Regular Mobs, 25 for Giant Size
/face fast
/if n $target(distance)>=13 /sendkey down up | 13 for Regular Mobs, 23 for Giant Size
/face fast
/if n $target(distance)<=10 /sendkey up up | 10 for Regular Mobs, 15 for Giant Size
/face fast
/if n $target(distance)<=8 /sendkey up up | 8 for Regular Mobs, 13 for Giant Size
/face fast
/if $char(ability,"Flying Kick")>0 /doability "Flying Kick"
/if $char(ability,"Disarm")>0 /doability "Disarm" }
/if $char(hp,pct)<=25 {
/attack off
/cleanup
/doability "Feign Death" }
/if "$target()"=="TRUE" /goto :kickinass
/return
if you use a monk ability other then flying kick (example: Dragon Punch). Change as needed
NOTHING here should be touched. If you wish to loot more then 3 items, follow the tutorial to follow.sub LootMob
:LootMob
/target npc corpse
/loot
/delay 1s
:lootloop
/if n LootSlot>=10 /call DoneLooting
/click left corpse @LootSlot
/delay 1s
:itemchecker
/if "$cursor()"!="TRUE" /call DoneLooting
/if "$cursor()"!="NULL" {
/if "$cursor(name)"=="@Keeper1" {
/echo Keeping $cursor(name)
/autoinventory }
/if "$cursor(name)"=="@Keeper2" {
/echo Keeping $cursor(name)
/autoinventory }
/if "$cursor(name)"=="@Keeper3" {
/echo Keeping $cursor(name)
/autoinventory }
| /echo Destroying $cursor(name)
/destroy
/varadd LootSlot 1
/goto :lootloop
}
/return
Again nothing here should be touched. This will walk you in a straight line to your AnchorX,and AnchorYSub MoveToAnchor
:AnchorMoveLoop
/if "$char(state)"=="SIT" /stand
/face nolook loc AnchorX,AnchorY
/if n $distance(AnchorX,AnchorY)>11 /sendkey down up
/if n $distance(AnchorX,AnchorY)<=11 {
/sendkey up up
/return }
/goto :AnchorMoveLoop
/return
Nothing needs to be touched here.sub BindWound
:BW
/target myself
/doability "Bind Wound"
/if n $char(hp,pct)<MaxBW {
/goto :BW }
/call Main
/return
NOTHING should be touched here.Sub DoneLooting
oneLooting
/varset LootSlot 0
/cleanup
/return
That about concludes the explanations. To follow is the tutorial on Adding Loot to the Loot List.
Adding to the Loot List:
First you must make a Global Varible for another Keeper, and a new VarSet for the item.. In this case it will be Keerp4would be edited to look likeSub Main
/declare Keeper1 Global | Loot Settings.
/declare Keeper2 Global | Loot Settings.
/declare Keeper3 Global | Loot Settings.
/declare AnchorX Global | Achor Setting. Don't Touch
/declare AnchorY Global | Achor Setting. Don't Touch
/declare LootSlot Global | Loot Settings. Don't Touch
/varset Keeper1 "Item Name Here" | Item to Keep. Edit Here or ingame with /varset
/varset Keeper2 "Item Name Here" | Item to Keep. Edit Here or ingame with /varset
/varset Keeper3 "Item Name Here" | Item to Keep. Edit Here or ingame with /varset
/varset LootSlot 0 | Loot Settings. Don't TouchNext we have to head down to:Sub Main
/declare Keeper1 Global | Loot Settings.
/declare Keeper2 Global | Loot Settings.
/declare Keeper3 Global | Loot Settings.
/declare Keeper4 Global | This is the NEW KEEPER
/declare AnchorX Global | Achor Setting. Don't Touch
/declare AnchorY Global | Achor Setting. Don't Touch
/declare LootSlot Global | Loot Settings. Don't Touch
/varset Keeper1 "Item Name Here" | Item to Keep. Edit Here or ingame with /varset
/varset Keeper2 "Item Name Here" | Item to Keep. Edit Here or ingame with /varset
/varset Keeper3 "Item Name Here" | Item to Keep. Edit Here or ingame with /varset
/varset Keeper4 "New Item Name Here" | This is out NEW ITEM KEEPER
/varset LootSlot 0 | Loot Settings. Don't TouchThis should be changed to look like:sub LootMob
:LootMob
/target npc corpse
/loot
/delay 1s
:lootloop
/if n LootSlot>=10 /call DoneLooting
/click left corpse @LootSlot
/delay 1s
:itemchecker
/if "$cursor()"!="TRUE" /call DoneLooting
/if "$cursor()"!="NULL" {
/if "$cursor(name)"=="@Keeper1" {
/echo Keeping $cursor(name)
/autoinventory }
/if "$cursor(name)"=="@Keeper2" {
/echo Keeping $cursor(name)
/autoinventory }
/if "$cursor(name)"=="@Keeper3" {
/echo Keeping $cursor(name)
/autoinventory }
| /echo Destroying $cursor(name)
/destroy
/varadd LootSlot 1
/goto :lootloop
}
/returnWe added an /if "$cursor(name)"!="@Keeper4" { to check Keeper4 (varible we made above), Then the basic echo, and autoinventorysub LootMob
:LootMob
/target npc corpse
/loot
/delay 1s
:lootloop
/if n LootSlot>=10 /call DoneLooting
/click left corpse @LootSlot
/delay 1s
:itemchecker
/if "$cursor()"!="TRUE" /call DoneLooting
/if "$cursor()"!="NULL" {
/if "$cursor(name)"=="@Keeper1" {
/echo Keeping $cursor(name)
/autoinventory }
/if "$cursor(name)"=="@Keeper2" {
/echo Keeping $cursor(name)
/autoinventory }
/if "$cursor(name)"=="@Keeper3" {
/echo Keeping $cursor(name)
/autoinventory }
/if "$cursor(name)"=="@Keeper4" { | THIS WAS ADDED
/echo Keeping $cursor(name) | THIS WAS ADDED
/autoinventory } | THIS WAS ADDED
| /echo Destroying $cursor(name)
/destroy
/varadd LootSlot 1
/goto :lootloop
}
/return
Save the file and run the MOFO to kill stuff.


