HP sub check

SHV126

Lifetimer
Joined
Mar 11, 2006
Messages
129
Reaction score
1
Points
18
Location
St. Paul, Minnesota
Total noob here but had enough of getting trained while foraging, so is it possible to add a sub check to a macro that at a certain percentage of hit points you would move to a location, succor and camp. If this is possible what would it look like? Thanks for any help.
 
Code:
/declare YourSafeX int outer xxxx
/declare YourSafeY int outer xxxx
/declare YourSafeZ int outer xxxx


Sub Main
:Main
/if (${Me.PctHPs}<75) /call StupidFuckTrainedMe

/goto :Main
Sub StupidFuckTrainedMe
/warp loc ${YourSafeY} ${YourSafeX} ${YourSafeZ}
/fade
/camp
/endmacro
/return
 
foraging + Training

I am assuming you are AFK foraging? Then why dont you just pick a safe place to leave the toon. It doesnt matter where you stand in a zone, you will forage the exact same things. You should also limit the amount of warps you do, especialy AFK.

but anyway the code should look more like this:

Sub main

:loop

/if (${Me.PctHPs}<=80) /call moveme

/goto :loop

/return


sub moveme

/warp succor
/delay 1m

/return
 
The code I gave him doesnt force him to use the succor point, gives you more variety, and 3/4 the zones I know people afk forage, the succor point isnt a safe spot to try and camp or warp to if your getting trained.

Guess you never ran into a malice player who doesnt care how safe of a location you are, they will train you for afk foraging.
 
avoid traing f#*ks

Ok, how about this:

Sub main

:loop


/if (${SpawnCount[npc radius 200]>0) /call avoiddeath


/goto :loop

/return

Sub avoiddeath

/camp
/endmacro


/return
 
Mont, your solution doesn't necessarily work, because in many zones, kos and non-kos mobs co-exist.

So with your last solution, you would camp even if a non-kos mob were to approach.

With Jim's solution, you could base it on HPs (which would be more indicative of being under attack by kos mobs). It lets you choose a pre-defined loc instead of the safe spot (lol just in case a GM happens to be watching also a the succor point).

Or, you could replace it with /warp s or even /gate

Jim one thing I might suggest, is a /instant before the /camp statement, lets you get out much sooner.

This is deffinitely something that is going into my new forage/gank project.
 
I dont use that, was just on the fly.

Code:
/if (${SpawnCount[npc radius 200]}) /call whatever

You dont need the >0 as that will only return true atleast 1 npc within that radius
 
try this

i agree with Sparky13, i have found I need to taylor my mac's to my particular situation.
So, if there are non kos mobs roaming, then you need to change the way you react to the situation.
The macro can have multiple actions, based on whats happening to the toon.
It can read like this:

/if (${SpawnCount[npc radius 15]>0 && ${Me.PctHPs}<100) /call moveme


with a radius of 15 you are assured its a mob hitting you, especially now that you HPs are going down too


or:


we could do an Event:

#event hit "#*# YOU for #*#"
#event hit "#*# YOU, but #*#"



Sub main


:loop

/doevents

/goto :loop


/return


Sub Event_hit


/delay 1
/camp
/endmacro
| **** or you could have it warp you somewhere else in zone, or gate, or whatever

/return
 
Well since most forage bots are either rangers or druids (the only classes who can get forage above 50 anyway), just work on getting their Class AA Innate Camouflage. Then just keep casting that on yourself when it's about to run out, can easily do that in the macro.

Other than that, position is everything. Try not just taking the first spot you find (unless it actually is the best spot), look around a bit, see if you can find some spots where you know mobs will not roam to (such as spires in Dreadlands) and preferably also a place where normal players don't easily get to (so they can't train you).

mon7181 said:
/if (${SpawnCount[npc radius 15]>0 && ${Me.PctHPs}<100) /call moveme
Depending on the zone and the mobs ofcourse, this could be bad. Real bad.

That one will only trigger if your HP is below 100% (good), AND if there's an NPC within 15 units of you (bad). Caster mobs can easily kill you from outside that range. It could even just be an AE from some fight happening somewhat near you.

Also warping around or even /gating to avoid this can be bad depending on the circumstances. It looks rather odd if you warp right in front of a player who just trained you. Grats petition and GM investigation ;) /gating is equally bad because suddenly you're just gone. No "died" message, no "casting a spell" message or anything.

Here's something I put together that I just might use.
Code:
Sub CheckHPs(bool GoBack, float NewY, float NewX, float NewZ)
    /declare OldY   float   local   ${Me.Y}
    /declare OldX   float   local   ${Me.X}
    /declare OldZ   float   local   ${Me.Z}
    /declare Camp   timer   local   30s
    /declare HPChk  int     local

    /if (${Me.PctHPs} < 95) {
        /echo Taking damage! Taking evasive actions.
        /if (!${SpawnCount[pc radius 250 zradius 50]} && !${SpawnCount[gm]}) {
            /echo No people nearby. Going to specified safespot.
            /squelch /warp ${If[${Defined[NewY]} && ${Defined[NewX]} && ${Defined[NewZ]}, loc ${NewY} ${NewX} ${NewZ},succor]}
            /squelch /fade
        } else {
            /echo People nearby. Gotta do it the old way.
            /if (${Me.AltAbility[Exodus]} && ${Me.AltAbilityReady[Exodus]}) /aa act "Exodus"
        }
        /if (${Me.AltAbility[Innate Camouflage]} && ${Me.AltAbilityReady[Innate Camouflage]}) /aa act "Innate Camouflage"
        /if (${Defined[GoBack]} && ${GoBack}) {
            /echo Going back to old spot, hopefully nothing there this time.
            /squelch /warp loc ${OldY} ${OldX} ${OldZ}
        } else {
            /varset Camp ${Camp.OriginalValue}
            /camp
            :Camping
                /varset HPChk ${Me.PctHPs}
                /delay 1s
                /popup Camping...
            /if (${Camp} && ${Me.PctHPs} >= ${HPChk}) /goto :Camping
            /if (${Me.PctHPs} < ${HPChk}) /keypress INSTANT_CAMP
            /endmacro
        }
    }
/return
 
Code:
/declare YourSafeX int outer xxxx
/declare YourSafeY int outer xxxx
/declare YourSafeZ int outer xxxx


Sub Main
:Main
/if (${Me.PctHPs}<75) /call StupidFuckTrainedMe

/goto :Main
Sub StupidFuckTrainedMe
/warp loc ${YourSafeY} ${YourSafeX} ${YourSafeZ}
/fade
/camp
/endmacro
/return

Thanks all for responding, when I put this into the macro I get an error that it can't find character named PctHPs and immediately warps to loc, fades and camps, probably due to my noobness, but need more info. Yes I am afk foraging, there are no roaming mobs in the area I am foraging in, and the trains are deliberate. I have put in a check for the person suspected for the trains to camp which is working but can't be sure that another isn't also doing it. The toon is in mid 40's atm so no AA's to be had.
 
If someone is deliberately training you for afk forageing, then that person knows exactly what you are doing. If they haven't already /petitioned you they soon will so adding a warp function to your macro to /warp you to another location will only add more fuel to the fire for you. Your account is on a fast track to ban city. So, if you care anything about this account (unless it is simply a throwaway acount) perhaps you should stop afk forageing for awhile or at least move to a different zone and forage something else for awhile. Be sure to go /anon so you won't show up on a /who all command if the person looking for you is not in the same zone as you that is. Just a thought.