• 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!

Something About Guild

a7aa7a

Member
Joined
Jul 5, 2011
Messages
316
Reaction score
13
I Want To Know How TO Make ...
!go- To make All guild Same Outfit :)


!bc-To Send borat cast Massage To All Guild Members :)

Rep+ Need Help Pless :) :w00t:
 
This is the guild outfit!

I didn't made the script and I don't know who scripted it

talkactions/scripts/guildoutfit.lua
Lua:
local config = {
	exhaustionInSeconds = 30,
	storage = 34534
}
 
function onSay(cid, words, param)
	if(exhaustion.check(cid, config.storage) == TRUE) then
		doPlayerSendCancel(cid, "You can change outfit only 1 time per " .. config.exhaustionInSeconds .. " seconds.")
		return TRUE
	end
 
	local playerGuild = getPlayerGuildId(cid)
	if(playerGuild == FALSE) then
		doPlayerSendCancel(cid, "Sorry, you're not in a guild.")
		return TRUE
	end
 
	local playerGuildLevel = getPlayerGuildLevel(cid)
	if(playerGuildLevel < GUILDLEVEL_LEADER) then
		doPlayerSendCancel(cid, "You have to be Leader of your guild to change outfits!")
		return TRUE
	end
 
	local players = getPlayersOnline()
	local outfit = getCreatureOutfit(cid)
	local message = "*Guild* Your outfit has been changed by leader. (" .. getCreatureName(cid) .. ")"
	local members = 0
	local tmp = {}
	for i, tid in ipairs(players) do
		if(getPlayerGuildId(tid) == playerGuild and cid ~= tid) then
			tmp = outfit
			if(canPlayerWearOutfit(tid, outfit.lookType, outfit.lookAddons) ~= TRUE) then
				local tidOutfit = getCreatureOutfit(tid)
				tmp.lookType = tidOutfit.lookType
				tmp.lookAddons = tidOutfit.lookAddons
			end
 
			doSendMagicEffect(getCreaturePosition(tid), 66)
			doCreatureChangeOutfit(tid, tmp)
			doPlayerSendTextMessage(tid, MESSAGE_INFO_DESCR, message)
			members = members + 1
		end
	end
 
	exhaustion.set(cid, config.storage, config.exhaustionInSeconds)
	doPlayerSendCancel(cid, "Guild members outfit has been changed. (Total: " .. members .. ")")
	return TRUE
end
talkactions.xml
XML:
<talkaction words="!go" event="script" value="guildoutfit.lua"/>
Open data/lib/data.lua
Lua:
dofile(getDataDir() .. "lib/exhaustion.lua")


This is the guild broadcast!

I didn't made the script and I don't know who scripted it

data/talkactions/guildcast.lua
Lua:
function onSay(cid, words, param)
local playerGuild = getPlayerGuildId(cid)
if playerGuild > 0 then
local playerGuildLevel = getPlayerGuildLevel(cid)
if playerGuildLevel >= GUILDLEVEL_VICE then
local players = getOnlinePlayers()
local message = "*Guild* " .. getCreatureName(cid) .. " [" .. getPlayerLevel(cid) .. "]:\n" .. param;
for i,playerName in ipairs(players) do
local player = getPlayerByName(playerName);
if getPlayerGuildId(player) == playerGuild then
doPlayerSendTextMessage(player, MESSAGE_STATUS_WARNING, message);
end
return TRUE
end
doPlayerSendCancel(cid, "Message sent to whole guild.");
else
doPlayerSendCancel(cid, "You have to be at least Vice-Leader to guildcast!");
end
else
doPlayerSendCancel(cid, "Sorry, you're not in a guild.");
end
doPlayerSendTextMessage(cid, 25, words)
return FALSE
end
data/talkactions/talkactions.xml
XML:
<talkaction words="!bc;/bc" filter="word" script="guildcast.lua"/>
 
Last edited:
Back
Top