Results 1 to 7 of 7

Thread: Item work like a key

  1. #1
    Member
    Join Date
    May 2008
    Posts
    60
    Reputation
    Status
    Kisskotte is offline

    Item work like a key

    Hello i wonder if its possible to make an item work like a key to a door? Like à sword or à Rune or something like that?


    /R.

  2. #2
    Experienced Member
    Join Date
    Nov 2008
    Location
    New York
    Posts
    1,191
    Reputation
    Status
    owned is offline

  3. #3
    Member
    Join Date
    May 2008
    Posts
    60
    Reputation
    Status
    Kisskotte is offline
    dident get it to work

    firerunedoor.lua
    local item = 2304 -- item id of item used as key.
    local location = {x=198, y=477, z=7} -- location of where to be moved upon using the door

    function onUse(cid, item, frompos, item2, topos)
    if getPlayerItemCount(cid,item) >= 1 then
    doTeleportThing(cid, location)
    else
    doPlayerSendCancel(cid, "You are required to have the fire rune of fire master to open this door!")
    end
    end
    Actions.xml
    <action uniqueid="32000" script="Other/firerunedoor.lua"/>

  4. #4
    Experienced Member
    Join Date
    Nov 2008
    Location
    New York
    Posts
    1,191
    Reputation
    Status
    owned is offline
    Use actionid not uniqueid...

  5. #5
    Member
    Join Date
    May 2008
    Posts
    60
    Reputation
    Status
    Kisskotte is offline
    Ok will try thanks =)

  6. #6
    Member
    Join Date
    May 2008
    Posts
    60
    Reputation
    Status
    Kisskotte is offline
    Hm maybe I'm a retard but dident work have put out the door set the action id to 32000 but when i try to open it no message appear that whould have been
    You are required to have the fire rune of fire master to open this door!
    and when i try the rune on the door. it just say not possible?

  7. #7
    Senior Member andu's Avatar
    Join Date
    Aug 2009
    Posts
    267
    Reputation
    Status
    andu is offline
    if you want to add new item, what will works like a key, and make it fully automatic you have to edit a bit your key.lua and door.lua by adding there new ids

    otherwise you have to make new script for each doors with new keys you have.
    -~= Mathematics =~-
    MENSA Level

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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