Rock5's Mail Mods

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Post Reply
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Rock5's Mail Mods

#1 Post by rock5 » Mon Aug 23, 2010 8:29 am

This userfunctions file consists of various functions to send and receive mail via the mailbox. They require a version of Ultimate Mail Mod addon.
The mailbox no longer needs to be open. UMM will find and open it for you.

Requirements:

To continue mailing beyong the approximate 60 item limit you will need my fastlogin addon installed.
http://www.solarstrike.net/phpBB3/viewt ... 350#p10350


The available functions are:

UMM_SetSlotRange(_from, _to)
  • Used to set the slot range in your bags that the functions below will search. Use it before calling the functions below. Defaults to all your bags. Must be values between 61 and 240. Does not effect UMM_SendInventoryItem or UMM_SendByRange
UMM_SetOneUseMailboxRelog(_boolean)
  • When reaching the sending limit, UMM can now relog and continue sending when using a mailbox, rented portable mailbox or IS purchased convenient mailbox. By default it wont relog when using single-use convenient mailboxes as it might be wasteful. If you still want it to relog and use another single-use mailbox then set this option to true before sending.
UMM_TakeMail()
  • Takes all mail. Note: if there is more than 30 it will only get the first 30 unless you reopen the mailbox.
UMM_SendMoney(_recipient, _amount)
  • Sends an amount of gold to the recipient. If "all" then will send all money.
UMM_SendInventoryItem(_recipient, _item)
  • Sends a specific slot item. Useful if you have selected the item yourself with your own code. Can accept an item object or slot number (61 to 240) or a table of item objects and slot numbers.
UMM_SendByRange(_recipient, _from, _to)
  • Similar to function UMM_SendInventoryItem(_recipient, _item) but sends a range of slot numbers (61 to 240).
UMM_SendAdvanced(_recipient, _itemTable, _quality, _reqlevel, _worth, _objtype, _statNo, _dura, _amount, _stacksize, _fusedtier)
  • This function is a compilation of all the filter options so you can create your own custom sends. Eg. Lets say you want to send all clean high dura blue armor with a required level of at least 50, then you would use

    Code: Select all

    UMM_SendAdvanced("recipient", nil, 2, 50, nil, "Armor", 0, 105)
  • Arguments
    • _recipient - Who you are sending to.

      _itemTable - Name or id of the items you want to send or a table of names and ids.

      _quality - The minimum quality/color of the item to send. 0 = white, 1 = green, 2 = blue etc.

      _reqlevel - The minimum 'required level' of the items.

      _worth - The minimum 'worth' of the items.

      _objtype - The item type as are listed in 'rom/cache/itemtypestable.lua'. You can list one type eg. "Cards" or multiple types in a table eg. {"Weapons","Armor"}.

      _statNo - Minimum number of "named stats". From 1 to 6. Does not include inherent stats and runes. 0 has a special meaning. It means it must has zero stats ie. clean and will only send armor and weapons.

      _dura - The minimum maxdurability the item must have. Note: maxdurability isn't implemented yet in the item class so it will compare against durability instead but I will implement maxdura in the item class soon.

      _amount - The number of items to send. It will split stacks if necessary. If you specify more than one sort of item, _amount is the total amount sent.

      _stacksize - The minimum stack size for each item sent. If "max" will only send full stacks. Useful for sending full stacks of daily items for example.

      _fusedtier - The Mana Stone tier level the item would make. Eg. A green level 58 item would make a tier 4 mana stone so if this is set to 4, it will be sent. Sends only armor and weapons.
Besides _recipient which is mandatory, all arguments are optional. An item must pass all included filters before it is sent. In the custom functions below, the argument meanings are the same as above.


Custom Functions

Below are some custom functions designed for specific purposes. They all use the UMM_SendAdvanced function but are easier for the user to use. The meaning or the arguments are the same as UMM_SendAdvanced. Arguments in square brackets are optional.

UMM_SendByQuality(_recipient, _quality)
  • For sending items by quality only.
UMM_SendByStatNumber(_recipient, _statNo)
  • Useful for sending your stated gear between characters.
