Results 1 to 3 of 3

Thread: using key on closed doors

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

    using key on closed doors

    I created a small action but it doesn't work. Can You help me?
    the door is 1 sq to the north:

    PHP Code:
    if (toptileitem(32190324348)) == 1631 then
    useitemon
    ("Wooden Key"32190,3234,8)
    end 

  2. #2
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    Ill post here mine action for it.
    PHP Code:
    -- OpenDoorAction by RafiXWPT
    local DoorX 
    -- Door X position
    local DoorY 
    -- Door Y position
    local KeyId 
    -- If you dont need keysimply left "0" here
    local ClosedDoorId 
    -- Closed Door ID
    local ClosedByKeyDoorId 
    -- Closed by Key Door ID, If you dont know that IDsimply left "0" here

    wait
    (200,600)
    -- If 
    Door is closed by Key
    if toptileitem(DoorX,DoorY,posz) == ClosedByKeyDoorId then
    wait
    (500,750)
         
    useitemon(KeyIdDoorX,DoorY,posz)
    wait(500,750)
    -- If 
    Door is just closed
    elseif toptileitem(DoorX,DoorY,posz) == ClosedDoorId then
    wait
    (500,750)
         
    useitem(ClosedDoorIdDoorX,DoorY,posz)
    wait(500,750)
    end 
    enjoy

  3. #3
    Normal User
    Join Date
    May 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    thx a lot

Posting Permissions

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