Page 1 of 2

Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 7:24 pm
by smike47
Trying to farm the 20 items for the quest, use my convenient mailbox, send to my alt, then continue harvesting. I've loaded the two addons from rock5 from http://www.solarstrike.net/phpBB3/viewt ... =27&t=1561 but whenever my waypoint file finishes farming at point 18 it errors out. The mailbox is opened. Could someone please help me script this out?



<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 18 --><waypoint x="-11235" z="22618">

player:target_Object("Mailbox",1000)
UMM_SendByNameOrId ("XXX", {Flaming Volcanic Mud})


</waypoint>
</waypoints>

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 7:42 pm
by rock5
Firstly, don't forget to put any code in code tags.

Secondly, an error message would be helpful.

Thirdly, 'player:target_Object("Mailbox",1000)' can only be used if there is a mailbox nearby. If you are using the convenient mailbox you wouldn't use that.

I'm not sure what command you would use to open the convenient mailbox. How would you normally use it? Right click it? If so then this should work,

Code: Select all

inventory:useItem("Convenient Mailbox")

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 7:53 pm
by smike47
thanks for the quick response...

" don't forget to put any code in code tags"
- What do you mean? Was i already missing a code tag?


"an error message would be helpful"
I incorrectly inserted the code to send mail before ending waypoint #18. Fixed that. now just trying to get it to send to my alt


As for the mailbox:
-I manually open the first convienent mailbox and just leave it open on the screen... will i need to open a new one each time?



So would I be running:

