is this an creatureevent or what?
Dont Work Pitufo pls help
Wont work for 0.2!
function onLogin(cid)
registerCreatureEvent(cid, "PlayerDeath")
registerCreatureEvent(cid, "PlayerAdvance")
return TRUE
end
Did you do any changes in script? Maybe you didn't add0.o I added and still nothing happenz when I advance :/ very strange
edit: seems that Ive got problems with login.lua :|
<event type="advance" name="advance" script="advance.lua"/>
registerCreatureEvent(cid, "advance")
shouldnt it bein login.lua?Code:registerCreatureEvent(cid, "advance")
edit: Its working with "advance" in login![]()
this creature event is possible used in TFS 0.2??
please help. Thanks
--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
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.