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.
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Rock5's BuyFromItemShop userfunction

#41 Post by lisa » Mon Jan 09, 2012 6:51 pm

something like this?

Code: Select all

ActualAccoutname= RoMScript("GetAccountName();");
for k,v in pairs(accountnames) do
if v == ActualAccoutname then
Actualpassword = pw[k]
end
end
Umm doesn't the code rock posted work??

Code: Select all

local pw = {
   [1] = "passforacc1",
   [3] = "passforacc3",
   [6] = "passforacc6",
}
local curacc = RoMScript("LogID")
BuyFromItemShop(_itemGUID, pw[curacc], _number )
if you are using the account details in the same positions as the autologin then that should work

So if you are in account 3 then pw[curacc] would be "passforacc3"
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

Germangold
Posts: 276
Joined: Thu Oct 22, 2009 3:58 am

Re: Rock5's BuyFromItemShop userfunction

#42 Post by Germangold » Tue Jan 10, 2012 2:26 am

[quote="lisa"]something like this?

Code: Select all

ActualAccoutname= RoMScript("GetAccountName();");
for k,v in pairs(accountnames) do
if v == ActualAccoutname then
Actualpassword = pw[k]
end
end
thanks lisa!

i will try your code

I didn't tried out rock5's code, cuz I have 6 different RoM Folders, each folder with a different set of Autologin passwords

I will implement the code and report the result after the "patchday"

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

Re: Rock5's BuyFromItemShop userfunction

#43 Post by gloover » Wed Feb 01, 2012 6:25 am

Hey rock, lisa:

How can I use the sec-passwort table using rocks loginxml (logindialog.lua) and combine this to buy from Itemshop?

Thx in advance!

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

Re: Rock5's BuyFromItemShop userfunction

#44 Post by lisa » Wed Feb 01, 2012 6:32 am

gloover wrote:sec-passwort table using rocks loginxml (logindialog.lua)
The scondary password is stored locally in the function that uses it, for a reason. If you want to access that info from outside of the function then you would need to make it global which means any addon could access your passwords, deffinately not ideal.

You are much better off to make up a local table with account names and passwords in a local function in your code where you want to buy things.
Might take you 10 minutes to create the table but atleast you know your passwords are safe from "naughty" people.
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

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: Rock5's BuyFromItemShop userfunction

#45 Post by Rickster » Sat Jun 09, 2012 12:06 am

Hi,

when i buy the "Arcane Transmutor Charges - 10 Charges" from the phirius shop they are automatically put into my item shop bag. how can i use them from this place?

Code: Select all

inventory:useItem(IDorName)
does not work.

Ric

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

Re: Rock5's BuyFromItemShop userfunction

#46 Post by rock5 » Sat Jun 09, 2012 4:09 am

It works fine for me. Are you giving it enough time for the charges to appear in bags? I have just a 1000ms pause between buying the charges and using them and have no problems.
  • 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

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: Rock5's BuyFromItemShop userfunction

#47 Post by Rickster » Sat Jun 09, 2012 7:09 am

Sorry, I was using the wrong ItemID. It works fine now :)

justAnub
Posts: 14
Joined: Thu Sep 01, 2011 3:30 pm

Re: Rock5's BuyFromItemShop userfunction

#48 Post by justAnub » Sat Oct 13, 2012 5:15 am

Can't get this userfunction to work, is show's sec password window i see password go in then the error occurs (tried with and without

Code: Select all

RoMScript("ItemMallFrame:Show()") yrest(1000) -- time for itemshop to pop
	RoMScript("ItemMallFrame:Hide()") 
in the userfunction both some result)

micromacro error code
Loaded waypoint path elfdaylie.xml
No return path with default naming elfdaylie_return.xml f
We use the normal waypoint path elfdaylie.xml now.
Moving to waypoint #1, (31847, 4592)
We have 1200 phirius coins
trying to buy 12 10x arcane transmutor charges packs
Did not find any crashed game clients.
12:1am - Error in command sent to IGF.
ingame macro has

Code: Select all

ItemMallFrame.lock=1
Code i wanted to use to buy the charge packs

Code: Select all

function charges()
	phirCoins = inventory:itemTotalCount(203038)
	print("We have "..phirCoins.." phirius coins")
	amountToBuy = phirCoins / 100
	print("trying to buy "..amountToBuy.." 10x arcane transmutor charges packs")
	repeat 
		BuyFromItemShop(2858, "secPSW")
		yrest(1000);
		amountToBuy = amountToBuy - 1
		inventory:useItem(202928);
		yrest(10);
		print("Using 10x arcane transmutor pack")
	until amountToBuy == 0
end
don't comment on my language im not english, just trying to make myself understood.

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

Re: Rock5's BuyFromItemShop userfunction

#49 Post by rock5 » Sat Oct 13, 2012 5:36 am

Sorry, the problem with "ItemMallFrame.lock=1" was reported on page 2 but I never updated the userfunction. I'll do it now. Hopefully that is the only cause of your problems.

BTW, handy error message, isn't it? The original version would have just hung.
  • 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

justAnub
Posts: 14
Joined: Thu Sep 01, 2011 3:30 pm

Re: Rock5's BuyFromItemShop userfunction