UMM_SendByNameOrId(_recipient, _itemTable[, _amount])
  • Useful for just sending a list of items by name. _amount has been added as an optional argument for those who want to send a certain number of items. Eg. Fusion Stones.
UMM_SendByDura(_recipient, _dura[, _statNo][, _objtype])
  • Used for sending high dura items. Use _statNo if you want to send only clean items. Use _objtype if you want to use different rules for weapons and armor. Eg. You might want to send clean armor but don't care if weapons are clean.
UMM_SendByStackSize(_recipient, _itemTable, _stacksize)
  • Used for sending items by stack size. Useful for sending only full stacks of dailys for instance, reducing the number of mails.
UMM_SendByFusedTierLevel(_recipient, _fusedtier, _amount)
  • Used for sending all weapons and armor that make a particular mana stone tier. Useful when making "Tier stones" and saving you having to buy belts. Eg. If set to 4 it will send white items of level 60+, green items of 58+, blue items of 54+ etc.

Downloads:

My modified version of Ultimate Mail Mod

Here is the modified Ultimate Mail Mod addon. Install it to your game clients 'inteface/addons' folder.
It's no longer necessary to use this version. The Mail Functions should work with versions of UMM found on curse.
UltimateMailMod.7z
Version 1.31
- Should no longer think you have a full bag when collecting mail too fast.
- Added some automatically translated test to help unsupported languages.
- Some buttons resize to fit the text.
- Improved ES language translation.
(81.03 KiB) Downloaded 1015 times
Changes to the original include:
  • Removed all lines with "setfocus" in them. setfocus blocks the rombot macro communication and removing them has no affect on UMM functionallity.
  • Fixed the tooltip for items received.
  • Adding items to Compose and removing items from individual mails now works.
  • Should now collect mail a lot faster.
  • I also added a mail count display so now you know when you need to check the mailbox again.
This version is mostly based on Startblazes mod.


Here is the functions file. Just copy it to your 'rom/userfunctions' folder.
Attachments
addon_Rock5s_Mail_Functions.lua
Version 1.85
- Added Hortek exception.
- Changed exceptions to support more mailboxes.
- Added exception list to simplify the management of exceptions.
(28.49 KiB) Downloaded 883 times
Last edited by rock5 on Mon Dec 20, 2010 7:37 pm, edited 10 times in total.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: Rock5's Mail Mods

#2 Post by Starrider » Mon Aug 23, 2010 1:39 pm

Hello, does you UMM has an working Item preview, did you fix the goldsending bug?
If you can make this in your edited UMM it would be a perfect Addon!

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#3 Post by rock5 » Mon Aug 23, 2010 2:34 pm

Starrider wrote:Hello, does you UMM has an working Item preview, did you fix the goldsending bug?
If you can make this in your edited UMM it would be a perfect Addon!
By "Item Preview" I guess you mean for received items? There is an easy fix for that but I didn't include it as it really doesn't have anything to do with botting or my scripts. You can read about it here.
http://rom.curse.com/downloads/rom-addo ... spx#796535

Gold sending is currently disabled. It is not a bug. I read that it should be back by about the beginning of next month.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: Rock5's Mail Mods

#4 Post by Starrider » Mon Aug 23, 2010 3:14 pm

yes I know that it is disabled, the bug exists scince the first time of UMM and had never been fixed.

i got still this message when i tried to send gold:

call UMMFrameTab2ComposerSend's OnClick,line:[string "?"]:545:bad argument #1 to 'format' (string expected, got nil)

bot I found a fixed version. thx

Also there is now item preview possibble.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#5 Post by rock5 » Tue Aug 24, 2010 12:01 am

Starrider wrote:yes I know that it is disabled, the bug exists scince the first time of UMM and had never been fixed.

i got still this message when i tried to send gold:

call UMMFrameTab2ComposerSend's OnClick,line:[string "?"]:545:bad argument #1 to 'format' (string expected, got nil)

bot I found a fixed version. thx
I don't know where you got your first version but before 3.0.3 I was using the current version of UMM from curse.com and had no problems sending gold.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

miximixi007
Posts: 94
Joined: Sat Apr 17, 2010 1:18 pm

Re: Rock5's Mail Mods

#6 Post by miximixi007 » Wed Aug 25, 2010 12:14 pm

:D thx a loooooooot
I wait it for a long time

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#7 Post by rock5 » Thu Aug 26, 2010 12:51 am

Starrider wrote:Hello, does you UMM has an working Item preview,
I've added item preview fix with the current bug fix of UMM. Enjoy.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
droppen
Posts: 179
Joined: Mon Aug 03, 2009 10:32 pm

Re: Rock5's Mail Mods

#8 Post by droppen » Thu Aug 26, 2010 6:39 am

Have you guys figured out yet how to open the mail box with the window minimized?

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#9 Post by rock5 » Thu Aug 26, 2010 6:51 am

droppen wrote:Have you guys figured out yet how to open the mail box with the window minimized?
Geeze, where have you been? We've been able to open the mailbox and bulletin board and other objects since revision 465 when player harvest started using memory addresses instead of the mouse. That was on the 29th of June.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
droppen
Posts: 179
Joined: Mon Aug 03, 2009 10:32 pm

Re: Rock5's Mail Mods

#10 Post by droppen » Thu Aug 26, 2010 11:06 am

Wow! cool, I feel inspired to code again :)
..i've been participating in the unfoldment of the collective conciousness awakening here in finland.

Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: Rock5's Mail Mods

#11 Post by Starrider » Thu Aug 26, 2010 2:12 pm

droppen if you already want to start coding again, i have a new idea for all of you XD.
Look into my opend threat...

Nebojsha
Posts: 25
Joined: Sun Nov 15, 2009 10:13 am

Re: Rock5's Mail Mods

#12 Post by Nebojsha » Fri Aug 27, 2010 9:18 am

This looks nice, I alredy have idea how/where to use it :)
Question tho, from where do I call this one?waypoint, or somewhere else? Cuz even tho I bot long time, i never used any of a bit advanced functions :)
Thanks in advance

Edit: im sorry for being so vague :) I want to gather few items 10 max, then mail them, then gather again and mail etc. So It would need to be called upon pretty often...
Edit2: after experimenting a while it says me(after inv update):
"scripts\rom\bot.lua:391: onLoad error: ... ts/rom/userfunctions/addon_Rock5s_Mail_Functions.lua:269: attempt to index field '?' <a nil value>"
code looks like this:
<onLoad>
inventory:update();
UMM_SendByNameOrId ("charname", {"Firewood"});
</onLoad>
Edit3: did i perhaps misplace functions file? It says in rom\addons, but it didnt work so i placed it in userfuncitons(seemed more logical then in game addon folder xD), maybe i shouldnt have? Pls any1 answer me on this :)

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#13 Post by rock5 » Fri Aug 27, 2010 10:24 am

Nebojsha wrote:This looks nice, I alredy have idea how/where to use it :)
Question tho, from where do I call this one?waypoint, or somewhere else? Cuz even tho I bot long time, i never used any of a bit advanced functions :)
Thanks in advance

Edit: im sorry for being so vague :) I want to gather few items 10 max, then mail them, then gather again and mail etc. So It would need to be called upon pretty often...
Edit2: after experimenting a while it says me(after inv update):
"scripts\rom\bot.lua:391: onLoad error: ... ts/rom/userfunctions/addon_Rock5s_Mail_Functions.lua:269: attempt to index field '?' <a nil value>"
code looks like this:
<onLoad>
inventory:update();
UMM_SendByNameOrId ("charname", {"Firewood"});
</onLoad>
I'm sorry but I don't understand how you got that error. You didn't edit the function did you?

Here is an explanation on how to use it.
After collecting your 10 items, go to the mailbox. In the waypoint add something like this,

Code: Select all

	<!-- #  1 --><waypoint x="2250" z="31880">
		player:target_Object("Mailbox",1000)
		UMM_SendByNameOrId("charname",{"Firewood"})
	</waypoint>
By the way, you don't need to do an inventory:update() because it is done in the function.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Nebojsha
Posts: 25
Joined: Sun Nov 15, 2009 10:13 am

Re: Rock5's Mail Mods

#14 Post by Nebojsha » Fri Aug 27, 2010 10:28 am

I didnt edit a thing. I just placed it into mm/scripts/rom/userfuncitons, and placed addon in interface/addons in rom folder. I dont need to open mailbox, cuz well I used convinient mailbox at daily place(smart huh) :) thats basically it, maybe i placed it at wrong place?

Edit: I ask this cuz in ur first post u say that its supposed to be placed in rom\addons... I mean functions file, is that a typo or am I wrong.
Edit2: Please some1 help :D Wasted over 20 mailboxes on trying in vain various stuff :D
And thanks about explaining about waypoints and update of inv.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#15 Post by rock5 » Fri Aug 27, 2010 10:55 am

Nebojsha wrote:I didnt edit a thing. I just placed it into mm/scripts/rom/userfuncitons, and placed addon in interface/addons in rom folder. I dont need to open mailbox, cuz well I used convinient mailbox at daily place(smart huh) :) thats basically it, maybe i placed it at wrong place?

Edit: I ask this cuz in ur first post u say that its supposed to be placed in rom\addons... I mean functions file, is that a typo or am I wrong.
It was originally called rom/addons when that feature was implemented but I thought that would cause confusion with the interface/addons folder so I asked Administrator to change it to rom/userfunctions folder. That name is much better because it is familiar. Sorry that I hadn't changed it yet in the description. I've updated it now.

I've never used a convenient mailbox but I don't think that is the problem.

It seems to me that the only way you could get that error is if you are 1 of those few people that have had problems with the new inventory:update() function. Do you see errors when you start the bot while it's loading the items table?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Nebojsha
Posts: 25
Joined: Sun Nov 15, 2009 10:13 am

Re: Rock5's Mail Mods

#16 Post by Nebojsha » Fri Aug 27, 2010 10:57 am

No, he works just fine when he gathers Firewood, then he scans invenory fine and when he finishes update he shows error. Will screenshot it if needed, gimme a min :)
Here
Image

Uploaded with ImageShack.us

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#17 Post by rock5 » Fri Aug 27, 2010 11:51 am

Nebojsha wrote:No, he works just fine when he gathers Firewood, then he scans invenory fine and when he finishes update he shows error.
Try this, line 269 is

Code: Select all

		inventory.BagSlot[i].SlotNumber = tmp[inventory.BagSlot[i].BagId]
Just before it add

Code: Select all

		print("i = "..i.." SlotNumber = "..tostring(inventory.BagSlot[i].SlotNumber).." BagId = "..tostring(inventory.BagSlot[i].BagId))
See what it prints out before it errors.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Nebojsha
Posts: 25
Joined: Sun Nov 15, 2009 10:13 am

Re: Rock5's Mail Mods

#18 Post by Nebojsha » Fri Aug 27, 2010 11:59 am

thanks for the help, it seems something was wrong with my profile... I made it default and it works :) Still dont know what, and I doubt we ever will (unless same problem occurs again) :D

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#19 Post by rock5 » Fri Aug 27, 2010 12:05 pm

Nebojsha wrote:thanks for the help, it seems something was wrong with my profile... I made it default and it works :) Still dont know what, and I doubt we ever will (unless same problem occurs again) :D
If there was something wrong with your profile why not post a copy of it. Maybe I can see what it wrong with it.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Nebojsha
Posts: 25
Joined: Sun Nov 15, 2009 10:13 am

Re: Rock5's Mail Mods

#20 Post by Nebojsha » Fri Aug 27, 2010 6:40 pm

Well I always use default profile for everything... So every now and then i tweak it a bit to my liking, and now i changed it back to default, so I lost all changes that were made... Was possibly something idiotic only I could do. :)
Well as for next question, possibly related to this topic, but other ones too. Now my bot working nicely, and at one point it says that recepant mail is full. So I see few possible solutions, while I being too amateur to make them :(
Is it possible to make bot check number of dailies in inv before sending daily items. For example instead of send 3, to make it check number on stack and send it only if it has 10 items in it? If so, how to do it ;)
Or, if mail of guy i send it to is full, to automaticaly send to next one? Or both of these?
Thanks in advance :)

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests