Auto Potion/Scroll?

Post Reply
javito
Posts: 11
Joined: Tue Jan 17, 2017 1:51 am
Been thanked: 1 time

Auto Potion/Scroll?

Post by javito » Sat Feb 11, 2017 8:12 pm

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;

User avatar
Werasalma
Posts: 5
Joined: Mon Jan 16, 2017 9:12 pm
Has thanked: 2 times
Been thanked: 1 time

Re: Auto Potion/Scroll?

Post by Werasalma » Sat Feb 11, 2017 9:00 pm

Hey, u have to perform ur new function. Add this line in ur attack routine.

Code: Select all

self:CheckRunScroll();
Your function CheckRunScroll looks ok!

javito
Posts: 11
Joined: Tue Jan 17, 2017 1:51 am
Been thanked: 1 time

Re: Auto Potion/Scroll?

Post by javito » Wed Feb 15, 2017 10:54 am

Werasalma wrote:
Sat Feb 11, 2017 9:00 pm
Hey, u have to perform ur new function. Add this line in ur attack routine.

Code: Select all

self:CheckRunScroll();
Your function CheckRunScroll looks ok!
thanks works now.

haihon
Posts: 3
Joined: Sun Apr 09, 2017 11:28 pm

Re: Auto Potion/Scroll?

Post by haihon » Sat May 27, 2017 7:36 am

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

haihon
Posts: 3
Joined: Sun Apr 09, 2017 11:28 pm

Re: Auto Potion/Scroll?

Post by haihon » Sun Jun 04, 2017 6:41 pm

where do we put the code in? i tried it doesn't work please help me thx

User avatar
smaion40
Posts: 83
Joined: Tue Apr 25, 2017 12:11 pm
Has thanked: 42 times
Been thanked: 16 times

Re: Auto Potion/Scroll?

Post by smaion40 » Mon Jul 10, 2017 1:22 pm

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.

User avatar
Diavolakos
Posts: 114
Joined: Thu Apr 20, 2017 5:05 am
Has thanked: 31 times
Been thanked: 13 times

Re: Auto Potion/Scroll?

Post by Diavolakos » Thu Aug 03, 2017 1:47 am

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.
Image

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.
I play on NA Server Siel

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests