local outfits =
{
["warmaster"] = { male = 335, female = 336, addon = 3, cost = 1000000 }
}
function onSay(cid, words, param)
if param == "" then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This is an invalid param.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return TRUE
end
-- Male --
if getPlayerSex(cid) == 1 and doPlayerRemoveMoney(cid, outfits[param].cost) == TRUE then
doPlayerAddOutfit(cid, outfits[param].male, outfits[param].addon)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have just recieved an addon.")
else
doPlayerSendCancel(cid, "You must have ".. outfits[param].cost .." gold coins to get this addon.")
return TRUE
end
-- Female --
if getPlayerSex(cid) == 0 and doPlayerRemoveMoney(cid, outfits[param].cost) == TRUE then
doPlayerAddOutfit(cid, outfits[param].female, outfits[param].addon)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have just recieved an addon.")
else
doPlayerSendCancel(cid, "You must have ".. outfits[param].cost .." gold coins to get this addon.")
return TRUE
end
end