Signup Now
Results 1 to 3 of 3
  1. #1
    Free User
    Join Date
    Mar 2015
    Posts
    6
    Reputation
    10
    Rep Power
    0

    Need help with script doubts

    anyone can explain me what do the next sentences p

    -- Buy Potions
    local HP = getuseroption("MaxHP")
    local MP = getuseroption("MaxMana")
    local HpCount = (HP - itemcount(getuseroption("HealthName")))
    local MpCount = (MP - itemcount("strong mana potion")) --this one

    if not islocation(1) then
    gotolabel($wptid-6, "City")
    else
    sellflasks()

    local Amount = (HpCount)
    while Amount > 0 and islocation(1) do
    buyitems(getuseroption("HealthName"), Amount)
    Amount = Amount - 100 --and this one
    wait(250,500)
    end


    local Amount = (MpCount)
    while Amount > 0 and islocation(1) do
    buyitems("strong mana potion", Amount)
    Amount = Amount - 100
    wait(250,500)
    end
    Last edited by ozzix; 04-21-2015 at 06:29 PM. Reason: lua tags

  2. #2
    Helper StaR's Avatar
    Join Date
    Dec 2013
    Location
    Manchester
    Posts
    712
    Reputation
    50
    Rep Power
    23
    Need more information, what are you trying to do/understand?

    edit: ahh i see the areas now that it has lua tags!
    Last edited by StaR; 04-21-2015 at 08:11 PM.



  3. #3
    Free User ozzix's Avatar
    Join Date
    Jan 2014
    Location
    Sweden
    Posts
    4,769
    Reputation
    151
    Rep Power
    31
    the first one removes the itemcount of smp from the variable MP and stores it in the variable MpCount
    the second one removes 100 from the variable Amount

    Level Latest Scripts
    250+
    Oramond Sewers [MAGE |RP X1 | RP X2 |RP X3|EK X2 | EK X1]
    200+
    Banuta X2 [MAGE | RP]
    280+
    Roshamuul Mountain [RP]
    280+
    Ferumbras Lair [RP]
    250+
    Roshamuul North Silencers [RP]

 

 

Posting Permissions

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