Hello,
I've been trying to make a quest involving a NPC.
The NPC is asking to bring him an item from somewhere but the player can take the item only once and if he accepted the mission from the NPC.
What I don't know is how to add a secondary Storage so the player won't be able to pick the item more than once and still check if the player has accepted the mission from the NPC.
Now I need to add in the script Storage 8949 so the player can take the item only once regardless of the Storage 8950 which gives the ability to take the item.
Posting errors I think isn't needed because I had many different errors while trying to add another storage in the script.
If it's needed:
I've been trying to make a quest involving a NPC.
The NPC is asking to bring him an item from somewhere but the player can take the item only once and if he accepted the mission from the NPC.
What I don't know is how to add a secondary Storage so the player won't be able to pick the item more than once and still check if the player has accepted the mission from the NPC.
Code:
function onUse(cid, item, frompos, item2, topos)
if (getPlayerStorageValue(cid, 8950) == 1) then
if doPlayerAddItem(cid, 192, 1) then
doSendMagicEffect(getPlayerPosition(cid), 34)
doCreatureSay(cid, "There isn't really much left but this ring. Bring it back to Monica.", TALKTYPE_ORANGE_1, cid)
end
else
doSendMagicEffect(getPlayerPosition(cid), 2)
doCreatureSay(cid, "There is nothing left.", TALKTYPE_ORANGE_1, cid)
end
return TRUE
end
Posting errors I think isn't needed because I had many different errors while trying to add another storage in the script.
If it's needed:
Code:
The Forgotten Server, version 0.3.6 (Crying Damson)
Last edited: