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

Anyone can help me with this MOD

Stewie

Family Guy # ;3
Joined
May 3, 2010
Messages
786
Reaction score
12
Location
TV
Hi,

I would like for Leader Party use this command,dont Guild leader,here script:

LUA:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="guild-outfit" version="1.0" author="slawkens" contact="[email protected]" enabled="yes">
	<config name="guild-outfit-config"><![CDATA[
		exhaust = 30 -- in seconds
		storage = 3002 -- storage value used to save exhaustion
	]]></config>

	<talkaction words="!go" event="script"><![CDATA[
		domodlib('guild-outfit-config')

		local config = {
			exhaustion = exhaust,
			storage = storage
		}

		function onSay(cid, words, param, channel)
			if(exhaustion.check(cid, config.storage)) then
				doPlayerSendCancel(cid, "You can change outfit only 1 time per " .. config.exhaustion .. " seconds.")
				return true
			end

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

			if(getPlayerGuildLevel(cid) < GUILDLEVEL_LEADER) then
				doPlayerSendCancel(cid, "You have to be Leader of your guild to change outfits!")
				return true
			end

			local outfit, members = getCreatureOutfit(cid), 0
			local message = "*Guild* Your outfit has been changed by leader. (" .. getCreatureName(cid) .. ")"
			for _, tid in ipairs(getPlayersOnline()) do
				if(getPlayerGuildId(tid) == playerGuild and cid ~= tid) then
					local newOutfit = outfit
					if(not canPlayerWearOutfit(tid, outfit.lookType, outfit.lookAddons)) then
						local tmpOutfit = getCreatureOutfit(tid)
						newOutfit.lookAddons = 0--tmpOutfit.lookAddons
						if(not canPlayerWearOutfit(tid, outfit.lookType, 0)) then
							newOutfit.lookType = tmpOutfit.lookType
						end
					end

					doSendMagicEffect(getCreaturePosition(tid), 66)
					doCreatureChangeOutfit(tid, newOutfit)
					doPlayerSendTextMessage(tid, MESSAGE_INFO_DESCR, message)
					members = members + 1
				end
			end

			exhaustion.set(cid, config.storage, config.exhaustion)
			doPlayerSendCancel(cid, "Guild members outfit has been changed. (Total: " .. members .. ")")
			return true
		end
	]]></talkaction>
</mod>
 
Here you are:
Code:
  <?xml version="1.0" encoding="UTF-8"?>
<mod name="party-outfit" version="1.0" author="GarQet" contact="[email protected]" enabled="yes">
        <config name="party-outfit-config"><![CDATA[
                exhaust = 30 -- in seconds
                storage = 3002 -- storage value used to save exhaustion
        ]]></config>
        <talkaction words="!go" event="script"><![CDATA[
                domodlib('party-outfit-config')

  local config =
{
        exhaustionInSeconds = exhaust,
        storage = storage,
        sexChangeable = false
}

function onSay(cid, words, param, channel)
        if(exhaustion.check(cid, config.storage) == TRUE) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can change outfit only 1 time per " .. config.exhaustionInSeconds .. " seconds.")
                return TRUE
        end

        party = getPlayerParty(cid)
        if (config.sexChangeable == true) then
                sex = getPlayerSex(cid)
        end
        if (party) then
                if (party == cid) then
                        outfit = getCreatureOutfit(cid)
                        members = getPartyMembers(party)
                        if (#members >= 1) then
                                tmp = outfit
                                for i=1,#members do    
                                        if (config.sexChangeable == true) then
                                                if (sex ~= getPlayerSex(members[i])) then
                                                        doPlayerSetSex(members[i], sex)
                                                end
                                        end
                                        doCreatureChangeOutfit(members[i], outfit)
                                        doSendMagicEffect(getCreaturePosition(members[i]), 66)
        				exhaustion.set(cid, config.storage, config.exhaustionInSeconds)
                                end
                        end
                else
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This command can use only leader of a party!")
                end
        else
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You must be in a party!")
        end
        return true
end
        ]]></talkaction>
</mod>

REP+
 
Back
Top