Page 1 of 1
Auto Potion/Scroll?
Posted: Sat Feb 11, 2017 8:12 pm
by javito
How i can make the auto Potions/Scroll working in a AS, With correct code and stateID items for NA
I already tried to add something like this in my class code and it does not work. Help me plz.
Code: Select all
function CheckRunScroll()
stateID = {9960};
foodName = {"Greater Running Scroll"};
flag = 0;
for _,v in ipairs(stateID) do
if Player:GetState():GetState( v ) ~= nil then
flag = flag + 1;
end
end
if flag == 0 then
for a,b in ipairs(foodName) do
if Helper:CheckAvailableInventory( b ) then
PlayerInput:Inventory( b );
break;
end
end
end
return true;
Re: Auto Potion/Scroll?
Posted: Sat Feb 11, 2017 9:00 pm
by Werasalma
Hey, u have to perform ur new function. Add this line in ur attack routine.
Your function CheckRunScroll looks ok!
Re: Auto Potion/Scroll?
Posted: Wed Feb 15, 2017 10:54 am
by javito
Werasalma wrote: ↑Sat Feb 11, 2017 9:00 pm
Hey, u have to perform ur new function. Add this line in ur attack routine.
Your function CheckRunScroll looks ok!
thanks works now.
Re: Auto Potion/Scroll?
Posted: Sat May 27, 2017 7:36 am
by haihon
where do we put the code in?? how do it work? please help i want to made it use superior recovery serum when the hp/mp go to 70%. thankyou
Re: Auto Potion/Scroll?
Posted: Sun Jun 04, 2017 6:41 pm
by haihon
where do we put the code in? i tried it doesn't work please help me thx
Re: Auto Potion/Scroll?
Posted: Mon Jul 10, 2017 1:22 pm
by smaion40
Hello, I'm wondering how you guys get the StateID for some items, I'm trying to find "Berdin's 100% XP Amulet IV" ID so I can use them automatically
Also, could you guys please explain how to call that function and from what .lua to make it work?, thank you.
Re: Auto Potion/Scroll?
Posted: Thu Aug 03, 2017 1:47 am
by Diavolakos
At this point I really think it would benefit anyone who wants to use scrolls to simply use a sidekick pet that automatically uses scrolls and food on behalf of master.
That sidekick akumu uses up to 5 scrolls and one food + one drink. I do not know how much it costs to your server, but in our server it went as low as 150m and it is permanent.
There are also much cheaper pets that use less scrolls and it would be enough for an at.speed/c.speed scroll and a critical scroll, that is most of what you need to grind.
Sure thing if you have like 10 characters it could be quite some cost. But I have given up most hope for scrolls and item buffs to be auto-used by AS long time ago. Most of the times we didn't know what code the buff had, the state ID (in the above example state ID = 9960) and when we knew the code for it it wouldn't work.
~~~~~~~~~~~
I know this is AS usage and tutorials, but trust me, the moment I gave my bots a sidekick akumu to each one of them I literally saved me a lot of time troubling around scrolls.