Results 1 to 10 of 10

Thread: Help with Action please

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

    Help with Action please

    Yo guys,

    I would like to make runes infront of my house.

    Is there a way to get my player into my house, when someone is on screen?
    Then to wait like 5 minutes inside and after the 5 minutes to run out again ( in case none is on screen ).


    Regards,

    Sergio

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

  3. #3
    Moderator Drakke's Avatar
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,898
    Mentioned
    216 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    390 Post(s)
    Reputation
    366
    Rep Power
    10
    PHP Code:
    local wait_time 1000 60 --Change the 5 into how many minutes you wish to wait

    if paround(7) > 0 then
        reachlocation
    (x,y,z) --Set where to go if player on screen
        wait
    (wait_time)
    else
        
    reachlocation(x,y,z) --Set where to go after waiting 5min and no player on screen
    end 

  4. #4
    Normal User serialbob's Avatar
    Join Date
    Jul 2012
    Location
    Goroma depot
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    11
    Rep Power
    5
    Wrongwindow XD
    Last edited by serialbob; 04-13-2013 at 01:03 PM.
    Sold 251 paladin to Edi - GOOD
    FOR SALE : 230 ~ EK sword 102 PVP

  5. #5
    Normal User The_3rM's Avatar
    Join Date
    Aug 2012
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Quote Originally Posted by Drakke View Post
    PHP Code:
    local wait_time 1000 60 --Change the 5 into how many minutes you wish to wait

    if paround(7) > 0 then
        reachlocation
    (x,y,z) --Set where to go if player on screen
        wait
    (wait_time)
    else
        
    reachlocation(x,y,z) --Set where to go after waiting 5min and no player on screen
    end 
    It's good, but i'd use the function lasttimeplayeronscreen. maby somthing like this:
    PHP Code:
    local wait_time 1000 60 --Change the 5 into how many minutes you wish to wait

    if lasttimeplayeronscreen wait_time then
        reachlocation
    (x,y,z) --Set where to go if player on screen
        wait
    (1000,1500)
    else
        
    reachlocation(x,y,z) --Set where to go after waiting 5min and no player on screen
        wait
    (500,1000
    end 

  6. #6
    Normal User
    Join Date
    Mar 2013
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    what do i have to edit on reachloaction ? a x, y or a z ?

    cuz it doesnt work yet for me :<

  7. #7
    Banned
    Join Date
    Jun 2012
    Location
    Ceará
    Posts
    2,114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    81
    Rep Power
    0
    Moved from Tutorials and Examples to Support.

    iBot Staff.

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

  9. #9
    Normal User salomao0104's Avatar
    Join Date
    Jan 2013
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    just do that in a new action
    This will scan the screen for players every 2 seconds. if there is any player outside, it comes in and reverse.

    PHP Code:
    -- it's mandatory to the positions between inside and outside be of just 1 sqm
    -- because the function reachlocation() walks just 1 sqm each time it'
    s executed
    if paround(7then
    reachlocation
    (x1y1z1) -- where x1y1 and z1 are the position of your door
    else
    reachlocation(x2y2z2) -- where x2y2 and z2 are the position in front of your door
    end
    wait
    (15002000
    I hope to be helpful, rep plx if you like my code

  10. #10
    Normal User salomao0104's Avatar
    Join Date
    Jan 2013
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    Sergio, if you don't know where to take the x, y and z, this little HUD can help you.
    You just have to go on Settings > Hud > List. Just leave List selected and click on Options all up and select "New".
    On this new Hud "Hudx" you insert the following code on Script:
    PHP Code:
    setfontcolor("orange")
    addtext("X Position:"1030)
    addtext("Y Position:"1045)
    addtext("Z Position:"1060)
    setfontcolor("white")
    addtext(posx10030)
    addtext(posy10045)
    addtext(posz10060
    After inserting the code, toggle enable on the hud to yes. Enable the Hud just created and the global Hud.
    This will show on your game screen your instant position, you can notice that if you walk, it changes too.
    Get the x, y and z of your door inside and outside.

    I hope I have helped. If yes, please rep me

Posting Permissions

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