Results 1 to 5 of 5

Thread: [How to] Make Manas + Eggs withdraw?

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

    [How to] Make Manas + Eggs withdraw?

    I wanna make = total of
    Mana potions and eggs
    I need a script that count the eggs i got on me and withdraw the money i need for the rest eggs
    for example i got 100 on me
    and on actions there is EGGtobuy 200
    so it take 200gps for buy rest

  2. #2
    iBot User
    Join Date
    Jun 2012
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    PHP Code:
    --Food
    eggCost 
    3
    eggAmount 
    200
    eggName 
    'egg'

    --Manas
    manaCost 
    50
    manaAmount 
    200
    manaName 
    'mana potion'

    --Math shit
    eggtot 
    positive(eggCost*(eggAmount-(itemcount(eggName)))
    manatot positive(manaCost*(manaAmount-(itemcount(manaName)))
    total eggtot manatot

    --Say to npc
    npcsay
    ('withdraw '.. total
    Hope you understand

  3. #3
    Normal User K_ingen's Avatar
    Join Date
    May 2012
    Location
    Sweden
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    11
    Rep Power
    5
    First of all, please try to use the search function...

    local manas = positive(numbersofmanas - countitem("mana potion")) * manacost
    local eggs = positive(numbersofeggs - countitem("egg")) * eggcost
    total = manas + eggs

    depositall()
    npcsay('withdraw '..total)
    npcsay('yes')


    edit it and try it.

  4. #4
    Normal User Qelss's Avatar
    Join Date
    Jun 2012
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    One more thing how do i use my Weapon on hand on wooden bars?
    Last edited by Qelss; 07-20-2012 at 11:11 AM.

  5. #5
    Normal User Tibianator's Avatar
    Join Date
    Jun 2012
    Location
    Poland
    Posts
    129
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    19
    Rep Power
    5
    PHP Code:
     useitemon("weaponname"posx,posy,posz
    posx,posy,posz of wooden bar
    Last edited by Tibianator; 07-20-2012 at 12:13 PM.

Posting Permissions

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