-
Sasuke
- Posts: 503
- Joined: Mon May 17, 2010 3:40 pm
- Location: Poland
#1
Post
by Sasuke » Thu May 12, 2016 12:44 pm
guys i need help for this script,they fix phirius and now you have npc for buy charge.i'd like change this macro for check phirius in backpack and after around 500 phirius in backpack i'd like character go to varanas phirius npc and buy charge...so now the point:
1-i must add the function for check phirius in backpack,if i have 500 or something character go to varanas and not after each dailies
2-this small script must be change check phirius and after i add my script "MAKEFUSION.xml"for go to buy charge
Code: Select all
local dqCount, dqPerDay = RoMScript("Daily_count()");
if dqPerDay == dqCount then
phirCoins = inventory:itemTotalCount(203038)
print("We have "..phirCoins.." phirius coins")
amountToBuy = phirCoins / 100
print("trying to buy "..amountToBuy.." 10x arcane transmutor charges packs")
repeat
buycharges()
yrest(1000);
amountToBuy = amountToBuy - 1
if RoMScript("IsMagicBoxEnable()") then
while inventory:itemTotalCount(202928) >0 do
inventory:useItem(202928)
end
end
yrest(10);
print("Using 10x arcane transmutor pack")
until 1 > amountToBuy
loadPaths("makefusion.xml");
ty guys:)
-
kenzu38
- Posts: 279
- Joined: Sun Dec 02, 2012 8:52 am
#2
Post
by kenzu38 » Thu Jun 23, 2016 9:06 am
Hmm, don't know if you already have this sorted out but since I had a char parked in Varanas, I took a crack at it.
So first, to make things easier, download travelTo userfunction if you still don't have it. Just search the forum for it.
I have tested the buying part and it works. The rest are untested. So, here's the code:
Code: Select all
local dqCount, dqPerDay = RoMScript("Daily_count()");
local phirCoins = inventory:itemTotalCount(203038)
print("We have "..phirCoins.." phirius coins")
if dqCount == dqPerDay and phirCoins >= 500 then
local amountToBuy = math.floor( phirCoins / 100 )
local angus = 110432
if player:target_NPC(angus) then
repeat yrest(500) until RoMScript("SpeakFrame:IsVisible()")
else
-- insert some player:moveTo() here if you are far from a Snoop
travelTo("VaranasCentral")
yrest(1000)
if player:target_NPC(angus) then
repeat yrest(500) until RoMScript("SpeakFrame:IsVisible()")
end
end
if ChoiceOptionByName(getTEXT("SC_PHIRIUS_SHOP_OPTION_02")) then
repeat yrest(500) until RoMScript("StoreFrame:IsVisible()")
end
sendMacro("StoreBuyItem(3, " .. amountToBuy .. ")")
print("Trying to buy "..amountToBuy.." 10x arcane transmutor charges packs")
yrest(1000);
if RoMScript("IsMagicBoxEnable()") then
while inventory:itemTotalCount(202928) > 0 do
inventory:useItem(202928)
yrest(50);
print("Using 10x arcane transmutor pack")
end
end
end
-- travel back to where you are supposed to start your makefusion wp, use travelTo function
loadPaths("makefusion.xml");
-
Sasuke
- Posts: 503
- Joined: Mon May 17, 2010 3:40 pm
- Location: Poland
#3
Post
by Sasuke » Fri Jun 24, 2016 7:07 am
ty kenzu but mm have an error on compose lua line #2...i don'0t understand why.never change it
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
<!-- Eggman1414's Mana Stone Production Script -->
<!-- V2.3 -->
<!-- 12/27/2013 -->
<!-- Two User options need changed -->
<!-- line 11 and line 18 -->
function buycharges()
BuyFromItemShop(1771253, "xxxxxx") <!--Insert your secondary password inside the quotes. ex: BuyFromItemShop(896, "romiscool")-->
end
NpcID = 112794
QName = "Helping Them Grow"
-
kenzu38
- Posts: 279
- Joined: Sun Dec 02, 2012 8:52 am
#4
Post
by kenzu38 » Fri Jun 24, 2016 5:43 pm
You'll have to post the whole error message and your whole code (wp) if you can. Aside from the BuyFromItemShop which is now useless because of the new item shop, can't tell what's the problem with just the code you posted.
Who is online
Users browsing this forum: Google [Bot] and 0 guests