Page 4 of 7

Re: Rock5's BuyFromItemShop userfunction

Posted: Sat Dec 01, 2012 12:28 pm
by gloover
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!

Re: Rock5's BuyFromItemShop userfunction

Posted: Sun Dec 02, 2012 12:26 am
by rock5
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"?

Re: Rock5's BuyFromItemShop userfunction

Posted: Sun Dec 02, 2012 5:45 am
by gloover
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.

Re: Rock5's BuyFromItemShop userfunction

Posted: Sun Dec 02, 2012 7:04 am
by rock5
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.

Re: Rock5's BuyFromItemShop userfunction

Posted: Mon Dec 03, 2012 3:46 am
by Rickster
just as an information
i am using the userfunction as is, without opening and closing IS frame before and it works well.

Ric

Re: Rock5's BuyFromItemShop userfunction

Posted: Fri Jan 11, 2013 5:10 pm
by romaniac
I guess it is not possible to buy a present for another char this way?

Re: Rock5's BuyFromItemShop userfunction

Posted: Sat Jan 12, 2013 1:59 am
by rock5
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.

Re: Rock5's BuyFromItemShop userfunction

Posted: Sat Jan 12, 2013 4:46 am
by lisa
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.

Re: Rock5's BuyFromItemShop userfunction

Posted: Sat Jan 12, 2013 5:00 am
by rock5
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 --

Re: Rock5's BuyFromItemShop userfunction

Posted: Sat Jan 12, 2013 5:03 am
by rock5
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.

Re: Rock5's BuyFromItemShop userfunction

Posted: Sat Jan 12, 2013 5:06 am
by lisa
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.

Re: Rock5's BuyFromItemShop userfunction

Posted: Sat Jan 12, 2013 5:49 am
by rock5
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?

Re: Rock5's BuyFromItemShop userfunction

Posted: Sat Jan 12, 2013 6:40 pm
by lisa
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.

Re: Rock5's BuyFromItemShop userfunction

Posted: Sat Jan 12, 2013 11:54 pm
by rock5
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:

Re: Rock5's BuyFromItemShop userfunction

Posted: Sun Jan 13, 2013 12:19 am
by rock5
I updated the userfunction to 1.2.

Re: Rock5's BuyFromItemShop userfunction

Posted: Thu Jan 31, 2013 4:58 pm
by Buster99
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.

Re: Rock5's BuyFromItemShop userfunction

Posted: Fri Feb 01, 2013 12:41 am
by rock5
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?

Re: Rock5's BuyFromItemShop userfunction

Posted: Fri Feb 01, 2013 9:46 am
by Buster99
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?

Re: Rock5's BuyFromItemShop userfunction

Posted: Fri Feb 01, 2013 1:21 pm
by rock5
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={")

Re: Rock5's BuyFromItemShop userfunction

Posted: Fri Feb 01, 2013 2:20 pm
by Buster99
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()")