Results 1 to 2 of 2

Thread: Problem with script! Help plz !

  1. #1
    Premium User iBot User
    Join Date
    Jul 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    Problem with script! Help plz !

    Anyone who can help me to make this work ?
    My char doesn´t go back to depo when it´s low in manas

    if itemcount(MPtype) < MPmin or weaponamount > SpearMin or cap > CapToLeave then
    gotolabel("Start")
    else
    gotolabel("Leave")
    end

  2. #2
    Normal User
    Join Date
    May 2012
    Location
    England
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    16
    Rep Power
    5
    You're using the if statement wrong, if any of those statements:

    itemcount(MPtype) < MPmin

    weaponamount > SpearMin

    cap > CapToLeave

    return true, then it will go to start hunting again, it won't leave until all of these return false, so what you want to do is use "and" instead of "or":

    PHP Code:
    if itemcount(MPtype) > MPmin and weaponamount SpearMin and cap CapToLeave then
    gotolabel
    ("Start")
    else
    gotolabel("Leave")
    end 
    Edit: Your first comparisong was checking if you had less manas than MPmin, instead of more, so this would also have fucked it (it wouldn't have deposited at all). The code above is repaired.
    Last edited by XtrmJosh; 02-15-2013 at 04:07 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
  •