Thorn
Spriting since 2013
Hello guys, i have been trying to do a quest that you can choose between 5 chest, you can only choose one, you know, this type of quest, but i cant get it to work!!
this is what i have so far
plz guys help me here, i use otx 2.52
CONSOLE
this is what i have so far
plz guys help me here, i use otx 2.52
Code:
<action uniqueid="23450" script="Quests/rareprestigeweapons.lua" />
<action uniqueid="23450" script="Quests/rareprestigeweapons.lua" />
<action uniqueid="23450" script="Quests/rareprestigeweapons.lua" />
<action uniqueid="23450" script="Quests/rareprestigeweapons.lua" />
<action uniqueid="23450" script="Quests/rareprestigeweapons.lua" />
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 23450 then
queststatus = getPlayerStorageValue(cid,20970)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Rare Prestige Sword.")
doPlayerAddItem(cid,20970,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 23450 then
queststatus = getPlayerStorageValue(cid,20902)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Rare Prestige Axe.")
doPlayerAddItem(cid,20902,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 23450 then
queststatus = getPlayerStorageValue(cid,20915)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Rare Prestige Hammer.")
doPlayerAddItem(cid,20915,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 23450 then
queststatus = getPlayerStorageValue(cid,21035)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Rare Prestige Spear.")
doPlayerAddItem(cid,21035,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 23450 then
queststatus = getPlayerStorageValue(cid,21160)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Rare Prestige Magic Staff.")
doPlayerAddItem(cid,21160,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
end
return 1
end
CONSOLE
Code:
[19/11/2016 20:32:56] [Warning - Actions::registerEvent] Duplicate registered item uid: 23450
[19/11/2016 20:32:56] [Warning - Actions::registerEvent] Duplicate registered item uid: 23450
[19/11/2016 20:32:56] [Warning - Actions::registerEvent] Duplicate registered item uid: 23450
[19/11/2016 20:32:56] [Warning - Actions::registerEvent] Duplicate registered item uid: 23450