<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 18 --><waypoint x="-11235" z="22618">
</waypoint>
UMM_SendByNameOrId ("XXX", {Flaming Volcanic Mud}
</waypoints>

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 8:04 pm
by rock5
smike47 wrote: " don't forget to put any code in code tags"
- What do you mean? Was i already missing a code tag?
Whenever you write code in a post, select it all and click the Code button at the top of the edit box. Code should look like this.

Code: Select all

command line 1
command line 2
smike47 wrote:As for the mailbox:
-I manually open the first convienent mailbox and just leave it open on the screen... will i need to open a new one each time?

So would I be running:

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- # 18 --><waypoint x="-11235" z="22618">
</waypoint>
UMM_SendByNameOrId ("XXX", {Flaming Volcanic Mud}
</waypoints>
In that case that should work. The mail functions just require that the UMM mail interface be open.

So that is how they work? Once open, they stay open for the whole session? So if you were playing manually it would be a nuisance because it covers most of the screen? There's no way to minimize it or something?

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 8:08 pm
by smike47
Correct.. its Gigantic. But not a problem if i'm just farming mud. However, its not sending to my character. it seems to completely skip that part. No errors or anything. It just continues to waypoint 1.

UMM_SendByNameOrId ("XXX", {Flaming Volcanic Mud}

is how its listed, with my alts name as "XXX" of course

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 8:15 pm
by rock5
On second glance that wont work because you have the command outside of the waypoint tags. All lua code has to be between 'waypoint' or 'onLoad' open and close tags. This is a waypoint open tag "<waypoint>" and this is a waypoint close tag "</waypoint>". And of course everything has to be between 'waypoints' tags.

So

Code: Select all

<waypoints>
    <onLoad> code here will execute </onload>

    code here will not execute

    <waypoint x="nn" z= "nn"> code here will execute </waypoint>

    <waypoint x="nn" z= "nn">
        code here will execute 
    </waypoint>

    code here will not execute
</waypoints>
I hope that makes things clearer.

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 8:19 pm
by rock5
smike47 wrote:UMM_SendByNameOrId ("XXX", {Flaming Volcanic Mud}
You are also missing a bracket and quotes around the item name. And if you are only sending 1 item it's not necessary to put it in table brackets.

Code: Select all

UMM_SendByNameOrId ("XXX", "Flaming Volcanic Mud")

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 8:20 pm
by smike47
So should it look like this? If not, then im not following where that command should fall... in my waypoint file or in my characterprofile.xml in the onload section?

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 8:22 pm
by rock5
smike47 wrote:

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	
	<!-- # 17 --><waypoint x="-11235" z="22618">player:target_Object("Volcanic Mud", 6000, false, false)	</waypoint>
	<!-- # 18 --><waypoint x="-11235" z="22618">
UMM_SendByNameOrId ("XXX", "Flaming Volcanic Mud"
</waypoint>
</waypoints>
So should it look like this? If not, then im not following where that command should fall... in my waypoint file or in my characterprofile.xml in the onload section?
Yes, that's correct but you are still missing a bracket at the end of the command.

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 8:31 pm
by smike47

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- # 17 --><waypoint x="-11235" z="22618">player:target_Object("Volcanic Mud", 6000, false, false)	</waypoint>
	<!-- # 18 --><waypoint x="-11235" z="22618">UMM_SendByNameOrId ("XXX", "Flaming Volcanic Mud")

</waypoint>
</waypoints>
Is my code now. After waypoint 18 I get the error:

Code: Select all

/addon_Rock5s_Mail_Functions.lua:190: Argument #2 to UMM_SendByNameOrId<>: Expected type 'table', got 'string'

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 8:52 pm
by rock5
That's strange. I could have swore that if it's a string it would put it in a table automatically. I must be remembering doing something similar elsewhere. In player:target_Object() for example. :)

Just put the item back in table brackets again.

Code: Select all

UMM_SendByNameOrId ("XXX", {"Flaming Volcanic Mud"})

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 8:58 pm
by smike47
Yeah, i finally got it... and it starts to work... however now i get:

Code: Select all


Sending items to XXX...
...ts/rom/userfunctions/addon_Rock5s_Mail_Functions.lua:204: attempt to index lo
cal 'slotitem' (a nil value)


Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script>

Also, how can i add a quantity limit before sending... once quantity hits 20, then sent items.

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 9:10 pm
by rock5
Try this,

Code: Select all

if inventory:itemTotalCount("Flaming Volcanic Mud") > 19 then
    UMM_SendByNameOrId ("XXX", "Flaming Volcanic Mud")
end
For the error I was going to suggest doing an inventory:update() but itemTotalCount does it when it runs.

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 9:15 pm
by rock5
I just thought of something else. Make sure you have the latest version of the mailmods userfunctions. It's currently version 1.52.

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 9:25 pm
by smike47
Still and error:

Code: Select all

moving to waypoint #18, <-1124, 22433>
Sending items to XXX
...ts/rom/userfunctions/addon_Rock5s_Mail_Functions.lua:204: attempt to index local 'slotitem' <a nil value>
Rock, thanks for helping man.

edit. I do if its the one in the main thread "Attachment:
File comment: Version 1.52
Fixed typo.
addon_Rock5s_Mail_Functions.lua [11.71 KiB]
Downloaded 79 times "

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 9:35 pm
by smike47
still failing with the nil value problem

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 9:53 pm
by rock5
Hm.. I'm a bit confused by this.

What version of the bot are you using? Is it installed correctly? ie. no conflicts.

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 10:01 pm
by smike47
Using micromacro, modified Ultimate Mail Mod addon with Version 1.52 addon_Rock5s_Mail_Functions.lua

I get no operations errors. I've restarted the PC as well. The bot harvests 20 of the items, then tries to send using the convenient mailbox. However i notice it never types in the name of who i'm sending it to. It highlights the item, then stops.

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 10:24 pm
by rock5
smike47 wrote:Using micromacro, modified Ultimate Mail Mod addon with Version 1.52 addon_Rock5s_Mail_Functions.lua

I get no operations errors. I've restarted the PC as well. The bot harvests 20 of the items, then tries to send using the convenient mailbox. However i notice it never types in the name of who i'm sending it to. It highlights the item, then stops.
Now we're getting somewhere. So it highlights the item before getting the error? That implies the error is with the range. Does it highlight the correct item? Did you change the UMM_FromSlot or UMM_ToSlot at the beginning of the file? Have you ever edited inventory.lua line 12?

Code: Select all

self.MaxSlots = 240
One last tip. Add this line just before line 204 of "addon_Rock5s_Mail_Functions.lua".

Code: Select all

if slotitem == nil then print(item) end
That should print the item number that caused the error.

I gotta go. I'll be back later.

Re: Help with volcanic mud and mailbox

Posted: Mon Jan 10, 2011 10:34 pm
by smike47
So it highlights the item before getting the error? That implies the error is with the range. Does it highlight the correct item? Did you change the UMM_FromSlot or UMM_ToSlot at the beginning of the file? Have you ever edited inventory.lua line 12?


Yeah, it highlights the right it item. I haven't changed anything with the addon.lua