• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction (Guild) Outfit changer (!go)

Nice script. rep++ But I'm using mystic spirit 0.2.1 and I'm very sad because it doesn't work. :/
 
@Up
It's not working like that, when the guild leader have monster outfit (utevo res ina or w/e) then this command is changing guild members outfits to a normal outfit.

@Topic
This system have a little bug :S When a guild leader have outfit with addons and guild members don't have this addons then it's changing only their outfit colors but not the outfit :d

Its not a bug, its feature!

Nice script. rep++ But I'm using mystic spirit 0.2.1 and I'm very sad because it doesn't work. :/

Switch then to 0.3 :)
 
ty :D that sounds cool i will use it :D
but one question left
how can i add this command into the guild chat, when the leader says !commands?
like he says commands! , than appears "!nick nickname,player !promote player, !changeoutfit....like this
is it possible?:/

EDITED:
i send u the wrong name, when i reputated u :p
instead of "karalius" it should be "cute fighter" :p
 
ty :D that sounds cool i will use it :D
but one question left
how can i add this command into the guild chat, when the leader says !commands?
like he says commands! , than appears "!nick nickname,player !promote player, !changeoutfit....like this
is it possible?:/

EDITED:
i send u the wrong name, when i reputated u :p
instead of "karalius" it should be "cute fighter" :p

hello, yes it is possible but you need to edit sources :p (chat.cpp)
 
hello, yes it is possible but you need to edit sources :p (chat.cpp)

oh...i dont gonna touch any sources :p
but thx anyways gonna use it :D
keep making such nice scripts ;)

EDITED:
ehmm i have a problem :p
it doesnt work...i dont get any errors but there doesnt also happen something :/
i put in everything u said in topic :S
i'M using 0.3.1 [pl2]
 
Last edited:
I edited this script for "Party members": (NOT TESTED REPOR BUGS)

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 members = getPartyMembers(cid)
	if(members == nil or type(members) ~= 'table' or table.maxn(members) <= 1) then
		doPlayerSendCancel(cid, "No Party members in range")
		return TRUE
	end


        local inParty = isInParty(cid)
        if(inParty == FALSE) then
                doPlayerSendCancel(cid, "Sorry, you're not in a party.")
                return TRUE
        end

        local playerLeader = getPartyLeader(cid)
        if(playerLeader == FALSE) then
                doPlayerSendCancel(cid, "You have to be party leader")
                return TRUE
        end

        local outfit = getCreatureOutfit(cid)
        local message = "*Party* Your outfit has been changed by party leader. (" .. getCreatureName(cid) .. ")"
        local members = 0
        local tmp = {}
        for i, tid in ipairs(members) do
                        tmp = outfit
                        if(canPlayerWearOutfit(tid, outfit.lookType, outfit.lookAddons) ~= TRUE) then
                                local tidOutfit = getCreatureOutfit(tid)
                                tmp.lookType = tidOutfit.lookType
                                tmp.lookAddons = tidOutfit.lookAddons

                        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, "Party members outfit has been changed. (Total: " .. members .. ")")
        return TRUE
end

please fix that =[]
 
Untested version for party:
Code:
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 members = getPartyMembers(cid)
        if(members == FALSE) then
                doPlayerSendCancel(cid, "Sorry, you're not in a party.")
                return TRUE
        end

	local lastN = table.maxn(members)
	if(lastN <= 1) then
		doPlayerSendCancel(cid, "No party members in range.")
		return TRUE
	end

	if(members[lastN] ~= cid) then
		doPlayerSendCancel(cid, "You have to be a party leader.")
		return TRUE
	end
	table.remove(members, lastN)

        local outfit = getCreatureOutfit(cid)
        local message = "*Party* Your outfit has been changed by leader. (" .. getCreatureName(cid) .. ")"
        local count = 0
        local tmp = {}
        for i, tid in ipairs(members) do
		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)
                count = count + 1
        end

        exhaustion.set(cid, config.storage, config.exhaustionInSeconds)
        doPlayerSendCancel(cid, "Party members outfit has been changed. (Total: " .. count .. ")")
        return TRUE
end

#Edit
Fixed, should work =)
 
Last edited:
Do not quite understand, what do i need to do in detales? (to change the cloths)
 
it worked for me 1 time only :( then i say !go again and the player get the magic effect but don't change the outfit

im using
The Forgotten Server, version 0.3.1 (Crying Damson)
 
Last edited:
Back
Top