Guerra
Member
Hello guys,
I would like to ask for help to modify a script of mine. My system is simple, but it has some peculiarities. It is a normal quest reward, but the name of the quester is recorded on the item.
What I would like to do:
1º add to the script the option to choose whether the prize the player will receive is item, outfit, mount or experience.
2º and that I can choose different prizes for each vocation of my server.
Below I will post the script that I use, so if anyone can help me modify it I appreciate it very much.
I would like to ask for help to modify a script of mine. My system is simple, but it has some peculiarities. It is a normal quest reward, but the name of the quester is recorded on the item.
What I would like to do:
1º add to the script the option to choose whether the prize the player will receive is item, outfit, mount or experience.
2º and that I can choose different prizes for each vocation of my server.
Below I will post the script that I use, so if anyone can help me modify it I appreciate it very much.
Lua:function onUse(player, item, fromPosition, target, toPosition, isHotkey) local queststatus = player:getStorageValue(30049) if queststatus == -1 then player:sendTextMessage(MESSAGE_INFO_DESCR, "Parabens, voce achou um tesouro.") local quest = player:addItem(31432, 1) quest:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "Esse item foi obtido por "..player:getName()..".") player:setStorageValue(30049, 1) else player:sendTextMessage(MESSAGE_INFO_DESCR, "Voce ja pegou seu premio.") end return true end