Ziggy
Member
- Joined
- Aug 11, 2007
- Messages
- 49
- Reaction score
- 6
alright here is my script
It is adding the item but is not setting it to have the action id of 1042, the key id is 2089 by the way, the script (I found this script and just edited it) had "key" in place of that but it didnt seem to work so I switched it to the ID of the key
here is the error code im getting
In this script it doesnt seem to change the player storage value right away, I made the quest last night and it wouldnt change the storage value, it stayed at 1 forever, but the next day (today) for all three characters the storage value was 2, so it happened overnight?
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local key = doPlayerAddItem(cid, 2089, 1)
if item.uid == 20013 then
if getPlayerStorageValue(cid, 20013) == 1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You have found the copper key to the mines, congratulations.")
doPlayerAddItem(cid, key, 1)
doSetItemActionId(2089, 1042)
setPlayerStorageValue(cid, 20013, 2)
else
doPlayerSendTextMessage(cid,25,"The chest is empty.")
end
end
end
It is adding the item but is not setting it to have the action id of 1042, the key id is 2089 by the way, the script (I found this script and just edited it) had "key" in place of that but it didnt seem to work so I switched it to the ID of the key
here is the error code im getting
Code:
[19/12/2010 17:05:46] [Error - Action Interface]
[19/12/2010 17:05:46] data/actions/scripts/quests/copperkey.lua:onUse
[19/12/2010 17:05:46] Description:
[19/12/2010 17:05:46] data/actions/scripts/quests/copperkey.lua:7: attempt to call global 'doSetItemActionId' (a nil value)
[19/12/2010 17:05:46] stack traceback:
[19/12/2010 17:05:46] data/actions/scripts/quests/copperkey.lua:7: in function <data/actions/scripts/quests/copperkey.lua:1>
In this script it doesnt seem to change the player storage value right away, I made the quest last night and it wouldnt change the storage value, it stayed at 1 forever, but the next day (today) for all three characters the storage value was 2, so it happened overnight?
Last edited: