Results 1 to 4 of 4

Thread: action comprar quantidade certa de hp

  1. #1
    iBot User
    Join Date
    Aug 2014
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    3

    Red face action comprar quantidade certa de hp

    sou novo aqui e queria saber, tem como vocês me passarem uma action mais ou menos assim:
    contar quantos hp tem na bp e tirar a quantidade certa de dinheiro, para comprar sempre completando a mesma quantidade de 100hp independente de quantos tenho na bp, 15, 20, 30. vlws

    exemplo:100 - 15 = 85 x 45 = 3825 quantidade em gold que preciso retirar
    Last edited by xoliver; 08-12-2014 at 06:56 PM.

  2. #2
    Normal User matheusking00's Avatar
    Join Date
    Jan 2014
    Location
    Fortaleza - CE
    Posts
    431
    Mentioned
    32 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    76 Post(s)
    Reputation
    77
    Rep Power
    3
    Normalmente ele já faz isso.


    Lua Code:
     
     
    closewindows()
    wait(500, 1000)
    openitem(mainBp, 'back')
    wait(500, 1000)
    resizewindows()
    wait(500,900)
    sellflasks()
    wait(500,900)
    opentrade()
    wait(500, 1000)
    if itemcount(HPname) < HPtobuy then
    buyitemsupto(HPname, HPtobuy)
    end
    wait(500,1000)
    buyitemsupto(MPname, MPtobuy)
    npcsay('Bye')
    wait(500,1000)


    com um setup assim:

    Lua Code:
     
    ----<< Backpack options >>----
    mainBp = "yellow Backpack"        -- Name of main backpack
    lootBp = "fur backpack"           -- Name of loot backpack
    goldBp = "blue Backpack"       -- Name of yellow backpack
     
    mainDpBp = "golden backpack"      -- Name of main DEPOT backpack
    stackableBp = "grey backpack"    -- Name of stackable DEPOT backpack
    nonStackableBp = "grey backpack" -- Name of nonstack~ DEPOT backpack
    potionDpBp = "grey backpack"    -- Name of DEPOT bp for potions
     
    -- Potions Setup:
    MPname = "mana potion" -- Name of mana potion.
    MPprice = 50 -- Price of mana potion to buy.
    MPtobuy = 10 -- How many mana potions to buy?
    MPtoback = 5 -- How many potions to back reffil?
    HPname = "health potion" -- Name of health potion.
    HPprice = 45 -- Price of health potion to buy
    HPtobuy = 5 -- How many potions buy?
    HPtoback = 2 -- How many potions to back reffil?
     
    -- Hunt:
    Captoback = 50 -- How much cap to back reffil? 
     
    -- Healer:
    -- To edit the healer you need know what to do.
    -- Visit the forum to learn about it.


    Dinheiro do Banco:

    Lua Code:
     
     
    -- Bank Depositer
    closewindows()
    wait(500, 1000)
    openitem(mainBp, 'back')
    wait(500, 1000)
    resizewindows()
    wait(500, 1000)
    resizewindows() 
     
    local mana = positive(MPtobuy - itemcount(MPname)) * MPprice
    local health = positive(HPtobuy - itemcount(HPname)) * HPprice
    local Total = mana + health
     
    depositall()
    wait(500,900)
    say('hi')
     
    if Total > 0 then
       npcsay("withdraw "..Total)
       wait(200,300)
       npcsay("yes")
       wait(200,300)
       npcsay("balance")
       wait(200,300)
    else
    npcsay("balance")
    end


    Testa la e me avisa.
    Rep +

    Conheça meu Tópico

  3. #3
    iBot User
    Join Date
    Aug 2014
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    3
    vou testar vlw

  4. #4
    iBot User
    Join Date
    Aug 2014
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    3
    cara vlw ajudou muito só teve um problema quando eu colocava pra reabrir as backpacks a qualquer momento ele ficava abrindo e fechando ai eu resolvi assim:
    deletei essa parte que manda fechar, ai quando fechava o action de reabrir, reabria, ai ficava fechando e abrindo e n comprava. resolveu!
    sellflasks()
    wait(500,900)
    opentrade()
    wait(500, 1000)
    if itemcount(HPname) < HPtobuy then
    buyitemsupto(HPname, HPtobuy)
    end
    wait(500,1000)
    buyitemsupto(MPname, MPtobuy)
    npcsay('Bye')
    wait(500,1000)

Posting Permissions

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