• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[Talkaction] Invite all guild's player to a party

chiitus

Member
Joined
Jun 1, 2009
Messages
206
Reaction score
12
Hello everyone!
I searching for a script that the guild leader say "/guildparty" and all players online of guild will be invite into a party.

Thanks adv!
 
Add This To your source
http://otland.net/threads/party-invitation.202394/
Then Talkaction
create a new .lua file in data/talkactions/scripts/guildinvite.lua
add this in it
Code:
function onSay(cid, words, param, channel)
local time = 50 -- in seconds
local playerGuild = getPlayerGuildId(cid)
if exhaustion.check(cid, 6008) then
doPlayerSendCancel(cid, "You Must Wait "..exhaustion.get(cid, 6008).." to invite Again")
return true
end

    if(playerGuild == 0) then
        doPlayerSendCancel(cid, "Sorry, you're not in a guild.")
          return true
    end

if not getPlayerGuildRank(cid) == 3 then
doPlayerSendCancel(cid, "You Aren't A Leader")
return true
end
    
        local players = getPlayersOnline()
                local members = 0
        for i, tid in ipairs(players) do
            if(getPlayerGuildId(tid) == playerGuild and cid ~= tid) then
    doPlayerInviteToParty(cid,tid)
    doPlayerSetStorageValue(cid, 9002, 1)
    doPlayerSendTextMessage(tid, 27, "You Have Been Invited to Party By Guild Master.Please Say !join "..getPlayerName(cid).."")
    doPlayerSendTextMessage(cid, 27,members.." has Been Invited")
    exhaustion.set(cid, 6008, time * 1000)
      members = members + 1
        end
    end
    return true
    end

in talkactions.xml
Code:
<talkaction log="yes" words="!guildparty" event="script" value="guildinvite.lua"/>
 
Last edited:
Back
Top