• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Storage tile

Brooke

Member
Joined
Mar 7, 2011
Messages
70
Reaction score
8
Hey! This script is working perfectly, but how can I add a storage to the tile, so people can enter the city every time?

Code:
function onStepIn(cid, item, pos)
if getPlayerItemCount(cid, 10107) >= 1 then
    doPlayerRemoveItem(cid, 10107, 1)
    doTeleportThing(cid, {x = 1000, y = 1000, z = 7})
    doCreatureSay(cid, 'City', TALKTYPE_ORANGE_1, false, cid)
    doSendMagicEffect({x=1000, y=1000, z=7}, 66)
else
    doTeleportThing(cid, {x=991, y=996, z=7})
    doSendMagicEffect({x=991, y=996, z=7}, 37)
    doCreatureSay(cid, 'You don\'t have the permission to enter the city!', TALKTYPE_ORANGE_1, false, cid)
end
    return TRUE
end
 
Code:
function onStepIn(cid, item, pos)
if getPlayerItemCount(cid, 10107) >= 1 then
doPlayerRemoveItem(cid, 10107, 1)
doTeleportThing(cid, {x = 1000, y = 1000, z = 7})
doCreatureSay(cid, 'City', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect({x=1000, y=1000, z=7}, 66)
setPlayerStorageValue(cid, 33321, 1)
elseif getPlayerStorageValue(cid, 33321) >= 1 then
doTeleportThing(cid, {x = 1000, y = 1000, z = 7})
doCreatureSay(cid, 'City', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect({x=1000, y=1000, z=7}, 66)
else
doTeleportThing(cid, {x=991, y=996, z=7})
doSendMagicEffect({x=991, y=996, z=7}, 37)
doCreatureSay(cid, 'You don\'t have the permission to enter the city!', TALKTYPE_ORANGE_1, false, cid)
end
return TRUE
end
 
Code:
local storage = 293023

function onStepIn(cid, item, pos)
     if getPlayerItemCount(cid, 10107) >= 1 or getPlayerStorageValue(cid, storage) == 1 then
         if getPlayerStorageValue(cid, storage) ~= 1 then
             doPlayerRemoveItem(cid, 10107, 1)
         end
         doTeleportThing(cid, {x = 1000, y = 1000, z = 7})
         doCreatureSay(cid, 'City', TALKTYPE_ORANGE_1, false, cid)
         setPlayerStorageValue(cid, storage, 1)
         doSendMagicEffect({x=1000, y=1000, z=7}, 66)
     else
         doTeleportThing(cid, {x=991, y=996, z=7})
         doSendMagicEffect({x=991, y=996, z=7}, 37)
         doCreatureSay(cid, 'You don\'t have the permission to enter the city!', TALKTYPE_ORANGE_1, false, cid)
     end
     return TRUE
end
 
Code:
function onStepIn(cid, item, pos)
if getPlayerItemCount(cid, 10107) >= 1 then
doPlayerRemoveItem(cid, 10107, 1)
doTeleportThing(cid, {x = 1000, y = 1000, z = 7})
doCreatureSay(cid, 'City', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect({x=1000, y=1000, z=7}, 66)
setPlayerStorageValue(cid, 33321, 1)
elseif getPlayerStorageValue(cid, 33321) >= 1 then
doTeleportThing(cid, {x = 1000, y = 1000, z = 7})
doCreatureSay(cid, 'City', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect({x=1000, y=1000, z=7}, 66)
else
doTeleportThing(cid, {x=991, y=996, z=7})
doSendMagicEffect({x=991, y=996, z=7}, 37)
doCreatureSay(cid, 'You don\'t have the permission to enter the city!', TALKTYPE_ORANGE_1, false, cid)
end
return TRUE
end

Thank you my friend. :)

Code:
local storage = 293023

function onStepIn(cid, item, pos)
     if getPlayerItemCount(cid, 10107) >= 1 or getPlayerStorageValue(cid, storage) == 1 then
         if getPlayerStorageValue(cid, storage) ~= 1 then
             doPlayerRemoveItem(cid, 10107, 1)
         end
         doTeleportThing(cid, {x = 1000, y = 1000, z = 7})
         doCreatureSay(cid, 'City', TALKTYPE_ORANGE_1, false, cid)
         setPlayerStorageValue(cid, storage, 1)
         doSendMagicEffect({x=1000, y=1000, z=7}, 66)
     else
         doTeleportThing(cid, {x=991, y=996, z=7})
         doSendMagicEffect({x=991, y=996, z=7}, 37)
         doCreatureSay(cid, 'You don\'t have the permission to enter the city!', TALKTYPE_ORANGE_1, false, cid)
     end
     return TRUE
end

Thank you Limos :)
 
Back
Top