@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
Nice script. rep++ But I'm using mystic spirit 0.2.1 and I'm very sad because it doesn't work. :/
ty that sounds cool i will use it
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
instead of "karalius" it should be "cute fighter"
hello, yes it is possible but you need to edit sources (chat.cpp)
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
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
The Forgotten Server, version 0.3.1 (Crying Damson)