Hey this script looks for logs and cloth or bolts of cloth in a chest then takes the right ammount of either needed and trys to make a dummy... Problem is sometimes it stops and doesnt do anything for no reason and sometimes it spams Invalid:55 over and over then crashes me when i try to move the logs... any ideas?
Code: sub carpdummy() var chest2="" var log2="0x1BDD" var tool2="0x1029" var mybag="" var clothcount=0 VAR WaitTime=20000 VAR LastTimer
while not uo.dead() getlogs: UO.FindType("0x1BDD", -1, "my") if UO.GetQuantity("finditem") < 55 then UO.FindType("0x1BDD", -1, chest2) uo.grab(55, "finditem") wait(1000) goto getlogs endif clothcheck: UO.FindType("0x175D", -1, "my") if UO.GetQuantity("finditem") <> 0 then clothcount=clothcount + UO.GetQuantity("finditem") uo.ignore("finditem") if clothcount > 65 then uo.ignorereset() clothcount=0 goto start endif UO.FindType("0x175D", -1, "my") if uo.findcount() <> 0 then goto clothcheck endif endif UO.FindType("0x175D", -1, chest2) if UO.GetQuantity("finditem") > 64 then uo.grab(65, "finditem") wait(1000) goto start endif UO.FindType("0x0F9B", -1, chest2) if UO.GetQuantity("finditem") <> 0 then uo.grab(2, "finditem") wait(1000) goto start endif UO.FindType("0x0F9C", -1, chest2) if UO.GetQuantity("finditem") <> 0 then uo.grab(2, "finditem") wait(1000) goto start endif UO.FindType("0x0F97", -1, chest2) if UO.GetQuantity("finditem") <> 0 then uo.grab(2, "finditem") wait(1000) goto start endif UO.FindType("0x0F95", -1, chest2) if UO.GetQuantity("finditem") <> 0 then uo.grab(2, "finditem") wait(1000) goto start endif UO.FindType("0x0F96", -1, chest2) if UO.GetQuantity("finditem") <> 0 then uo.grab(2, "finditem") wait(1000) goto start endif start: uo.waitmenu('Carpentry', 'Miscellaneous', 'Miscellaneous', 'Deed to a Training Dummy (') uo.useobject("0x4003C4C5") LastTimer=UO.Timer() while NOT UO.InJournal("You put") AND NOT UO.InJournal("You fail") AND NOT UO.InJournal("That is too") AND NOT UO.InJournal("You can") AND NOT LastTimer+WaitTime<UO.Timer() wait(100) wend wait(1000) UO.DeleteJournal() wend end sub
|