Follow along with the video below to see how to install our site as a web app on your home screen.
Notka: This feature may not be available in some browsers.
Our partners and their custom servers:
local config = {
maxLevel = getConfigInfo('maximumDoorLevel')
}
local increasingItems = {[416] = 417, [426] = 425, [446] = 447, [3216] = 3217, [3202] = 3215}
local decreasingItems = {[417] = 416, [425] = 426, [447] = 446, [3217] = 3216, [3215] = 3202}
local depots = {2589, 2590, 2591, 2592}
local checkCreature = {isPlayer, isMonster, isNpc}
function onStepIn(cid, item, position, fromPosition)
if(not increasingItems[item.itemid]) then
return FALSE
end
if(isPlayer(cid) ~= TRUE or isPlayerGhost(cid) ~= TRUE) then
doTransformItem(item.uid, increasingItems[item.itemid])
end
if(item.actionid >= 194 and item.actionid <= 196) then
local f = checkCreature[item.actionid - 193]
if(f(cid) == TRUE) then
doTeleportThing(cid, fromPosition, FALSE)
doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
end
return TRUE
end
if(item.actionid >= 191 and item.actionid <= 193) then
local f = checkCreature[item.actionid - 190]
if(f(cid) ~= TRUE) then
doTeleportThing(cid, fromPosition, FALSE)
doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
end
return TRUE
end
if(isPlayer(cid) ~= TRUE) then
return TRUE
end
if(item.actionid == 189 and isPremium(cid) ~= TRUE) then
doTeleportThing(cid, fromPosition, FALSE)
doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
return TRUE
end
local gender = item.actionid - 186
if(isInArray({PLAYERSEX_FEMALE, PLAYERSEX_MALE, PLAYERSEX_GAMEMASTER}, gender) == TRUE) then
local playerGender = getPlayerSex(cid)
if(playerGender ~= gender) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
doTeleportThing(cid, fromPosition, FALSE)
doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
end
return TRUE
end
local skull = item.actionid - 180
if(skull >= 0 and skull < 6) then
local playerSkull = getCreatureSkullType(cid)
if(playerSkull ~= skull) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
doTeleportThing(cid, fromPosition, FALSE)
doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
end
return TRUE
end
local group = item.actionid - 150
if(group >= 0 and group < 30) then
local playerGroup = getPlayerGroupId(cid)
if(playerGroup < group) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
doTeleportThing(cid, fromPosition, FALSE)
doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
end
return TRUE
end
local vocation = item.actionid - 100
if(vocation >= 0 and vocation < 50) then
local playerVocationInfo = getVocationInfo(getPlayerVocation(cid))
if(playerVocationInfo.id ~= vocation and playerVocationInfo.fromVocation ~= vocation) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
doTeleportThing(cid, fromPosition, FALSE)
doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
end
return TRUE
end
if(item.actionid >= 1000 and item.actionid <= config.maxLevel) then
if(getPlayerLevel(cid) < item.actionid - 1000) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
doTeleportThing(cid, fromPosition, FALSE)
doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
end
return TRUE
end
if(item.actionid ~= 0 and getPlayerStorageValue(cid, item.actionid) <= 0) then
doTeleportThing(cid, fromPosition, FALSE)
doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
return TRUE
end
if(getTileInfo(position).protection) then
local depotPos, depot = getPlayerLookPos(cid), {}
depotPos.stackpos = STACKPOS_GROUND
while(true) do
depotPos.stackpos = depotPos.stackpos + 1
depot = getThingFromPos(depotPos)
if(depot.uid == 0) then
break
end
if(isInArray(depots, depot.itemid) == TRUE) then
local depotItems = getPlayerDepotItems(cid, getDepotId(depot.uid))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Your depot contains " .. depotItems .. " item" .. (depotItems > 1 and "s" or "") .. ".")
break
end
end
return TRUE
end
return FALSE
end
function onStepOut(cid, item, position, fromPosition)
if(not decreasingItems[item.itemid]) then
return FALSE
end
if(isPlayer(cid) ~= TRUE or isPlayerGhost(cid) ~= TRUE) then
doTransformItem(item.uid, decreasingItems[item.itemid])
return TRUE
end
return FALSE
end
<movevent event="StepIn" actionid="6464" script="dcq/pillows1.lua" />
<movevent event="StepIn" actionid="6465" script="dcq/pillows2.lua" />
function onStepIn(cid, item, pos)
pillow1pos = {x=pos.x+2, y=pos.y, z=pos.z, stackpos=1}
pillow2pos = {x=pos.x+3, y=pos.y, z=pos.z, stackpos=1}
pillow3pos = {x=pos.x+4, y=pos.y, z=pos.z, stackpos=1}
pillow4pos = {x=pos.x+5, y=pos.y, z=pos.z, stackpos=1}
pillow5pos = {x=pos.x+6, y=pos.y, z=pos.z, stackpos=1}
pillow6pos = {x=pos.x+7, y=pos.y, z=pos.z, stackpos=1}
pillow1 = getThingfromPos(pillow1pos)
pillow2 = getThingfromPos(pillow2pos)
pillow3 = getThingfromPos(pillow3pos)
pillow4 = getThingfromPos(pillow4pos)
pillow5 = getThingfromPos(pillow5pos)
pillow6 = getThingfromPos(pillow6pos)
doTransformItem(pillow1.uid,pillow6.itemid)
doTransformItem(pillow2.uid,pillow1.itemid)
doTransformItem(pillow3.uid,pillow2.itemid)
doTransformItem(pillow4.uid,pillow3.itemid)
doTransformItem(pillow5.uid,pillow4.itemid)
doTransformItem(pillow6.uid,pillow5.itemid)
return 1
end
function onStepIn(cid, item, pos)
pillow1pos = {x=pos.x, y=pos.y+2, z=pos.z, stackpos=1}
pillow2pos = {x=pos.x, y=pos.y+3, z=pos.z, stackpos=1}
pillow3pos = {x=pos.x, y=pos.y+4, z=pos.z, stackpos=1}
pillow4pos = {x=pos.x, y=pos.y+5, z=pos.z, stackpos=1}
pillow5pos = {x=pos.x, y=pos.y+6, z=pos.z, stackpos=1}
pillow6pos = {x=pos.x, y=pos.y+7, z=pos.z, stackpos=1}
pillow1 = getThingfromPos(pillow1pos)
pillow2 = getThingfromPos(pillow2pos)
pillow3 = getThingfromPos(pillow3pos)
pillow4 = getThingfromPos(pillow4pos)
pillow5 = getThingfromPos(pillow5pos)
pillow6 = getThingfromPos(pillow6pos)
doTransformItem(pillow1.uid,pillow6.itemid)
doTransformItem(pillow2.uid,pillow1.itemid)
doTransformItem(pillow3.uid,pillow2.itemid)
doTransformItem(pillow4.uid,pillow3.itemid)
doTransformItem(pillow5.uid,pillow4.itemid)
doTransformItem(pillow6.uid,pillow5.itemid)
return 1
end