Page 1 of 1

problem with a scirpt

Posted: Sun Oct 10, 2010 3:36 pm
by hextler
I made a waypoint with a lua script and it turns out an error:

Code: Select all

if 20 > RoMScript("HowDurable(15)") then
		sendMacro("UseItemByName("Einfacher Reparaturhammer")");
		sendMacro("PickupEquipmentItem(15)");
	end
The function "HowDurable(slot)" returns the durability and if it's under 20
the Bot should use a repair hammer("Einfacher Reparaturhammer"), but he has
a problem with the UseItemByName function.

Re: problem with a scirpt

Posted: Sun Oct 10, 2010 8:16 pm
by matt87

Code: Select all

if 20 > RoMScript("HowDurable(15)") then
      sendMacro("UseItemByName('Einfacher Reparaturhammer')");
      sendMacro("PickupEquipmentItem(15)");
end
Should work. Use ' instead of " while you have string statement already started.

Re: problem with a scirpt

Posted: Mon Oct 11, 2010 7:24 am
by hextler
thx it works