• 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!

chest bug

Status
Not open for further replies.

habiba

New Member
Joined
Aug 26, 2007
Messages
586
Reaction score
4
Location
Örebro, Sweden
I got a simple bug i think!
when i open exemple chest with uniqueid 2004 and actionid 2004
i got my chain armor and when i open the same chest again it say It is empty. BUT THE CHEST IS OPENING AGAIN AND IT IS A NORMAL CHEST

Check this image
check this.jpg

What is the poblem with this script

Code:
-- ROOKGAARD QUESTS

function onUse(cid, item, frompos, item2, topos)

-- bear room quest
if item.uid == 2004 then -- the unique id of chest
queststatus = getPlayerStorageValue(cid,2004) --storage value, keep at chests unique id
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a chain armor.") --Massage when open
doPlayerAddItem(cid,2464,1) -- item
setPlayerStorageValue(cid,2004,1) -- sets storage value up 1
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 2005 then -- the unique id of chest
queststatus = getPlayerStorageValue(cid,2005) --storage value, keep at chests unique id
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a brass helmet.") --Massage when open
doPlayerAddItem(cid,2460,1) -- item
setPlayerStorageValue(cid,2005,1) -- sets storage value up 1
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 2006 then -- the unique id of chest
    queststatus = getPlayerStorageValue(cid,2006) --storage value, keep at chests unique id
if queststatus == -1 then -- checks if quest is done
    doPlayerSendTextMessage(cid,22,"You have found a bag")  --Massage when open
    Container = doPlayerAddItem(cid, 1987, 1) -- container =bag or backpack ID
    doAddContainerItem(Container, 2148, 50) -- item
    doAddContainerItem(Container, 2544, 12) -- item
    setPlayerStorageValue(cid,2006,1) -- sets storage value up 1
else
    doPlayerSendTextMessage(cid,22,"It is empty.")
end
-- Combat Knife quest
elseif item.uid == 2007 then -- the unique id of chest
queststatus = getPlayerStorageValue(cid,2007) --storage value, keep at chests unique id
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a Combat Knife.") --Massage when open
doPlayerAddItem(cid,2404,1) -- item
setPlayerStorageValue(cid,2007,1) -- sets storage value up 1
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
-- Doublet quest
elseif item.uid == 2008 then -- the unique id of chest
queststatus = getPlayerStorageValue(cid,2008) --storage value, keep at chests unique id
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a Doublet.") --Massage when open
doPlayerAddItem(cid,2485,1) -- item
setPlayerStorageValue(cid,2008,1) -- sets storage value up 1
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
-- Copper Shield quest
elseif item.uid == 2009 then -- the unique id of chest
    queststatus = getPlayerStorageValue(cid,2009) --storage value, keep at chests unique id
if queststatus == -1 then -- checks if quest is done
    doPlayerSendTextMessage(cid,22,"You have found a bag") --Massage when open
    Container = doPlayerAddItem(cid, 1987, 1) -- container =bag or backpack ID
    doAddContainerItem(Container, 2480, 1) -- item
    doAddContainerItem(Container, 2530, 1) -- item
    setPlayerStorageValue(cid,2009,1) -- sets storage value up 1
else
    doPlayerSendTextMessage(cid,22,"It is empty.")
end
-- Goblin Temple Quest
elseif item.uid == 2010 then -- the unique id of chest
    queststatus = getPlayerStorageValue(cid,2010) --storage value, keep at chests unique id
if queststatus == -1 then -- checks if quest is done
    doPlayerSendTextMessage(cid,22,"You have found a bag") --Massage when open
    Container = doPlayerAddItem(cid, 1987, 1) -- container =bag or backpack ID
    doAddContainerItem(Container, 2148, 50) -- item
    doAddContainerItem(Container, 1294, 5) -- item
    doAddContainerItem(Container, 2111, 4) -- item
    doAddContainerItem(Container, 2642, 1) -- item
    doAddContainerItem(Container, 2563, 1) -- item
    setPlayerStorageValue(cid,2010,1) -- sets storage value up 1
