Rock5's BuyFromItemShop userfunction

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 BuyFromItemShop userfunction

#1 Post by rock5 » Mon Oct 17, 2011 8:16 am

These 2 functions allow you to buy items from the Item Shop for yourself and as a present.

There are instruction in the file on how to use them which I will copy here.

Code: Select all

--  Syntax:
--  BuyFromItemShop(itemGUID, secondaryPassword [, number] )
--  BuyPresentFromItemShop(itemGUID, secondaryPassword, recipient [,subject] [,body])
--  guid = FindItemShopGUID(nameOrId, currency [,ammount])
--
--  Arguments:
--    itemGUID (type number) - The uniquie id of the item selection. Use FindItemShopGUID to find.
--    secondaryPassword (type string) - Your secondary password for that account
--    number (type number) - The number you want to buy of that selection. Optional. If not specified will, buy only one.
--    recipient (type string) - The person you want to send the present to.
--    subject (type string) - The subject of the message sent with the present. Optional.
--    body (type string) - The body of the message sent with the present. Optional.
--    nameOrId (type string or number) - The full name or id of the item. Not the GUID.
--    currency (type string) - The currency you wish to use. Can be "diamond", "ruby", "coin" or variations.
--    ammount (type number) - Number of items you receive, "Ammount:n". Optional. Assumes 1.
--
--  Examples:
--    To buy 2 items with GUID of 100
--       BuyFromItemShop(100, "secpass', 2)
--    To buy an item with GUID of 100 and send it as a present
--       BuyPresentFromItemShop(100, "secpass', "recipientName")
--    To find the guid of the 10 pack of charges you buy with coins.
--       guid = FindItemShopGUID(202928,"coin")
Attachments
userfunction_BuyFromItemShop.lua
Version 1.4
- Fixed bug that made it fail first time.
- Added 'FindItemShopGUID' function.
(5.47 KiB) Downloaded 350 times
  • 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

sdude13
Posts: 76
Joined: Thu Aug 19, 2010 9:36 am

Re: Rock5's BuyFromItemShop userfunction

#2 Post by sdude13 » Mon Oct 17, 2011 8:53 am

sounds nice will try it out. Does it also work with phirius coin items and ruby items ?

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

Re: Rock5's BuyFromItemShop userfunction

#3 Post by rock5 » Mon Oct 17, 2011 9:06 am

sdude13 wrote:sounds nice will try it out. Does it also work with phirius coin items and ruby items ?
It should work with any items. Just make sure you select the right item in the shop when getting the itemGUID.
  • 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
OneofMany
Posts: 119
Joined: Mon May 09, 2011 2:30 am

Re: Rock5's BuyFromItemShop userfunction

#4 Post by OneofMany » Tue Oct 18, 2011 2:12 am

Rock! you rock!

When i can login again i will test this out immediatly, current working on a project that can surely use this!

OneofMany
Its not about cheating. Its about being smarter than the game...

User avatar
OneofMany
Posts: 119
Joined: Mon May 09, 2011 2:30 am

Re: Rock5's BuyFromItemShop userfunction

#5 Post by OneofMany » Tue Oct 18, 2011 2:21 am

i suppose, when i check if theres more than 1200 tokens in my backpack and i run:

Code: Select all

if inventory:itemTotalCount("Phirius Coins") > 1170 then 
	BuyFromItemShop(0,"2ndpass",1)
end
Where 0 has to be the phirius coin shop itemid, but i cant log in now :)

it will run? Also i see that the secondarypass is with quotes, that has to be?

Or do i have to put something in onload too, this will save me so much time.

Thnx
Its not about cheating. Its about being smarter than the game...

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

Re: Rock5's BuyFromItemShop userfunction

#6 Post by rock5 » Tue Oct 18, 2011 2:40 am

For starters I think they are called 'Phirius Token Coin'. You can also use their Id 203038.

To make sure you have 1200 coins you would use

Code: Select all

if inventory:itemTotalCount("Phirius Token Coin") > 1199 then
The secondary password is a string so it needs quotes. I added the secondary password as an argument because some people might have different passwords for different accounts.
  • 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
OneofMany
Posts: 119
Joined: Mon May 09, 2011 2:30 am

Re: Rock5's BuyFromItemShop userfunction

#7 Post by OneofMany » Tue Oct 25, 2011 4:34 pm

If my character trys to buy something from the item shop. I get the error : Item shop backpack is full. There are 1 item transaction not completed or something

Is this a common error? im buying purified fusion stones.
Its not about cheating. Its about being smarter than the game...

User avatar
OneofMany
Posts: 119
Joined: Mon May 09, 2011 2:30 am

Re: Rock5's BuyFromItemShop userfunction

#8 Post by OneofMany » Thu Oct 27, 2011 3:16 am

this is my code i use btw:

Code: Select all

if inventory:itemTotalCount("Phirius Token Coin") >= 1200 then 
BuyFromItemShop(436,"2ndpassword",1)
end
Still getting the error "item shop backpack full"

And there is nothing in there...
Its not about cheating. Its about being smarter than the game...

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

Re: Rock5's BuyFromItemShop userfunction

#9 Post by rock5 » Thu Oct 27, 2011 6:33 am

OneofMany wrote:Still getting the error "item shop backpack full"
Is that the exact error message? Because I don't see that anywhere in the bot. Or are you getting that error in game?
  • 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
OneofMany
Posts: 119
Joined: Mon May 09, 2011 2:30 am

Re: Rock5's BuyFromItemShop userfunction

#10 Post by OneofMany » Thu Oct 27, 2011 8:00 am

The error i get ingame, should have told that :-)
Its not about cheating. Its about being smarter than the game...

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

