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.
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#221 Post by rock5 » Mon Sep 19, 2011 12:13 am

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.
  • 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

imaginethat
Posts: 61
Joined: Sun Jul 10, 2011 10:39 pm

Re: Rock5's Mail Mods

#222 Post by imaginethat » Wed Sep 21, 2011 6:56 pm

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

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

Re: Rock5's Mail Mods

#223 Post by rock5 » Thu Sep 22, 2011 5:09 am

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?
  • 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

imaginethat
Posts: 61
Joined: Sun Jul 10, 2011 10:39 pm

Re: Rock5's Mail Mods

#224 Post by imaginethat » Thu Sep 22, 2011 6:02 pm

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 :oops: )

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.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Rock5's Mail Mods

#225 Post by lisa » Thu Sep 22, 2011 7:06 pm

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
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

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

Re: Rock5's Mail Mods

#226 Post by rock5 » Thu Sep 22, 2011 9:26 pm

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.
  • 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

imaginethat
Posts: 61
Joined: Sun Jul 10, 2011 10:39 pm

Re: Rock5's Mail Mods

#227 Post by imaginethat » Thu Sep 22, 2011 10:31 pm

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

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

Re: Rock5's Mail Mods

#228 Post by rock5 » Fri Sep 23, 2011 1:55 pm

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.
  • 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

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Rock5's Mail Mods

#229 Post by kanta » Sat Sep 24, 2011 7:25 pm

Does this send from all available bag slots or does it use the store sell settings?
Scout/Knight/Rogue 70/66/66

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

Re: Rock5's Mail Mods

#230 Post by rock5 » Sat Sep 24, 2011 10:39 pm

It uses it's own variables which default to all the bags.

You can change the range by using this function.

Code: Select all

UMM_SetSlotRange(61, 90)
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.
  • 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

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Rock5's Mail Mods

#231 Post by kanta » Sun Sep 25, 2011 8:31 am

Thanks for the info. Take your time and get things done in game while you can :)
Scout/Knight/Rogue 70/66/66

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

Re: Rock5's Mail Mods

#232 Post by rock5 » Mon Sep 26, 2011 12:45 am

Updated the the first page with a description of all the new funtions.

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

imaginethat
Posts: 61
Joined: Sun Jul 10, 2011 10:39 pm

Re: Rock5's Mail Mods

#233 Post by imaginethat » Mon Sep 26, 2011 3:34 pm

that's awesome Rock5, very much appreciated.
I will be busy implementing these into my scripts tonight.

User avatar
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Re: Rock5's Mail Mods

#234 Post by gloover » Sun Oct 02, 2011 4:44 pm

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.

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

Re: Rock5's Mail Mods

#235 Post by rock5 » Sun Oct 02, 2011 7:39 pm

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.
  • 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
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Re: Rock5's Mail Mods

#236 Post by gloover » Mon Oct 03, 2011 3:30 am

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

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

Re: Rock5's Mail Mods

#237 Post by rock5 » Mon Oct 03, 2011 6:09 am

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.
  • 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
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Re: Rock5's Mail Mods

#238 Post by gloover » Mon Oct 03, 2011 8:16 am

Yea Rock, that was it!

Here the translation for DE.lua

Code: Select all

UMM_INBOX_LABEL_MAILCOUNT         = "Anzahl der Briefe:";
thanx again!

LoneWolf
Posts: 18
Joined: Sun Dec 12, 2010 3:41 pm

Re: Rock5's Mail Mods

#239 Post by LoneWolf » Sat Oct 08, 2011 12:48 pm

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? :?:

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

Re: Rock5's Mail Mods

#240 Post by rock5 » Sat Oct 08, 2011 12:57 pm

Is the UltimateMailMod mailbox opening?
  • 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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest