Caduceus
Unknown Member
- Joined
- May 10, 2010
- Messages
- 321
- Solutions
- 2
- Reaction score
- 24
Server Version: TFS 1.2
Script is sending the 'msg', setting my storage value to 3, but not giving the items. I am getting no errors to go on.
script
Script is sending the 'msg', setting my storage value to 3, but not giving the items. I am getting no errors to go on.
script
Code:
local storage = 45552
local vocations = {
[1] = {items = {2662, 2653, 5918}},
[2] = {items = {2662, 2653, 5918}},
[3] = {items = {2458, 2464, 2648}},
[4] = {items = {2457, 2463, 2647}},
[9] = {items = {2457, 2463, 2647}}
}
local msg = ''
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if player:getStorageValue(storage) == 2 then
local vocId = vocations[player:getVocation():getBase():getId()]
player:addItem(vocId.items)
msg = "You have found some useful gear!"
player:setStorageValue(storage, 3)
else
msg = "chest appears to be locked."
print (item)
end
player:sendTextMessage(MESSAGE_INFO_DESCR, msg)
return true
end