Signup Now
Page 1 of 4 123 ... LastLast
Results 1 to 10 of 38
  1. #1
    Banned
    Join Date
    Dec 2013
    Location
    Porto Alegre - RS
    Posts
    524
    Reputation
    61
    Rep Power
    0

    Supplies (Checks, Resupply, Conditions)

    Hello, my first script i used the supply functions in the but, but i prefer LUA script!!

    Let's show you the functions and variable about it:

    Code:
    needresupply(cap, category)
    resupply()
    depositerbank()


    Looking at this image you see, categories that A and B.

    Now, using a check for your hunt:

    The code needresupply(cap, category) - if you didn't use any variable for cap, it will be default by 50

    Let's try to check if i need repot:

    Code:
    if needresupply(cap, 'a') then
    gotolabel(0, "Hunt2City")
    else
    gotolabel("Hunt")
    end
    This will check if need both Mana Potion and Health Potion, because the category is a that i filled up in the screen.

    The same for b that check if i need royal spear, it works with ANY item.

    Now let's use function for buy items in pot or anything else you want.

    The code resupply(category) will be added in a action, in front of NPC, if you want put a reachcreature before

    The code for resupply potion will be:

    Code:
    resupply('a')
    wait(1234,3456)

    Simple...

    Than now to withdraw money in bank for supplies:

    The code depositerbank(category) has the same variable of other supplies function, the category.

    Doing the code below it will withdraw money to all a category items.

    Code:
    depositerbank('a')
    wait(1234,3456)
    If you need money to withdraw 2 or more categories you use:

    Code:
    depositerbank('ab')
    wait(1234,3456)
    Don't do separated depositerbank() because it will deposit all your money.


    Take free to questions.

    Last edited by Borges; 10-17-2015 at 03:51 PM. Reason: Upload images to imgur.com

  2. #2
    Free User mexicows's Avatar
    Join Date
    Dec 2013
    Location
    Brasil, São Paulo
    Posts
    30
    Reputation
    14
    Rep Power
    0
    Thanks a lot mate, by the way, is the function needresupply() is missing on the docs or it was my miss?

  3. #3
    Moderator RoxZin xD's Avatar
    Join Date
    Dec 2013
    Location
    Rio de Janeiro
    Posts
    4,911
    Reputation
    109
    Rep Power
    32
    Why do you need to put gotolabel(0, "Hunt2City")? That's the only part I don't get. I'm using gotolabel("Hunt2City") normally o.o

  4. #4
    Banned
    Join Date
    Dec 2013
    Location
    Porto Alegre - RS
    Posts
    524
    Reputation
    61
    Rep Power
    0
    gotolabel(0, "Hunt2City") , the (0, "") is to change the section like

    This image is hosted on a possibly dangerous website (http://puu.sh/5ILNT.png). Please consider reuploading it on Imgur.com.





    @mexicows, not, is on Lucas Library.

  5. #5
    Free User mexicows's Avatar
    Join Date
    Dec 2013
    Location
    Brasil, São Paulo
    Posts
    30
    Reputation
    14
    Rep Power
    0
    i forgot to take a look at the libraby, but it should be added in the docs anyway

  6. #6
    Banned
    Join Date
    Dec 2013
    Location
    Porto Alegre - RS
    Posts
    524
    Reputation
    61
    Rep Power
    0
    I'll repot to Lucas soon!

  7. #7
    Free User wizard's Avatar
    Join Date
    Dec 2013
    Location
    New Zealand
    Posts
    46
    Reputation
    12
    Rep Power
    0
    This was useful, good job.

  8. #8
    Moderator RoxZin xD's Avatar
    Join Date
    Dec 2013
    Location
    Rio de Janeiro
    Posts
    4,911
    Reputation
    109
    Rep Power
    32
    Yeah I noticed what it was after a while :P I didn't know it would serve as gotowpt() x)

  9. #9
    Moderator Dehan's Avatar
    Join Date
    Dec 2013
    Posts
    1,404
    Reputation
    315
    Rep Power
    27
    nice tutorial, but maybe it should be moved to Scripting Tutorials?

  10. #10
    Banned
    Join Date
    Dec 2013
    Location
    Porto Alegre - RS
    Posts
    524
    Reputation
    61
    Rep Power
    0
    Quote Originally Posted by Dehan;n1607
    nice tutorial, but maybe it should be moved to Scripting Tutorials?

    I did not know what category it fits!!

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •