Signup Now
Results 1 to 4 of 4
  1. #1
    Free User Benya's Avatar
    Join Date
    Dec 2013
    Posts
    274
    Reputation
    29
    Rep Power
    21

    To check if one of several wpts sections are active ($wptsection) - help

    Hey guys,
    basically i want to trigger a refiller if either one of this waypoints sections are active, tried several alternatives but none is working.

    Code:
    if $wptsection == ("HuntWayPoints"), ("Cave Minus1"), ("Cave Minus2")
    Code:
    if $wptsection == 'Cave Minus1' or 'Cave Minus2' or 'Cave Minus3'
    Code:
    if $wptsection ~= 'Cave Minus1' or 'Cave Minus2' or 'Cave Minus3'
    Code:
    if $wptsection == 'Cave Minus1', 'Cave Minus2' or 'Cave Minus3'
    none is working,
    friend stated that it would maybe work with if if if but then again i tried and it failed.

    here is the full code
    Code:
    auto(500)
    
    
    if $wptsection == ("HuntWayPoints"), ("Cave Minus1"), ("Cave Minus2"), ("Cave Minus3") and $lootsaround == 0 and $attacked.id == 0 and not $trapped then
      if itemcount("mana potion", "all") <= getuseroption("MpToLeave") or (itemcount("supreme health potion", "all") <= getuseroption("ShpToLeave") and getuseroption("UseSHP")) or itemcount("ultimate health potion", "all") <= getuseroption("UhpToLeave") or $stamina < getuseroption("StaminaCheck")*60 then
         TargOn()
         settrap("yes", "monster", "monster0", "monster1", "ancient scarab", "demon skeleton")
         setlooting("off")
         gotolabel("LeaveSecondFloor", "Leave")        
         waitping(2,3)
      end
    end
    Working code:

    Code:
    auto(500)
    
    
    if $wptsection == "HuntWayPoints" and $lootsaround == 0 and $attacked.id == 0 and not $trapped then
      if itemcount("mana potion", "all") <= getuseroption("MpToLeave") or (itemcount("supreme health potion", "all") <= getuseroption("ShpToLeave") and getuseroption("UseSHP")) or itemcount("ultimate health potion", "all") <= getuseroption("UhpToLeave") or $stamina < getuseroption("StaminaCheck")*60 then
         TargOn()
         settrap("yes", "monster", "monster0", "monster1", "ancient scarab", "demon skeleton")
         setlooting("off")
         gotolabel("LeaveSecondFloor", "Leave")        
         waitping(2,3)
      end
    end
    Thanks in advance


    Last edited by Benya; 08-31-2020 at 05:20 PM.

  2. #2
    Free User Benya's Avatar
    Join Date
    Dec 2013
    Posts
    274
    Reputation
    29
    Rep Power
    21
    No one able to help with this? :/

  3. #3
    Free User
    Join Date
    Jan 2019
    Posts
    13
    Reputation
    10
    Rep Power
    0
    if ($wptsection == "A" or $wptsection == "B" or $wptsection == "C") and (itemcount("Mana Potion") < 50 or itemcount("Supreme Health Potion") < 50) then

    Also, I don't recommend using both "$lootsaround == 0 and $attacked.id == 0" as if there are monsters around he might take some time before going to refill. Safety >> 1 extra looted body

    If You need any help simply contact me directly via discord Inuidisse#4684

  4. #4
    Free User strahowski's Avatar
    Join Date
    Aug 2014
    Posts
    216
    Reputation
    27
    Rep Power
    20
    You're making this hard to maintain or making edits.


    if(table.find({"Wptsection", "WptsectionTwo"}, $wptsection) then
    if(itemcount("supreme health potion") <= 50 or itemcount("mana potion") <= 50) then
    gotolabel("SomeLabel")
    end
    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
  •