xYzPrototype
Just a standard member
Hello,
I am new to coding so please be nice
So this is a really simple one, but i cannot see what is wrong with this script. Basically, i want this quest to give 50 experience to the player as well as the reward item. I have the following script and i don't know why the exp part isn't working. The script isn't throwing up any errors and it still gives the item as intended.
EDIT: The exp does work it just doesn't come up with the experience as if you killed a monster, does anybody know how to show the experience come up on use?
I am new to coding so please be nice
So this is a really simple one, but i cannot see what is wrong with this script. Basically, i want this quest to give 50 experience to the player as well as the reward item. I have the following script and i don't know why the exp part isn't working. The script isn't throwing up any errors and it still gives the item as intended.
EDIT: The exp does work it just doesn't come up with the experience as if you killed a monster, does anybody know how to show the experience come up on use?
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if player:getStorageValue(1000) == 1 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'The loose board is empty.')
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have found a doublet.')
player:addItem(2485, 1)
player:addExperience(50)
player:setStorageValue(1000, 1)
end
return true
end