Santy
Member
- Joined
- Aug 14, 2007
- Messages
- 654
- Reaction score
- 22
This is a quest that if you use an item on a certain pos, you will get another item! :O.. Btw u can only do it once..
Code:
function onUse(cid, item, frompos, item2, topos)
playapos = {x=1000, y=1000, z=7}
playapoz = getPlayerPosition(cid)
prize = item.uid
queststatus = getPlayerStorageValue(cid,prize)
if item.itemid == 2193 then
if playapoz == playapos then
if queststatus == -1 then
doPlayerAddItem(cid,2354,1)
doPlayerSendTextMessage(cid,22,"The gods have given you this precious gift.")
doRemoveItem(item.uid,1)
setPlayerStorageValue(cid,prize,1)
else
doPlayerSendCancel(cid,"You already got your gift.")
end
else
doPlayerSendCancel(cid,"You are not in the correct place.")
end
return 1
else
return 0
end
end