Ir para conteúdo
Banner com Efeitos

kmus1344

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    kmus1344 deu reputação a FlavioHulk em (Resolvido)[PEDIDO] Promotion Free   
    Em npc/lib/npcsystem no arquivo modules.lua...
    troque a função StdModule.promotePlayer, por essa abaixo

     
    function StdModule.promotePlayer(cid, message, keywords, parameters, node) local npcHandler = parameters.npcHandler if not npcHandler then error("StdModule.promotePlayer called without any npcHandler instance.") end if not npcHandler:isFocused(cid) then return false end local player = Player(cid) local promotion = player:getVocation():getPromotion() if player:getStorageValue(STORAGEVALUE_PROMOTION) == 1 then npcHandler:say("You are already promoted!", cid) elseif player:getLevel() < parameters.level then npcHandler:say("I am sorry, but I can only promote you once you have reached level " .. parameters.level .. ".", cid) elseif not player:removeMoney(parameters.cost) then npcHandler:say("You do not have enough money!", cid) else npcHandler:say(parameters.text, cid) player:setVocation(promotion) player:setStorageValue(STORAGEVALUE_PROMOTION, 1) end npcHandler:resetNpc(cid) return true end  
  2. Curtir
    kmus1344 deu reputação a Bruxo Ots em (Resolvido)[PEDIDO] NPC ADDON   
    Segue abaixo, peguei o do próprio otx acredito não ter bugs.
    Se quiser modificar ou alterar dados e só configurar.
     
  3. Gostei
    Opa, testa agora meu bom
     
    function onUse(cid, item, frompos, item2, topos) -- POSIÇÃO DOS ALTARES -- altar1 = {x = 111, y = 111, z = 1, stackpos = 1} -- ALTAR 1 -- getaltar1 = getThingfromPos(altar1) altar2 = {x = 222, y = 222, z = 2, stackpos = 1} -- ALTAR 2 -- getaltar2 = getThingfromPos(altar2) altar3 = {x = 333, y = 333, z = 3, stackpos = 1} -- ALTAR 3 -- getaltar3 = getThingfromPos(altar2) altar4 = {x = 444, y = 444, z = 4, stackpos = 1} -- ALTAR 4 -- getaltar4 = getThingfromPos(altar3) altar5 = {x = 555, y = 555, z = 5, stackpos = 1} -- ALTAR 5 -- getaltar5 = getThingfromPos(altar4) altar6 = {x = 666, y = 666, z = 6, stackpos = 1} -- ALTAR 6 -- getaltar6 = getThingfromPos(altar6) switchUID= 10102 -- UID da Alavanca switchID = 1945 -- ID da Alavanca switch2ID = 1946 -- ID da Alavanca após utilizada item1 = 1111 -- Item de sacrificio 1 item2 = 1111 -- Item de sacrificio 2 item3 = 1111 -- Item de sacrificio 3 item4 = 1111 -- Item de sacrificio 4 item5 = 1111 -- Item de sacrificio 5 item6 = 1111 -- Item de sacrificio 6 tpto = {x = 111, y = 111, z = 1, stackpos = 1} -- Aonde o player será teleportado -- if item.uid == switchUID and item.itemid == switchID and getaltar1.itemid == item1 and getaltar2.itemid == item2 and getaltar3.itemid == item3 and getaltar4.itemid == item4 and getaltar5.itemid == item5 and getaltar6.itemid == item6 then doSendMagicEffect(cid, 2) doTeleportThing(cid, tpto) doSendMagicEffect(tpto, 10) doRemoveItem(getaltar1.uid, 1) doRemoveItem(getaltar2.uid, 1) doRemoveItem(getaltar3.uid, 1) doRemoveItem(getaltar4.uid, 1) doRemoveItem(getaltar5.uid, 1) doRemoveItem(getaltar6.uid, 1) elseif item.uid == switchUID and item.itemid == switch2ID then doTransformItem(item.uid, item.itemid-1) else doPlayerSendCancel(cid, "Desculpe, você precisa colocar os items corretos nos altares.") end return true end !
  4. Obrigado
    kmus1344 deu reputação a Gengo em (Resolvido)[PEDIDO] Matar boss criar um portal   
    Opa blz, vamos lá no que você está procurando.
     
    Vá na pasta do seu servidor data/creaturescripts/script/ e crie um arquivo chamado teleportBoss.lua e coloque o seguinte script:
    local config = { ["Demon"] = { posiTeleporte = {x = 32337, y = 32220, z = 7, stackpos = 254}, -- Posição em que o teleporte aparecerá. posiToTeleporte = {x = 32344, y = 32223, z = 7}, -- Posição onde será teleportado. time = 20 -- Tempo em que o teleporte irá desaparecer 20 segundos. } } function removeTeleporte(tp) local teleporte = getTileItemById(tp.posiTeleporte, 5023) if teleporte then doRemoveItem(teleporte.uid, 1) doSendMagicEffect(tp.posiTeleporte, CONST_ME_POFF) end end function onDeath(cid) local teleport = config[getCreatureName(cid)] if teleport then doCreateTeleport(5023, teleport.posiToTeleporte, teleport.posiTeleporte) addEvent(removeTeleporte, teleport.time*1000, teleport) end return true end Depois abre o arquivo data/creaturescripts/creaturescripts.xml e coloque a seguinte tag:
    <event type="death" name="teleportmonster" script="teleportBoss.lua"/> E por fim na pasta data/monster/ procure pelo monstro no qual você deseja que crie o teleporte, no meu caso ali eu escolhi o Demon e então abre o nomeMonstro.xml e coloque a seguinte tag:
    <script> <event name="teleportmonster"/> </script> Essa script funciona na tfs1.2, testei ela aqui e fica assim no in game:

Informação Importante

Confirmação de Termo