- Joined
- Jun 19, 2009
- Messages
- 1,852
- Reaction score
- 5
Hello. I am doing arenas, and instead of having weapons as rewards, I want to make two statues... one of them giving 500 levels and the other statue will give 5 skills (depending on the vocation) but something is wrong;
data/actions/scripts/arenareward.lua
actions.xml:
And I've made the statue's unique ID 42361...
data/actions/scripts/arenareward.lua
PHP:
function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) >= 5000 and getPlayerLevel(cid) <= 5001 then
doPlayerAddExp(cid, getExperienceForLevel(getPlayerLevel(cid)+500)-(getPlayerExperience(cid)))
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE)
doPlayerSendTextMessage(cid, 22, "You recieved 500 levels!")
doRemoveItem(item.uid,1)
doCreatureSay(cid, "You have gained 500 levels and have now reached level ".. getPlayerLevel(cid) .."! Relog to save your character", TALKTYPE_ORANGE_1)
else
doSendCancel(cid "Only players above level 5000 or below level 5001 can receive this arenareward.")
end
end
actions.xml:
PHP:
<action uniqueid="42361" event="script" value="quests/arenareward.lua"/>
And I've made the statue's unique ID 42361...