Ir para conteúdo

Lykkan

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    Lykkan deu reputação a luangop em (Resolvido)Stamina player.lua   
    Testa ai:
     
  2. Gostei
    Lykkan deu reputação a vankk em Nuker   
    Coloca para que quando isso acontecer ele seja transportado para o Templo. Como se fosse um TP igual no global.
  3. Gostei
    Lykkan deu reputação a Absolute em Nuker   
    Com esse simples erro nem Mark Samman arruma  [Error - MoveEvent::executeStep] Call stack overflow.
    tem que achar o ação que o player está executando pra cair, ele não retorna erro de script nada, só diz que é overflow
  4. Gostei
    Lykkan deu reputação a luanluciano93 em Frag Remover   
    Olá pessoal, para quem não sabe esse script funciona da seguinte maneira, você escolhe um X item, e ao dar use neste X item, será removido a skull e os frags do player que usa-lo (só funciona se estiver Red Skull ou Black Skull).
     
    Crie um arquivo com o nome frag_remover.lua em actions/scripts/ e coloque esse código dentro: 
    function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey) if table.contains({SKULL_RED, SKULL_BLACK}, player:getSkull()) then player:setSkull(SKULL_NONE) player:setSkullTime(0) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your skull has been removed!") db.query("UPDATE `player_deaths` SET `unjustified` = 0 WHERE `unjustified` = 1 AND `killed_by` = " .. db.escapeString(player:getName())) item:remove(1) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You can only remove red or black skulls!") player:getPosition():sendMagicEffect(CONST_ME_POFF) end return true end
    E em actions.xml adicione a tag:
    <action itemid="XXXX" script="frag_remover.lua"/> Agora é só trocar o XXXX da tag acima pelo ID do item que será o seu Frag Remover
     
    Créditos: Ninja
     
     
    Bem simples né pessoal ?! Espero ter ajudado, abraços!
  5. Gostei
    Lykkan deu reputação a nookia em (Resolvido)Script Premmium Scroll   
    http://www.tibiaking.com/forum/topic/19830-action-premium-system/
  6. Gostei
    Lykkan deu reputação a alissonfgp em Mensagens automáticas para todo o servidor ? 10.76   
    tfs 1.x+
     
    testa ai

    <globalevent name="Auto Msg" interval="3600000" script="automsg.lua"/>  
    3600000-- 1h
     
    automsg.lua

    function onThink(interval)     broadcastMessage("MENSAGEMAQUI", MESSAGE_EVENT_ADVANCE)     return true end
  7. Gostei
    Lykkan recebeu reputação de tibira em Most powerfull guilds   
    Eu não tenho certeza se é isso, tenta colocar em www/pages/latestnews.php logo abaixo do <?PHP header
     
     



  8. Gostei
    Lykkan deu reputação a zipter98 em (Resolvido)O que tem de errado?   
    local mounts = {     --[itemid] = {name = "monster", storage = storage, mountId = xxx, chance = xxx},      [13937] = {name = "donkey", storage = 5918, mountId = 13, chance = 50},        --Sendo a chance (de funcionar) em porcentagem. } function onUse(cid, item, frompos, itemEx, topos)     local target = mounts[item.itemid]     if target then         if getPlayerStorageValue(cid, target.storage) > -1 then             return doPlayerSendTextMessage(cid, 19, "Sorry, you already have that ride.")         elseif not isMonster(itemEx.uid) then             return doPlayerSendCancel(cid, "Use this in a monster.")         elseif getCreatureName(itemEx.uid):lower() ~= target.name then             return doPlayerSendCancel(cid, "Use this in "..target.name..".")         end         if math.random(1, 100) <= target.chance then             doPlayerAddMount(cid, target.mountId)             doRemoveCreature(itemEx.uid)             doPlayerSendTextMessage(cid, 19, "The strange wheel seems to vibrate and slowly starts turning continuosly.")             setPlayerStorageValue(cid, target.mountId, 1)         else             doPlayerSendCancel(cid, "Fail!")             doRemoveItem(item.uid, 1)         end     end     return true end
  9. Gostei
    Lykkan recebeu reputação de fironfox em Sistema de recompensa de boss   
    Boa Noite,
     
     
     
    Como eu faço pra criar um sistema de recompensa dos Boss, igual o global? tipo todo mundo que for matar um boss tem direito a uma parte do loot de acordo com que ele hitou do monstro. 
     
     
     
     
    abs
  10. Gostei
    Lykkan deu reputação a zipter98 em (Resolvido)O que tem de errado?   
    local mounts = {     --[itemid] = {name = "monster", storage = storage, mountId = xxx},      [13937] = {name = "donkey", storage = 5918, mountId = 13}, } function onUse(cid, item, frompos, itemEx, topos)     local target = mounts[item.itemid]     if target then         if getPlayerStorageValue(cid, target.storage) > -1 then             return doPlayerSendTextMessage(cid, 19, "Sorry, you already have that ride.")         elseif not isMonster(itemEx.uid) then             return doPlayerSendCancel(cid, "Use this in a monster.")         elseif getCreatureName(itemEx.uid):lower() ~= target.name then             return doPlayerSendCancel(cid, "Use this in "..target.name..".")         end         doPlayerAddMount(cid, target.mountId)         doRemoveCreature(itemEx.uid)         doPlayerSendTextMessage(cid, 19, "The strange wheel seems to vibrate and slowly starts turning continuosly.")         doRemoveItem(item.uid, 1)         setPlayerStorageValue(cid, target.mountId, 1)     end     return true end
  11. Gostei
    void Player::regenerateStamina(int32_t offlineTime) { if (!g_config.getBoolean(ConfigManager::STAMINA_SYSTEM)) { return; } offlineTime -= 600; if (offlineTime < 180) { return; } int16_t regainStaminaMinutes = (offlineTime / 180)/2 ; int16_t maxNormalStaminaRegen = 2400 - std::min<int16_t>(2400, staminaMinutes); if (regainStaminaMinutes > maxNormalStaminaRegen) { int16_t happyHourStaminaRegen = (offlineTime - (maxNormalStaminaRegen * 180)) / 600; staminaMinutes = std::min<int16_t>(2520, std::max<int16_t>(2400, staminaMinutes) + happyHourStaminaRegen); } else { staminaMinutes += regainStaminaMinutes; } } void Player::useStamina() { if (!g_config.getBoolean(ConfigManager::STAMINA_SYSTEM) || staminaMinutes == 0) { return; } time_t currentTime = time(nullptr); if (currentTime > nextUseStaminaTime) { time_t timePassed = currentTime - nextUseStaminaTime; if (timePassed > 60) { if (staminaMinutes > 2) { staminaMinutes -= 2; } else { staminaMinutes = 0; } nextUseStaminaTime = currentTime + 120; } else { --staminaMinutes; nextUseStaminaTime = currentTime + 60; } sendStats(); } } Tenta assim...
  12. Gostei
    Lykkan deu reputação a Tibia2015br em Retirar house de player, apos 15 dias sem entrar   
    Abra sua pasta talkactions/scripts e dentro dela crie um arquivo .lua com o nome de: expulse_house.lua e dentro coloque:
    function onSay(cid, words, param)
        local position = getPlayerPosition(cid)

        if getPlayerLookDir(cid) == 0 then
            positions = {x=position.x, y=position.y-1, z=position.z}
        elseif getPlayerLookDir(cid) == 1 then
            positions = {x=position.x+1, y=position.y, z=position.z}
        elseif getPlayerLookDir(cid) == 2 then
            positions = {x=position.x, y=position.y+1, z=position.z}
        elseif getPlayerLookDir(cid) == 3 then
            positions = {x=position.x-1, y=position.y, z=position.z}
        end

        if getHouseFromPos(positions) == false then
            doPlayerSendTextMessage(cid, 27, "Voce precisa estar na frente a porta da casa para usar o comando.")
        return true
        end

        local days = 5*24*60*60
        local own = getHouseOwner(getHouseFromPos(positions))
        local qry = db.getResult("SELECT `lastlogin` FROM `players` WHERE `id` = "..own)
        
        if(qry:getID() ~= -1) then
            last = tonumber(qry:getDataInt("lastlogin"))
            if last < os.time() - days then
                setHouseOwner(getHouseFromPos(positions), NO_OWNER_PHRASE,true)
                doPlayerSendTextMessage(cid, 27, "A Casa agora esta sem dono, você ou outro jogador pode compra-la")
            end
            if last > os.time() - days then
                doPlayerSendTextMessage(cid, 27, "O proprierário desta casa ainda está ativo no servidor, tente outra casa.")
            end
        end
        return true
    end
    Pós ter feito isto, abra o seu arquivo talkactions.xml e coloque debaixo de uma linha qualquer a seguinte linha:
    <talkaction words="!eject" event="script" value="expulse_house.lua"/>
    Pronto. basta o player chegar na porta da casa e dizer !eject, caso o jogador esteja a 5 dias sem logar, os items do antigo dono irão para o DEPOT e a casa ficarásem dono.
     
     
    @Configuração do script:
      local days = 5*24*60*60
    Onde está o número 5 é o tanto de dias que o player tem que ficar sem logar para outro jogador executar o comando.
     
     
    Para alterar para 3 dias, ficaria como exemplo:
        local days = 3*24*60*60
     
    se te ajudei mida um like
     
    aew coloca eu na staff de seu otserv posso ser o mapper ou o script ate mesmo webmaster
  13. Gostei
    Lykkan deu reputação a Tibia2015br em Retirar house de player, apos 15 dias sem entrar   
    cade o like sapoha ^^^^^^
  14. Gostei
    Lykkan deu reputação a Caronte em (Resolvido)[PEDIDO]Bless Free ate lvl 50   
    Em baixo de:
    player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr) for i = 1, 5 do if player:getLevel(cid) < 50 then player:addBlessing(cid, i) end end
  15. Gostei
    Lykkan deu reputação a luanluciano93 em (Resolvido)[DUVIDA] Quantidade de caracteres na Account   
    Em system/load.compat.php, procure e edite essa função:
    function check_account_name($name) { $name = (string) $name; $temp = strspn("$name", "QWERTYUIOPASDFGHJKLZXCVBNM0123456789"); if ($temp != strlen($name)) return false; if(strlen($name) < 1) return false; if(strlen($name) > 32) return false; return true; } Nessa linha tu pode editar o número máximo de caracteres na account: 
    if(strlen($name) > 32) Qualquer dúvida posta ai!
  16. Gostei
    Lykkan deu reputação a luanluciano93 em (Resolvido)[DUVIDA] Quantidade de caracteres na Account   
    O tópico foi movido para a área correta, preste mais atenção da próxima vez!
    Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680

    Este tópico foi movido:
    De: "OTServ → OTServ Geral"
    Para: "OTServ → Suporte OTServ → Suporte de WebSites"
  17. Gostei
    Lykkan deu reputação a Factur em (Resolvido)NPC Marina   
    Hm...
     
    Bom eu não notei erro no script, porém tente usar um que eu uso no meu próprio servidor, eu irei destacar as partes onde você deverá mudar!
     
    Marina.lua!



    _________________________________________________________
    Marina.xml


    _______________________________________________________   -----Conversa--------
    Player: HI
    Npc: "Fala que você podera editar"
    Player: Yes
    NPC: "Fala que vai estar no código acima em Verde com Negrito"
    ___________________________________
     
    Player: Hi
    NPC "Fala que você podera editar"
    Player: no
    NPC: "Fala que vai estar no código acima em Rosa com Negrito"
  18. Gostei
    Lykkan deu reputação a Summ em (Resolvido)Uniwheel   
    Eu tinha feito no meu antigo ot esse script :
    local id = 13937 function onUse(cid, item, frompos, itemEx, topos ) if itemEx.itemid == id then doPlayerAddMount(cid, 15) doPlayerSendTextMessage(cid, 19,"The strange wheel seems to vibrate and slowly starts turning continuosly.") doPlayerRemoveItem(cid, 13938, 1) else doPlayerSendTextMessage(cid, 19, "Sorry, you already have that ride.") end return true end <action itemid="13938" script="ARQUIVO.lua"/>
  19. Gostei
    Lykkan recebeu reputação de Drazyn1291 em (Resolvido)Uniwheel   
    bump
  20. Negativo
    Lykkan recebeu reputação de Bruno Minervino em (Resolvido)Uniwheel   
    bump
  21. Gostei
    Lykkan deu reputação a Ceos em (Resolvido)Group_ID   
    E só você ir na pasta (data/xml/group.xml), e verifica qual group e o adm.
  22. Gostei
    Lykkan deu reputação a Summ em (Resolvido)add montaria   
    exato, basta seguir o modelo da tabela.
  23. Gostei
    Lykkan deu reputação a Summ em (Resolvido)add montaria   
    http://www.tibiaking.com/forum/topic/50629-addonmount-para-shopsystem-por-storage/
  24. Gostei
    Lykkan deu reputação a falling em (Resolvido)Shop System   
    Faz isso direto pelo MySQL no phpmyadmin
    Na coluna shop_offers
  25. Gostei
    Lykkan deu reputação a Bruno Minervino em [PEDIDO] Book of Bless   
    function onUse (cid, item, itemEx , fromPosition, toPosition) local blessings = 0 for b = 1, 5 do if getPlayerBlessing(cid, b) then blessings = blessings + b end end if blessings == 5 then doPlayerSendCancel(cid, "Voce ja possui todas as blessings.") doSendMagicEffect(getPlayerPosition(cid), 17) else for i = 1, 5 do doPlayerAddBlessing(cid, i) end doSendMagicEffect(getPlayerPosition(cid), 37) doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, "Voce agora possui todas as blessings!") end return true end

Informação Importante

Confirmação de Termo