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

#261 Post by rock5 » Fri Oct 21, 2011 9:41 am

tbpit3w wrote:hi, after a few hours of testing, i think i've figured it out.

the message queue is somewhere around 60 messages, and it clears 2 messages from the queue every minute. seems to be server sided cos i can't even compose a normal message once the limit is reached. relogging completely resets the queue.
How accurate is "clears 2 messages from the queue every minute"? Does that mean we have to wait 1 minutes before we can send another 2 or can you send 1 after 30s?

By relogging, do you mean dropping to character selection, dropping to the login screen or closing the game completely and starting again?
  • 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

tbpit3w
Posts: 4
Joined: Wed Oct 19, 2011 11:31 am

Re: Rock5's Mail Mods

#262 Post by tbpit3w » Sat Oct 22, 2011 10:56 pm

@rock:
i didn't check every 30 seconds, only every minute, so i'm not very sure...
as for relogging, gotta close the client and open it again...

@gloover:
after the 60 sends, you have to wait 1 min to send 2, then gotta wait some more, etc...

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

Re: Rock5's Mail Mods

#263 Post by rock5 » Sun Oct 23, 2011 1:22 am

Thanks I finally wrote my belt and fusion stone sending script. What I did was,check the number in my inventory, send, then if the number in inventory isn't what I expect then it's starting to fail. I then wait about 30s x the number to send before sending. Works mostly well. Still takes ages. I think I'll have to make sure I do the fusing often to reduce the wasted time.
  • 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

tbpit3w
Posts: 4
Joined: Wed Oct 19, 2011 11:31 am

Re: Rock5's Mail Mods

#264 Post by tbpit3w » Sun Oct 23, 2011 7:47 am

yeah thats what i did in my script too... guess i'll just do fusion more often too...

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

Re: Rock5's Mail Mods

#265 Post by gloover » Sun Oct 23, 2011 8:14 am

:-/ not the best solution, but better then nothing.

edit:

I did it! The script works with sending and redirecting, waiting the necessary time and sending again, then switch to next recipient, but my sentiments exactly, it take ages. I've to wait 3 hours to send all my items :o

botique
Posts: 40
Joined: Fri Oct 21, 2011 12:25 pm

Re: Rock5's Mail Mods

#266 Post by botique » Tue Oct 25, 2011 4:18 pm

Would it be possible to pick up only certain mail (selected by subject, for example)?

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

Re: Rock5's Mail Mods

#267 Post by rock5 » Tue Oct 25, 2011 11:14 pm

Picking up specific mail is too much work and not really needed. Just make sure you send only the items you want that character to have.
  • 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

D1mAnn
Posts: 37
Joined: Mon Jul 04, 2011 4:56 am

Re: Rock5's Mail Mods

#268 Post by D1mAnn » Fri Nov 04, 2011 12:41 am

is there any verification events sending a mail or not?
for example what you need to replace "????"

Code: Select all

repeat
player:target_NPCA("Почтовый ящик",1500); yrest(1000);
until RoMScript("MailFrame:IsVisible()")
counter = 0
	 for __, item in pairs(inventory.BagSlot) do
		 if item.Name=="Превосходный пояс" then
			 counter = counter + 1
				repeat
				UMM_SendInventoryItem(CharNames[char], item)
				until ????
		 end
		if counter == 9 then break end
		end

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

Re: Rock5's Mail Mods

#269 Post by rock5 » Fri Nov 04, 2011 1:07 am

Are you trying to do a fix for the mail sending limit? I currently have a fix I'm still testing.

What I'm doing is counting the items in inventory before and after the send to tell if it worked.
  • 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

D1mAnn
Posts: 37
Joined: Mon Jul 04, 2011 4:56 am

Re: Rock5's Mail Mods

#270 Post by D1mAnn » Fri Nov 04, 2011 1:15 am

is such that mail freezes for a few seconds and a letter is sent, it is a bug on the server side, after a while continue sending letters
how best to implement repeat with a given function?

madgamer
Posts: 18
Joined: Sat Oct 01, 2011 1:34 pm

Re: Rock5's Mail Mods

#271 Post by madgamer » Sat Nov 05, 2011 3:32 pm

heya, wondering how i can get something like this to work, id like to use a variable in the _recipient field.


local sendstufftome = mycharactername
UMM_SendAdvanced(sendstufftome, nil,nil,nil,nil, "Cards");

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

Re: Rock5's Mail Mods

#272 Post by rock5 » Sat Nov 05, 2011 8:32 pm

When using 'type' the name has to be exact. No partials. So this should work

Code: Select all

UMM_SendAdvanced(sendstufftome, nil,nil,nil,nil, "Monster Cards");
This is, of course, for an English client.

To see the full list of values you can use, check out 'itemtypestable.lua' in the 'rom/cache' folder.
  • 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

