Synthetic_
deathzot.net
- Joined
- Dec 30, 2008
- Messages
- 2,535
- Reaction score
- 574
Well here's something simple that I thought would be cool to add to my server so I decided to release it here.
Tested on TFS0.3.5pl1
enter.lua
leave.lua
add this to creaturescripts.xml
in login.lua add
Tested on TFS0.3.5pl1
enter.lua
Lua:
function onLogin(cid)
doBroadcastMessage(getPlayerName(cid) .. " [" .. getPlayerLevel(cid) .. "]: has entered the game world", MESSAGE_STATUS_CONSOLE_ORANGE)
return TRUE
end
leave.lua
Lua:
function onLogout(cid)
doBroadcastMessage(getPlayerName(cid) .. " [" .. getPlayerLevel(cid) .. "]: has left the game world", MESSAGE_STATUS_CONSOLE_ORANGE)
return TRUE
end
add this to creaturescripts.xml
Code:
<event type="login" name="enter" event="script" value="enter.lua"/>
<event type="logout" name="leave" event="script" value="leave.lua"/>
in login.lua add
Code:
registerCreatureEvent(cid, "enter")