Mariuskens
Sword Art Online 2D-MMORPG
msg in console here->
[Error - CreatureEvent::configureEvent] No valid type for creature event.levelreward
[20/09/2012 11:33:08] [Warning - BaseEvents::loadFromXml] Cannot configure an event
my script
function onAdvance(cid, skill, oldlevel, newlevel)
if(skill == SKILL__LEVEL and getPlayerStorageValue(cid, 41025) ~= 1 and newlevel >= 200) then
setPlayerStorageValue(cid, 41025, 1)
doPlayerAddItem(cid, 2160, 100)
doPlayerAddItem(cid, 8982, 1)
doCreatureSay(cid, "Congratulations " .. getCreatureName(cid) .. ", you have reached level 200, you will now be rewarded 100 crystal coins. Enjoy your hunting!", TALKTYPE_ORANGE_1)
elseif(skill == SKILL__LEVEL and getPlayerStorageValue(cid, 41022) ~= 1 and newlevel >= 50) then
setPlayerStorageValue(cid, 41022, 1)
doPlayerAddItem(cid, 2160, 10)
doPlayerAddItem(cid, 8982, 1)
doCreatureSay(cid, "Congratulations " .. getCreatureName(cid) .. ", you have reached level 50, you will now be rewarded with some money. Enjoy your hunting!", TALKTYPE_ORANGE_1)
elseif(skill == SKILL__LEVEL and getPlayerStorageValue(cid, 41023) ~= 1 and newlevel >= 100) then
setPlayerStorageValue(cid, 41022, 1)
doPlayerAddItem(cid, 2160, 100)
doPlayerAddItem(cid, 8982, 1)
doCreatureSay(cid, "Congratulations " .. getCreatureName(cid) .. ", you have reached level 100, you will now be rewarded with items. Enjoy your hunting!", TALKTYPE_ORANGE_1)
elseif(skill == SKILL__LEVEL and getPlayerStorageValue(cid, 41024) ~= 1 and newlevel >= 250) then
setPlayerStorageValue(cid, 41022, 1)
doPlayerAddItem(cid, 9020, 1)
doPlayerAddItem(cid, 2504, 1)
doCreatureSay(cid, "Congratulations " .. getCreatureName(cid) .. ", you have reached level 250, you will now be rewarded with items. Enjoy your hunting!", TALKTYPE_ORANGE_1)
elseif(skill == SKILL__LEVEL and getPlayerStorageValue(cid, 41026) ~= 1 and newlevel >= 300) then
setPlayerStorageValue(cid, 41022, 1)
doPlayerAddItem(cid, 2523, 1)
doPlayerAddItem(cid, 2640, 1)
doCreatureSay(cid, "Congratulations " .. getCreatureName(cid) .. ", you have reached level 300, you will now be rewarded with vip items. Enjoy your hunting!", TALKTYPE_ORANGE_1)
elseif(skill == SKILL__LEVEL and getPlayerStorageValue(cid, 41027) ~= 1 and newlevel >= 350) then
setPlayerStorageValue(cid, 41022, 1)
doPlayerAddItem(cid, 2640, 10)
doPlayerAddItem(cid, 9020, 10)
doCreatureSay(cid, "Congratulations " .. getCreatureName(cid) .. ", you have reached level 350, you will now be rewarded with vip items. Enjoy your hunting!", TALKTYPE_ORANGE_1)
end
return true
end
[Error - CreatureEvent::configureEvent] No valid type for creature event.levelreward
[20/09/2012 11:33:08] [Warning - BaseEvents::loadFromXml] Cannot configure an event
my script
function onAdvance(cid, skill, oldlevel, newlevel)
if(skill == SKILL__LEVEL and getPlayerStorageValue(cid, 41025) ~= 1 and newlevel >= 200) then
setPlayerStorageValue(cid, 41025, 1)
doPlayerAddItem(cid, 2160, 100)
doPlayerAddItem(cid, 8982, 1)
doCreatureSay(cid, "Congratulations " .. getCreatureName(cid) .. ", you have reached level 200, you will now be rewarded 100 crystal coins. Enjoy your hunting!", TALKTYPE_ORANGE_1)
elseif(skill == SKILL__LEVEL and getPlayerStorageValue(cid, 41022) ~= 1 and newlevel >= 50) then
setPlayerStorageValue(cid, 41022, 1)
doPlayerAddItem(cid, 2160, 10)
doPlayerAddItem(cid, 8982, 1)
doCreatureSay(cid, "Congratulations " .. getCreatureName(cid) .. ", you have reached level 50, you will now be rewarded with some money. Enjoy your hunting!", TALKTYPE_ORANGE_1)
elseif(skill == SKILL__LEVEL and getPlayerStorageValue(cid, 41023) ~= 1 and newlevel >= 100) then
setPlayerStorageValue(cid, 41022, 1)
doPlayerAddItem(cid, 2160, 100)
doPlayerAddItem(cid, 8982, 1)
doCreatureSay(cid, "Congratulations " .. getCreatureName(cid) .. ", you have reached level 100, you will now be rewarded with items. Enjoy your hunting!", TALKTYPE_ORANGE_1)
elseif(skill == SKILL__LEVEL and getPlayerStorageValue(cid, 41024) ~= 1 and newlevel >= 250) then
setPlayerStorageValue(cid, 41022, 1)
doPlayerAddItem(cid, 9020, 1)
doPlayerAddItem(cid, 2504, 1)
doCreatureSay(cid, "Congratulations " .. getCreatureName(cid) .. ", you have reached level 250, you will now be rewarded with items. Enjoy your hunting!", TALKTYPE_ORANGE_1)
elseif(skill == SKILL__LEVEL and getPlayerStorageValue(cid, 41026) ~= 1 and newlevel >= 300) then
setPlayerStorageValue(cid, 41022, 1)
doPlayerAddItem(cid, 2523, 1)
doPlayerAddItem(cid, 2640, 1)
doCreatureSay(cid, "Congratulations " .. getCreatureName(cid) .. ", you have reached level 300, you will now be rewarded with vip items. Enjoy your hunting!", TALKTYPE_ORANGE_1)
elseif(skill == SKILL__LEVEL and getPlayerStorageValue(cid, 41027) ~= 1 and newlevel >= 350) then
setPlayerStorageValue(cid, 41022, 1)
doPlayerAddItem(cid, 2640, 10)
doPlayerAddItem(cid, 9020, 10)
doCreatureSay(cid, "Congratulations " .. getCreatureName(cid) .. ", you have reached level 350, you will now be rewarded with vip items. Enjoy your hunting!", TALKTYPE_ORANGE_1)
end
return true
end