Page 12 of 39
Re: Rock5's Mail Mods
Posted: Mon Sep 19, 2011 12:13 am
by rock5
Ok, so I'm going to do some other updates too.
First I'll update UMM_SendByStatNumber to use the new item.Stats value.
Next, when I used the mail functions recently, I wanted to send all clean dura armor and all dura weapons. I don't have any functions for that so I thought I'd add it to the UMM_SendAdvanced. Or maybe create a specific funcion. Dura is easy to check but stat number has to be done differently.
So these are the options;
Add to UMM_SendAdvanced
- UMM_SendAdvanced(_recipient, _nameorid, _quality, _reqlevel, _worth, _objtype, _dura, _clean)
So for the examples above I would use
Code: Select all
UMM_SendAdvanced("toonname", nil, nil, nil, nil, "Weapons", 104)
UMM_SendAdvanced("toonname", nil, nil, nil, nil, "Armor", 104, true)
or a new function
- UMM_SendByDura(_recipient, _dura, _clean, _objtype)
So insteed I would use
Code: Select all
UMM_SendByDura("toonname", 104, nil, "Weapons")
UMM_SendByDura("toonname", 104, true, "Armor")
Hm... That solves a specific need. I've avoided adding functions for specific needs because I wanted to reduce the complexity and minimize maintenance.
I had an idea. If all options are added to the advanced function, I could just call that in the "specific need" functions.
Eg.
Code: Select all
function UMM_SendByDura(_recipient, _dura, _clean, _objtype)
UMM_SendAdvanced(_recipient, nil, nil, nil, nil, _objtype, _dura, _clean)
end
That would REALLY simplfy things. Then, not only can users do just about anything with the "advanced" function but it will be easy to add "specific need" functions.
This will need a major rewrite. I'll add an interim fix for the bug above and start working on it.
Re: Rock5's Mail Mods
Posted: Wed Sep 21, 2011 6:56 pm
by imaginethat
Hi
this is a request also for this function, not sure if its possible, but I am wanting to send daily quest items to another character to free up bag space, but only want to send if the stack is full (99), and hold on to the daily items until they fill up then post them off.
Is it possible to have a "quantity" in this function? As some stacks are different amounts, is there any was of identifying a "full" stack, so you could send all quest items if the stack is "full".
Thanks
Re: Rock5's Mail Mods
Posted: Thu Sep 22, 2011 5:09 am
by rock5
It's not able to do that. I can add an option for stack size but the bot currently doesn't know if items are dailies or not so you would still have to send them by name.
How about somthing like
- UMM_SendByStackSize(recipient, itemtable, stacksize)
So
Code: Select all
UMM_SendByStackSize("toonname", {"daily item1","daily item2"}, 99)
How does that sound?
Re: Rock5's Mail Mods
Posted: Thu Sep 22, 2011 6:02 pm
by imaginethat
Hi, I have only just started playing around with this, and only last night did I get it sending Daily Quest items to my alt, and Cards to another alt, Recipes to another etc etc.
I was using the numbers 1 through 11 to identify item Objtype.
I created a function to identify the Objtype of everything in my bag (most code 'borrowed' from your mailmod code

)
Code: Select all
function DisplayItemTypes()
local _startslot = 60;
local _finishslot = 120;
printf(" Listing stot item types");
for item = _startslot, _finishslot, 1 do
local slotitem = inventory.BagSlot[item];
local slotNumber = slotitem.SlotNumber - 60
if (slotitem.Available and not slotitem.Empty) then
local _itemname = slotitem.Name;
local _itemtype = slotitem.ObjType;
printf(" Slot%d: %d: %s \n", slotNumber, _itemtype, _itemname);
end
end
end
With the Objtype numbers I them plugged that into your mailmod function
Code: Select all
player:target_Object("Mailbox",1000);
yrest(150);
inventory:update();
yrest(150);
<!-- Send Cards to toon1 -->
UMM_SendAdvanced("toon1", nil,nil,nil,nil, 6);
yrest(10000);
<!-- Send Daily Quest Items to toon2 -->
UMM_SendAdvanced("toon2", nil,nil,nil,nil, 10);
yrest(10000);
<!-- Send Recipes to toon3 -->
UMM_SendAdvanced("toon3", nil,nil,nil,nil, 4);
I am well aware I do not really know what the Objtype numbers cover, and have only identified the items currently in my bag, so this may not work in the long run.
I have not yet found anywhere that lists all the Objtypes, and what each number covers, but what I found last night was
0=weapon 1=armor 2=potion 3=? 4=recipe 5=rune 6=card 7=? 8=? 9=? 10=Daily Quest Item 11=ammo (very small test sample. What was in my back at the time)
That's all I could tell from the 20 odd items in my bag, so obviously no extensive testing has been done. The dailies I have, some stacks had 200, so if 99 was put in the function, maybe it could check if the amount in the bagslot was 99 or greater, not just == 99.
Thanks for looking at this Rock5, much appreciated.
Re: Rock5's Mail Mods
Posted: Thu Sep 22, 2011 7:06 pm
by lisa
imaginethat wrote:I have not yet found anywhere that lists all the Objtypes
everything you want to know is in this file
rom/cache/itemtypestable.lua
Re: Rock5's Mail Mods
Posted: Thu Sep 22, 2011 9:26 pm
by rock5
Did I really do it that way? Sorry.
Obviously you should be able to use strings. The version I'm currently working on will use strings. And it will compare against ObjSubType and ObjSubSubType as well because it uses item:isType(_type) function.
I might release it later today. I was testing it last night and it seemed to be working ok.
Re: Rock5's Mail Mods
Posted: Thu Sep 22, 2011 10:31 pm
by imaginethat
awesome, thanks Lisa. I knew it had to be somewhere and didn't even think about the "cache" folder.
I now understand the sub and sub/sub types Rock5 is working on. Look forward to the update.
Thanks
Re: Rock5's Mail Mods
Posted: Fri Sep 23, 2011 1:55 pm
by rock5
Updated to version 1.7.
I've completely reorganised things now so it's easier to add to the values checked and easier to add specific purpose functions. I've added 3 functions already.
I haven't updated the descriptions on the first post yet. That's another big job. I'll do that tomorrow.
Re: Rock5's Mail Mods
Posted: Sat Sep 24, 2011 7:25 pm
by kanta
Does this send from all available bag slots or does it use the store sell settings?
Re: Rock5's Mail Mods
Posted: Sat Sep 24, 2011 10:39 pm
by rock5
It uses it's own variables which default to all the bags.
You can change the range by using this function.
That will send from the first bag only.
I'm busy taking advantage of the double xp weekend but I'll try to make time to update the descriptions today.
Re: Rock5's Mail Mods
Posted: Sun Sep 25, 2011 8:31 am
by kanta
Thanks for the info. Take your time and get things done in game while you can

