Results 1 to 10 of 10

Thread: Putting two outputs in action?

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

    Putting two outputs in action?

    My script has two outputs (LeaveN and LeaveS), I would like to know how to, when to stay with 0 royal spear in hand he go for the nearest exit. The action is this below:


    if weaponamount == 0 then
    if posx < x and posy > y and posz == z then
    settargeting ("no")
    gotolabel ("leave")
    end
    end

  2. #2
    iBot User
    Join Date
    Aug 2012
    Posts
    805
    Mentioned
    18 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    38 Post(s)
    Reputation
    180
    Rep Power
    7
    N and S looks like north and south so get posy of north and south

    Lua Code:
    local northy = 33333
    local southy = 34444
    local middley = (northy+(southy-northy)/2)
    if weaponamount == 0 then
    if (southy-middley) > (middley-northy) then
    gotolabel("LeaveN")
    else
    gotolabel("LeaveS")
    end
    end
    Last edited by shanp; 02-22-2014 at 01:46 PM.

  3. #3
    Normal User
    Join Date
    Mar 2013
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    How to get the posy?

  4. #4
    Focus Group Targets's Avatar
    Join Date
    Nov 2013
    Location
    PoA - Brazil
    Posts
    456
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    48 Post(s)
    Reputation
    109
    Rep Power
    5
    Quote Originally Posted by marcolp View Post
    How to get the posy?
    Lua Code:
     
    local X = posx
    local Y = posy
    local Z = posz



  5. #5
    iBot User
    Join Date
    Aug 2012
    Posts
    805
    Mentioned
    18 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    38 Post(s)
    Reputation
    180
    Rep Power
    7
    Quote Originally Posted by TargetScripts View Post
    Lua Code:
     
    local X = posx
    local Y = posy
    local Z = posz
    lol

    Just check posy of your waypoints with both labels

  6. #6
    iBot User walukasz's Avatar
    Join Date
    Feb 2012
    Location
    Poland
    Posts
    312
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    25 Post(s)
    Reputation
    67
    Rep Power
    5
    Quote Originally Posted by TargetScripts View Post
    Lua Code:
     
    local X = posx
    local Y = posy
    local Z = posz
    how was that supposed to help him? XD

  7. #7
    Normal User
    Join Date
    Feb 2014
    Posts
    104
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    9 Post(s)
    Reputation
    5
    Rep Power
    0
    ^ bug?
    Follow My Botting Project.


    http://www.tibiaibot.com/forum/showt...sor-Goes-Here)


    - bought 316 MS from tazz other forum
    - sold 214 MS to Baahl other forum
    - sold 201 MS to fatstax other forum
    - bought 324 MS bought fatstax other forum
    - sold 211 EK to Zoroastrian
    - bought 266 RP from tahoe
    - bought 225 MS from davidb
    - sold 236 EK to Fencing
    - sold 225 RP to umer other forum
    - sold 355 EK to Pirate other forum
    - bought 297 ED from superte other forum
    - bought 300 EK from Athene other forum
    - sold 219 RP to Fencing
    - bought 291 ED from Ferenix
    - sold 181 RP to guwop
    - sold 101 EK to adamtwat other forum
    - sold 216 MS to Fresno
    - bought318 RP from baibailu

  8. #8
    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
    Quote Originally Posted by marcolp View Post
    How to get the posy?
    thats a stupid question. Just look at the wpt and note the posy...

    in your action just say if posy > "whatever is about halfway between then" then gotolabel("LeaveN") else gotolabel("LeaveS")

    Either way, I see this as a pointless complication.

  9. #9
    iBot User walukasz's Avatar
    Join Date
    Feb 2012
    Location
    Poland
    Posts
    312
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    25 Post(s)
    Reputation
    67
    Rep Power
    5
    Quote Originally Posted by shanp View Post
    N and S looks like north and south so get posy of north and south

    Lua Code:
    local northy = 33333
    local southy = 34444
    local middley = (northy+(southy-northy)/2)
    if weaponamount == 0 then
    if (southy-middley) > (middley-northy) then
    gotolabel("LeaveN")
    else
    gotolabel("LeaveS")
    end
    end
    Well as he still needs help and the action makes no sence, here it is:

    Lua Code:
    local northy = 33333
    local southy = 34444
    local middley = northy+(southy-northy)/2
    if weaponamount == 0 then
    	if posy < middley then
    		gotolabel("LeaveN")
    	else
    		gotolabel("LeaveS")
    	end
    end

  10. #10
    iBot User
    Join Date
    May 2012
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    18 Post(s)
    Reputation
    16
    Rep Power
    5
    Also there is a HUD made to show your pos x,y,z that could be activated there:
    Start>Settings>Hud>List>GeneralInfo

    By default, it is set as "Enabled: yes".
    So probably it will be very simple, you need to click on:
    Extras>States>Hud

Posting Permissions

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