This script uses two combat spells and lots more.
It loads buffs and will cast if u lose the buff.
Loots certin items u may want and destroys others.
It hunts the whole zone and kills it, if for some reason it has to evac, the script will cast a gate or evac spell to get u out of danger. Once in the new zone the script takes over and hunts that zone.
The script will watch your Health and heal u if need be.
Once your mania is down to a certain lvl it will med on spot. sorry no safe spot.
I now love this script . So heres what i have to share with u.
Code: Select all
| Rainman.mac
| v1.0
| Farming script with loot for new loot parser.
| As always much of this script is inspired or taken directly from
| pieces of macro's found at macroquest2.com's macro depot
| Thank you to all the people who have donated their scripts which
| made this possible. And thank you to the MQ developers.
|
| Edit /varset MainArray(1,0) "silk" and /varset MainArray(1,1) "skin"
| Also edit /varset MainArray(2,0) "widow" and /varset MainArray(2,1) "wolf"
| You can also make these arrays bigger. If you want to search for
| wolfs, widows and orcs you would have this
| /varset MainArray(2,0) "widow"
| /varset MainArray(2,1) "wolf"
| /varset MainArray(2,2) "orc"
| /varset MobArraySize 3
| This picks a random number based on MobArraySize to pick which
| Type of mob it will chose from the array.
|
| What type of loot you want can be expanded in a similar way to
| the mobs you want to hunt. Just add your array entry and update
| /varset LootTotal 2 to be /varset LootTotal [# of loot entries]
|
| Another thing, for the code to actualy destroy items you don't want to
| keep you must have fast item destroy turned on in the game. I would
| test the script for a while on your machine before doing this. It would
| really suck if it picks up your Eyepatch of Plunder and destroies it
| due to a bug.
|
| If you dont like the spell locs the script mems just run down to the bottom
| of the script and change the loc.
#turbo 90
#include SpellCast.inc
#define HEAL "Nature's Infusion" | Spell to heal yourself with.
#define ROOT "Engorging Roots" | Spell you want to Root with.
#define NUKE "Firestrike" | Spell you want to Nuke with.
#define SNARE "Ensnare" | Spell you want to Snare with.
#define EVAC "Egress" | Spell to use to port out when your HP gets too low.
#define SOW "Spirit of Wolf" | Spell u use to up the speed of your legs.
#define DS "Brackencoat" | Spell that u have for a self damage shield.
#define SKIN "Protection of the Nine" | Spell to give u hps.
Sub Main
/declare MobToHunt global
/declare MainArray array2
/declare MyXLOC global
/declare MyYLOC global
/declare KSRadius global
/declare NotSee global
/declare TooFar global
/declare MyTarget global
/declare TargetDead global
/declare HasTarget global
/declare ObstCount global
/declare LootSlot global
/declare CheckLoot global
/declare LootTotal global
/declare MobArraySize global
/declare RangeMax global
/declare RangeMin global
/declare FastRange global
/press esc
/press esc
/press esc
/press esc
/press alt
/press shift
/press ctrl
/varset RangeMax 12
/varset RangeMin 10
/varset FastRange 14
/varset LootSlot 0
/varset CheckLoot 0
| Add as many of these as you want but make sure you
| increase LootTotal
/varset MainArray(1,0) "silk"
/varset MainArray(1,1) "quality"
/varset MainArray(1,2) "egg"
/varset MainArray(1,3) "bone"
| Add as many of these as you want but make sure you
| increase MobArraySize
/varset MainArray(2,0) "spider"
/varset MainArray(2,1) "wolf"
/varset MainArray(2,2) "bear"
/varset MainArray(2,3) "kodiak"
/varset MainArray(2,4) "lion"
/varset MainArray(2,5) "cat"
/varset MainArray(2,6) "snake"
/varset MainArray(2,7) "skeleton"
| Make sure u udate this part of the script if u add items to the moblist or the itemloot list.
/varset LootTotal 4
/varset KSRadius 60
/varset HasTarget 0
/varset ObstCount 0
/varset MobArraySize 8
|Starting the script here
:Start
/call CheckHP
/call CheckMana
/call SetupSpells
/call Buffchecks
/call GetTarget
/if @HasTarget=="1" /call MoveToMob
/if @HasTarget=="1" /call CombatSub
/if @HasTarget=="1" /call MoveToMob
/if @HasTarget=="1" /call LootMob
/call ResetSub
/goto :Start
/return
sub GetTarget
:Aquire
/target nopcnear @KSRadius npc "@MainArray(2,$rand(@MobArraySize))"
/varset MyTarget $target(id)
/varset TargetDead 0
/if n $target(id)==0 /goto :Aquire
/if $target()=="False" /goto :Aquire
/varset HasTarget 1
/varset MobToHunt $target(name)
/return
Sub MoveToMob
/face fast
/if n $target(distance)>=@FastRange /call Fastmove
/if n $target(distance)>@RangeMax {
/press up
}
/if n $target(distance)<@RangeMin {
/press down
}
/return
Sub Fastmove
/varset MyXLOC $char(x)
/varset MyYLOC $char(y)
/varset ObstCount 0
:fastmoveloop
/if $target()=="FALSE" {
/sendkey up up
/if $combat=="TRUE" {
/attack off
/return
}
}
/face fast
/if n $target(distance)>@FastRange {
/sendkey down up
}
/if n $target(distance)<=@FastRange {
/sendkey up up
/return
}
/varadd ObstCount 1
/if n @ObstCount>=3 {
/call CheckObst
}
/goto :fastmoveloop
/return
sub CombatSub
/if $target()=="FALSE" {
/varset HasTarget 0
/return
}
/delay 1s
/echo Rooting: $target(name,clean)
/call cast "ROOT"
/delay 3s
/if ("$target()"=="TRUE" || n $target(hp,pct)>=1) /call dead
/sendkey up up
/delay 1s
/target corpse
/lootn never
/delay 2s
/return
Sub dead
:nuke
/if ("$target()"=="TRUE" || n $target(hp,pct)>=1) {
/face nolook
/echo The dam $target(name,clean) is not dead yet!
/delay 1s
/echo Nuking: $target(name,clean)
/call cast "NUKE"
/delay 3s
/if "$target()"=="TRUE" /goto :nuke }
/return
sub LootMob
/loot
/delay 1s
:lootloop
/if n @LootSlot>=9 /goto :doneloot
/click left corpse @LootSlot
/delay 1s
/if "$cursor()"!="TRUE" /goto :doneloot
:lootChecker
/if "$cursor(name)"~~"@MainArray(1,@CheckLoot)" {
/delay 1s
/autoinventory
/delay 1s
/varadd LootSlot 1
/goto :lootloop
}
/varadd CheckLoot 1
/if "$cursor()"=="TRUE" {
/if n @CheckLoot<@LootTotal /goto :lootchecker
}
/if "$cursor()"=="TRUE" {
/delay 1s
/destroy
}
/varadd LootSlot 1
/varset CheckLoot 0
/goto :lootloop
:doneloot
/lootn always
/varset LootSlot 0
/return
sub ResetSub
/sendkey up up
/press esc
/press esc
/press esc
/press esc
/press alt
/press shift
/press ctrl
/varset CheckLoot 0
/varset HasTarget 0
/varset ObstCount 0
/delay 1s
/return
sub CheckObst
/if n @MyXLOC==$char(x) /if n @MyYLOC==$char(y) /call HitObst 5
/varset MyXLOC $char(x)
/varset MyYLOC $char(y)
/varset ObstCount 0
/return
sub HitObst
/sendkey up up
/sendkey down down
/if n $rand(99)>50 {
/delay 3s
/sendkey up down
/sendkey down Right
/delay @Param0
/sendkey up Right
/sendkey down up
/delay 3s
/sendkey up up
} else {
/delay 3s
/sendkey up down
/sendkey down left
/delay @Param0
/sendkey up left
/sendkey down up
/delay 3s
/sendkey up up
}
/sendkey up down
/sendkey up Right
/sendkey up Left
/sendkey down up
/return
Sub CheckHP
| Check our current Hit Points and Port out if below 20%.
/if n $char(hp,pct)<=20 {
/echo HEY!!! I'm DIEING!!! Time to bug out!!! [HP: $char(hp,pct)%]
/call cast "EVAC"
}
| Check our current Hit Points and if below 60%, Heal until we reach 90%.
/if n $char(hp,pct)<=60 {
/target myself
:HealLoop
/echo LOW HEALTH!!! Healing to 90%... [HP: $char(hp,pct)%]
/call cast "HEAL"
/if n $char(hp,pct)<=90 /goto :HealLoop
}
/return
Sub CheckMana
| Check our current Mana and Port out if below 20%.
/if n $char(mana,pct)<=30 {
/echo HEY!!! I'm almost OOM!!! Time to bug out!!! [MANA: $char(mana,pct)%]
/call cast "EVAC"
}
| Check our current Mana and if below 40%, Meditate until we reach 90%.
/if n $char(mana,pct)<=40 {
/echo LOW MANA!!! Medding to 90%... [MANA: $char(mana,pct)%]
:MedLoop
/if "$char(state)"!="SIT" /sit
/delay 15s
/if n $char(mana,pct)<=90 /goto :MedLoop
}
/return
Sub Buffchecks
| Checks your buff and updates if u dont have it.
/if n $char(buff,"SOW")==0 {
/target myself
/call cast "SOW"
/delay 3s
}
/if n $char(buff,"DS")==0 {
/target myself
/call cast "DS"
/delay 3s
}
/if n $char(buff,"SKIN")==0 {
/target myself
/call cast "SKIN"
/delay 3s
}
/return
Sub SetupSpells
| Memorize our spells if they are not already memorized.
| You can put these in any slot you want by changing the # after /memspell.
/if n $char(gem,"HEAL")==0 {
/memspell 8 "HEAL"
/delay 5s
}
/if n $char(gem,"ROOT")==0 {
/memspell 1 "ROOT"
/delay 5s
}
/if n $char(gem,"NUKE")==0 {
/memspell 3 "NUKE"
/delay 5s
}
/if n $char(gem,"SNARE")==0 {
/memspell 2 "SNARE"
/delay 5s
}
/if n $char(gem,"SOW")==0 {
/memspell 7 "SOW"
/delay 5s
}
/if n $char(gem,"SKIN")==0 {
/memspell 4 "SKIN"
/delay 5s
}
/if n $char(gem,"DS")==0 {
/memspell 5 "DS"
/delay 5s
}
/if n $char(gem,"EVAC")==0 {
/memspell 6 "EVAC"
/delay 5s
}
/return
Sub BackstabIt
/if n $char(ability,"Backstab")!=-2 {
/if $target()=="TRUE" {
/face fast
/doability "Backstab"
}
}
/returnif u could help. id thank u kindly.
