Page 5 of 7
Re: Rock5's BuyFromItemShop userfunction
Posted: Fri Feb 01, 2013 3:32 pm
by rock5
From your original description the character goes back to the daily spot after mailing. The mailbox should close by itself. Is there any time that the character doesn't go back to the daily spot but instead changes character near the mailbox? If so then, yes, you need to do a
Re: Rock5's BuyFromItemShop userfunction
Posted: Sun Feb 03, 2013 11:10 am
by fobsauce
So I sometimes had a problem getting this function to work. It seems to have the issue when I have a static popup, most often the warning about unhealthy memory. It may be a good idea to look for and close the popups before purchasing from the item shop.
Code: Select all
warningmemorypopup = RoMScript('StaticPopup_Visible("WARNING_MEMORY")')
if warningmemorypopup == "StaticPopup1" then
RoMScript('StaticPopup_OnClick(StaticPopup1, 1);')
end
Re: Rock5's BuyFromItemShop userfunction
Posted: Sun Feb 03, 2013 1:20 pm
by rock5
That looks wrong. It would only work if the popup is staticpopup1. What if it's a different one? Try this instead
Code: Select all
warningmemorypopup = RoMScript('StaticPopup_Visible("WARNING_MEMORY")')
if warningmemorypopup then
RoMScript('StaticPopup_OnClick('..warningmemorypopup ..', 1);')
end
But you're right. This userfunction doesn't make sure it's using the right popup. I'll fix it.
Re: Rock5's BuyFromItemShop userfunction
Posted: Sun Feb 03, 2013 1:29 pm
by rock5
I just copied the code from my 'rent' userfunction. Try this and let me know if it works and I'll upload it to the first post.
--== Obsolete file deleted ==--
Re: Rock5's BuyFromItemShop userfunction
Posted: Sun Feb 03, 2013 6:18 pm
by fobsauce
It works as long as there are no other popups before it (as Staticpopup1)
but when I tested it by sending that character a party invite first, the function would then hang.
If I'm not being clear then basically...if
local staticpopup = RoMScript("StaticPopup_Visible('PASSWORD_CONFIRM')")
equals to StaticPopup1 then it works. Otherwise it hangs.
Re: Rock5's BuyFromItemShop userfunction
Posted: Sun Feb 03, 2013 10:51 pm
by rock5
I understand. That's what I tried to fix but I missed 1 'staticpopup1' when it first opens the password popup.
This should work. I actually tested it. Actually, because I know it works, I'll post it on the first post.
Re: Rock5's BuyFromItemShop userfunction
Posted: Tue Feb 05, 2013 11:19 am
by Buster99
Just wanted to give an update to my problem and what seems to have fixed it (crossing fingers). Server been down lately so will be testing more soon.
After much trial and error what fixed the problem was taking your suggestion, Rock, of moving the purchasing of buying the Item Shop Puris down further int the script. I tried putting the RomScript in onload to get the items to populate with a wait but it still didn't do the trick. But after clearning bags, recalling, running to the mailbox THEN purchasing the Puris it seems to work.
Side note: I still don't understand why it works exactly. e.g. - I deleted all script except logging char in, purchasing Puris, logging in next character. Tested this shorter script at length and it never had any errors. Odd. Anyways.
Thanks for help.
Re: Rock5's BuyFromItemShop userfunction
Posted: Tue Feb 05, 2013 11:58 am
by rock5
I just tried opening the ItemShop with the mailbox open. It opened but I did get the "close mailbox before continuing" message but I only got it once. If I tried it again it didn't show it. There could be some bug involved with that. Did you end up trying to close the mailbox first before buying your puris? The fact that you don't have problems with the short script which doesn't check the mail supports the theory that it is related to the mail.
Re: Rock5's BuyFromItemShop userfunction
Posted: Wed Apr 09, 2014 12:21 pm
by Desmond
And, what command do I must to insert, that a boat was purchased for counters by a clearing stone?
Re: Rock5's BuyFromItemShop userfunction
Posted: Wed Apr 09, 2014 8:38 pm
by rock5
Sorry, I didn't understand that.
Re: Rock5's BuyFromItemShop userfunction
Posted: Thu Apr 10, 2014 3:56 am
by Desmond
What is needed code to buy a stone?
Re: Rock5's BuyFromItemShop userfunction
Posted: Thu Apr 10, 2014 6:28 am
by rock5
Everything you need to know is on the first post. Don't you understand it?
Re: Rock5's BuyFromItemShop userfunction
Posted: Thu Apr 10, 2014 8:29 am
by Desmond
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:
-- Syntax:
-- BuyFromItemShop(itemGUID, secondaryPassword [, number] )
-- BuyPresentFromItemShop(itemGUID, secondaryPassword, recipient [,subject] [,body])
--
-- Arguments:
-- itemGUID (type number) - The uniquie id of the shop selection. See below for instructions on how to get this value.
-- 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.
--
-- 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")
--
-- WARNING! GUIDs are unique per server. GUIDs given by other users might be wrong for your
-- server. So it's important to get your own GUIDs using the instructions below.
--
-- How to get 'itemGUID':
-- 1. Open the Item Shop.
-- 2. Find the item you want to buy. Make sure it's the right item. I take no responsability if your make a mistake.
-- 3. Select the 'Buy' button so that the 'Buy' popup appears.
-- 4. Now enter this command,
-- /script SendSystemChat(ItemMallFrame.selectItem.GUID)
-- 5. The number it prints is the 'itemGUID' of the item you want to buy.
Attachments:
File comment: Version 1.3.1
- Fixed uses correct popup even is others are open
userfunction_BuyFromItemShop.lua [3.91 KiB]
Downloaded 180 times
herein to understand unreal
Re: Rock5's BuyFromItemShop userfunction
Posted: Thu Apr 10, 2014 8:49 am
by rock5
Desmond wrote:herein to understand unreal
Sorry, I don't understand.
Re: Rock5's BuyFromItemShop userfunction
Posted: Thu Apr 10, 2014 8:57 am
by Desmond
code what buy for Badges stones?
Re: Rock5's BuyFromItemShop userfunction
Posted: Thu Apr 10, 2014 9:04 am
by rock5
I can't tell you what GUID to use because they are different on each server. The instructions to get the GUID are listed above. Here they are again.
Code: Select all
1. Open the Item Shop.
2. Find the item you want to buy. Make sure it's the right item. I take no responsibility if your make a mistake.
3. Select the 'Buy' button so that the 'Buy' popup appears.
4. Now enter this command,
/script SendSystemChat(ItemMallFrame.selectItem.GUID)
5. The number it prints is the 'itemGUID' of the item you want to buy.
Re: Rock5's BuyFromItemShop userfunction
Posted: Thu Apr 10, 2014 9:09 am
by Desmond
and that dalie
Re: Rock5's BuyFromItemShop userfunction
Posted: Thu Apr 10, 2014 9:16 am
by lisa
You need to get the item ID, it is different for each server.
Ви повинні отримати ідентифікатор елемента, він відрізняється для кожного сервера.
Try to buy 1 of the item and use this code when the confirm appears, you don't need to actually buy the item.
Спробуйте купити 1 даного пункту і використовувати цей код при появі підтвердження, вам не потрібно насправді купуєте деталь.
Code: Select all
/script SendSystemChat(ItemMallFrame.selectItem.GUID)
Then post what is printed on screen here.
Тоді після того, що друкується на екрані тут.
No I don't speak Ukranian.
Ні я не кажу українська.
Re: Rock5's BuyFromItemShop userfunction
Posted: Thu Apr 10, 2014 9:24 am
by Desmond
BuyFromItemShop(829, "km80673460297", 1)
this code to buy?
Re: Rock5's BuyFromItemShop userfunction
Posted: Thu Apr 10, 2014 9:36 am
by rock5
If that is the number that was printed then it looks OK.