• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How To Use This Script?

-.Savage.-

New Member
Joined
Jul 2, 2008
Messages
32
Reaction score
2
Hello was wondering if any1 knew how to use this script
lets say you come online my server. you would have to choose
a team, when you enter the team , it sets ur town id,outfit,and guild. but if u choose another team ur guild is still wut ever you chose first, so when u enter the change teleport
its suppose to open ur guild chat and say !leave.

like a auto leave guild when u enter a teleport

can some1 tell me how to use this script
ill rep++ you

its suppose to sendto channel
GuildId: 2
Guild Name: American Team
Message: !leave

Lua:
doPlayerSendToChannel(cid, targetId, SpeakClasses, message, channel[, time])
 
Guild MOTD is good example:
Code:
function onJoinChannel(cid, channelId, users)
	if(channelId == CHANNEL_GUILD) then
		local guildId = getPlayerGuildId(cid)
		if(guildId and guildId ~= 0) then
			local guildMotd = getGuildMotd(guildId)
			if(guildMotd and guildMotd ~= "") then
				addEvent(doPlayerSendChannelMessage, 150, cid, "", "Message of the Day: " .. guildMotd, TALKTYPE_CHANNEL_W, CHANNEL_GUILD)
			end
		end
	end

	return true
end
 
Thx 4 example. Ofc rep ;]

But is it possible to write script which will message to channel help a text. "God has logged in" or sth like that?
 
Code:
function onLogin(cid)
	if (getPlayerAccess(cid) >= 3) then
		addEvent(doPlayerSendChannelMessage, 150, cid, "", getCreatureName(cid) .." has logged in", TALKTYPE_CHANNEL_O, CHANNEL_HELP)
	end
	return true
end
 
Code:
function onLogin(cid)
	local list = getChannelUsers(CHANNEL_HELP)

	if (getPlayerAccess(cid) >= 3) then
		if (#list > 0) then
			for i = 1, #list do
				addEvent(doPlayerSendChannelMessage, 150, list[i], "", getCreatureName(cid) .." has logged in", TALKTYPE_CHANNEL_O, CHANNEL_HELP)
			end
		end
	end
	return true
end
 
Back
Top