Nottinghster
Tibia World RPG Developer
- Joined
- Oct 24, 2007
- Messages
- 1,618
- Solutions
- 6
- Reaction score
- 537
- Location
- Brazil - Rio de Janeiro
- GitHub
- Nottinghster
Hello OTLanders!
I was with nothing to do and decided to create a simple script, but useful, I created in about 3 minutes.
Enjoy it ;]
I was with nothing to do and decided to create a simple script, but useful, I created in about 3 minutes.
Code:
-- Quest System by Rodrigo (Nottinghster)
function onUse(cid, item, frompos, item2, topos)
config = {
number_code = 123
queststatus = getPlayerStorageValue(cid,number_code),
itemWeight = getItemWeightByID(item_weight_id, 1),
playerCap = getPlayerFreeCap(cid),
item_weight_id = 123
item_gain = '', -- item name here
container = '', -- container name here
}
if item.uid == config.number_code then
if config.queststatus == -1 and getPlayerAccess(cid) == 0 then
if config.playerCap >= config.itemWeight then
doPlayerSendTextMessage(cid,22,'You have found a ' .. config.item_gain .. '.')
--[[ YOUR CODE HERE ]]--
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. config.item_gain .. ' weighing ' .. config.itemWeight .. '.oz it\'s too heavy.')
end
else
doPlayerSendTextMessage(cid,22,"The ".. config.container .." is empty.")
end
else
return FALSE
end
return TRUE
end
Enjoy it ;]