else
    doPlayerSendTextMessage(cid,22,"It is empty.")
end
-- Katana_Quest
elseif item.uid == 2011 then -- the unique id of chest
queststatus = getPlayerStorageValue(cid,2011) --storage value, keep at chests unique id
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a viking helmet.") --Massage when open
doPlayerAddItem(cid,2473,1) -- item
setPlayerStorageValue(cid,2011,1) -- sets storage value up 1
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 2012 then -- the unique id of chest
queststatus = getPlayerStorageValue(cid,2012) --storage value, keep at chests unique id
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a katana.") --Massage when open
doPlayerAddItem(cid,2412,1) -- item
setPlayerStorageValue(cid,2012,1) -- sets storage value up 1
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
-- Minotaur Hell Quest
elseif item.uid == 2013 then -- the unique id of chest
queststatus = getPlayerStorageValue(cid,2013) --storage value, keep at chests unique id
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a carlin sword.") --Massage when open
doPlayerAddItem(cid,2395,1) -- item
setPlayerStorageValue(cid,2013,1) -- sets storage value up 1
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 2014 then -- the unique id of chest
queststatus = getPlayerStorageValue(cid,2014) --storage value, keep at chests unique id
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a fishing rod.") --Massage when open
doPlayerAddItem(cid,2580,1) -- item
setPlayerStorageValue(cid,2014,1) -- sets storage value up 1
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 2015 then -- the unique id of chest
    queststatus = getPlayerStorageValue(cid,2015) --storage value, keep at chests unique id
if queststatus == -1 then -- checks if quest is done
    doPlayerSendTextMessage(cid,22,"You have found a bag")  --Massage when open
    Container = doPlayerAddItem(cid, 1987, 1) -- container =bag or backpack ID
    doAddContainerItem(Container, 2545, 4) -- item
    doAddContainerItem(Container, 2544, 10) -- item
    setPlayerStorageValue(cid,2015,1) -- sets storage value up 1
else
    doPlayerSendTextMessage(cid,22,"It is empty.")
end
-- Rapier Quest
elseif item.uid == 2016 then -- the unique id of chest
queststatus = getPlayerStorageValue(cid,2016) --storage value, keep at chests unique id
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a rapier.") --Massage when open
doPlayerAddItem(cid,2384,1) -- item
setPlayerStorageValue(cid,2016,1) -- sets storage value up 1
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
-- Torch Quest
elseif item.uid == 2017 then -- the unique id of chest
queststatus = getPlayerStorageValue(cid,2017) --storage value, keep at chests unique id
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a torch.") --Massage when open
doPlayerAddItem(cid,2050,1) -- item
setPlayerStorageValue(cid,2017,1) -- sets storage value up 1
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 2018 then -- the unique id of chest
    queststatus = getPlayerStorageValue(cid,2018) --storage value, keep at chests unique id
if queststatus == -1 then -- checks if quest is done
    doPlayerSendTextMessage(cid,22,"You have found a backpack")  --Massage when open
    Container = doPlayerAddItem(cid, 1988, 1) -- container =bag or backpack ID
    doAddContainerItem(Container, 1990, 1) -- item
    doAddContainerItem(Container, 2014, 1) -- item
	doAddContainerItem(Container, 2035, 1) -- item
	doAddContainerItem(Container, 2013, 1) -- item
    setPlayerStorageValue(cid,2018,1) -- sets storage value up 1
else
    doPlayerSendTextMessage(cid,22,"It is empty.")
end
return 1
end
end
 
Last edited:
I don't think that has anything to do with your script, I've noticed that as well, but I think Tala and the rest of his guys will have to fix that small problem... I don't think you can prevent that with a lua script.

So there's nothing wrong with your script! ;)
 
Ya, it's something that got changed in 0.2.12-13. Don't worry, they will probably fix it. And it's nothing critical anyway.
 
im doing a other file with 2000 lines of script i dont want that to be bugged :p thats why i post it here.
thanks for your words Empty

remove thread or close thread thanks
 
Status
Not open for further replies.
Back
Top