Results 1 to 6 of 6

Thread: Help leave when less than x cape

  1. #1
    Normal User
    Join Date
    Jan 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4

    Help leave when less than x cape

    hello guys i made action
    PHP Code:
    if ((itemcount(MPtype) >= MPmin) or (itemcount(HPtype) >= HPmin) or (cap >= CapToLeave)) 
    then
    gotolabel
    ('startexp')
    end 
    and my actions setings looks like

    PHP Code:
    -- Potions Settings --
    MPtype "mana potion"
    MPmax 40
    MPmin 
    5
    MPprice 
    50
    HPtype 
    "health potion"
    HPmax 20
    HPmin 
    5
    HPprice 
    45

    -- Hunt Settings --
    CapToLeave 30 
    but it wont work for me cuz when i have less than 30cap hes still going to label "startexp" whats wrong?
    Last edited by kangur; 02-02-2013 at 11:09 AM.

  2. #2
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    u must set "and" instead of "or"...

  3. #3
    Banned
    Join Date
    May 2012
    Location
    Poland
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    7
    Rep Power
    0
    Check that :

    if itemcount(MPtype) >= MPmin or itemcount(HPtype) >= HPmin or cap >= CapToLeave
    then
    gotolabel('startexp')
    end

  4. #4
    Normal User kozik7's Avatar
    Join Date
    Oct 2012
    Posts
    146
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    18
    Rep Power
    5
    Quote Originally Posted by Devisso View Post
    Check that :

    if itemcount(MPtype) >= MPmin or itemcount(HPtype) >= HPmin or cap >= CapToLeave
    then
    gotolabel('startexp')
    end
    omg rafix wrote reason and you again write wrong?

    if you have "or" then character can go hunt without mp/ammo but when he have enough cap

    kangur change "or" for "and" and it will work

  5. #5
    Banned
    Join Date
    May 2012
    Location
    Poland
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    7
    Rep Power
    0
    Aaaa ! Sorry, I haven't read that "Startexp" label So yep, "and" is correct. My example works for leave from resp

  6. #6
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Or make it go then goto Leavehunt, else goto startexp

Posting Permissions

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