Ir para conteúdo
  • 0
Entre para seguir isso  
Eokkkkk

Scripting Ajuda a configurar ! rep++

Pergunta

Eokkkkk    0
Eokkkkk

-- Monday = Segunda
-- Tuesday = Terça
-- Wednesday = Quarta
-- Thursday = Quinta
-- Friday = Sexta
-- Saturday = Sabado
-- Sunday = Domingo

function onLogin(cid)
DoubleDays = {"Sunday"}
 if isInArray(DoubleDays, os.date("%A")) then
  doPlayerSetRate(cid, SKILL__LEVEL, 2.0)
  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Double XP] \ Today we are in Double XP event! \ Enjoy.")
 end
 return true
end

 

 

ou arruma esse script para tfs 0.3.6

 

 

 

local amuletId = 2160

function onKill(creature, target)
    local player = Player(creature)

    if player:getSlotItem(CONST_SLOT_NECKLACE).itemid == amuletId then
        if target:isMonster() then
            local pos = target:getPosition()
            local corpse = Tile(pos):getTopDownItem()
            if corpse:getType():isCorpse() and corpse:getType():isMovable() then
                if corpse:isContainer() then
                    local str = "[Double Loot Amulet] Duplicated loot: "
                    for i = corpse:getSize()-1, 0, -1 do
                         local item = corpse:getItem(i)
                         str = str..item:getCount().."x "..item:getName()..", "
                         doAddContainerItem(corpse, item:getId(), item:getCount()) 
                    end
                    str = string.sub(str, 1, #str-2).."."
                    player:sendTextMessage(TALKTYPE_ORANGE_2, str)
                    pos:sendMagicEffect(31)
                end
            end
        end
    end
    return true
end

Compartilhar este post


Link para o post
Compartilhar em outros sites

1 resposta a esta questão

Recommended Posts

  • 0
Majesty    1755
Majesty

Tópico Fechado.

Compartilhar este post


Link para o post
Compartilhar em outros sites
Visitante
Este tópico está impedido de receber novos posts.
Entre para seguir isso  

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×