• 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.

CreatureEvent Skill UP message!

im using Roxor 8.42 By Liemannen V.03


Please help me plx

[19/06/2009 19:32:21] Error: [CreatureEvent::configureEvent] No valid type for creature event.Playeradvance
[19/06/2009 19:32:21] Warning: [BaseEvents::loadFromXml] Can not configure event


here is my login.lua



function onLogin(cid)
setPlayerStorageValue(cid,29061,1)
registerCreatureEvent(cid, "DeathBroadcast")
--registerCreatureEvent(cid, "inquisitionPortals")
registerCreatureEvent(cid, "PlayerDeath")
registerCreatureEvent(cid, "PlayerKill")
registerCreatureEvent(cid, "up_skill")
registerCreatureEvent(cid, "Playeradvance")
registerCreatureEvent(cid, "advance")
registerCreatureEvent(cid, "KilledMonstersCounter")
return TRUE

if (InitArenaScript ~= 0) then
InitArenaScript = 1
-- make arena rooms free
for i = 42300, 42309 do
setGlobalStorageValue(i, 0)
setGlobalStorageValue(i+100, 0)
end
end
for i = 1, 3 do
if getPlayerStorageValue(cid, 42300 + i * 10 - 1) < 1 then
for j = 0, 9 do
setPlayerStorageValue(cid, 42290 + i * 10 + j, 0)
end
end
end
if getPlayerStorageValue(cid, 42355) == -1 then
setPlayerStorageValue(cid, 42355, 0) -- did not arena level
end
setPlayerStorageValue(cid, 42350, 0) -- time to kick 0
setPlayerStorageValue(cid, 42352, 0) -- is not in arena


return TRUE
end
 
Last edited:
rofl@some coding here

sorry for this, but W T F is this crap?

PHP:
 for type, variable in pairs(config) do
        if skill == type then
            doCreatureSay(cid, ""..variable[1].." ["..newlevel.."]", TALKTYPE_ORANGE_1)
??????? man i dont beleive you scripted this because if you know how to script, as it seems u do when u are able to use tables and loops, u should know that u dont need any loop for that.........

everyone, replace code above with:

PHP:
	doCreatureSay(cid, config[skill][1] .. " ["..newlevel.."]", TALKTYPE_ORANGE_1)
 
Last edited:
Could anyone change the magic effect to something cooler ?.
With holy animations please :p

I sux at this
 
is it possible to turn off the advance message and add this one (without effect) to tfs 0.3.5pl1??:huh:

please answer...:thumbup:
 
Could anyone change the magic effect to something cooler ?.
With holy animations please :p

I sux at this

Lua:
-Script made by Pitufo/Haifurer!
local config = {
    [0] = { "Fist skill UP", 30}, -- [B]30[/B] = variable[2]  -- Animation effect
    [1] = { "Club skill UP", 30}, -- [B]30[/B] = variable[2]  -- Animation effect
    [2] = { "Sword skill UP", 30}, -- [B]30[/B] = variable[2]  -- Animation effect
    [3] = { "Axe skill UP", 30}, -- [B]30[/B] = variable[2]  -- Animation effect
    [4] = { "Distance skill UP", 30}, -- [B]30[/B] = variable[2]  -- Animation effect
    [5] = { "Shield skill UP", 30}, -- [B]30[/B] = variable[2]  -- Animation effect
    [6] = { "Fishing skill UP", 30}, -- [B]30[/B] = variable[2]  -- Animation effect
    [7] = { "Magic level UP", 30}, -- [B]30[/B] = variable[2]  -- Animation effect
    [8] = { "Level UP", 30} -- [B]30[/B] = variable[2]  -- Animation effect
}
function onAdvance(cid, skill, oldlevel, newlevel)
local pos = getPlayerPosition(cid)
local positions = {
        {x=pos.x+1,y=pos.y-1,z=pos.z},
        {x=pos.x-1,y=pos.y-1,z=pos.z},
        {x=pos.x+1,y=pos.y+1,z=pos.z},
        {x=pos.x-1,y=pos.y+1,z=pos.z},
        {x=pos.x+1,y=pos.y,z=pos.z},
        {x=pos.x-1,y=pos.y,z=pos.z},
        {x=pos.x,y=pos.y+1,z=pos.z},
        {x=pos.x,y=pos.y-1,z=pos.z}}
        
    for type, variable in pairs(config) do
        if skill == type then
            doCreatureSay(cid, ""..variable[1].." ["..newlevel.."]", TALKTYPE_ORANGE_1)
            for i = 1, table.maxn(positions) do
                    doSendMagicEffect(positions[i],variable[2])
            end

            
        end
    end    
return TRUE
end
\change the 30's to what effect you want
 
Back
Top