Signup Now
Results 1 to 5 of 5

Thread: Resupply Script

  1. #1
    Free User mtdrpt's Avatar
    Join Date
    May 2015
    Posts
    8
    Reputation
    10
    Rep Power
    0

    Resupply Script

    Hello, I'm abit noob at scripting and I'm trying to learn about it.

    I already made a "full script" which completes my needs, basicaly I start my script at the mana shop and then he buys the needed amount of it. Then it goes to the spawn.

    But I can't set it up to check supplies (while on resp) and then if it's less than X to go back to the mana shop to resupply...


    Do I need to make some Actions in Spawn Waypoints?

    Could anyone tell me what could I do please? I just need it to make my script working
    thanks alot

  2. #2
    Free User Borges's Avatar
    Join Date
    Feb 2014
    Location
    Brazil
    Posts
    1,468
    Reputation
    205
    Rep Power
    25
    Quote Originally Posted by mtdrpt View Post
    Hello, I'm abit noob at scripting and I'm trying to learn about it.

    I already made a "full script" which completes my needs, basicaly I start my script at the mana shop and then he buys the needed amount of it. Then it goes to the spawn.

    But I can't set it up to check supplies (while on resp) and then if it's less than X to go back to the mana shop to resupply...


    Do I need to make some Actions in Spawn Waypoints?

    Could anyone tell me what could I do please? I just need it to make my script working
    thanks alot
    you can use actions in spawn or a force refill.

    for exemple:
    if you using supplylist at supplies tab, you can set category and amount of potions/ runes to leave and go spawn with this action.

    if needresupply(50,'rp') then -- 50 for cap, 'r' for runes and 'p' por potions
    gotolabel('Leave1','Refill')
    end


    exemple force refill:
    auto(1000)
    if $wptsection == 'Hunt' then -- will check only if you in Hunt tab.
    if needresupply(50,'rp') then
    if $posx >= 11111 and $posy >= 22222 and $posz == $wptz and
    $posx <= 33333 and $posy <= 44444 then
    gotolabel('Leave1','Refill')
    elseif $posx >= 55555 and $posy >= 66666 and $posz == $wptz and
    $posx <= 77777 and $posy <= 88888 then
    gotolabel('Leave2','Refill')
    end
    end
    end


    if you don't using supplies tab you can't use the action "needresuppy()"
    so you can check amount items like this:

    if itemcount('mana potion') <= 40 or itemcount('health potion') <= 40 or $cap <= 50 then
    gotolabel('Leave1','Refill')
    end

    same for force refill
    Last edited by Borges; 06-19-2015 at 02:25 PM.
    Helped you? REP+

  3. #3
    Free User mtdrpt's Avatar
    Join Date
    May 2015
    Posts
    8
    Reputation
    10
    Rep Power
    0
    Thanks alot @borges, I think I made it working

    Could you please tell me a script to put 'targetting off' when I use this action below? (if mana or hp below X then put targetting off to leave more fast)

  4. #4
    Free User Borges's Avatar
    Join Date
    Feb 2014
    Location
    Brazil
    Posts
    1,468
    Reputation
    205
    Rep Power
    25
    Quote Originally Posted by mtdrpt View Post
    Thanks alot @borges, I think I made it working

    Could you please tell me a script to put 'targetting off' when I use this action below? (if mana or hp below X then put targetting off to leave more fast)
    Look This
    Helped you? REP+

  5. #5
    Free User mtdrpt's Avatar
    Join Date
    May 2015
    Posts
    8
    Reputation
    10
    Rep Power
    0
    I added a similar action like this

    Code:
    if itemcount('mana potion') <= 40 or itemcount('health potion') <= 40 or $cap <= 50 then
        gotolabel('Leave1','Refill')
    end
    But when my script passes around that waypoint and dont have supplies he keeps running... what could be the problem? I added the label already

 

 

Posting Permissions

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