madgamer
Posts: 18
Joined: Sat Oct 01, 2011 1:34 pm

Re: Rock5's Mail Mods

#273 Post by madgamer » Sun Nov 06, 2011 2:09 am

hrm maybe i wrote it wrong but i was more interested in getting the name to work

Code: Select all

local sendstufftome = mycharactername
UMM_SendAdvanced(sendstufftome, nil,nil,nil,nil, "Monster Cards");
as when i tryed that the sendstufftome wouldnt affix itself properly and would give an error
tryed "sendstufftome" but that obviously doesnt work.

do i need to have it like this?

Code: Select all

local sendstufftome = "mycharactername"
UMM_SendAdvanced(sendstufftome,
that didnt seem to work for me either. I'm not to sure how i can have this variable
local sendstufftome = mycharactername
and have my code like UMM_SendAdvanced(sendstufftome, nil,nil,nil,nil, "Monster Cards")
but the result in game being UMM_SendAdvanced("mycharactername", nil,nil,nil,nil, "Monster Cards")

hopeing that makes more sense :?

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

Re: Rock5's Mail Mods

#274 Post by rock5 » Sun Nov 06, 2011 2:28 am

Sorry I missed the quotes but yes, this should work.

Code: Select all

local sendstufftome = "mycharactername"
UMM_SendAdvanced(sendstufftome, nil,nil,nil,nil, "Monster Cards");
If you are still getting an error message, please let us know what it is.
  • 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

madgamer
Posts: 18
Joined: Sat Oct 01, 2011 1:34 pm

Re: Rock5's Mail Mods

#275 Post by madgamer » Sun Nov 06, 2011 3:25 am

yup that one worked

Code: Select all

<OnLoad>
mailphatsto = "mynamehere"
</OnLoad>

<waypoint>
  UMM_SendMoney(mailphatsto, "all"); yrest(1000);
</waypoint>
the problem i guess was i had it as

Code: Select all

local mailphatsto = "mynamehere"
and i guess it cant have a local in front if its being done from the onload.
it worked as local if i put the line infront of the UMM line.

but global works to =)

makes me curious if that could be the root problem to a few other things ive been toying with.
never did understand the difference between local and global and when each are updated or defined.

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

Re: Rock5's Mail Mods

#276 Post by lisa » Sun Nov 06, 2011 3:33 am

Rock or admin will no doubt have a much better explanation of local.

global however can be called by any part of the program no matter where abouts it is defined, aslong as the definition is actually made.

The way I understand local is for in the imidiate environment. So in a function or in an event like onload, so if you try to access the local outside of that environment it will return nil.

Code: Select all

function test()
local trueblue = true
end
test()
if trueblue ~= nil then print("works") else print("doesn't work") end
that example should print "doesn't work" 100% of the time.

Code: Select all

function test()
local trueblue = true
if trueblue ~= nil then print("works") else print("doesn't work") end
end
test()
That will print "works" 100% of the time. Atleast that is best way I can explain it anyway.

I always just test with local first and if it fails then I remove the local to make it global =)
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
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Rock5's Mail Mods

#277 Post by Administrator » Sun Nov 06, 2011 3:42 am

'local' is just that; local. It means it exists only in the immediate area. That is, the current block and any nested blocks. If you don't understand what this is for, just don't use it. It isn't ever really necessary, it just makes that variable unable to be used somewhere else and prevents you from accidentally modifying it from somewhere else. It is considered good programing practice.

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

Re: Rock5's Mail Mods

#278 Post by rock5 » Sun Nov 06, 2011 3:47 am

While I wrote this lisa and admin already anwered (always happens to me :) ) but seeing as I've already written, it I'll post it anyway.

Local just means it's local to whereever it is. If you use local in a loop such as a 'for' or 'repeat' loop, then that variable is only valid inside that loop. If you use it inside a function, it's only valid in that function. If you use it in a file, it will be local to that file.

eg.

Code: Select all

local var = "one"
function testprint()
    local var = "two"
    repeat
        local var = "three"
    until true
    print(var)
end

testprint()
print(var)
"testprint()" will print "two" because the "var" that equals "three" is local to the 'repeat' loop only and doesn't affect the 'var' that equals "two"

"print(var)" prints "one" because all the 'vars' in the function are local so do not affect the external 'var'.

As to the onload local variable, all events such as the 'onload', 'onskillcast', 'onleavecombat', etc. are made into a function when executed so any local variables will be local to that event only.

Hope that helps.
  • 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

madgamer
Posts: 18
Joined: Sat Oct 01, 2011 1:34 pm

Re: Rock5's Mail Mods

#279 Post by madgamer » Sun Nov 06, 2011 3:59 am

yup that helps me so much =)
thanks a bunch peeps :D

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

Re: Rock5's Mail Mods

#280 Post by lisa » Sun Nov 06, 2011 4:18 am

I like Rock's example better then mine =)
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

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests