Results 1 to 6 of 6

Thread: Retirando e comprando a quantidade errada

  1. #1
    Normal User zumbi_2012's Avatar
    Join Date
    Sep 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    Retirando e comprando a quantidade errada

    PHP Code:
    local spearmax 20
    local spearprice 
    15
    local potionmax 
    10
    local potionprince 
    45
    local SpearMoney 
    positive(spearmax - (weaponamount itemcount("royal spear")))*spearprice
    local PotionMoney 
    positive(potionmax - (weaponamount itemcount("health potion")))*potionprince
    local Money 
    positive(SpearMoney PotionMoney)

    wait(1000)
    say("hi")
    wait(2000)
    npcsay("deposit all")
    wait(500700)
    npcsay("yes")
    wait(1000)
    npcsay("withdraw "..Money)
    wait(300700)
    npcsay("yes"

  2. #2
    Normal User zumbi_2012's Avatar
    Join Date
    Sep 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    O char só retira o valor das spears mais o valor de até 8 health potion. Mesma coisa na hora de comprar. Gostaria de saber onde tah ocorrendo o erro.

  3. #3
    Normal User livascripts's Avatar
    Join Date
    Apr 2012
    Posts
    729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    15
    Rep Power
    6
    substitui o

    local PotionMoney = positive(potionmax - (weaponamount + itemcount("health potion")))*potionprince

    por:

    local PotionMoney = positive(potionmax - itemcount("health potion"))*potionprince

  4. #4
    Normal User zumbi_2012's Avatar
    Join Date
    Sep 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Opa, vlw amigo

  5. #5
    Normal User zumbi_2012's Avatar
    Join Date
    Sep 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    agora chega a hora de comprar, e ele não seleciona o item
    PHP Code:
    local potionmax 10
    local TotalPotion 
    potionmax - (weaponamount itemcount("health potion"))

    npcsay("hi")
    wait(2000)
    npcsay("trade")
    wait(2000)
    if (
    weaponamount itemcount("health potion")) < potionmax
    then
    buyitemsupto
    ("health potion"TotalPotion)
    end 

  6. #6
    Normal User livascripts's Avatar
    Join Date
    Apr 2012
    Posts
    729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    15
    Rep Power
    6
    PHP Code:
    local potionmax 10
    local TotalPotion 
    potionmax itemcount("health potion")

    opentrade()
    wait(500,900)
    if 
    itemcount("health potion") < potionmax then
    buyitemsupto
    ("health potion"TotalPotion)
    end 

Posting Permissions

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