This might be basic one
But This is my first tutorial
Wish you like it
Example: You Reach level 50 You get 50 crystal coin
Data-->Creaturescript-->Scripts
Add new file and call it getmoney.lua
And add this in it
Now Go to Creaturescripts.xml
And add this
Rep+ if i helped you
But This is my first tutorial
Wish you like it
Example: You Reach level 50 You get 50 crystal coin
Data-->Creaturescript-->Scripts
Add new file and call it getmoney.lua
And add this in it
Code:
local config = {
levelReach = 50,
item = 2160,
count = 50
}
function onAdvance(cid, skill, oldLevel, newLevel)
if(skill == SKILL__LEVEL and newLevel >= config.levelReach and getPlayerStorageValue(cid, 58557) == -1) then
setPlayerStorageValue(cid, 58557, 1)
doPlayerAddItem(cid, config.item, config.count)
end
return TRUE
end
Now Go to Creaturescripts.xml
And add this
Code:
<event type="advance" name="getmoney" event="script" value="getmoney.lua"/>