Page 1 of 1

Working on Sigil of Regeneration Addon

Posted: Fri Mar 11, 2011 9:55 am
by Germangold
Hi !!

i've tried to create a fast and easy addon to use the regeneration sigil

what ive done before was
BTW "Siegel der Regeneration" is the german name for the item/buff

ingame create a macro and put it on key no9:

Code: Select all

/Script FocusUnit(12,"target")
/Script TargetUnit("player")
/Script UseItemByName("Siegel der Regeneration")
/Script TargetUnit("focus12")
/Script FocusUnit(12,"")
Profile.xml:

Code: Select all

<onSkillCast><![CDATA[
if not player:hasBuff("Siegel der Regeneration") then
keyboardPress(key.VK_9);   	
yrest(330);  end
]]></onSkillCast>

This is not realy elegant...
my questions are
How do I focus my self? >> player:target(self) or sth like this
or should i do it like this

Code: Select all

	if not player:hasBuff(GetIdName(500998)) then
			sendMacro("FocusUnit(12,"target")");
			sendMacro("TargetUnit("player")");
			inventory:useItem(200005);
			sendMacro("TargetUnit("focus12")");
			sendMacro("FocusUnit(12,"")");
		end

Re: Working on Sigil of Regeneration Addon

Posted: Fri Mar 11, 2011 10:17 am
by rock5
Assuming those id numbers are correct and you fix the double quotes, it should work.

By "fix the quotes" I mean you can't nest matching quotes.

This wont work.

Code: Select all

sendMacro("FocusUnit(12,"target")");
These should.

Code: Select all

sendMacro("FocusUnit(12,'target')");
sendMacro("FocusUnit(12,\"target\")");
sendMacro('FocusUnit(12,"target")');
Also 'hasBuff' can accept ids so you don't need to use 'GetIdName'.

Re: Working on Sigil of Regeneration Addon

Posted: Fri Mar 11, 2011 10:19 am
by Germangold

Code: Select all

<onSkillCast><![CDATA[
		if not player:hasBuff(500998) then
		keyboardPress(key.VK_9);   	yrest(555);  end	]]></onSkillCast>
and

Code: Select all

/Script FocusUnit(12,"target")
/Script TargetUnit("player")
/Script UseItemByName("Siegel der Regeneration")
/Script TargetUnit("focus12")
/Script FocusUnit(12,"")
works perfectly