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
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Re: Rock5's BuyFromItemShop userfunction

#61 Post by gloover » Sat Dec 01, 2012 12:28 pm

That is the craziest thing - printing the values

Code: Select all

	printf(shopitemguid)
	printf("\n")
	printf(secpw[currentacc])
	printf("\n")
	printf(shopitemamount)
	printf("\n")
	player:sleep()
give me the right variables:

Code: Select all

896
Pass1
4
the further function in wp

BuyFromItemShop(723,secpw[currentacc],1); yrest(1000);

write this "bag full" errror. :-(

As allready said - last week, before the patch, everything was running fine!

My goose is cooked!

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

Re: Rock5's BuyFromItemShop userfunction

#62 Post by rock5 » Sun Dec 02, 2012 12:26 am

I don't know.

I want to double check what you meant by this line
Gloover wrote:so, when I put this
BuyFromItemShop(896, "Pass1", 4) into a CommandLine, it works as well
The script didn't work so what do you mean by "as well"? Did you mean "it works" or "it didn't work as well"?
  • 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

#63 Post by gloover » Sun Dec 02, 2012 5:45 am

Yes, rock, that's the curiosity: starting the script from command-line works fine, but using this in wp cause the "bag full" error.

Have solved the problem with a Romscript to open and close IS interface, as "OneofMany" wrote on page 2.

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

Re: Rock5's BuyFromItemShop userfunction

#64 Post by rock5 » Sun Dec 02, 2012 7:04 am

So if that fix worked does that mean you open and closed the IS frame when it worked from the commandline? Does that mean that if you had opened and closed the IS interface, before using the script that caused the error, it would have worked?

Sorry, but I've been finding it difficult to 100% confirm that you need to open and close the IS frame to fix that problem. In at least one case, it turned out to be the wrong id that was causing the error. If you can 100% confirm that it fixes your problem then I might finally have to add it to the userfunction.
  • 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

#65 Post by Rickster » Mon Dec 03, 2012 3:46 am

just as an information
i am using the userfunction as is, without opening and closing IS frame before and it works well.

Ric

romaniac
Posts: 79
Joined: Sat Feb 04, 2012 8:25 am

Re: Rock5's BuyFromItemShop userfunction

#66 Post by romaniac » Fri Jan 11, 2013 5:10 pm

I guess it is not possible to buy a present for another char this way?

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

Re: Rock5's BuyFromItemShop userfunction

#67 Post by rock5 » Sat Jan 12, 2013 1:59 am

romaniac wrote:I guess it is not possible to buy a present for another char this way?
No you can't. Do you need to bot buying a present for another? Do you need to send a present on a regular basic via bot? If so, I'll look into 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

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

Re: Rock5's BuyFromItemShop userfunction

#68 Post by lisa » Sat Jan 12, 2013 4:46 am

I had a macro set up for sending presents when I played on RoM4u, I'll see if I still have it somewhere. It was just an in game function on a loop,
ie. for i = 1,50.
Used it because best diamond -> ruby conversion was a sigil package.
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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's BuyFromItemShop userfunction

#69 Post by rock5 » Sat Jan 12, 2013 5:00 am

Turned out to be easier than I thought.

The old function remains the same. I added a function for sending presents

Code: Select all

BuyPresentFromItemShop(itemGUID, secondaryPassword, recipient)
I couldn't be bothered testing it so if it doesn't work let me know. I've updated the instructions in the file for the new function.

-- Obsolete file removed --
  • 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

#70 Post by rock5 » Sat Jan 12, 2013 5:03 am

lisa wrote: sending presents when I played on RoM4u
I just noticed RoM4u seem to have disabled all present options on itemshop items. I wonder if my new function will be able to bypass that.

Edit: Nope. Looks like they disabled the present function altogether.
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Rock5's BuyFromItemShop userfunction

#71 Post by lisa » Sat Jan 12, 2013 5:06 am

gloover wrote:Yes, rock, that's the curiosity: starting the script from command-line works fine, but using this in wp cause the "bag full" error.

Have solved the problem with a Romscript to open and close IS interface, as "OneofMany" wrote on page 2.
the items on IS itself are populated the first time you open the IS interface after logging in, so if you do it once then it should be fine after that but if you have a high ping it might take longer for the IS to populate all of the items.
Just something to keep in mind.
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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's BuyFromItemShop userfunction

#72 Post by rock5 » Sat Jan 12, 2013 5:49 am

lisa wrote: the items on IS itself are populated the first time you open the IS interface after logging in, so if you do it once then it should be fine after that but if you have a high ping it might take longer for the IS to populate all of the items.
Just something to keep in mind.
The problem is it works for me regardless of whether I open the IS interface first or not. Lisa, are you saying that you are one of those that need to open the IS frame first?
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Rock5's BuyFromItemShop userfunction

#73 Post by lisa » Sat Jan 12, 2013 6:40 pm

rock5 wrote:The problem is it works for me regardless of whether I open the IS interface first or not. Lisa, are you saying that you are one of those that need to open the IS frame first?
Never used the userfunction but I suspect I would fall into that group as the IS populates farely slowly on Rom4u server for me. First time I open IS it literally has nothing in it.
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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's BuyFromItemShop userfunction

#74 Post by rock5 » Sat Jan 12, 2013 11:54 pm

Interesting. If I start rom4u and immediately opened IS it's already populated. So maybe you are on to something. Maybe I have an addon that is updating the IS. Actually I know exactly what it is, d303fix, when it tries to get the time from the IS specials. Maybe you are not using that option?

Ok, so I disabled that option can finally confirm that the IS frame needs to be open and closed before the functions will work. So I will finally add it. Better late than never. :mrgreen:
  • 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

#75 Post by rock5 » Sun Jan 13, 2013 12:19 am

I updated the userfunction to 1.2.
  • 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

Buster99
Posts: 69
Joined: Fri Nov 25, 2011 9:27 am

Re: Rock5's BuyFromItemShop userfunction

#76 Post by Buster99 » Thu Jan 31, 2013 4:58 pm

Rock (or anyone who can assist of course),

I am using this userfunction to purchase Purifieds for my characters that farm phirus tokens. Function works great until it logs in next character. Game completely crashes when it attempts to purchase from itemshop. Works perfect first time but almost always crashes on 2nd character.

Info that may help:
Bot purchases Puris from itemshop if has certain number of phirus tokens. Moves Puris to bag. Runs to mailbox. Gets mail (belts mailed from other character). Makes clean stones. Mails clean stones to main character. Runs back to daily starting spot. Relogs to next char.

Any ideas? I am wondering if something with using mail or fusion is causing problem next time I try and use itemshop. Maybe I need to manually close them? Or maybe I need to do something right after logging in next char (I only have loadProfile() being used after LoginNextChar() currently) to make sure everything is "reset" for new char? Grasping at straws here.

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

Re: Rock5's BuyFromItemShop userfunction

#77 Post by rock5 » Fri Feb 01, 2013 12:41 am

There is nothing that should cause the game to crash in the BuyFromItemshop userfunction. It just uses RoMScripts. It doesn't need anything updated between characters.

One of your ideas is a possibility, though. With the mailbox, if you leave it open when you change character then you'll have trouble opening it again. Maybe there is some similar problem with the itemshop frame. Hm... but doesn't the function open then close the frame in the latest version? Is the itemshop remaining open?
  • 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

Buster99
Posts: 69
Joined: Fri Nov 25, 2011 9:27 am

Re: Rock5's BuyFromItemShop userfunction

#78 Post by Buster99 » Fri Feb 01, 2013 9:46 am

The itemshop does not stay open on the screen. But then again, when it purchases the items we don't see the itemshop at all on screen (hidden) so was just wondering if it stays "open" even though can't see it. I know I am reaching here.

I ran through a whole account, 8 chars, with no crashes. So now I can't reproduce the problem even though using exact same script with no changes. Odd. Will test more today.

Is there a way to figure out what exactly causes the game to crash..some kind of debug or info that would specifially point to the error which would help?

UPDATE: Having same problem today...crashes every 2nd time script is run and it tries to buy from itemshop. I don't think it is related to mail (I entered house and exited to make sure no hangups with mailing items). I wish someone else would run multi-chars through buying items in item shop to see if they have same problems. Ideas?

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

Re: Rock5's BuyFromItemShop userfunction

#79 Post by rock5 » Fri Feb 01, 2013 1:21 pm

The item shop frame opens and closes to make sure the shop item list is updated. Maybe it takes time and you are trying to buy before all the items are ready. Maybe try updating the item shop earlier to make sure it's up to date. Try adding the following line earlier in your script or maybe in the onload so that hopefully the item shop list will definitely be filled buy the time you buy.

Code: Select all

RoMScript("} ItemMallFrame:Show(); ItemMallFrame:Hide(); a={")
  • 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

Buster99
Posts: 69
Joined: Fri Nov 25, 2011 9:27 am

Re: Rock5's BuyFromItemShop userfunction

#80 Post by Buster99 » Fri Feb 01, 2013 2:20 pm

Trying your suggestion...

I am starting to go back to idea of it being mail function error. After mailing items to my main I am getting the "please close mail box" error in game. The mailbox doesnt seem to be closing sometimes. Using this line in my script:

Code: Select all

UMM_SendByNameOrId("charName",{"Mana Stone Tier 4","Mana Stone Tier 5"})
I have version 1.80 of your MailMods which is current version. I will go read that thread to see if there is something I need to do to prevent this error from occuring. I am going to add after sending mail to see if helps:

Code: Select all

RoMScript("MailFrame:Hide()")

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests