Hello, i make nice script, INFO CHAT!
How this works?
Its a new chat, where write all news from serwer, who are killed and by who, who advanced etc.
In XML/Channels.xml add line:
Now you have your chat, but nothing write there ;( lets add some features:
Players Advance info:
Creaturescripts.xml
login.lua (add before "return true")
infoadv.lua (make in scripts folder)
(I know its terrible long, if someone can make a table...)
Players Death/Kill info:
Creaturescripts.xml
login.lua (add before "return true")
infodeath.lua (make in scripts folder)
I will add new features!
If someone have an idea what can i add, just write here (or if someone make a new script).
Rate and comment :3
Thank you PANDA!
How this works?
Its a new chat, where write all news from serwer, who are killed and by who, who advanced etc.
In XML/Channels.xml add line:
XML:
<channel id="11" name="Info Chat" active="no"/>
Now you have your chat, but nothing write there ;( lets add some features:
Players Advance info:
Creaturescripts.xml
XML:
<event type="advance" name="InfoAdv" event="script" value="infoadv.lua"/>
login.lua (add before "return true")
Lua:
registerCreatureEvent(cid, "InfoAdv")
infoadv.lua (make in scripts folder)
Lua:
function onAdvance(cid, skill, oldLevel, newLevel)
for _, pid in ipairs(getPlayersOnline()) do
if skill == SKILL__LEVEL and newLevel % 50 == 0 then
doPlayerSendChannelMessage(pid, "Advance", "Player " .. getCreatureName(cid) .. " advanced to " .. getPlayerLevel(cid) .. " level!", TALKTYPE_CHANNEL_O, 11);
end
end
return true;
end
Players Death/Kill info:
Creaturescripts.xml
XML:
<event type="kill" name="InfoDeath" event="script" value="infodeath.lua"/>
login.lua (add before "return true")
Lua:
registerCreatureEvent(cid, "InfoDeath")
infodeath.lua (make in scripts folder)
Lua:
function onKill (cid, target)
local nick = getCreatureName(target)
local nick2 = getCreatureName(cid)
if isPlayer(cid) and isPlayer(target) then
local lvl = getPlayerLevel(target)
for _, pid in ipairs(getPlayersOnline()) do
doPlayerSendChannelMessage(pid, "Death", "Player "..nick.." has been slain by "..nick2.." at "..lvl.." level.", TALKTYPE_CHANNEL_RN, 11)
end
end
return true
end
I will add new features!
If someone have an idea what can i add, just write here (or if someone make a new script).
Rate and comment :3
Thank you PANDA!
Last edited: