Blorin Mage
Member
- Joined
- Jan 26, 2012
- Messages
- 90
- Reaction score
- 13
1) go to your creaturescripts\scripts and create Vocationreward.lua
level to take the reward is 45
to change the reward level change this
to change the reward change this
for example
2) go to login.lua and after
add this
3) go to creaturescripts.xml add this
level to take the reward is 45
to change the reward level change this
Lua:
newlevel >= 45
Lua:
doPlayerAddItem(cid, itemid, count)
Lua:
doPlayerAddItem(cid, 2160, 5)
Lua:
function onAdvance(cid, skill, oldlevel, newlevel)
if(getPlayerStorageValue(cid, 99963) ~= 1 and skill == SKILL__LEVEL and newlevel >= 45) then
if isSorcerer(cid) then
doPlayerAddItem(cid, 2160, 5)
elseif isDruid(cid) then
doPlayerAddItem(cid, 2160, 10)
elseif isPaladin(cid) then
doPlayerAddItem(cid, 2160, 15)
elseif isKnight(cid) then
doPlayerAddItem(cid, 2160, 20)
end
setPlayerStorageValue(cid, 99963, 1)
doPlayerSendTextMessage(cid, 22, "Congratulations For Receving Your Vocation's Reward!")
end
return true
end
Lua:
registerCreatureEvent(cid, "ReportBug")
Lua:
registerCreatureEvent(cid, "Vocationreward")
3) go to creaturescripts.xml add this
XML:
<event type="advance" name="Vocationreward" event="script" value="Vocationreward.lua"/>
Last edited: