Results 1 to 5 of 5

Thread: Auto use energy wall

  1. #1
    iBot User
    Join Date
    Aug 2014
    Posts
    42
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    10 Post(s)
    Reputation
    10
    Rep Power
    3

    Question Auto use energy wall

    Hi, i am trying to do an script that get my postion and use energy wall on diagonal.

    But, i need some way to get information about that sqm (diagonal), so i can know if it already have energy or not.

    Anyone have an idea?

    I do one script based on time, but isnt the best way to do that...i need an way to get information about sqm (diagonal).

    Note: i am not using cavebot, so, i dont have this sqm on waypoints.



    My script based on time is that:

    Lua Code:
     
    x = tonumber(posx)
    y = tonumber(posy)
    z = tonumber(posz)
    xtwo = x+1
    ytwo = y+1
    settargeting('off')
    while targeting == 'on' do
    	settargeting('off')
    end
    stopattack()
    setsettings("Settings\\Healer\\Enabled", "no")
    setsettings("Settings\\FriendHealer\\Enabled", "no")
    wait(200,300)
    useitemon("energy wall rune", xtwo, ytwo , z)
    wait(200,300)
    setsettings("Settings\\Healer\\Enabled", "yes")
    setsettings("Settings\\FriendHealer\\Enabled", "yes")
    while targeting == 'off' do
    	settargeting('on')
    end
    settargeting('on')
    yone = 0
    xtwo = 0
    ytwo = 0
    wait(800, 1000)


    Sorry for my bad english.
    Thanks and peace

  2. #2
    Focus Group mexicowss's Avatar
    Join Date
    May 2012
    Location
    Brasil
    Posts
    440
    Mentioned
    20 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    59 Post(s)
    Reputation
    128
    Rep Power
    6
    you can always use your own position as a reference.
    example:
    you are stand still, your position second ibot variables is : (posx,posy,posz)
    The X axis raises for the right >>>>
    The Y axis raises for the south \/
    so if you want it to trow the field on your northeast diagonal for example
    you can use:
    useitemon("energy wall rune", posx+1,posy-1,posz)
    The other thing to detect if there is already a field on the floor is using toptileitem(x,y,z)
    PHP Code:
    local Rune "energy wall rune"
    local energyID xxxx
    if toptileitem(x,y,z) ~= energyID then
    useitemon
    (Runex,y,z)
    else
    end 
    OBS: you can get the field ID via HUDS or using print(toptileitem(x,y,z))
    Last edited by mexicowss; 01-15-2015 at 07:37 PM.
    click the image below to see my thread.



  3. #3
    iBot User
    Join Date
    Aug 2014
    Posts
    42
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    10 Post(s)
    Reputation
    10
    Rep Power
    3
    Quote Originally Posted by mexicowss View Post
    you can always use your own position as a reference.
    example:
    you are stand still, your position second ibot variables is : (posx,posy,posz)
    The X axis raises for the right >>>>
    The Y axis raises for the south \/
    so if you want it to trow the field on your northeast diagonal for example
    you can use:
    useitemon("energy wall rune", posx+1,posy-1,posz)
    The other thing to detect if there is already a field on the floor is using toptileitem(x,y,z)
    PHP Code:
    local Rune "energy wall rune"
    local energyID xxxx
    if toptileitem(x,y,z) ~= energyID then
    useitemon
    (Runex,y,z)
    else
    end 
    OBS: you can get the field ID via HUDS or using print(toptileitem(x,y,z))


    yah yah, is exactly that i need toptileitem() function.

    Thanks.
    Yes, i was using my position as reference

    Thanks for that, i will refactory my script using toptileitem() + while

    peace

  4. #4
    Focus Group mexicowss's Avatar
    Join Date
    May 2012
    Location
    Brasil
    Posts
    440
    Mentioned
    20 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    59 Post(s)
    Reputation
    128
    Rep Power
    6
    Quote Originally Posted by bolinho1988 View Post
    yah yah, is exactly that i need toptileitem() function.

    Thanks.
    Yes, i was using my position as reference

    Thanks for that, i will refactory my script using toptileitem() + while

    peace
    I would not recommend using while in this, IF would fit better
    click the image below to see my thread.



  5. #5
    iBot User
    Join Date
    Aug 2014
    Posts
    42
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    10 Post(s)
    Reputation
    10
    Rep Power
    3
    Quote Originally Posted by mexicowss View Post
    I would not recommend using while in this, IF would fit better
    I need 100% of sure the rune are shooted, so i will use while with some time controls inside the loop.


    useitemon() sometime don't shoot the rune, cause other things can broke it.

    other things like: healer, friendhealer, other actions and more.

    So, to be sure, i need one while with time control to shoot it.

    Thanks and peace bro

Posting Permissions

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