Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- [[ Tag: login.lua ]] --
- registerCreatureEvent(cid, "msg2guild")
- -- [[ Tag: login.lua ]] --
- -- [[ Tag: creaturescripts.xml ]] --
- <event type="login" name="msg2guild" event="script" value="msg2guild.lua"/>
- -- [[ Tag: creaturescripts.xml ]] --
- -- [[ Script msg2guild.lua ]] --
- local msgType = MESSAGE_STATUS_CONSOLE_BLUE
- function onLogin(cid)
- if isPlayer(cid) then
- getMyGuild = getPlayerGuildId(cid)
- if getMyGuild ~= 0 then
- for i = 1, #getPlayersOnline() do
- tid = getPlayersOnline()[i]
- getHerGuild = getPlayerGuildId(tid)
- if getMyGuild == getHerGuild then
- if cid ~= tid then
- doPlayerSendTextMessage(tid, msgType, ""..getPlayerGuildRank(cid):upper()..": "..getCreatureName(cid)..", "..getPlayerVocationName(cid)..", level "..getPlayerLevel(cid).." and from "..getPlayerGuildName(cid).." Guild is Online now.")
- end
- doPlayerSendChannelMessage(tid, getCreatureName(cid), ""..getPlayerGuildRank(cid):upper()..": Vocation "..getPlayerVocationName(cid)..", level "..getPlayerLevel(cid).." and from "..getPlayerGuildName(cid).." Guild is Online now.", TALKTYPE_CHANNEL_W, CHANNEL_GUILD)
- end
- end
- end
- end
- return true
- end
- -- [[ Script msg2guild.lua ]] --
Advertisement
Add Comment
Please, Sign In to add comment