perfection
FATAL DAMAGE
- Joined
- Aug 27, 2011
- Messages
- 196
- Reaction score
- 8
Lua:
-- Scripted by Perfection --
local item1 = XXXX -- Id of First Item
local item2 = XXXX -- Id of Second Item
local item3 = XXXX -- Id of Third Item
function onAdvance(cid, skill, oldLevel, newLevel)
if getPlayerStorageValue(cid, 99963) ~= 1 and getPlayerLevel(cid) >= 600 then
doPlayerAddItem(cid, item1)
setPlayerStorageValue(cid, 99963, 1)
doPlayerSendTextMessage(cid,22,"YOU RECIEVED "..getItemNameById(item1).." FOR REACHING LVL 600")
return 1
end
if getPlayerStorageValue(cid, 99962) ~= 2 and getPlayerLevel(cid) >= 800 then
doPlayerAddItem(cid, item2)
setPlayerStorageValue(cid, 99962, 2)
doPlayerSendTextMessage(cid,22,"YOU RECIEVED "..getItemNameById(item2).." FOR REACHING LVL 800")
return 1
end
if getPlayerStorageValue(cid, 99961) ~= 3 and getPlayerLevel(cid) >= 1000 then
doPlayerAddItem(cid, item3)
setPlayerStorageValue(cid, 99961, 3)
doPlayerSendTextMessage(cid,22,"YOU RECIEVED "..getItemNameById(item3).." FOR REACHING LVL 1000")
return 1
end
return TRUE
end
in creaturescripts.xml
XML:
<event type="advance" name="Reward" event="script" value="Reward.lua"/>
in login.lua add
Lua:
registerCreatureEvent(cid, "Reward")
i hope u like this better than my noob 5 line scripts
Last edited: