enum CreatureEventType_t
{
CREATURE_EVENT_NONE,
CREATURE_EVENT_LOGIN,
CREATURE_EVENT_LOGOUT,
CREATURE_EVENT_THINK,
CREATURE_EVENT_PREPAREDEATH,
CREATURE_EVENT_DEATH,
CREATURE_EVENT_KILL
};
Then I don't think it's possible just yet, Not without 4220Niller's onAdvance function, that isn't working with newer TFS.
Can anyone give me the script please ^_^
You advanced from Level %d to Level %d.", prevLevel, newLevel);
sendTextMessage(MSG_EVENT_ADVANCE, levelMsg);
if(newLevel == 300){
char bc[70];
sprintf(bc, "New LEVEL %d !!! You advanced from Level %d to Level %d.", newLevel, prevLevel, newLevel);
Player* player = getPlayer();
g_game.playerBroadcastMessage(player, bc);}
if(!player->hasFlag(PlayerFlag_CanBroadcast))
return false;
playername = getCreatureName(cid)
if isPlayer(cid) == TRUE then
if getPlayerLevel(cid) == 100 then
broadcastMessage("..playername.." just reached level 100, MESSAGE_STATUS_WARNING)
function onAdvance(cid, skill, oldlevel, newlevel)
if newlevel == 100 then
doPlayerBroadcastMessage(cid, ".. getCreatureName(cid) .. has reached level 100, congratulations!")
elseif newlevel == 200 then
doPlayerBroadcastMessage(cid, ".. getCreatureName(cid) .. has reached level 200, congratulations!")
elseif newlevel == 300 then
doPlayerBroadcastMessage(cid, ".. getCreatureName(cid) .. has reached level 300, congratulations!")
end
return TRUE
end
function onAdvance(cid, skill, oldlevel, newlevel)
if newlevel == 100 or newlevel == 200 or newlevel == 300 then
broadcastMessage(getCreatureName(cid) .. " has reached level " .. newlevel .. ", congratulations!")
end
return TRUE
end
little fix & edit
Code:function onAdvance(cid, skill, oldlevel, newlevel) if newlevel == 100 or newlevel == 200 or newlevel == 300 then broadcastMessage(getCreatureName(cid) .. " has reached level " .. newlevel .. ", congratulations!") end return TRUE end
That scripts goes in data/creaturescripts/advances/level.lua.. right?