Page 2 of 2

Re: Rock5's craftItem function

Posted: Fri Sep 09, 2011 9:19 am
by rock5
Hm.. It's possible the version I updated was not the same as the original 1.21. Could someone who still has version 1.21 post it please.

Re: Rock5's craftItem function

Posted: Fri Sep 09, 2011 9:43 am
by rock5
I spoke too soon. I scared myself because when I tested it, it automatically contributed the processed resources to the guild. But now I realise that that was just because of my version of logarcraft.xml.

After further testing it seems to be working fine. Are you sure you have all the recipes you need? I just did that. I thought I had the same problem as you until I realised I didn't have the recipes for the resources I was trying to process.

Re: Rock5's craftItem function

Posted: Fri Sep 09, 2011 1:43 pm
by Dsanchez
yes, after it processes one stack of each resource it goes and sleeps. i press delete and it will go around and process one more stack. i would like it to process everything the first time.

Re: Rock5's craftItem function

Posted: Sat Sep 10, 2011 2:01 am
by rock5
I bought 2 stacks of Zinc Ore. It processed both in one go. I bought some more Zinc Ore and some Flame Dust. It did both. I don't seem to be having your problem.

Re: Rock5's craftItem function

Posted: Sun Sep 11, 2011 11:19 pm
by Dsanchez
I get an error saying Failed to craft. Make sure you are near the correct crafting tools. even tho it just finished processing a stack and is standing in the same spot. Any ideas?
I'm using the latest SVN of both micromacro and rombot. Also, what's up with all the *s?

Code: Select all

********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
**************************************************************]Crafting -196502
Redwood Timber
[b]Failed to craft. Make sure you are near the correct crafting tools.[/b]
Moving to waypoint #31, (-371, -6444)
Use MACRO: DRUID_CONCENTRATION_=>   <UNKNOWN> (1000/1000)
Clearing target.
Moving to waypoint #32, (-352, -6386)
Moving to waypoint #33, (-349, -6338)
Moving to waypoint #34, (-361, -6290)
Id 1041733529 not found
Id 1041854735 not found
Id 1023945526 not found
Id 1041709479 not found
Id 1053108388 not found
Id 1041896550 not found
Id 1051350324 not found
Id 1041810131 not found
Id 1041866712 not found
Id 1041733529 not found
Id 1041854735 not found
Id 1023945526 not found
Id 1041709479 not found
Id 1053108388 not found
Id 1041896550 not found
Id 1051350324 not found
Id 1041810131 not found
Id 1041866712 not found
Id 1041733529 not found
Id 1041854735 not found
Id 1023945526 not found
Id 1041709479 not found
Id 1053108388 not found
Id 1041896550 not found
Id 1051350324 not found
Id 1041810131 not found
Id 1041866712 not found
Moving to waypoint #35, (-426, -6170)
Moving to waypoint #36, (-532, -6052)
Moving to waypoint #37, (-593, -6010)
Moving to waypoint #38, (-697, -5971)
Moving to waypoint #39, (-878, -5919)
Go to sleep at 09/12/11 00:21:48. Press Delete to wake up.
Awake from sleep after pressing Delete at 09/12/11 00:21:55.
Moving to waypoint #1, (-910, -5904)
Moving to waypoint #2, (-1015, -5970)
Moving to waypoint #3, (-1073, -5987)
Moving to waypoint #4, (-1157, -6002)
Moving to waypoint #5, (-1256, -6020)
Moving to waypoint #6, (-1310, -6047)
Moving to waypoint #7, (-1335, -6078)
Moving to waypoint #8, (-1377, -6157)
Crafting 852 Dusk Orchid Bundle
23076% [************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
**************************************************]Crafting -195758 Dusk Orchid
Bundle
Failed to craft. Make sure you are near the correct crafting tools.
Moving to waypoint #9, (-1345, -6102)
Use MACRO: DRUID_SAVAGE_BLESSIN=>   <UNKNOWN> (1000/1000)
Use MACRO: DRUID_CONCENTRATION_=>   Reincarnated (1312/1312)
Use MACRO: WARDEN_BRIAR_SHIELD =>   Reincarnated (1312/1312)
Clearing target.
Moving to waypoint #10, (-1302, -6045)
Moving to waypoint #11, (-1255, -6026)
Moving to waypoint #12, (-1191, -6014)
Moving to waypoint #13, (-1116, -6014)
Moving to waypoint #14, (-1002, -6025)
Moving to waypoint #15, (-936, -6054)
Moving to waypoint #16, (-847, -6106)
Moving to waypoint #17, (-767, -6142)
Moving to waypoint #18, (-724, -6149)
Moving to waypoint #19, (-656, -6143)
Moving to waypoint #20, (-641, -6147)
Moving to waypoint #21, (-623, -6198)
Moving to waypoint #22, (-596, -6240)
Crafting 458 Dark Crystal Sand
42927% [************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
******]

Re: Rock5's craftItem function

Posted: Mon Sep 12, 2011 9:37 am
by Dsanchez
i saw the download counter on the link was reset so i assumed it has been updated. i downloaded the new version and everything seems to be working fine now.


