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

Guildoutfit changer for REV 3858 [0.4]

Axelor

Member
Joined
Sep 2, 2010
Messages
505
Reaction score
9
Hello,

I searched guldoutfit changer for 0.4 I found for 0.3, but those gaved me errors and didnt work,

someone can help me with the guildoutfit changer, command !go.

Repp+
 
Post Script/Errors.

script of guildoutfit.lua

PHP:
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


This is the error
PHP:
[15:20:35.167] [Error - TalkAction Interface]
[15:20:35.167] data/talkactions/scripts/guildoutfit.lua:onSay
[15:20:35.167] Description:
[15:20:35.167] data/lib/034-exhaustion.lua:8: bad argument #1 to 'time' (table expected, got number)
[15:20:35.167] stack traceback:
[15:20:35.167]  [C]: in function 'time'
[15:20:35.167]  data/lib/034-exhaustion.lua:8: in function 'check'
[15:20:35.167]  data/talkactions/scripts/guildoutfit.lua:7: in function <data/talkactions/scripts/guildoutfit.lua:6>
 
Back
Top