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

[28/01/2009 19:24:23] Error: [CreatureEvent::configureEvent] No valid type for creature event.advance
[28/01/2009 19:24:23] Warning: [BaseEvents::loadFromXml] Can not configure event

please help
 
Yes, it works.
Replace data/creaturescripts/login.lua with:
PHP:
function onLogin(cid)
	registerCreatureEvent(cid, "PlayerDeath")
	registerCreatureEvent(cid, "PlayerAdvance")
	return TRUE
end
 
0.o I added and still nothing happenz when I advance :/ very strange

edit: seems that Ive got problems with login.lua :|
 
Last edited:
yeah doesnt work here too
using tfs 0.3 beta 2
i did everything right ive used many scripts before
but im thinking somethings wrong with this version becouse my inquisition quest which ws working on alpha 4 doesnt work on beta 2 i think none of the creaturescripts r working this is bs
 
shouldnt it be
Code:
  registerCreatureEvent(cid, "advance")
in login.lua?


edit: Its working with "advance" in login :P
 
Last edited:
hahaaaaaa works
man you rock xD
bro my inquisition quest isnt workin do u kno why? it used to work on alpha 4

function onLogin(cid)
registerCreatureEvent(cid, "Inquisition")
registerCreatureEvent(cid, "PlayerDeath")
registerCreatureEvent(cid, "advance")
return TRUE
end
 
Well you can do something like that:
Code:
--Script made by Pitufo/Haifurer!
 -- 30 = variable[2]  -- Animation effect
local config = {
    [0] = { "fist fighting", 30},
    [1] = { "club fighting", 30}
    [2] = { "sword fighting", 30}
    [3] = { "axe fighting", 30},
    [4] = { "distance fighting", 30},
    [5] = { "shield fighting", 30},
    [6] = { "fishing", 30},
    [7] = { "magic level", 30},
    [8] = { "mevel", 30}
}
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}
    }
        
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You advanced in "..config[skill][1].." from "..oldlevel.." to "..newlevel..".")
    for i = 1, table.maxn(positions) do
        doSendMagicEffect(positions[i],config[skill][2])
    end   
return TRUE
end

And it will give message:
You advanced in fist fighting from 10 to 11.
 
Well you can do something like that:
Code:
--Script made by Pitufo/Haifurer!
 -- 30 = variable[2]  -- Animation effect
local config = {
    [0] = { "fist fighting", 30},
    [1] = { "club fighting", 30}
    [2] = { "sword fighting", 30}
    [3] = { "axe fighting", 30},
    [4] = { "distance fighting", 30},
    [5] = { "shield fighting", 30},
    [6] = { "fishing", 30},
    [7] = { "magic level", 30},
    [8] = { "mevel", 30}
}
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}
    }
        
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You advanced in "..config[skill][1].." from "..oldlevel.." to "..newlevel..".")
    for i = 1, table.maxn(positions) do
        doSendMagicEffect(positions[i],config[skill][2])
    end   
return TRUE
end

And it will give message:
You advanced in fist fighting from 10 to 11.


If you didnt notice i made 2 scripts in these thread, look at the second one: Here
 
Back
Top