Darkstox
Been Blazing
- Joined
- Sep 26, 2008
- Messages
- 37
- Reaction score
- 2
Exactly what the title says... here is my scripts this is for behe quest, every thing works except the bag part..
Here is the script...
here is whats i have in actions.xml
And this is the error i get in console when i try collecting the bag.
Here is the script...
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.uid == 2222) then
if(getPlayerStorageValue(cid, 315) < 1) then
setPlayerStorageValue(cid, 315, 1)
doPlayerAddItem(cid, 2520, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a demon shield.")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.")
end
elseif(item.uid == 2221) then
if(getPlayerStorageValue(cid, 316) < 1) then
setPlayerStorageValue(cid, 316, 1)
doPlayerAddItem(cid, 2466, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a golden armor.")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.")
end
elseif(item.uid == 2223) then
if(getPlayerStorageValue(cid, 318) < 1) then
setPlayerStorageValue(cid, 318, 1)
doPlayerAddItem(cid, 2427, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a guardian halberd.")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.")
end
elseif(item.uid == 2220) then
if(getPlayerStorageValue(cid, 317) < 1) then
setPlayerStorageValue(cid, 317, 1)
bag = doPlayerAddItem(cid, 1987, 1)
doAddContainerItem(bag.uid, 2171, 1)
doAddContainerItem(bag.uid, 2168, 1)
doAddContainerItem(bag.uid, 2124, 1)
doAddContainerItem(bag.uid, 2145, 3)
doAddContainerItem(bag.uid, 2146, 4)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a bag.")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.")
end
end
return true
end
here is whats i have in actions.xml
Code:
<action uniqueid="2220" script="behemoth quest/behemothQuestRewards.lua"/>
<action uniqueid="2221" script="behemoth quest/behemothQuestRewards.lua"/>
<action uniqueid="2222" script="behemoth quest/behemothQuestRewards.lua"/>
<action uniqueid="2223" script="behemoth quest/behemothQuestRewards.lua"/>
And this is the error i get in console when i try collecting the bag.