Re: Rock5's Mail Mods
Posted: Mon Sep 26, 2011 12:45 am
by rock5
Updated the the first page with a description of all the new funtions.
Enjoy.
Re: Rock5's Mail Mods
Posted: Mon Sep 26, 2011 3:34 pm
by imaginethat
that's awesome Rock5, very much appreciated.
I will be busy implementing these into my scripts tonight.
Re: Rock5's Mail Mods
Posted: Sun Oct 02, 2011 4:44 pm
by gloover
Hey Rock, my UMM cause a problem with mass sending items.
The bot go shopping and buy 52 items, then he's going to the mail box and should send a 13 items to 4 characters.
here is my code.
Code: Select all
..
nameTable = {"toon1","toon2","toon3","toon4"}
..
while inventory:getItemCount(227502) > 0 do -- Item
player:target_NPC(110694,200); --postbox
sendMacro("ChoiceOption(1);");
yrest(500);
UMM_SendByNameOrId(nameTable[player.free_counter1], {227502}, 13)
player.free_counter1 = player.free_counter1 + 1
end
...
so, now the problem: the bot enqueue 13 items to the first character, during the send process UMM hangs on (freezing for 5-6 sec.), so the whole send proces will be canceled but the bot passed this as "send items" select the next character and so one.
If the first queue was successfully send, so it hangs on the second

