Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: posx,y,z & wptx,y,z

  1. #1
    Normal User
    Join Date
    May 2012
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    posx,y,z & wptx,y,z

    posx,y,z --> Returns the x,y,z position of your character.

    So this is whats happening, I make an action at posz lets say 8, the action walks/levitates down and then it checks the posz which = 9. Although it is 9, the bot reads it still as an 8 because of the action made on floor 8? Not sure if this is a bug, a mistake in the description of the variable?

    wpt.x,y,z work well, as intended to in the description


    Action I'm using:
    Code:
    if not islocation() then
    gotolabel('HuntRandomizing13')
    end
    
    move('e') wait(1000,1200)
    if posz == 8 then
    levitate('e','down') wait(800,1200)
    end
    
    if posz == 8 then
    gotolabel('HuntRandomizing13')
    end
    
    if posz == 9 then
    gotolabel('South4')
    end

  2. #2
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    posz should always return the z position of your character and not the action waypoint.
    Last edited by soder; 09-19-2012 at 05:00 PM.

  3. #3
    Normal User
    Join Date
    May 2012
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Well, I've tried this several times and it keeps denying that I'm on floor 9 while the action was made on floor 8.

  4. #4
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    I'll check it out tomorrow and if it's a bug I'll forward it to jonatas, use 2 action waypoints meanwhile.

  5. #5
    Normal User blablabla's Avatar
    Join Date
    Jun 2012
    Location
    Curitiba, Brazil
    Posts
    242
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    22
    Rep Power
    5
    I think once iBot gets to that action it will read and save the location you are. So, when getting to if posz == 9 then~ it will act as if you were still at the same spot you were when this action was first executed (posz == 8).

    I've had something similar happen to me before, that's why I think it works this way. The way I found to counter it was to use different actions.

  6. #6
    Normal User
    Join Date
    May 2012
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    @ Up
    wpt.x,y,z work good, only problems I have is with posx,y,z

  7. #7
    Banned
    Join Date
    May 2012
    Posts
    1,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    127
    Rep Power
    0
    PHP Code:
    if not islocation() then
    gotolabel
    ('HuntRandomizing13')
    else
    move('e'wait(1000,1200)
    end


    if posz == 8 then
    levitate
    ('e','down'wait(800,1200)
    gotolabel('HuntRandomizing13')
    elseif 
    posz == 9 then
    gotolabel
    ('South4')
    end 

  8. #8
    Normal User
    Join Date
    May 2012
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    I've tried that way also, and also making it in to 1 action with longer intervals between checking posz, but it keeps getting that I'm on floor 8

  9. #9
    Normal User
    Join Date
    May 2012
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Apparently wpt.x,z,y also work the same way. Although being on the 9th floor, they think I'm on the 8th. Maybe this is caused by me standing on 3 parcels/pots? Maybe thats the problem/bug?

    @ Edit

    Just made a seperate action
    Code:
    if wpt.z == 9 then
    say('blabla')
    end
    And it says blabla while on floor 9, while on any othr it doesn't. So I still think that the bot reads the coordinations of the wpt it was made on...

    Using this 1 now:
    Code:
    if not islocation() then 
    gotolabel('HuntRandomizing1')
    end
     
    move('e') wait(2000,2222)
    
    if wpt.z == 8 then
    levitate('e','down') wait(800,1200)
    gotolabel('Hunt3')  
    elseif wpt.z == 9 then
    gotolabel('Hunt3') 
    end
    It goes to the spot, checks if not on it, if not then back to wptx, otherwise it tried walking east. Then it walks down, and doesn't matter if it walked down and its on floor 9 or not, it always uses levitate. So I end up going down, then puffing 1x without any sense on every action like this. Then it goes on to next wpt as intended. The only thing not working is checking position...
    Last edited by Sargo; 09-20-2012 at 09:51 AM.

  10. #10
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    Download sirmates library and try if Self.PositionZ() == 9 then

Posting Permissions

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