if getPlayerStorageValue(cid,xxxxx) == 1 and getPlayerStorageValue(cid,xxxxx) == 1 and getPlayerStorageValue(cid,xxxxx) == 1 and getPlayerStorageValue(cid,xxxxx) == 1 and getPlayerStorageValue(cid,xxxxx) == 1 and getPlayerStorageValue(cid,xxxxx) == 1 and getPlayerStorageValue(cid,xxxxx) == 1 then
doPlayerSendTextMessage(cid,25,'You may enter!')
local outfits = {
{looktype},
{looktype},
{looktype},
{looktype},
{looktype}
}
local function enter(cid, item, toPosition)
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition)
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
for i = 1, #outfits do
if(item.actionid == xxxx) then
if(not canPlayerWearOutfit(cid, i, 1 and 2) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This door seems to be sealed against unwanted intruders.")
else
enter(cid, item, toPosition)
end
break
end
end
return true
end
Lua:local outfits = { {looktype}, {looktype}, {looktype}, {looktype}, {looktype} } local function enter(cid, item, toPosition) doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, toPosition) end function onUse(cid, item, fromPosition, itemEx, toPosition) for i = 1, #outfits do if(item.actionid == xxxx) then if(not canPlayerWearOutfit(cid, i, 1 and 2) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This door seems to be sealed against unwanted intruders.") end enter(cid, item, toPosition) end end return true end
local outfits = {looktype,looktype,looktype,looktype,looktype}
local function enter(cid, item, toPosition)
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition)
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local canEnter = true;
for i = 1, #outfits do
if(not canPlayerWearOutfit(cid, i, 3) then
canEnter = false;
break;
end
end
if(canEnter)then
enter(cid, item, toPosition);
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This door seems to be sealed against unwanted intruders.")
end
return true
end
Lua:local outfits = { {looktype}, {looktype}, {looktype}, {looktype}, {looktype} } local function enter(cid, item, toPosition) doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, toPosition) end function onUse(cid, item, fromPosition, itemEx, toPosition) for i = 1, #outfits do if(item.actionid == xxxx) then if(not canPlayerWearOutfit(cid, i, 1 and 2) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This door seems to be sealed against unwanted intruders.") else enter(cid, item, toPosition) end break -- <<< end end return true end
local outfits = {looktype,looktype,looktype,looktype,looktype}
local ThisDoorItemId = 0;
local function enter(cid, item, toPosition)
if(item.itemid == ThisDoorItemId or ThisDoorItemId == 0) then
doTransformItem(item.uid, item.itemid + 1)
end
doTeleportThing(cid, toPosition)
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
for i = 1, #outfits do
if(not canPlayerWearOutfit(cid, outfits [i], 3) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This door seems to be sealed against unwanted intruders.")
return true;
end
end
if(ThisDoorItemId == 0)then
ThisDoorItemId = item.itemid; --Reloading actions could screw this up.
end
enter(cid, item, toPosition);
return true
end
local outfits = {
{looktype},
{looktype},
{looktype},
{looktype},
{looktype}
}
[...]
if(not canPlayerWearOutfit(cid,i, 1 and 2) then
end
if(not canPlayerWearOutfit(cid,i[1], 1 and 2) then
end
for i = 1, #outfits do
if(item.actionid == xxxx) then
if(not canPlayerWearOutfit(cid, i, 1 and 2) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This door seems to be sealed against unwanted intruders.")
else
enter(cid, item, toPosition)
end
break -- <<<
end
end
for i = 1, #outfits do
if(item.actionid == xxxx) then
if(not canPlayerWearOutfit(cid, outfits[1], 1 and 2) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This door seems to be sealed against unwanted intruders.")
else
enter(cid, item, toPosition)
end
break -- <<<
end
end