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.
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#421
Post
by rock5 » Sat May 25, 2013 12:26 am
Good work. I should have remembered about the find issue, we've come across it before. Another way to deal with the '-' is to replace it with '.' which means "any character". This is something all users who have hyphens in their language need to be aware of. If you are using a userfunction or command and it doesn't recognise the non-alpha characters in your string, try replacing them with '.'
If we want to really make it universal we should probably leave the find command as it was because I was just checking some other languages and Polish eggs seem to be named "Egg <something> Pet" so with the pattern matching enabled they could use
Code: Select all
textInAllEggNames = "Jajo .* Zwierzątka"
I couldn't find a language string for just "Egg Pet" but we could add multilanguage support like this.
Code: Select all
local lang = bot.ClientLanguage
local textInAllEggNames
if lang == "EN" then
textInAllEggNames = "Egg Pet"
elseif lang == "DE" then
textInAllEggNames = "Begleiter.Ei"
elseif lang == "PL" then
textInAllEggNames = "Jajo .* Zwierzątka"
etc.
- 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.”
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#422
Post
by rock5 » Sat May 25, 2013 1:07 am
Another way to make it multilingual is to consider that there are only 6 egg pet name. We could get the local names and compare against all of them.
Code: Select all
local eggnames = {
[1] = getIdName(204476), -- Wild Pet Egg
[2] = getIdName(204482), -- Natural Pet Egg
[3] = getIdName(204488), -- Amazing Pet Egg
[4] = getIdName(204494), -- Magical Pet Egg
[5] = getIdName(204500), -- Holy Pet Egg
[6] = getIdName(204506), -- Rune Pet Egg
}
local function IsPetEgg(name)
for k,v in pairs(eggnames) do
if v == name then
return true
end
end
return false
end
function sendEggsByLevel(_recipient, lowest, highest)
local sendlist = {} -- Make table of items to send
for item = 61, 240, 1 do -- for each inventory
local slotitem = inventory.BagSlot[item];
local eggLevel = memoryReadByte(getProc(), slotitem.Address + 0x2E)
if IsPetEgg(slotitem.Name) and eggLevel >=lowest and highest >= eggLevel then
-- Add to table
table.insert(sendlist, slotitem.SlotNumber)
end
end
UMM_SendInventoryItem(_recipient, sendlist)
end
I might be getting a bit carried away now.
- 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.”
-
Rickster
- Posts: 291
- Joined: Sun Oct 24, 2010 4:23 pm
#423
Post
by Rickster » Sat May 25, 2013 1:23 am
nice work.
I prefer and will use the second solution with the table of local egg names, because that way nobody has to care about entering a search string.
But everybody can freely choose from the above
-
lisa
- Posts: 8332
- Joined: Tue Nov 09, 2010 11:46 pm
- Location: Australia
#424
Post
by lisa » Sat May 25, 2013 8:18 am
untested I am guessing
[1] = getIdName(204476), -- Wild Pet Egg
[2] = getIdName(204482), -- Natural Pet Egg
[3] = getIdName(204488), -- Amazing Pet Egg
[4] = getIdName(204494), -- Magical Pet Egg
[5] = getIdName(204500), -- Holy Pet Egg
[6] = getIdName(204506), -- Rune Pet Egg
should be GetIdName =)
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#425
Post
by rock5 » Sat May 25, 2013 8:31 am
Yeah probably.
- 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.”
-
lisa
- Posts: 8332
- Joined: Tue Nov 09, 2010 11:46 pm
- Location: Australia
#426
Post
by lisa » Sat May 25, 2013 6:31 pm
I only noticed because I needed to use the getidname function and just copied it from here and got the call global nil error lol
-
ratzuk
- Posts: 19
- Joined: Wed Dec 01, 2010 7:39 am
#427
Post
by ratzuk » Sat Jun 08, 2013 4:35 am
When using UMM_TakeMail() bot seems to hang if backpack is full. Is there anyway to set a timeout for this function, say 60sec, where it can just give up trying to take mail and resume?
Thanks
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#428
Post
by rock5 » Sat Jun 08, 2013 5:44 am
I could but what would be the point? If I make it time out what are you going to make the bot do with a full backpack after taking the mail?
- 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.”
-
Alleexx
- Posts: 120
- Joined: Sun May 15, 2011 4:28 am
- Location: Sweden
#429
Post
by Alleexx » Sat Jun 08, 2013 10:39 am
I would like to check if my characters have over 100 phirius tokens, that's easy, but then I want the bot to either write the charname to a separate file or to my belt/fusion stone sending files.
This is the waypoint I use for sending:
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
player.free_counter1 = 1;
</onLoad>
<!-- # 1 --><!--waypoint x="-5056" z="6778" y="86"> </waypoint-->
<!-- # 1 --><waypoint x="2742" z="-1632" y="78">
local tobuy = 10;
local beltname = RoMScript("TEXT('Sys202999_name')") -- Stones
repeat
local beltcount = inventory:getItemCount(202999) -- Number of stones you already have
if beltcount >= tobuy then break end
player:openStore("Prole");
inventory:storeBuyItem(beltname, tobuy - beltcount)
yrest(3000)
until false
sendMacro("CloseAllWindows()");
inventory:update();
player:clearTarget()
sendMacro("OpenMail()"); yrest(1000);
nameTable = {
"name",
"name"
"name"
"name"
"end"
}
if nameTable[player.free_counter1] == player.Name then
player.free_counter1 = player.free_counter1 + 1
if player.free_counter1 > #nameTable then
player.free_counter1 = 1
end
end
UMM_SendByNameOrId(nameTable[player.free_counter1], {202999},10); yrest(1000);
player.free_counter1 = player.free_counter1 + 1;
if (player.free_counter1 > #nameTable) then
player.free_counter1 = 1;
end
sendMacro("CloseAllWindows()");inventory:update();
-- Changing channel
repeat parallelID = RoMScript("GetCurrentParallelID()"); yrest(500) until parallelID
if (parallelID == 2) then
sendMacro("ChangeParallelID(1);");
else
sendMacro("ChangeParallelID(2);");
end
player:rest(25);
if nameTable[player.free_counter1] == "end" then
-- Last character
print("Last player finished.")
player:sleep()
end
</waypoint>
</waypoints>
So I need to save the names in that format or I will have to copy it all separate and add "". The reason I need this is because I don't run all my characters every day so i only want to send it to those that have at least 100 tokens.
Even better would be if it could also check if the char have 200, 300, 400 tokens in which it would add the name more than once.
-
ratzuk
- Posts: 19
- Joined: Wed Dec 01, 2010 7:39 am
#430
Post
by ratzuk » Sat Jun 08, 2013 12:47 pm
rock5 wrote:I could but what would be the point? If I make it time out what are you going to make the bot do with a full backpack after taking the mail?
The bot is the first on an account that does dailies for tokens. Each char on the account does dailies and then buys mana stones and logs on next char using the autologon function. All junk that can make T4 and above is sent to it from other accounts (Anything from 0 to 100+ items). I then tier manually using fusion.
Changing Line 198 of the mail userfunction to:
Code: Select all
until RoMScript("UMMMailManager.priv_AutoRunning") == nil or os.clock() - starttimer > 60000
Should do what I want - not had time to test yet
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#431
Post
by rock5 » Sat Jun 08, 2013 1:06 pm
If the last thing you are going to bot with the character is take the mail then you fuse manually, you could just as easily take your mail manually then do your fusing.
Now if you were going to bot the fusing as well you still would want to make sure you keep enough space in your bags. You would make sure you have at least 30 spaces then collect the mail once, do the fusing, send mana stones of the correct level to the next character, make sure you still have 30 spaces then collect more mail.
I just can't see a situation while botting, where it would be ok to fill your bag with mail unless, like in your situation, you intend to stop the bot. So what I'm saying is it's usually good if the bot stops if your bags become unexpectedly full otherwise it might end up running around trying to do stuff and accomplishing nothing. On the other hand they could check whether their inventory is full after checking their mail.
I don't know. I may still do it. Let me think on it a bit more.
- 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.”
-
McGuffin
- Posts: 46
- Joined: Sat Mar 16, 2013 6:14 am
#432
Post
by McGuffin » Sat Jun 08, 2013 10:48 pm
ratzuk wrote:rock5 wrote:I could but what would be the point? If I make it time out what are you going to make the bot do with a full backpack after taking the mail?
The bot is the first on an account that does dailies for tokens. Each char on the account does dailies and then buys mana stones and logs on next char using the autologon function. All junk that can make T4 and above is sent to it from other accounts (Anything from 0 to 100+ items). I then tier manually using fusion.
Just as an aside, T5 is pretty much the min now I think. At least on the "official" servers. All of the drops in Syrbal make T5 and the drop rates are pretty insane. 6 bags of T5 stuffs in about 100 minutes. The instances drop clean greens that make clean T5s.
As for your problem, you could add a check before getting mail like lisa'a bagckeck function in the <onload> section...
Code: Select all
function bagcheck()
if 31 >= inventory:itemTotalCount(0) then
skip over getting mail with __WPL:setWaypointIndex(__WPL:findWaypointTag());
or start using Rock's fusion control userfunction.
end
end
Call bagcheck() before you get the mail. I used 31 because if you fill your bag exactly then the empty mails will not be deleted by the addon (not the mod).
-
delay84
- Posts: 8
- Joined: Fri Jul 20, 2012 12:34 pm
#433
Post
by delay84 » Mon Jun 17, 2013 10:16 am
Hi there,
i edited the userfunction to send Tier 5 Items.
Code: Select all
-- Calculate tier level
local tier = 1
if level >= 20 and level <= 39 then
tier = 2
elseif level >= 40 and level <= 59 then
tier = 3
elseif level >= 60 and level <= 79 then
tier = 4
elseif level >= 80 and level <= 99 then
tier = 5
end
Now I can send the items with:
Code: Select all
UMM_SendAdvanced("recipient", nil, 1, 74, nil, nil, nil, nil,20,nil,5)
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#434
Post
by rock5 » Mon Jun 17, 2013 10:55 am
Ok, I'll add it to my next update.
- 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.”
-
gloover
- Posts: 304
- Joined: Wed Jul 07, 2010 4:31 am
#435
Post
by gloover » Wed Jun 19, 2013 3:25 am
Hey rock.
Code: Select all
local eggLevel = memoryReadByte(getProc(), slotitem.Address + 0x2E)
is to detect the egg-level. Wich address is to detect the egg element (wind, darkness...)
thx in advance
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#436
Post
by rock5 » Wed Jun 19, 2013 4:33 am
Looks like 0x2D
Code: Select all
eggElement = memoryReadByte(getProc(), slotitem.Address + 0x2D)
The values I can confirm are
0 = Earth
3 = Wind
4 = Light
You can work out the rest.
- 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.”
-
gloover
- Posts: 304
- Joined: Wed Jul 07, 2010 4:31 am
#437
Post
by gloover » Wed Jun 19, 2013 5:06 am
great, that is it - 10q very much!
-
Rickster
- Posts: 291
- Joined: Sun Oct 24, 2010 4:23 pm
#438
Post
by Rickster » Sat Jun 22, 2013 5:10 am
Hi,
the postbox at Hyern In Syrbalpass can not be found by the userfunction.
Something wrong at my side or can we solve this?
Thanx,
Ric
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#439
Post
by rock5 » Sat Jun 22, 2013 7:31 am
All mailboxes have the floating mail icon above them with the same id. That's how the userfunction finds the mail box. But the one in Hyern doesn't have it so it doesn't find the mailbox. I'll have to add an exception for it. Easy enough. Are there any other mailboxes in Syrbal Pass?
- 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.”
-
Rickster
- Posts: 291
- Joined: Sun Oct 24, 2010 4:23 pm
#440
Post
by Rickster » Sat Jun 22, 2013 5:06 pm
No, I think this is the only mailbox there.
Who is online
Users browsing this forum: No registered users and 0 guests