Results 1 to 9 of 9

Thread: Door opener action

  1. #1
    Normal User
    Join Date
    Dec 2012
    Location
    Poland
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4

    Door opener action

    I need two action scripts.

    If standing on (my sqm) then pass to (my label)

    And

    If door is closed then use key, if door is open then don't use

    I ask you so much to do it and I will be very glad if u could make this, I need it so much.
    Last edited by Nilowz; 03-24-2013 at 04:22 PM.

  2. #2
    zami84's Avatar
    Join Date
    May 2012
    Posts
    316
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    48
    Rep Power
    5
    1.
     if islocation then gotolabel("my_label")
    end

    2.
    local doorx = 32075 -- Door Pos X
    local doory = 32540 -- Door Pos Y
    local doorid = 5277 -- Closed door ID
    local keyid = XXX -- Key Item ID

    if toptileitem(doorx, doory, posz) == doorid then
    while toptileitem(doorx, doory, posz) == doorid do
    useitem(doorid, doorx, doory, posz)
    wait(300,450)
    useitemon(keyid, doorx, doory, posz)
    wait(300,450)
    end
    end

    By pink_panther
    Last edited by zami84; 03-24-2013 at 02:54 PM.

  3. #3
    Normal User
    Join Date
    Dec 2012
    Location
    Poland
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    Ok and one more in case door doesn't need key.

    If door is closed then use on it, if door is open then nothing

  4. #4
    zami84's Avatar
    Join Date
    May 2012
    Posts
    316
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    48
    Rep Power
    5
        local doorx = 32075 -- Door Pos X
    local doory = 32540 -- Door Pos Y
    local doorid = 5277 -- Closed door ID

    if toptileitem(doorx, doory, posz) == doorid then
    while toptileitem(doorx, doory, posz) == doorid do
    useitem(doorid, doorx, doory, posz)
    wait(300,450)
    end
    end


    Its good to add wpt with action to check location

    wpt stand "OpenDoors" -- before doors
    wpt action - with doors opening
    wpt stand -- after doors
    wpt action --
    if not islocation() then gotolabel("OpenDoors") end

  5. #5
    Normal User
    Join Date
    Dec 2012
    Location
    Poland
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    It doesn't workinkg. I add door x, door y correctly. Is something what I need else to add?

  6. #6
    zami84's Avatar
    Join Date
    May 2012
    Posts
    316
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    48
    Rep Power
    5
    change doorid

  7. #7
    Normal User
    Join Date
    Dec 2012
    Location
    Poland
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    I don't know how to heck door id.

  8. #8
    iBot User
    Join Date
    Jun 2012
    Posts
    517
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    4 Post(s)
    Reputation
    132
    Rep Power
    7
    Quote Originally Posted by Nilowz View Post
    I don't know how to heck door id.
    Add a new hud with this:

    PHP Code:
    addtext(cursorinfo().id2030

  9. #9
    Normal User
    Join Date
    Dec 2012
    Location
    Poland
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    Ok all correct Thank you very much, you can edit it all in one post with hud too and delete other for order.

Posting Permissions

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