thanks

small problem

Posted: Fri Nov 11, 2011 2:09 am
by spawni
hi there,
i´am working with a german client.

No problems with:

Code: Select all

craftItem("ndel", "all"); -- Kraeuter bis gruen
craftItem("sand", "all");	-- Sand bis gruen
btw Using "Sand" with a S does not work - "sand" works

No my problem:

Code: Select all

craftItem(201727, "all"); -- Dunkelkristall-Klumpen
does not work. No error-message. The bot just skips that point.
Any hint for me?

the whole code:

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>

-- Piieeep! ----
function beepwhispers()
repeat
local time, moreToCome, name, msg = EventMonitorCheck("Whispers", "4,1")
if time ~= nil then
printf("\a\a\a");
end
until moreToCome ~= true
end
EventMonitorStart("Whispers", "CHAT_MSG_WHISPER");
registerTimer("beepwhispers", secondsToTimer(5), beepwhispers)
-- end of beepwhispers ---
</onLoad>

	<!-- #  1 wir kommen herein  -->
	<waypoint x="22" z="11" y="0">
	</waypoint>
	<!-- #  2 wir stehen am Alchemietool wir machen alles auf Bündel, Wir machen die Säfte die wir wollen--><waypoint x="-20" z="52" y="0">
	craftItem("ndel", "all"); -- Kraeuter bis gruen
	craftItem(201806, "all"); -- Frevler-Hand-Saft
	craftItem(550115, "all"); -- Dmmerorchideen-Saft
	</waypoint>
	<!-- #  3 wir stehen am Holztool-->
	<waypoint x="-42" z="28" y="0">
	</waypoint>
	<!-- #  4 wir stehen am Amboss -->
	<waypoint x="47" z="23" y="0">
	craftItem("sand", "all");	-- Sand bis gruen
	craftItem(201727, "all"); -- Dunkelkristall-Klumpen
	</waypoint>
	<!-- #  5 wir stehen doof in der ecke 1000 = 1 sekunde ergo 60000 für ne minute -->
	<waypoint x="53" z="66" y="0">
	yrest(300000);
	yrest(300000);	
	yrest(30000);
	</waypoint>
</waypoints>

Re: Rock5's craftItem function

Posted: Fri Nov 11, 2011 2:29 am
by rock5
You have to use the name or the id of the recipe to make that item. Not the id of the item.

In the above example, this should work.

Code: Select all

craftItem(550015, "all"); -- Dunkelkristall-Klumpen  
Like it says on the first post.
•_itemNameOrGUID - The name of the item, or part of it, you want to craft. Or the GUID of the item. The GUID is the id of the recipe.

Re: Rock5's craftItem function

Posted: Fri Nov 11, 2011 2:39 am
by spawni
:oops: ty for the fast help.
Of course you are right - using the id of the matts would not work -.-

Now all works fine

Re: Rock5's craftItem function

Posted: Sat Mar 16, 2013 9:02 pm
by C3PO
Hi Rock,

it's seems that craftItem() is not working if you are running more than one RoM windows & MM windows. Could that be right or is something else wrong?
I'm using the SVN Version

Re: Rock5's craftItem function

Posted: Sun Mar 17, 2013 1:31 am
by rock5
I'm not aware of any reason why you shouldn't be able to run more than 1 client and mm. If you can't figure out what you are doing wrong, try describing exactly what happens.

Re: Rock5's craftItem function

Posted: Sun Mar 17, 2013 2:52 am
by C3PO
at he moment I'm running 5 RoM windows and 5 MM Windows, they are doing different things and are not working together.
One stands next to the tools in my house and when I give him the command craftItem("aft","all") it starts doing it, but immediately afterwards I get

Code: Select all

Command> craftItem("aft","all")
Crafting 12 Bergteufelgras-Saft
onLoad error: ...rom/userfunctions/loadsvn/userfunction_craftitem.lua:63: attemp
t to compare number with nil
Command>
if I do the same thing when It's only 1 RoM- and 1 MM- window than it works like usual perfect.

Re: Rock5's craftItem function

Posted: Sun Mar 17, 2013 3:17 am
by lisa
maybe the userfunction needs updating?
Seems the addresses are hard coded in the userfunction with no auto update.

NVM there was an update to 1.22 which I didn't notice, I had 1.2
just run a SVN update on the userfunctions folder and it should be fine now.

Re: Rock5's craftItem function

Posted: Tue Jun 18, 2013 4:20 am
by Schwertseele
That's a great idea! Is there a way that there is a "list" of items? So you can create several stuff one after one? Useful for leveling crafting skills. =)

Btw, your scripts and userfunctions ROCK!

Re: Rock5's craftItem function

Posted: Tue Jun 18, 2013 4:59 am
by rock5
Schwertseele wrote:That's a great idea! Is there a way that there is a "list" of items? So you can create several stuff one after one? Useful for leveling crafting skills. =)

Btw, your scripts and userfunctions ROCK!
Just create a list of items you want to create and then crate them one at a time. The tools you need to do this are already provided.