I Think its an addon problem, so I've try to increase a send-time and close the frame between send-processes
Code: Select all
while inventory:getItemCount(227502) > 0 do -- Excellent Belt
player:target_NPC(110694,200); --postbox limo desert
sendMacro("ChoiceOption(1);");
yrest(500);
UMM_SendByNameOrId(nameTable[player.free_counter1], {227502}, 13)
sendMacro("CloseWindows()")
yrest (7000)
inventory:update()
player.free_counter1 = player.free_counter1 + 1
end
without any bettering.
Are 13 Items to much? How can I manage the sent-timing, without causing this hanging!
Btw. Your last UMM-Addon doesn't work for me - it crashs on game loading, so I'm using the moddified (I have clean of Setfocus) version from grande on page 11.
Mailfunction is your last (1.7) one.
Re: Rock5's Mail Mods
Posted: Sun Oct 02, 2011 7:39 pm
by rock5
gloover wrote:so, now the problem: the bot enqueue 13 items to the first character, during the send process UMM hangs on (freezing for 5-6 sec.), so the whole send proces will be canceled but the bot passed this as "send items" select the next character and so one.
If the first queue was successfully send, so it hangs on the second
I Think its an addon problem, so I've try to increase a send-time and close the frame between send-processes
Addidng a delay wont help because the mail functions actually wait for the send page to clear before continuing. So the problem is with UMM failing.
gloover wrote:Btw. Your last UMM-Addon doesn't work for me - it crashs on game loading, so I'm using the moddified (I have clean of Setfocus) version from grande on page 11.
Mailfunction is your last (1.7) one.
Are you talking about the latest one, version 1.1? Because it's working perpectly for me with everything working unlike my old version. It is also based on Starblaze's version of UMM but with a few needed changes. I even added a mail counter in the corner.
I'd say, try the files on the first page again. They should work. If they don't, report any error messages you get in both the client and micromacro.
Re: Rock5's Mail Mods
Posted: Mon Oct 03, 2011 3:30 am
by gloover
Yes Rock, I'm talking about yours last UMM 1.1
Ok, have tested again, did this:
with char 1 opens the mailbox (was empty) and get those from the client.
Code: Select all
1/2 call UMMMasterframe's OnUpdate, line: [string "?"]:145: attempt to concatenate global 'UMM_INBOX_LABEL_MAILCOUNT' {a nil value}
2/2 call UMMMasterframe's OnHide, line: [string "?"]:145: attempt to concatenate global 'UMM_INBOX_LABEL_MAILCOUNT' {a nil value}
Send 2 mails via mass-send to char2. Relog.
Char2:
opening the mailbox, shows the tiny icon near the minimap, the "Inbox"-Tab shows nothing (empty), so I have first to switch on "Send"-tab and back in "Inbox" then I can see the mails in my inbox.
Taking theam out, the empty mails wouldn't be deleted (the option "delete empty mails after taking out" is selected), so the mailbox frame stay opened.
Closing this manually and opens again: the inbox tab shows "loading mails" and nothing happens - it hangs, can not switch to send or mass-send tab.
SO it seems, that mailcounter option causing this error.
__ tested on german Full- and Slimclient
Re: Rock5's Mail Mods
Posted: Mon Oct 03, 2011 6:09 am
by rock5
Looks like I missed adding that variable to the DE language file. Try adding this line to the DE.lua file in UMM's language folder.
Code: Select all
UMM_INBOX_LABEL_MAILCOUNT = "Mail Count";
Translate "Mail Count" to German and let me know how it goes. Also let me know the translation and I'll add it.
Re: Rock5's Mail Mods
Posted: Mon Oct 03, 2011 8:16 am
by gloover
Yea Rock, that was it!
Here the translation for DE.lua
Code: Select all
UMM_INBOX_LABEL_MAILCOUNT = "Anzahl der Briefe:";
thanx again!
Re: Rock5's Mail Mods
Posted: Sat Oct 08, 2011 12:48 pm
by LoneWolf
Hi @ all,
I have a little problem.
my bot will not open the mailbox. I constantly get the following error message:
rom/userfunctions/addon_Rock5s_Mail_Functions.lua:486:
The UMM mail interface needs to be open first before using the UMM_SendByQuality() function
the code for the waypoint looks like this
Code: Select all
...
<!-- #10 --><waypoint x="4574" z="-2206">
player:target_Object("Postfach"); yrest(3000);
UMM_SendByQuality("character",1) ; yrest(3000);
...
has anyone got an idea what's the problem?

Re: Rock5's Mail Mods
Posted: Sat Oct 08, 2011 12:57 pm
by rock5
Is the UltimateMailMod mailbox opening?