#50 Post by justAnub » Sat Oct 13, 2012 6:01 am

no problem i should have checked if the bug you found was updated in the version i had. :oops:
works like a charm now.
BTW, handy error message, isn't it? The original version would have just hung.
yes that error msg is really handy for getting the bugs out. :thumbs up:
don't comment on my language im not english, just trying to make myself understood.

wilifox
Posts: 86
Joined: Tue Jul 26, 2011 6:00 pm

Re: Rock5's BuyFromItemShop userfunction

#51 Post by wilifox » Wed Oct 17, 2012 11:52 pm

"Item shop backpack full" why?¿ thx :o

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

Re: Rock5's BuyFromItemShop userfunction

#52 Post by rock5 » Thu Oct 18, 2012 12:40 am

Are you using the current version 1.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

wilifox
Posts: 86
Joined: Tue Jul 26, 2011 6:00 pm

Re: Rock5's BuyFromItemShop userfunction

#53 Post by wilifox » Thu Oct 18, 2012 3:52 am

yes Rock! my v. 1.1

my waypoint file :

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
............
........
.................
.................
.............

</onLoad>
 <!-- # 1 --><waypoint x="31847" z="4592" tag ="Main">
    local dqCount, dqPerDay = RoMScript("Daily_count()");
    if dqPerDay > dqCount then 
       queststate = getQuestStatus(questName1);
       if queststate == "complete" then
          player:target_NPC(questEndNpcID1);
          CompleteQuestByName(questName1);
         yrest(300);

-- BUY PURI, IN MY SERVER 1 PURI = 380 PTC --

	if inventory:itemTotalCount("Phirius Token Coin") > 380 then 

            BuyFromItemShop(436,"2ndpass")

           end

-----------------------------------------------

.....
....
....
Item shop backpack is full!!! why??

User avatar
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: Rock5's BuyFromItemShop userfunction

#54 Post by grande » Fri Oct 19, 2012 3:11 pm

Just taking a stab at this...

Code: Select all

BuyFromItemShop(436,"2ndpass")
Doesn't look right. you sure "436" is the correct ID?

De Ja Vu... this is pretty much the first and second page discussion in this thread.

wilifox
Posts: 86
Joined: Tue Jul 26, 2011 6:00 pm

Re: Rock5's BuyFromItemShop userfunction

#55 Post by wilifox » Sat Oct 20, 2012 2:11 am

how I can know that ID has the puri you buy with Phirius? ID must be different than the diamond puri? thanks

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

Re: Rock5's BuyFromItemShop userfunction

#56 Post by rock5 » Sat Oct 20, 2012 6:04 am

You have to follow the instructions and get your own id. They are different for different servers so any ids you see here might be the wrong ones for you. The instructions are at the top of the file as well as the first post.
grande wrote:De Ja Vu... this is pretty much the first and second page discussion in this thread.
Yeah and there seemed to be a solid fix, open and close the itemmall frame. If I really had to, I'd do that, but I was hoping the bug I found concerning "ItemMallFrame.lock=1" fixed the problem. If I remember correctly I never got enough feedback to be sure one way or the other so I just fixed the bug. I'd still like to fix it differently though. I don't like opening and closing a frame.

BTW, I just tried buying something for coins and diamonds just after starting the game and 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

wilifox
Posts: 86
Joined: Tue Jul 26, 2011 6:00 pm

Re: Rock5's BuyFromItemShop userfunction

#57 Post by wilifox » Sun Oct 21, 2012 7:26 am

Thanks Rock, the problem was in the ItemID, in my server the ID of the puris "1106", and it works right! thanks

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

Re: Rock5's BuyFromItemShop userfunction

#58 Post by rock5 » Sun Oct 21, 2012 10:22 am

Oh, good, then there is nothing to fix. And if someone else says they get the "bag full" error I can tell them to check their id.
  • 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 BuyFromItemShop userfunction

#59 Post by gloover » Sat Dec 01, 2012 5:10 am

Strange thing - since the last update I also got a "bag full" error - before this patch it was working like a charm :-(

Im using the wp-file with the included lua:

Settings.lua

Code: Select all

setExecutionPath(getExecutionPath().."/..")

	shopitemguid = 896		-- 10 Arcaner Charges
	Phirprice = 100

	
	currentacc = RoMScript("LogID")
	secpw = {
		[1] = "Pass1",	
		[2] = "Pass2",	
		[3] = "Pass3",		
	}
WP segment:

Code: Select all

..
include("waypoints/Settings.lua",true)
..

local Phircoins = inventory:getItemCount(203038)
local shopitemamount = math.floor(Phircoins/Phirprice)
BuyFromItemShop(shopitemguid,secpw[currentacc],shopitemamount); yrest(1000);
so, when I put this
BuyFromItemShop(896, "Pass1", 4) into a CommandLine, it works as well. whats wrong?

Rock, I need your help again.

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

Re: Rock5's BuyFromItemShop userfunction

#60 Post by rock5 » Sat Dec 01, 2012 5:30 am

If it worked on the command line maybe something is different with how you are using it. Add a print message to print out the values before the function is used and make sure they are what you think they are.
  • 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: Bing [Bot] and 3 guests