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

Windows Monster outfit lever tfs 1.1

kozmo

Member
Joined
Jan 30, 2009
Messages
443
Solutions
2
Reaction score
23
Hi otland, hoping someone can help me make a script.


When you click on the lever it gives you a random monster outfit to use for 25 crystal coins.
You keep the outfit on forever until the player decides to change back to his normal addon outfits.
I looked around and only found this for lower clients, please help thanks.
 
Last edited:
Folder actions / scripts create a file.lua like this:

Code:
local config = {
    outfit = {123,111,122}, -- list monster outfit
    coins = 2160, -- id coin
    cust = 25 -- amount cust
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if player:getItemCount(config.coins) < config.cust then
        player:sendCancelMessage('You need '.. config.cust ..' crystal coins')
        return true
    end
    local outfit = config.outfit[math.random(table.maxn(config.outfit))]
    local o = player:getOutfit()
    if o.lookType == outfit then
        player:sendCancelMessage('You are already using the outfit.')
    else
        player:removeItem(config.coins, config.cust)
        o.lookType = outfit
        player:setOutfit(o)
        player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE ,'Congratulations! You purchased the successful outfit.')
    end
    return true
end

and actions.xml put this tag:

Code:
    <action actionid="ActionId_the_lever" script="YOURFILE.lua"/>


sorry for my english :|
 
Last edited:
Back
Top