Matheus Vieira
Member
- Joined
- Apr 11, 2015
- Messages
- 102
- Reaction score
- 6
0.4
Mah Dudes, Im here to ask for a little help. I have a simple quest script, where the player right-click on the chest and gain their items. What im asking for is for the script to tell the player to remove all of his items before clicking on the chest.
So, the script have to identify all of his equipment (not the backpack) and if he is wearing something (weapon, ring, necklace, armor, anything) to tell him to remove before trying to open the chest.
Mah Dudes, Im here to ask for a little help. I have a simple quest script, where the player right-click on the chest and gain their items. What im asking for is for the script to tell the player to remove all of his items before clicking on the chest.
So, the script have to identify all of his equipment (not the backpack) and if he is wearing something (weapon, ring, necklace, armor, anything) to tell him to remove before trying to open the chest.
C++:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 37179 then
queststatus = getPlayerStorageValue(cid,37179)
if queststatus == -1 or queststatus == 0 then
doPlayerSendTextMessage(cid,22,"")
item_uid = doPlayerAddItem(cid,12852,1)
setPlayerStorageValue(cid,37179,1)
else
doPlayerSendTextMessage(cid,22,"its empty.")
end
else
return 0
end
return 1
end