Hello.
I modified this script to work properly in Tfs 0.2 (mystic Spirit)
this script send a message in red color to all player in the same guild.
you must be a leader or vice leder in the guild.
talkactions/talkactions.xml
talkactions/scripts/guildcast.lua
create a new script called guildcast.lua
Now, you say !bg "text for the guild
Finish
example of the text:
[Guild Power Abusers] Ozzy [223]:
hello this is a text example for the guild
____________________________________________
credits:
99.9% to Elf
0.1 to me
Reegards
I modified this script to work properly in Tfs 0.2 (mystic Spirit)
this script send a message in red color to all player in the same guild.
you must be a leader or vice leder in the guild.
talkactions/talkactions.xml
Code:
<talkaction words="!bg" script="guildcast.lua"/>
talkactions/scripts/guildcast.lua
create a new script called guildcast.lua
Code:
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 " .. getPlayerGuildName(cid) .. "] " .. 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
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
return TRUE
end
Now, you say !bg "text for the guild
Finish
example of the text:
[Guild Power Abusers] Ozzy [223]:
hello this is a text example for the guild
____________________________________________
credits:
99.9% to Elf
0.1 to me
Reegards