creaturescripts/scripts/yourscript.lua
function onAdvance(cid, skill, oldlevel, newlevel)
if(getPlayerStorageValue(cid, 99963) ~= 1 and skill == SKILL__LEVEL and newlevel >= 8) then
doPlayerSendTextMessage(cid, 22, "Your msg")
end
return TRUE
end
creaturescript/creaturescript.xml
<event type="advance" name="msg" event="script" value="yourscript.lua"/>
creaturescripts/scripts/login.lua
add thisregisterCreatureEvent(cid, "yourscriptname")
thanks! I will try this tomorrow cuz im tired and need go to sleep.increaturescripts/scripts/yourscript.lua
then add this inLua:function onAdvance(cid, skill, oldlevel, newlevel) if(getPlayerStorageValue(cid, 99963) ~= 1 and skill == SKILL__LEVEL and newlevel >= 8) then doPlayerSendTextMessage(cid, 22, "Your msg") end return TRUE end
creaturescript/creaturescript.xml
then in inXML:<event type="advance" name="msg" event="script" value="yourscript.lua"/>
creaturescripts/scripts/login.lua
add this
Lua:registerCreatureEvent(cid, "yourscriptname")
i did everything and still don't get the message.thanks! I will try this tomorrow cuz im tired and need go to sleep.
i did everything and still don't get the message.increaturescripts/scripts/yourscript.lua
then add this inLua:function onAdvance(cid, skill, oldlevel, newlevel) if(getPlayerStorageValue(cid, 99963) ~= 1 and skill == SKILL__LEVEL and newlevel >= 8) then doPlayerSendTextMessage(cid, 22, "Your msg") end return TRUE end
creaturescript/creaturescript.xml
then in inXML:<event type="advance" name="msg" event="script" value="yourscript.lua"/>
creaturescripts/scripts/login.lua
add this
Lua:registerCreatureEvent(cid, "yourscriptname")
I named Rookgaard lvl 8 message.lua and registerCreatureEvent(cid, "Rookgaard lvl 8 message.")make sure that the name="" in the creaturescripts.xml and the one you used on registerCreatureEvent(cid, "yourscriptname") is the same name
Still don't work... is there another way to fix it?Try to name it without 'spaces', call it rookgaard_8_level_message, anyway so complicated, name it rookgaard_login, and keep other events for category login once in rookgaard in one file.
I did and still don't get the message when I reached to lvl 8XML:<event type="advance" name="RookgaardMSG" event="script" value="rookgaard_msg.lua"/>
Rename the lua file to rookgaard_msg.lua
function onAdvance(cid, skill, oldlevel, newlevel)
if(getPlayerStorageValue(cid, 99963) ~= 1 and skill == SKILL__LEVEL and newlevel >= 8) then
doPlayerSendTextMessage(cid, 22, "you can leave rookgaard for now")
end
return TRUE
end
it workIn login.luaLua:registerCreatureEvent(cid, "RookgaardMSG")
function onAdvance(cid, skill, oldlevel, newlevel)
if(getPlayerStorageValue(cid, 99963) ~= 1 and skill == SKILL__LEVEL and newlevel >= 8) then
doPlayerSendTextMessage(cid, 22, "Your msg")
doCreatureSetStorage(cid, 99963, 1)
end
return TRUE
end
it work.Code:function onAdvance(cid, skill, oldlevel, newlevel) if(getPlayerStorageValue(cid, 99963) ~= 1 and skill == SKILL__LEVEL and newlevel >= 8) then doPlayerSendTextMessage(cid, 22, "Your msg") doCreatureSetStorage(cid, 99963, 1) end return TRUE end