• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Bug - movewhenhit doesn't move you out of melee range w/ pet tanking

rodd996

New member
Joined
Jul 4, 2014
RedCents
when you pull a mob and it comes to you before the pet picks it up, you then movewhenhit. you still end up being with in the melee range of the mob thus die from melee damage. Is there a way to modify the distance? Thanks
 
Find this code and change this line /declare GotHitDistChk int local 25

Increase 25 to what you want, but be careful you don't increase it to much.


Rich (BB code):
    Sub Event_GotHit(string Line, string AttackingMob)
        /declare GotHitDistChk int local 25
        /varset GotHitToggle 1
        /declare AttackingMobID int local
        /if (${AggroTargetID} && !${Target.ID} && !${ReturnToCamp}) {
            /call CheckForCombat 1 Event_GotHit
        }
        /if (${Pulled} && ${Select[${Role},pullertank,pullerpettank]} && ${NearestSpawn[npc los radius ${CampRadius} targetable].ID}!=${MyTargetID}) {
            /varset MyTargetID 0
            /varset MyTargetName
        } 
        
        /if (${Select[${Role},pettank,pullerpettank,hunterpettank]}) {   
            /doevents flush GotHit        
            /varset AttackingMobID ${NearestSpawn[npc radius 39 targetable "${AttackingMob}"].ID}
            /squelch /target id ${Spawn[${AttackingMobID}].ID}                         
            /delay 5 ${Target.ID}==${AttackingMobID}
            |- If mob that hit me still too close, move to camp or away from mob.
            /if (${GotHitToggle} && ${AttackingMobID}>0) {
                /echo I got hit by >>${AttackingMob}<< ID:${AttackingMobID}!
                /moveto mdist 10
                /if (${Math.Distance[${Me.Y},${Me.X}:${CampYLoc},${CampXLoc}]}>${CampRadius} && !${Select[${Role},hunterpettank]}) {
                    |- Only move away from mob if MoveWhenHit enabled (1)
                    /if (${MoveWhenHit}) {
                        /echo Moving back to camp!
                        /moveto loc ${CampYLoc} ${CampXLoc}
                    }
                } else {
                    |- If mob is in pet attack range from camp, send pet in.
                    /if (${Me.Pet.ID} && ${Math.Distance[${Target.Y},${Target.X}:${CampYLoc},${CampXLoc}]}<=${PetAttackRange}) /pet attack
                    |- Only move away from mob if MoveWhenHit enabled (1)
                    /if (${MoveWhenHit}) {
                        /echo Trying to get away from >>${AttackingMob}<<.
                        /if (${Math.Distance[${Me.Y},${Me.X}:${Target.Y},${Target.X}]}<=${GotHitDistChk}) /moveto loc ${Target.Y} ${Math.Calc[${Target.X}-${GotHitDistChk}]}
                    }
                }
            }
            /if (${MoveWhenHit}) /delay 15 ${Math.Distance[${Me.Y},${Me.X}:${Target.Y},${Target.X}]}>${GotHitDistChk}
            /if (${Target.ID}) /face nolook
            /look 0
        }
    /varset GotHitToggle 0
    /doevents flush GotHit
 
thanks for addressing that for me Chris,
when setting the distance check i figured 25 was a safe amount to check against, since i assumed pet picking up mob fast due to pet speed velocity buff.
Never took into account other pet classes may have slow moving pets... which may be the case in some cases.

Good value should be no higher than 35....

Also consider pet movement is speed for mage pets is greatly reduced when aegis of XXX (multi lines of spell) is on pet... pet gains the hit protection but looses allot of speed.
 
Could always just add GotHitDistChk to the kiss ini file under the pet section and default it to 35. This way anyone could make the change as they see fit without messing with the code. Just a thought.
 
Bug - movewhenhit doesn't move you out of melee range w/ pet tanking

Users who are viewing this thread

Back
Top
Cart