Rock5's BuyFromItemShop userfunction
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Only post additional bot resources here. Please do not ask unrelated questions.
Re: Rock5's BuyFromItemShop userfunction
Good.
- 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
Re: Rock5's BuyFromItemShop userfunction
right now I try to paste into your waypoint
Re: Rock5's BuyFromItemShop userfunction
rock5 works great thanks!
Re: Rock5's BuyFromItemShop userfunction
and how to make passwords for each account to others?
Re: Rock5's BuyFromItemShop userfunction
I usually use the same secondary password so don't have that problem. But you could try this.
'accountpw' is a list of account numbers and secondary passwords. In the example above, '5', '6' and '7' are the account numbers.
Code: Select all
accountpw = {
[5] = "secondary passwors1",
[6] = "secondary password2",
[7] = "secondary password3",
}
BuyFromItemShop(829, accountpw[getAcc()], 1)
- 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
Re: Rock5's BuyFromItemShop userfunction
Thanks try little pozhzhe
Re: Rock5's BuyFromItemShop userfunction
why here is a code not working he true test?
if inventory:itemTotalCount("Phirius Token Coin") > 840 then
BuyFromItemShop(829, "km80673460297", 1)
end
if inventory:itemTotalCount("Phirius Token Coin") > 840 then
BuyFromItemShop(829, "km80673460297", 1)
end
Re: Rock5's BuyFromItemShop userfunction
Are you playing with an English client? "Phirius Token Coin" will only work on English client.
- 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
Re: Rock5's BuyFromItemShop userfunction
No ru how sorry (((
Re: Rock5's BuyFromItemShop userfunction
Hello, sorry for my ignorance, but would like to know how to use function to be tested .. because I am beginner here in entato already used it ... Rock waypoints which the first poster of this function. What necessary for it to work?
Re: Rock5's BuyFromItemShop userfunction
I followed your instructions, but when you know the number of items ... what to do?
Re: Rock5's BuyFromItemShop userfunction
The guid number printed is 1148. So to buy that in a waypoint file you would use
where secondaryPassword is your secondary password and number is how many you want to but but is optional.
Code: Select all
BuyFromItemShop(1148, secondaryPassword , number )
- 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
Re: Rock5's BuyFromItemShop userfunction
Rock .... So where to use this command to test? I'm watching and learning a lot from you ... but lost myself ... where to use the command? sorry
Re: Rock5's BuyFromItemShop userfunction
Well to test it the easiest way would be to start the commandline.xml. Then just type it in.
In the waypoint file all code must be between a <waypoint x... z .. y> and </waypoint> or the <onload> and </onload> at the top of the file. Just add it at the waypoint at which you want to do it.
In the waypoint file all code must be between a <waypoint x... z .. y> and </waypoint> or the <onload> and </onload> at the top of the file. Just add it at the waypoint at which you want to do 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
Re: Rock5's BuyFromItemShop userfunction
Updated to version 1.4:
- - Fixed bug that made it fail first time (because it takes sooo long for the item shop items to populate the shop).
- Added 'FindItemShopGUID' function.
- - nameOrId must be the full exact name of the item being purchased or any id that yields the correct name.
- Supported currencies are "coin", "rub", and "dia". Some other variations you can use are "coins", "ruby", "rubies", "diamond", "diamonds", "dias", among other. Also you can use the full name in the current language, eg. in English "Phirius Tokens", in German "Phiriusmarken".
- The "amount" is the amount shown in the tooltip. Don't get confused by the name. For example "10 Arcane Transmutor Charges" is 1 item that gives you 10 charges. In the tooltip it shows "Amount: 1". Whereas "Convenient Mailbox" can be purchased 10 at a time and shows "Amount: 10". Amount is optional and defaults to 1 so you only have to include it if the amount shown is more than 1. Don't confuse "amount" with the number you wish to buy. Don't forget his is a search function so "amount" is a search criteria.
Code: Select all
if inventory:itemTotalCount(203038) >= 200 -- Enough coin
coinguid = FindItemShopGUID(202928,"coin")
BuyFromItemShop(coinguid, "secondary password",1)
end
- 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
Re: Rock5's BuyFromItemShop userfunction
Hello,
when trying to buy something from the coins store, the bot gets stuck in the loop stating "Waiting for Item Shop database to load."
It waits until I open the shop manually AND change to the coins tab, then it continues.
So I think needs to be modified, not only to open and close the shop, but also switch to the needed tab where one wants to buy item from.
I don´t know myself how to code things to switch to the wanted tab
Ric
when trying to buy something from the coins store, the bot gets stuck in the loop stating "Waiting for Item Shop database to load."
It waits until I open the shop manually AND change to the coins tab, then it continues.
So I think
Code: Select all
local function commonBuy(_itemGUID, _secondaryPassword, _numberOrRecipient, _subject, _body)
if RoMScript("ItemMallFrame.OK") ~= true then
RoMCode("ItemMallFrame:Show() ItemMallFrame:Hide()")
print("Waiting for Item Shop database to load.")
repeat
yrest(50)
until RoMScript("ItemMallFrame.OK") == true
end
I don´t know myself how to code things to switch to the wanted tab
Ric
Re: Rock5's BuyFromItemShop userfunction
Nah, I don't think it has to open the right tab. Probably it just failed to open the item shop and got stuck in that loop waiting for ItemMallFrame.OK to become true, which it never will until the shop is opened. You probably think changing the tab made it go because it just happened to finish loading the database just as you clicked it.
What we can do to fix it is have it try and open the shop if it fails, eg.
What we can do to fix it is have it try and open the shop if it fails, eg.
Code: Select all
local function commonBuy(_itemGUID, _secondaryPassword, _numberOrRecipient, _subject, _body)
if RoMScript("ItemMallFrame.OK") ~= true then
print("Waiting for Item Shop database to load.")
repeat
RoMCode("ItemMallFrame:Show() ItemMallFrame:Hide()")
local starttime = getTime()
repeat
yrest(50)
until RoMScript("ItemMallFrame.OK") == true or deltaTime(getTime(), starttime) > 1000
until RoMScript("ItemMallFrame.OK") == true
end
- 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
Re: Rock5's BuyFromItemShop userfunction
On my side it hang in the loop. Then I opened the shop and closed it, nothing happend. Then I opend it, changed to coins store and immediately the bot continues with the input of the secondary PW.
As I am doing that in a loop with several chars and all got stuck at the same point, I thought I found the problem :-/
I will try your fix and report back whats happening.
Thanx
Ric
As I am doing that in a loop with several chars and all got stuck at the same point, I thought I found the problem :-/
I will try your fix and report back whats happening.
Thanx
Ric
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests