Ir para conteúdo

.Smile

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Curtir
    .Smile recebeu reputação de VitorNM em /adm para virar GOD /player para virar PLAYER   
    Olá a todos, atualmente estou aprendendo programação e desenvolvendo um Servidor, uma das coisas chatas a se fazer era ficar alternando entre um Personagem PLAYER e outro GOD para testar algumas coisas, com esses 2 scripts eu resolvi esse problema.

    É um script simples que eu pretendo futuramente melhorá-lo.

    What does the command do?
    /adm - Transforma seu personagem em GOD e kika ele
    /player - Transforma seu personagem em PLAYER e kika ele
     
    LEMBRANDO QUE: Não é qualquer que consegue usar esse comando, você precisa ter dado a sua conta o acesso de god, assim podendo ter esse comando num Servidor Online com outros jogadores sem que os mesmos possam usar.

    \data\talkactions
    talkactions.xml
    Code: <talkaction words="/player" script="player.lua" /> <talkaction words="/adm" script="adm.lua" /> \data\talkactions\scripts 
    adm.lua
    Code: function onSay(player, words, param) if player:getAccountType() < ACCOUNT_TYPE_GOD then return false end local position = player:getPosition() player:setGroup(Group(3)) position:sendMagicEffect(14) player:remove() return false end \data\talkactions\scripts
    player.lua
    function onSay(player, words, param) if player:getAccountType() < ACCOUNT_TYPE_GOD then return false end local position = player:getPosition() player:setGroup(Group(1)) position:sendMagicEffect(13) player:remove() return false end  
  2. Curtir
    .Smile deu reputação a vine96 em (Resolvido)Numero de items em um sqm   
    consegui adaptar o script para tfs 1.3, quem quiser ta aí:
    local tile = Tile(toPosition)     if tile and tile:getItemCount() > 20 then         self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)         return false     end  
  3. Obrigado
    .Smile recebeu reputação de ITALOx em (Resolvido)Alguém poderia me fornecer esse script?   
    Essa Spell já foi feita pelo membro @xWhiteWolf
    Link do tópico: 
     
     
    copie algum arquivo .lua da sua pasta data/spells/scripts e renomeie para flightkubu.lua, apague tudo e cole isso dentro:
    -- dash as it was in avaOT by Night Wolf local damage = 0 -- dano que toma qnd bate em algum obstáculo local speed = 500 -- velocidade do player ao usar o dash (vai de 0 a mil) local pzprotect = true -- nao deixa entrar em pz com a spell local distance = 15 -- quantos sqms anda local function isWalkable(pos, creature, proj, pz)-- by Nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function onWalk(cid) if isCreature(cid) then local poslook = getCreatureLookPosition(cid) poslook.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE if isWalkable(poslook, false, false, pzprotect) then if not isCreature(getThingfromPos(poslook).uid) then doMoveCreature(cid, getPlayerLookDirection(cid)) doSendMagicEffect(getPlayerPosition(cid), 14) else doCreatureAddHealth(cid, -damage) doSendMagicEffect(getPlayerPosition(cid), 31) doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) end else doCreatureAddHealth(cid, -damage) doSendMagicEffect(getPlayerPosition(cid), 31) doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) end end return true end function onCastSpell(cid, var) for i = 0, distance do addEvent(onWalk, (1001- math.min(speed, 1000)) *i, cid) end return true end em data/spells/spells.xml adicione essa tag:
    <instant name="Flight Kubu" words="Flight Kubu" direction="1" lvl="100" mana="200" prem="0 exhaustion="7000" event="script" value="flightkubu.lua"> <vocation id="7"/> <vocation id="6"/> <vocation id="5"/> </instant>  
  4. Gostei
    .Smile deu reputação a xWhiteWolf em Dash.   
    Uma magia que solta um dash, que é controlado ao mudar a direção que você está olhando (ctrl + seta)
    ~~~~Script baseado no AvaOT/Korelin
    dash.lua
    -- dash as it was in avaOT by Night Wolf local damage = 20 -- dano que toma qnd bate em algum obstáculo local speed = 910 -- velocidade do player ao usar o dash (vai de 0 a mil) local pzprotect = true -- nao deixa entrar em pz com a spell local distance = 15 -- quantos sqms anda local function isWalkable(pos, creature, proj, pz)-- by Nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function onWalk(cid) if isCreature(cid) then local poslook = getCreatureLookPosition(cid) poslook.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE if isWalkable(poslook, false, false, pzprotect) then if not isCreature(getThingfromPos(poslook).uid) then doMoveCreature(cid, getPlayerLookDirection(cid)) doSendMagicEffect(getPlayerPosition(cid), 14) else doCreatureAddHealth(cid, -damage) doSendMagicEffect(getPlayerPosition(cid), 31) doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) end else doCreatureAddHealth(cid, -damage) doSendMagicEffect(getPlayerPosition(cid), 31) doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) end end return true end function onCastSpell(cid, var) for i = 0, distance do addEvent(onWalk, (1001- math.min(speed, 1000)) *i, cid) end return true end no começo você edita o dano que recebe ao bater num obstáculo e aqui
     local distance = 15 você configura a distancia máxima que o player percorre antes do dash acabar.

    no Spells.xml você adiciona essa tag aqui
    <instant name="Dash" words="utani dash hur" direction="1" lvl="100" mana="200" prem="1"  exhaustion="7000"  event="script" value="dash.lua"> <vocation id="7"/> <vocation id="6"/> <vocation id="5"/> </instant> EDIT:: ALGUMAS IMAGENS


  5. Curtir
    .Smile deu reputação a rodolfoaugusto em Exercise Weapons 1.2   
    Olá pessoal, essa é a primeira versão do "Exercise Weapons",
     
    Sinta-se livre para sugerir modificações e ajudar a melhorá-lo!
    Caso você não tenha as sprites, pode usar outras, como a "Training Dummy" e outros items correspondentes.


     


    Crie o arquivo exercise_training.lua
    local skills = { [26397] = {id=SKILL_SWORD,voc=4}, [26398] = {id=SKILL_AXE,voc=4}, [26399] = {id=SKILL_CLUB,voc=4}, [26400] = {id=SKILL_DISTANCE,voc=3,range=CONST_ANI_SIMPLEARROW}, [26401] = {id=SKILL_MAGLEVEL,voc=2,range=CONST_ANI_ENERGY}, [26402] = {id=SKILL_MAGLEVEL,voc=1,range=CONST_ANI_FIRE}, } ------- CONFIG -----// local dummies = {26403,26404} local skill_gain = 1 -- per hit local gain_stamina = 60 local function start_train(pid,start_pos,itemid,fpos) local player = Player(pid) if player ~= nil then local pos_n = player:getPosition() if start_pos:getDistance(pos_n) == 0 and getTilePzInfo(pos_n) then if player:getItemCount(itemid) >= 1 then local exercise = player:getItemById(itemid,true) if exercise:isItem() then if exercise:hasAttribute(ITEM_ATTRIBUTE_CHARGES) then local charges_n = exercise:getAttribute(ITEM_ATTRIBUTE_CHARGES) if charges_n >= 1 then exercise:setAttribute(ITEM_ATTRIBUTE_CHARGES, (charges_n-1)) local required = 0 local currently = 0 local voc = player:getVocation() if skills[itemid].id == SKILL_MAGLEVEL then required = voc:getRequiredManaSpent(player:getBaseMagicLevel() + 1)/skill_gain currently = player:getManaSpent() player:addManaSpent(required - currently) else required = voc:getRequiredSkillTries(skills[itemid].id, player:getSkillLevel(skills[itemid].id)+1)/skill_gain currently = player:getSkillTries(skills[itemid].id) player:addSkillTries(skills[itemid].id, (required - currently)) end fpos:sendMagicEffect(CONST_ME_HITAREA) if skills[itemid].range then pos_n:sendDistanceEffect(fpos, skills[itemid].range) end player:setStamina(player:getStamina() + 60) if charges_n == 1 then exercise:remove(1) return true end local training = addEvent(start_train, voc:getAttackSpeed(), pid,start_pos,itemid,fpos) else exercise:remove(1) stopEvent(training) end end end end else stopEvent(training) end else stopEvent(training) end return true end function onUse(player, item, fromPosition, target, toPosition, isHotkey) local start_pos = player:getPosition() if target:isItem() then if isInArray(dummies,target:getId()) then if not skills[item.itemid].range and (start_pos:getDistance(target:getPosition()) > 1) then stopEvent(training) return false end if not player:getVocation():getId() == skills[item.itemid].voc or not player:getVocation():getId() == (skills[item.itemid].voc+4) then stopEvent(training) return false end player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You started training.") start_train(player:getId(),start_pos,item.itemid,target:getPosition()) end end return true end  
    Adicione essa linha em actions.xml
     <!-- Training -->     <action fromid="26397" toid="26402" script="exercise_training.lua" allowfaruse="1"/>  
    Em events.xml 

    - Você vai alterar a parte (enable="0" para "1")
    <event class="Player" method="onTradeRequest" enabled="1" />  
    Em /events/scripts/player.lua
    Adicione essa linha no início do arquivo
    local exercise_ids = {26397,26398,26399,26400,26401,26402}
    - Agora vá até a função function PlayerMoveItem e adicione abaixo:
      -- Exercise Weapons     if isInArray(exercise_ids,item.itemid) then         self:sendCancelMessage('You cannot move this item outside this container.')         return false     end
    - Na função function PlayerOnTradeRequest adicione essa linha abaixo:
      if isInArray(exercise_ids,item.itemid) then         return false     end  
     
    Espero que gostem e seja útil.
  6. Curtir
    .Smile deu reputação a DdJs em [Link Quebrado] The Magician's Library | Cave Hunt | 10.98   
    The Magician's Library
    Version: 10.98
     
     
    [Scan]
     
     
    Type: .Rar
    Size: 229KB
    Position(s): [X: 1011 Y: 1030 Z: 10]
    File password: tibiaking
     
     
    Images:
     
     
  7. Curtir
    .Smile deu reputação a lordzetros em Alavanca de troca [X itens por Y itens]   
    Olá,
    Bom... teve um pedido no Discord da TK feito por algum usuário (não estou recordando o nome) que estava tendo dificuldades em fazer determinado script, então decidi fazê-lo. É algo simples, eu já tinha enviado lá no canal de suporte, porém, como já de conhecimento por muitos, o canal foi removido. Decidi refazer de uma forma melhor e mais prática.

    * Sobre o Script * 
    Quando o jogador utilizar a alavanca para ganhar determinado(s) item(s), ele terá que ter deixado em POSIÇÕES DEFINIDAS alguns itens, sendo assim, possível efetuar a troca. Simples, não? Caso ainda não tenha entendido, tem imagem abaixo de como funciona o mesmo.
     
    * Imagens demonstração * 

    Tentando efetuar a troca sem tá com os itens posicionados de forma correta...
     

    Efetuando a troca de forma correta.
     
    * Instalando o Script * 
    Em data/actions/scripts/ crie um arquivo chamado alavanca_troca.lua e cole isto dentro:
    --[[ Lordzetros - TK ]] local config_itens = { {id = 2666, pos = {144,63,6}, count = 1}, -- ID DO ITEM NECESSÁRIO, POSIÇÃO QUE DEVE FICAR, QUANTIDADE DE ITEM NECESSÁRIO {id = 2667, pos = {145,63,6}, count = 1}, {id = 2671, pos = {146,63,6}, count = 1}, -- Caso queira colocar outro item, basta seguir esse modelo (ctrl + c) } local config_troca = { msg_falha = "Falha na troca do item. Necessario: %dx %s em sua devida posicao!", msg_sucesso = "A troca foi efetuada com sucesso!", recompensas = {{id = 2003, count = 1}, {id = 2004, count = 1}} -- Para deixar apenas uma recompensa, apenas deixe recompensas = {{id = ID_DO_ITEM_A_GANHAR, count = QUANTIDADE_A_GANHAR}} } function onUse(player, item, fromPosition, target, toPosition, isHotkey) local ax_t = {} for i, v in ipairs(config_itens) do local vt = Tile(Position(v.pos[1], v.pos[2], v.pos[3])) local item_t = vt:getItemById(v.id) if (not item_t or item_t:getCount() < v.count) then player:getPosition():sendMagicEffect(CONST_ME_POFF) player:sendTextMessage(36, config_troca.msg_falha:format(v.count, ItemType(v.id):getName())) return false end table.insert(ax_t, {item_t, v.count}) end for i, v in ipairs(ax_t) do v[1]:remove(v[2]) end for i, v in ipairs(config_troca.recompensas) do player:addItem(v.id, v.count) end player:sendTextMessage(36, config_troca.msg_sucesso) player:getPosition():sendMagicEffect(CONST_ME_FIREWORK_RED) return true end Em seguida, coloque esta linha de código abaixo de uma semelhante em data/actions/actions.xml
    <action actionid="30258" script="alavanca_troca.lua" />  
    Para finalizar, abre seu editor de mapa e coloque em algum alavanca o actionID = 30258

     
     
    * Configurando o Script * 
    Tá tudo comentado no código, portanto, vou falar só por cima.

     {id = 2666, pos = {144,63,6}, count = 1}
    Nesta parte, você deve colocar o id do item necessário, a posição que ele deve ficar e a quantidade.
     
    E nesta parte você configura a recompensa do jogador
     recompensas = {{id = 2003, count = 1}, {id = 2004, count = 1}}
    Id do item que ele ganhará e quantidade
     
     
    Enfim, script simples, porém, pode ser útil para muitos, assim como acredito que será para o usuário que solicitou, :). Abraços.
  8. Curtir
    .Smile deu reputação a DdJs em Frazzlemaw Grounds | Cave Hunt | 10.98   
    Frazzlemaw Grounds
    Version: 10.98
     
    Download:

     
    Type: .Rar
    Size: 127KB
    Position(s): [X: 970 Y: 1050 Z: 7], [X: 1094 Y: 991 Z: 8]
    File password: tibiaking
     
    Scan:

     
    Images:
     
     
  9. Curtir
    .Smile deu reputação a Reds em SD Modificada   
    Hoje estou trazendo um script bem simples, mas que é muito divertido.. Uma modificação no script da SD, mas que você pode utilizar em alguma outra rune/spell.
    O que eu fiz foi modificar para a SD ter uma chance de dar "double hit", nesse caso 20%.
     
    Para fazer isso é bem simples, altere o código da sua SD para:
     
     
    Lembro que foi um dos primeiros que consegui fazer sozinho e que na época me trouxe muita alegria, hoje quando abri para fazer o tópico, consegui perceber o quanto evoluí. E é claro que essa já é a versão refatorada.
    Testado em TFS 0.4
  10. Curtir
    .Smile recebeu reputação de Naze em (Resolvido)NPC Teleporta Storange e Level, Ajuda por favor   
    local DESTINO = {x = 160, y = 54, z = 7} -- POSIÇÃO DE DESTINO local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg:lower()) end function onThink() npcHandler:onThink() end local talkState = {} function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if getPlayerStorageValue(cid, 12345) > 0 then -- STORAGE selfSay('Você já fez a quest',cid) return false end if msgcontains(msg, "tentar") then selfSay("Você realmente deseja tentar obter aprovação, achar o caminho de volta pode ser muito dificil se não conseguir?", cid) talkState[talkUser] = 1 elseif msgcontains(msg, "yes") and talkState[talkUser] == 1 then if getPlayerLevel(cid) >= 400 then selfSay("Boa sorte!", cid) doSendMagicEffect(getThingPos(cid), 10) npcHandler:releaseFocus(cid) doTeleportThing(cid, DESTINO) doSendMagicEffect(DESTINO, 10) else selfSay("Me desculpe, mas você não tem level necessario para obter aprovação. Volte quando atingir level 400.", cid) end talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())  
     
  11. Curtir
    .Smile recebeu reputação de joaovitorbk9 em [Ajuda] Como usar powerdown em protectzone   
    Vai no seu spells.xml e encontra a Tag da magia mude o 
    aggressive="1" para 
    aggressive="0"  caso não tenha essa Tag adicione ela.
  12. Obrigado
    .Smile deu reputação a mullino em (Resolvido)Usar Comando Somente Em X Position   
    @.Smile Obrigado mano vc é 10 TBM...
    da uma forcinha la no outro fazendo favor tem como?
     
  13. Curtir
    .Smile recebeu reputação de mullino em (Resolvido)Usar Comando Somente Em X Position   
    SakopPkosaok sempre erro na hora de mexer com variáveis fico feliz que já tenham te ajudado, corrigi o  código lá de qualquer forma.
  14. Curtir
    .Smile deu reputação a Igorzerah em (Resolvido)Usar Comando Somente Em X Position   
    @mullino
  15. Curtir
    .Smile recebeu reputação de drygolx em [8.60] Erro na troca de vocação   
    Vai no seu vocations.xml é certifica que o ID da vocação é o mesmo ID do fromvoc
     
    Exemplo:
    <vocation id="10" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="5"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation>  
    vocation id="10" fromvoc="5">
     
    a vocação 10 quando morreu ou deslogar vai voltar para a vocação 5, então certifique-se que os fromvoc estão iguais aos vocation id.
  16. Haha
    .Smile deu reputação a mullino em (Resolvido)Ajuda Remeres.   
    Era uma coisa Boba Que meu Brother @igorcarmo
    Me Ajudou.. Era So Aperta
     [ A ] para remover a borta alto matica e eu sofrendo com isso a tempos.... 
    decupem pela vergonha que passei..
  17. Obrigado
    .Smile recebeu reputação de Black Fenix em (Resolvido)Nao poder usar o comando em "X" lugares   
    function onSay(cid, words, param) local from,to = {x=1001, y=705, z=7},{x=1031, y=737, z=7} local from2,to2 = {x=1011, y=705, z=6},{x=1031, y=738, z=6} local from3,to3 = {x=1012, y=706, z=5},{x=1032, y=739, z=5} local pos = {x=99, y=188, z=7} if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) or isInRange(getCreaturePosition(cid), from3, to3) then doPlayerSendCancel(cid, "Voce nao pode fazer isso nessa area!") return true end if getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "Voce nao pode fazer isso em luta") else doSendMagicEffect(getPlayerPosition(cid),53) doPlayerSendCancel(cid,"Voce foi teleportado Com Sucesso") doTeleportThing(cid,pos) end return true end local from,to = {x=1001, y=705, z=7},{x=1031, y=737, z=7} = aqui você edita as posições do mapa sendo o primeiro valor a posição superior esquerda e segundo a posição inferior direita.

  18. Curtir
    .Smile recebeu reputação de King Laker em (Resolvido)Nao poder usar o comando em "X" lugares   
    function onSay(cid, words, param) local from,to = {x=1001, y=705, z=7},{x=1031, y=737, z=7} local from2,to2 = {x=1011, y=705, z=6},{x=1031, y=738, z=6} local from3,to3 = {x=1012, y=706, z=5},{x=1032, y=739, z=5} local pos = {x=99, y=188, z=7} if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) or isInRange(getCreaturePosition(cid), from3, to3) then doPlayerSendCancel(cid, "Voce nao pode fazer isso nessa area!") return true end if getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "Voce nao pode fazer isso em luta") else doSendMagicEffect(getPlayerPosition(cid),53) doPlayerSendCancel(cid,"Voce foi teleportado Com Sucesso") doTeleportThing(cid,pos) end return true end local from,to = {x=1001, y=705, z=7},{x=1031, y=737, z=7} = aqui você edita as posições do mapa sendo o primeiro valor a posição superior esquerda e segundo a posição inferior direita.

  19. Curtir
    .Smile recebeu reputação de Agaka em (Resolvido)Nao poder usar o comando em "X" lugares   
    function onSay(cid, words, param) local from,to = {x=1001, y=705, z=7},{x=1031, y=737, z=7} local from2,to2 = {x=1011, y=705, z=6},{x=1031, y=738, z=6} local from3,to3 = {x=1012, y=706, z=5},{x=1032, y=739, z=5} local pos = {x=99, y=188, z=7} if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) or isInRange(getCreaturePosition(cid), from3, to3) then doPlayerSendCancel(cid, "Voce nao pode fazer isso nessa area!") return true end if getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "Voce nao pode fazer isso em luta") else doSendMagicEffect(getPlayerPosition(cid),53) doPlayerSendCancel(cid,"Voce foi teleportado Com Sucesso") doTeleportThing(cid,pos) end return true end local from,to = {x=1001, y=705, z=7},{x=1031, y=737, z=7} = aqui você edita as posições do mapa sendo o primeiro valor a posição superior esquerda e segundo a posição inferior direita.

  20. Curtir
    .Smile deu reputação a DdJs em Behemoth's Lair | Cave Hunt | 10.98   
    Behemoth's Lair
    Version: 10.98
     
    Download:

     
    Type: .Rar
    Size: 67KB
    Position(s): [X: 1024 Y: 1017 Z: 8]
    File password: tibiaking
     
    Scan:

     
    Images:
     
     
  21. Obrigado
    .Smile recebeu reputação de leozincorsair em (Resolvido)Colocar storage e exausted nessa script   
    local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_ORANGE) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -110.0, 0, -125.0, 0) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 301) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat3, COMBAT_PARAM_EFFECT, 301) local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat4, COMBAT_PARAM_EFFECT, 301) local combat5 = createCombatObject() setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat5, COMBAT_PARAM_EFFECT, 301) arr1 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } arr2 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0}, {0, 0, 0, 0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0, 0}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) local area3 = createCombatArea(arr3) local area4 = createCombatArea(arr4) local area5 = createCombatArea(arr5) setCombatArea(combat1, area1) setCombatArea(combat2, area2) setCombatArea(combat3, area3) setCombatArea(combat4, area4) setCombatArea(combat5, area5) local function onCastSpell1(parameters) return isCreature(parameters.cid) and doCombat(parameters.cid, parameters.combat1, parameters.var) end local function onCastSpell2(parameters) return isCreature(parameters.cid) and doCombat(parameters.cid, parameters.combat2, parameters.var) end local function onCastSpell3(parameters) return isCreature(parameters.cid) and doCombat(parameters.cid, parameters.combat3, parameters.var) end local function onCastSpell4(parameters) return isCreature(parameters.cid) and doCombat(parameters.cid, parameters.combat4, parameters.var) end local function onCastSpell5(parameters) return isCreature(parameters.cid) and doCombat(parameters.cid, parameters.combat5, parameters.var) end function onCastSpell(cid, var) local waittime = 1.5 -- tempo de exhaustion em segundos local storage = 115818 -- storage do exhaustion if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "You are exhausted") return false end local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5 } addEvent(onCastSpell1, 0, parameters) addEvent(onCastSpell2, 0, parameters) addEvent(onCastSpell3, 150, parameters) addEvent(onCastSpell4, 300, parameters) addEvent(onCastSpell5, 450, parameters) exhaustion.set(cid, storage, waittime) if not isPlayer(parameters.cid) then return true end return true end  
  22. Gostei
    .Smile deu reputação a mullino em (Resolvido)Colocar storage e exausted nessa script   
    @leozincorsair testa ai
    local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_ORANGE) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -110.0, 0, -125.0, 0) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 301) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat3, COMBAT_PARAM_EFFECT, 301) local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat4, COMBAT_PARAM_EFFECT, 301) local combat5 = createCombatObject() setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat5, COMBAT_PARAM_EFFECT, 301) arr1 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } arr2 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0}, } arr5 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) local area3 = createCombatArea(arr3) local area4 = createCombatArea(arr4) local area5 = createCombatArea(arr5) setCombatArea(combat1, area1) setCombatArea(combat2, area2) setCombatArea(combat3, area3) setCombatArea(combat4, area4) setCombatArea(combat5, area5) local function onCastSpell1(parameters) return isCreature(parameters.cid) and doCombat(parameters.cid, parameters.combat1, parameters.var) end local function onCastSpell2(parameters) return isCreature(parameters.cid) and doCombat(parameters.cid, parameters.combat2, parameters.var) end local function onCastSpell3(parameters) return isCreature(parameters.cid) and doCombat(parameters.cid, parameters.combat3, parameters.var) end local function onCastSpell4(parameters) return isCreature(parameters.cid) and doCombat(parameters.cid, parameters.combat4, parameters.var) end local function onCastSpell5(parameters) return isCreature(parameters.cid) and doCombat(parameters.cid, parameters.combat5, parameters.var) end local tempo = 2 -- em segundos local strg = 12120 function onCastSpell(cid, var) if not exhaustion.check(cid, strg) then exhaustion.set(cid, strg, tempo * 1000) return doCombat(cid, combat, var) else doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid, strg).."]") end local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5 } addEvent(onCastSpell1, 0, parameters) addEvent(onCastSpell2, 0, parameters) addEvent(onCastSpell3, 150, parameters) addEvent(onCastSpell4, 300, parameters) addEvent(onCastSpell5, 450, parameters) if not isPlayer(parameters.cid) then return true end return true end  
  23. Gostei
    .Smile recebeu reputação de mullino em (Resolvido)Trocar Money Por Item   
    local moneyId = 11192 -- ID do item que ira remover local moneyRed = 5 -- Quatidade de item para remover o frag e red skull local moneyBlack = 3 -- Quatidade de item para remover o frag e black skull local moneySkullNone = 1 -- Quatidade de item para remover o frag function onSay(cid, words, param, channel) if not getTileInfo(getThingPos(cid)).protection then return doPlayerSendCancel(cid, "You must be in a Protection Zone.") end pid = getPlayerGUID(cid) if getCreatureSkullType(cid) == 4 then if doPlayerRemoveItem(cid, moneyId, moneyRed) then doCreatureSetSkullType(cid, 0) doPlayerSendTextMessage(cid, 19, 'His frags and red skull were removed for '.. doNumberFormat(moneyRed) ..' golds. You will be logged off in 5 seconds.') doSendMagicEffect(getPlayerPosition(cid), 14) doRemoveConditions(cid, CONDITION_INFIGHT) doRemoveCreature(cid) db.executeQuery("UPDATE players SET skulltime = 0 WHERE id = ".. pid ..";") db.executeQuery("UPDATE killers SET unjustified = 0 WHERE id IN (SELECT kill_id FROM player_killers WHERE player_id = " .. pid .. ");") else doPlayerSendTextMessage(cid, 19, 'You don\'t have enough money, it takes '.. doNumberFormat(moneyRed) ..' golds') doSendMagicEffect(getPlayerPosition(cid), 2) end return TRUE end if getCreatureSkullType(cid) == 5 then if doPlayerRemoveItem(cid, moneyId, moneyBlack) then doCreatureSetSkullType(cid, 0) doPlayerSendTextMessage(cid, 19, 'His frags and black skull were removed for '.. doNumberFormat(moneyBlack) ..' golds. You will be logged off in 5 seconds.') doSendMagicEffect(getPlayerPosition(cid), 14) doRemoveConditions(cid, CONDITION_INFIGHT) doRemoveCreature(cid) db.executeQuery("UPDATE players SET skulltime = 0 WHERE id = ".. pid ..";") db.executeQuery("UPDATE killers SET unjustified = 0 WHERE id IN (SELECT kill_id FROM player_killers WHERE player_id = " .. pid .. ");") else doPlayerSendTextMessage(cid, 19, 'You don\'t have enough money, it takes '.. doNumberFormat(moneyBlack) ..' golds') doSendMagicEffect(getPlayerPosition(cid), 2) end return TRUE end if getCreatureSkullType(cid) <= 3 then if doPlayerRemoveItem(cid, moneyId, moneySkullNone) then doCreatureSetSkullType(cid, 0) doPlayerSendTextMessage(cid, 19, 'His frags were removed for '.. doNumberFormat(moneySkullNone) ..' golds. You will be logged off in 5 seconds.') doSendMagicEffect(getPlayerPosition(cid), 14) doRemoveConditions(cid, CONDITION_INFIGHT) doRemoveCreature(cid) db.executeQuery("UPDATE players SET skulltime = 0 WHERE id = ".. pid ..";") db.executeQuery("UPDATE killers SET unjustified = 0 WHERE id IN (SELECT kill_id FROM player_killers WHERE player_id = " .. pid .. ");") else doPlayerSendTextMessage(cid, 19, 'You don\'t have enough money, it takes '.. doNumberFormat(moneySkullNone) ..' golds') doSendMagicEffect(getPlayerPosition(cid), 2) end return TRUE end end  
  24. Curtir
    .Smile recebeu reputação de mullino em (Resolvido)Money Por Vip Coins   
    Corrigido, lembre-se de editar o valor minimo e o fee na lib e veja se tem os requisitos.
    npc
    --[[ SISTEMA DE CAÇADOR DE RECOMPENSAS FEITO POR LEORIC [OMEGA] ]]-- local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local moneyId = 11192 -- ID da moeda local playerReward = getPlayerStorageValue(cid, bountyReward) local points = getPlayerStorageValue(cid, bountyPoints) > 0 and getPlayerStorageValue(cid, bountyPoints) or 0 if msgcontains(msg,'assassin guild') then selfSay('Yess, I am the masster of the assasssinsss. What do you want with the guild? {Post} a bounty on someone? Get your {reward}, check the {most wanted} or your {points}? Or maybe some {information} about our bounty system?',cid) talkState[talkUser] = 1 elseif talkState[talkUser] == 1 then if msgcontains(msg,'post') then selfSay('Yesss, a bounty?! Good for businessss. The death of whom do you wish? Give me a {name}.',cid) talkState[talkUser] = 2 elseif msgcontains(msg,'information') then selfSay('It isss very sssimple. You give me a name and money and I\'ll put it at the bounty board. You can check who hasss an active bounty there too. Who kills that person, gets the money. Ssssimple. And, of course, you don\'t get paid to kill a person whose bounty you posted.',cid) elseif msgcontains(msg, 'points') then if bountyConfig.points == false and bountyConfig.omegaPointSystem == false then selfSay('Point system is currently disabled.',cid) else selfSay('You have '..points..' bounty points.',cid) end elseif msgcontains(msg,'reward') then if playerReward > 0 then doPlayerAddItem(cid, moneyId, playerReward) selfSay('Here you go, my bounty hunter friend, '..playerReward..' gps.', cid) setPlayerStorageValue(cid, bountyReward, 0) talkState[talkUser] = 1 else selfSay('Nope, you have no reward to collect.',cid) talkState[talkUser] = 1 end elseif msgcontains(msg, 'most wanted') then local players = getTopBounties(10) local names = {} local str = '' if not players then selfSay('There are no active bounties at this moment.',cid) return true end for index, pid in ipairs(players) do table.insert(names,'{'..index..'} '..getPlayerNameByGUID(pid)..' ['..getPlayerBounty(getPlayerNameByGUID(pid))..']\n') end str = table.concat(names) doPlayerPopupFYI(cid, str) end elseif talkState[talkUser] == 2 then if not playerExist(msg) then selfSay('No, no, no. That is not a valid target. Give me a {name}!',cid) elseif string.lower(msg) == string.lower(getCreatureName(cid)) then selfSay('You can\'t post a bounty on yourself, stupid!', cid) else playername = {} playername[cid] = msg selfSay('Very well. The service has a minimum cost of '..bountyConfig.min..' and we take a '..bountyConfig.fee..'% fee of your bounty. How much do you want to deposit on your bounty?',cid) talkState[talkUser] = 3 end elseif talkState[talkUser] == 3 then if tonumber(msg) ~= nil and tonumber(msg) and tonumber(msg) >= bountyConfig.min then bounty = tonumber(msg) if doPlayerRemoveItem(cid, moneyId, bounty) then doPlayerAddBounty(playername[cid], math.ceil(((1-(bountyConfig.fee/100))*bounty))) setGlobalStorageValue(getPlayerGUIDByName(playername[cid])+20000, getPlayerGUIDByName(getCreatureName(cid))) selfSay('You have sssuccessfully posted a bounty for '..playername[cid]..'.',cid) selfSay('Would you like anything else? Maybe {post} a bounty on someone, check the {most wand} or your {points}? Get your {reward}? Or maybe some {information} about our bounty system?',cid) playername[cid] = nil talkState[talkUser] = 1 else selfSay('You can\'t fool me, you basssstard! You don\'t pay, I add no bounty!',cid) talkState[talkUser] = 1 end else selfSay('I\'m still expecting a real bounty, my friend... it has to be bigger than '..bountyConfig.min..'.',cid) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())  
  25. Curtir
    .Smile recebeu reputação de eliaspalermo em Adição no tp scroll   
    function onUse(cid, item, fromPosition, itemEx, toPosition) if getCreatureCondition(cid, CONDITION_INFIGHT) == true then return doPlayerSendCancel(cid, "You can not be in Battle.") end local config = { pos = {x = 987, y = 1029, z = 7}, -- posição que o player vai cair waittime = 1.5 -- tempo de exhaustion em segundos storage = 115818 -- storage do exhaustion } if exhaustion.check(cid, config.storage) then doPlayerSendCancel(cid, "You are exhausted") return false end if(itemEx.itemid == 13576) then doPlayerSendTextMessage(cid, 19, "Voce foi transportado de volta a File City") -- mensagem que sairá quando ele for teleportado doTeleportThing(cid, config.pos) doRemoveItem(item.uid, 1) exhaustion.set(cid, config.storage, config.waittime) end return true end  

Informação Importante

Confirmação de Termo