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

TFS 1.X+ OnChangeOutfit + table, help!

E

Evil Puncker

Guest
Hello everyone, I'm working on adding achievements to tfs (as seen here), and wanted to add the ones that you earn when getting full outfit, so my guess is to use the OnChangeOutfit, but I don't know when is it triggered, is it triggered when earning a new outfit or only when changing outfit? if it is not the case, what is the best approach to achieve this? and if it is the case, could someone guide me on how the script would look like, for example a table containing outfit name+achievement name and the script itself (don't forget that there are outfits that have only one addon to be marked as "complete" = yalaharian), thanks in advance
 
Lua:
local login = CreatureEvent("CheckOutfit")

login.onLogin = function(player)
    if player:hasOutfit(lookType, 3) then
        -- he has the outfit
    end
    return true
end

login:register()
 
Lua:
local login = CreatureEvent("CheckOutfit")

login.onLogin = function(player)
    if player:hasOutfit(lookType, 3) then
        -- he has the outfit
    end
    return true
end

login:register()
but that is going to give the achievement only on login, right? 🤔 maybe we need an OnReceiveOutfit(outfit, addons) and an OnMount(mount) events wink wink
 
Back
Top