|**---------------------------------------------------------------------------------------------------------------
Beg.mac by Draimen
This macro will beg a target forever.
To end, simply press esc to clear your target then wait ~15 seconds. You will then receive a report.
If you somehow get out of beg range, but less than 30 ft away, the macro will move you closer.
If you get more than 30 ft away it will end.
Use this macro on stationary mobs that you know will not attack you. Onytir Seavin in N Freeport if a good one.
If you piss off an npc and it attacks, the macro has no way of saving you, so use wisely.
----------------------------------------------------------------------------------------------------------------**|
#Event fail "Your attempt at begging was unsuccessful."
#Event skillup "You have become better at Begging#*#"
#Event suc "You have begged#*#"
Sub Main
/declare failcount int outer 0
/declare skillup int outer 0
/declare attempt int outer 0
/declare scount int outer 0
/declare copper int outer
/if (!${Target.ID}) {
/echo You must target an npc before using this macro!
/endmacro
}
/if (${Target.Distance}>14) {
/echo Too far away from target to beg, get closer and start the macro again
/endmacro
}
/echo Starting begging skillup macro on ${Target.CleanName}
/vardata copper Me.Copper
:begloop
/if (!${Target.ID}) /call End
/if (${Target.Distance}>30) {
/echo Target got too far out of range, ending macro
/call End
}
/if ((${Target.Distance}>14)&&(${Target.Distance}<30)) {
:farloop
/if (${Me.Sitting}) /stand
/face
/keypress forward hold
/delay 5 ${Target.Distance}<14
/keypress forward
/if (${Target.Distance}>14) /goto :farloop
}
/delay 15s ${Me.AbilityReady[begging]}
/if ((${Target.ID})&&(${Me.AbilityReady[begging]})) /doability begging
/varcalc attempt ${attempt}+1
/delay 15s ${Me.AbilityReady[begging]}
/doevents
/goto :begloop
/return
Sub Event_fail
/varcalc failcount ${failcount}+1
/return
Sub Event_skillup
/varcalc skillup ${skillup}+1
/return
Sub Event_suc
/varcalc scount ${scount}+1
/return
Sub End
/echo You failed begging ${failcount} out of ${attempt} tries.
/echo You succeeded in begging ${scount} out of ${attempt} tries.
/echo You got ${skillup} skill ups.
/echo You received ${Math.Calc[${Me.Copper}-${copper}]} copper for all your hard work.
/endmacro
/return