local t = {
[1337] = {1}, -- [door action id] = {vocation}
[1338] = {2},
[1339] = {3},
[1340] = {4}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local k = t[item.actionid]
if(k and getPlayerVocation(cid) == k[1]) then
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition, true)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This door seems to be sealed against unwanted intruders.")
end
return true
end
LUA:local t = { [1337] = {1}, -- [door action id] = {vocation} [1338] = {2}, [1339] = {3}, [1340] = {4} } function onUse(cid, item, fromPosition, itemEx, toPosition) local k = t[item.actionid] if(k and getPlayerVocation(cid) == k[1]) then doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, toPosition, true) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This door seems to be sealed against unwanted intruders.") end return true end
Please, answer fast -
So I put on actions.xml:
<action itemid="1337;1338;1339;1340" event="script" value="vocdoor.lua"/>
? Please reply fast.
<action uniqueid="1212" event="script" value="door.lua"/>