Resources Scripts
Addon Doll TFS Script 1.1+

This script adds the addon to the player in exchange for an item.

To install go to the folder OTFolder/data/talkactions/scripts, create a .lua file (addondoll.lua) and put this:

function onSay(player, words, param)

    local outfits =
    {
        --[outfit] = {id_female, id_male}
        ["citizen"] = {136, 128},
        ["hunter"] = {137, 129},
        ["mage"] = {138, 130},
        ["knight"] = {139, 131},
        ["noblewoman"] = {140, 132},
        ["summoner"] = {141, 133},
        ["warrior"] = {142, 134},
        ["barbarian"] = {147, 143},
        ["druid"] = {148, 144},
        ["wizard"] = {149, 145},
        ["oriental"] = {150, 146},
        ["pirate"] = {155, 151},
        ["assassin"] = {156, 152},
        ["beggar"] = {157, 153},
        ["shaman"] = {158, 154},
        ["norsewoman"] = {252, 251},
        ["nightmare"] = {269, 268},
        ["jester"] = {270, 273},
        ["brotherhood"] = {279, 278},
        ["demonhunter"] = {288, 289},
        ["yalaharian"] = {324, 325},
        ["warmaster"] = {336, 335},
        ["wayfarer"] = {366, 367},
        ["afflicted"] = {431, 430},
        ["elementalist"] = {433, 432},
        ["deepling"] = {464, 463},
        ["insectoid"] = {466, 465},
        ["red baron"] = {471, 472},
        ["crystal warlord"] = {513, 512},
        ["soil guardian"] = {514, 516},
        ["demon"] = {542, 541}
    }

    local param = string.lower(param)
    local addondoll_id = 9693

    if player:getItemCount(addondoll_id) > 0 then
        if param ~= "" and outfits[param] then
            if (not player:hasOutfit(outfits[param][1], 3)) or (not player:hasOutfit(outfits[param][2], 3)) then
                player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS)
                player:removeItem(addondoll_id, 1)
                player:addOutfitAddon(outfits[param][1], 3)
                player:addOutfitAddon(outfits[param][2], 3)
                player:sendTextMessage(MESSAGE_INFO_DESCR, "Seu Addon full foi adicionado!")
            else
                player:sendCancelMessage("Voce ja tem este addon")
            end
        else
            player:sendCancelMessage("Digite novamente, algo esta errado!")
        end
    else
        player:sendCancelMessage("Voce nao tem addon doll!")
    end

    return true
end

After adding the script, go OTFolder/data/talkactions, in the file talkactions.xml, add:

<talkaction words="!addon" script="addondoll.lua"/>

Set the addondoll ID in:

local addondoll_id = 9693
**This script adds the addon to the player in exchange for an item.** To install go to the folder OTFolder/data/talkactions/scripts, create a .lua file (addondoll.lua) and put this: ```` function onSay(player, words, param) local outfits = { --[outfit] = {id_female, id_male} [&quot;citizen&quot;] = {136, 128}, [&quot;hunter&quot;] = {137, 129}, [&quot;mage&quot;] = {138, 130}, [&quot;knight&quot;] = {139, 131}, [&quot;noblewoman&quot;] = {140, 132}, [&quot;summoner&quot;] = {141, 133}, [&quot;warrior&quot;] = {142, 134}, [&quot;barbarian&quot;] = {147, 143}, [&quot;druid&quot;] = {148, 144}, [&quot;wizard&quot;] = {149, 145}, [&quot;oriental&quot;] = {150, 146}, [&quot;pirate&quot;] = {155, 151}, [&quot;assassin&quot;] = {156, 152}, [&quot;beggar&quot;] = {157, 153}, [&quot;shaman&quot;] = {158, 154}, [&quot;norsewoman&quot;] = {252, 251}, [&quot;nightmare&quot;] = {269, 268}, [&quot;jester&quot;] = {270, 273}, [&quot;brotherhood&quot;] = {279, 278}, [&quot;demonhunter&quot;] = {288, 289}, [&quot;yalaharian&quot;] = {324, 325}, [&quot;warmaster&quot;] = {336, 335}, [&quot;wayfarer&quot;] = {366, 367}, [&quot;afflicted&quot;] = {431, 430}, [&quot;elementalist&quot;] = {433, 432}, [&quot;deepling&quot;] = {464, 463}, [&quot;insectoid&quot;] = {466, 465}, [&quot;red baron&quot;] = {471, 472}, [&quot;crystal warlord&quot;] = {513, 512}, [&quot;soil guardian&quot;] = {514, 516}, [&quot;demon&quot;] = {542, 541} } local param = string.lower(param) local addondoll_id = 9693 if player:getItemCount(addondoll_id) &gt; 0 then if param ~= &quot;&quot; and outfits[param] then if (not player:hasOutfit(outfits[param][1], 3)) or (not player:hasOutfit(outfits[param][2], 3)) then player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS) player:removeItem(addondoll_id, 1) player:addOutfitAddon(outfits[param][1], 3) player:addOutfitAddon(outfits[param][2], 3) player:sendTextMessage(MESSAGE_INFO_DESCR, &quot;Seu Addon full foi adicionado!&quot;) else player:sendCancelMessage(&quot;Voce ja tem este addon&quot;) end else player:sendCancelMessage(&quot;Digite novamente, algo esta errado!&quot;) end else player:sendCancelMessage(&quot;Voce nao tem addon doll!&quot;) end return true end ```` After adding the script, go OTFolder/data/talkactions, in the file talkactions.xml, add: ```` &lt;talkaction words=&quot;!addon&quot; script=&quot;addondoll.lua&quot;/&gt; ```` Set the addondoll ID in: ```` local addondoll_id = 9693 ````
211
0
1
live preview
enter atleast 20 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft