Jump to content
  • 0
Sign in to follow this  
Eokkkkk

Scripting Ajuda a configurar ! rep++

Question

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

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
Majesty

Tópico Fechado.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×