RevScript Random New Player Addon

Alex

Miembro del equipo
Webdesigner
LV
58
 
Awards
38
Hola,


Este Revscript Anade un Outfit Aleatorio a un nuevo jugador ( creado ) , pueden modificarlo si conocen los looktypes,

Código:
local outfits = {
    {136, 128, "Citizen"},
    {137, 129, "Hunter"},
    {138, 130, "Mage"},
    {139, 131, "Knight"}
}

local randOutfit = CreatureEvent("RandomOutfitForNewPlayers")

function randOutfit.onLogin(player)
    if player:getLastLoginSaved() <= 0 then
        local outfit = outfits[math.random(1, #outfits)]
        local addon = math.random(1, 2)
        player:addOutfitAddon(outfit[1], addon)
        player:addOutfitAddon(outfit[2], addon)
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("You obtained the %s outfit with addon %d.", outfit[3], addon))
    end
    return true
end

randOutfit:register()
 
Arriba