Page 1 of 1

Simple Heal Macro

Posted: Sun Mar 20, 2011 1:46 pm
by Empathy88
Sub Main
/target Name
/if(${Target.PctHPs}<60)
{
/cast 8
}
/return




---------------------

This is the first macro I have ever written so go easy. It's so simple I thought for sure I could get it to work heh, what happens is my cleric just spams heal even when my target is at 100% health. But the if statement to me seems correct, any help from the pro's please? Thank you.

Re: Simple Heal Macro

Posted: Sun Mar 20, 2011 3:22 pm
by Milten
I can't, but what I can do is tell you how the spend the best 10$ you will ever spend in your entire life. ever.

Donate for VIP.

Then get Modbot.

Trust me on this one.

Re: Simple Heal Macro

Posted: Thu Apr 07, 2011 12:17 am
by doormat
/target is something that is asychronous to your code execution, probably because the client actually generates a packet and waits for a response when a target is changed. When you execute /target it is non-blocking, the result is that any subsequent code that depends upon the Target TLO being changed may be interacting with stale data. So you need to synchronize somehow. The easiest thing to do is to simply add a delay, such as /delay 5. Experimentally that's enough for me on DSL, most of the time. It isn't 100%.

In theory you can use delay differently, using the first parameter as a timeout, while the second parameter is a condition for wake-up (see wiki). Experimentally I tried this: /delay 10s ${Target.ID} but that didn't quite work out. I think this is the general form of the "best" solution, but I'm still a novice myself and I'm not entirely sure which aspects of the Target TLO get "updated" when the target is changed such that you can wait on them to become valid.

VIP section definitely has loads of good stuff, but if you just want to understand, I think this is generally the problem you're having.

Re: Simple Heal Macro

Posted: Thu Apr 14, 2011 1:12 pm
by Qhynos
When you target anything in EQ, you need to delay long enough before the next instruction to ensure that the target is set. Use a /delay with a check like:

Code: Select all

Sub TargetMyBuddy(string mybuddysname)
	/declare mobid int local ${Spawn[mybuddysname].ID}
	/target id ${mobid}
	/delay 10 ${Target.ID} == ${mobid}
/return
In addition to this, you will need an extra delay afterward if you are about to check extended information like buff duration on group members as it takes a bit for the server to send some target details to your client. Usually /delay 2 is adequate, but it depends on your network connection latency.

Re: Simple Heal Macro

Posted: Thu Apr 14, 2011 4:37 pm
by demonmachine666
Try this:

Code: Select all

Sub Main
/target Name
/if (${Target.PctHPs} < 60)
{
/cast 8
}
/return
Not sure if fixing the space on your /if statement will fix it or not but it should.

Excellent Product Guide

Posted: Fri Aug 18, 2023 6:44 pm
by FrankJScott
Why don't you Google it! before you post

Best Toto Slot Info

Posted: Sat Aug 19, 2023 10:13 am
by FrankJScott
Sebagai balasan untuk pria bertanya tentang nama nama situs judi slot online terbaik, game slot terpercaya, daftar judi onlen terpercaya, judi slot online itu apa, slot dan togel gacor, situs judi terpercaya di indonesia, daftar slot dan togel, bola bola slot, agen gacor slot, slot deposit pulsa 2023, situs online slot terpercaya, situs slot indonesia, game slot terpercaya di indonesia, rtp yang gacor hari ini, link situs slot resmi, slot terpercaya gacor hari ini, tempat togel terpercaya, agen slot resmi terpercaya, situs slot terlaris, situs judi slot terbaik di indonesia, Saya dapat menjamin ini situs slot gacor for toto togel deposit pulsa, togel no 1 di indonesia, agen slot terpercaya indonesia, togel online resmi, menang judi terbesar, situs terpercaya slot, daftar gacor, agen game slot online, link judi slot terbaik, game slot terpercaya deposit pulsa, toto slot togel, situs judi slot gacor, situs link togel, daftar togel onlen terpercaya, daftar slot gacor 2023, togel dan pragmatic, bola gacor com, togel online terbaik, judi slot terpercaya, daftar judi deposit pulsa, also. See More Recommended Toto Togel Guide 52a1b86