• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

[Request] BROADCAST ADVANCE LEVEL!

Go to Creaturescripts, create level100.lua
Add:
Code:
function onAdvance(cid, skill, oldlevel, newlevel)
    local name = getCreatureName(cid)
    if skill == SKILL_LEVEL and oldlevel < 100 and newlevel > 99 then
       doBroadcastMessage("Congratulations " .. name .. " on level 100!", MESSAGE_STATUS_CONSOLE_RED)
    end
return TRUE
end

Next open login.lua
Add:
Code:
registerCreatureEvent(cid, "Level100")

Finally, go to creaturescripts.xml
Add:
Code:
<event type="advance" name="Level100" script="level100.lua"/>
Tested and working.
 
Last edited:
Here, 100% working. :)

Go to Creaturescripts, create level100.lua
Add:
Code:
function onAdvance(cid, skill, oldlevel, newlevel)
    local name = getCreatureName(cid)
    if skill == SKILL_LEVEL and oldlevel < 100 and newlevel > 99 then
       doBroadcastMessage("Congratulations " .. name .. " on level 100!", MESSAGE_STATUS_CONSOLE_RED)
    end
return TRUE
end

Next open login.lua
Add:
Code:
registerCreatureEvent(cid, "Level100")

Finally, go to creaturescripts.xml
Add:
Code:
<event type="advance" name="Level100" script="level100.lua"/>
 
Last edited:
Back
Top