Re: Rock5's BuyFromItemShop userfunction

#11 Post by rock5 » Thu Oct 27, 2011 8:43 am

I'd say if your item shop backpack is not full then it's some sort of bug with the game. I can't see how the bot could cause such an error.
  • 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
OneofMany
Posts: 119
Joined: Mon May 09, 2011 2:30 am

Re: Rock5's BuyFromItemShop userfunction

#12 Post by OneofMany » Thu Oct 27, 2011 8:55 am

Was allready thinking the same, as i can buy stuff manually. and the function did work initially. dont know when the function stopped working tho
Its not about cheating. Its about being smarter than the game...

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

Re: Rock5's BuyFromItemShop userfunction

#13 Post by rock5 » Thu Oct 27, 2011 9:19 am

Are you sure the GUID is correct? For me it's different but I'm assuming they might be differrent on different servers.
  • 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's BuyFromItemShop userfunction

#14 Post by rock5 » Thu Oct 27, 2011 9:23 am

Just had an idea. Is that code you posted part of a loop where it buys more that one puri at a time? Because, probably, if you buy them fast enough you might fill the incoming stack. Although this seems very unlikely.
  • 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
OneofMany
Posts: 119
Joined: Mon May 09, 2011 2:30 am

Re: Rock5's BuyFromItemShop userfunction

#15 Post by OneofMany » Fri Oct 28, 2011 1:06 am

I have the code just before logging to next character at the elfdaily.+
first checks the tokens >= 1200, then buy puri

then checks if charges are == 1 if so buy 10 charges if puris are >= 300

It does the trick, but not the buying "Item shop backpack is full"
Its not about cheating. Its about being smarter than the game...

User avatar
OneofMany
Posts: 119
Joined: Mon May 09, 2011 2:30 am

Re: Rock5's BuyFromItemShop userfunction

#16 Post by OneofMany » Fri Oct 28, 2011 1:13 am

The code:

Code: Select all

		if inventory:itemTotalCount("Phirius Token Coin") >= 1200 then 
			BuyFromItemShop(436,"2ndpass",1)
		end
		
		
		
		local ATQ = RoMScript("CheckQuest(421457);");
		if ATQ ~= 0 
		then
		charges = RoMScript("GetMagicBoxEnergy()")
		if charges == 1 then
		if inventory:itemTotalCount("Phirius Token Coin") >= 300 then
		BuyFromItemShop(453,"2ndpass",1)
		inventory:useItem(202928)
		end
		end
		end
Its not about cheating. Its about being smarter than the game...

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

Re: Rock5's BuyFromItemShop userfunction

#17 Post by botique » Mon Oct 31, 2011 1:31 am

I can confirm the same in-game error (backpack full) when trying to buy purified fusion stones (id 11941) with phirrius tokens.
However, I have no trouble buying transmutor charges.
I used the command line.

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

Re: Rock5's BuyFromItemShop userfunction

#18 Post by rock5 » Mon Oct 31, 2011 7:58 am

Looks like I'm not going to be able to help you guys. I just tested buying a puri with phirius coins and it worked. I used

Code: Select all

BuyFromItemShop(261,"mysecpw")
from the commandline. My guid number might be different because I think guid numbers are different between servers. I left out the last argument because I know it defaults to '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

User avatar
OneofMany
Posts: 119
Joined: Mon May 09, 2011 2:30 am

Re: Rock5's BuyFromItemShop userfunction

#19 Post by OneofMany » Mon Oct 31, 2011 10:05 am

Im gonna try without the 1 too, maybe that helps... ill report in later...
Its not about cheating. Its about being smarter than the game...

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

Re: Rock5's BuyFromItemShop userfunction

#20 Post by D1mAnn » Mon Oct 31, 2011 11:21 am

what is it?

Code: Select all

RoMScript("ItemMallFrame.lock=1") yrest(500)

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests