Ir para conteúdo

MaTTch

Membro
  • Registro em

  • Última visita

Solutions

  1. MaTTch's post in (Resolvido)[Pedido] Account Manager was marked as the answer   
    Não testado.
  2. MaTTch's post in (Resolvido)[Duvida] Healing Source was marked as the answer   
    Tenta assim:



  3. MaTTch's post in (Resolvido)[ajudem-please] Rotate dos personagens was marked as the answer   
    Creaturescripts:
    local delay = 200 -- milliseconds local cidTable = {} function onDirection(cid, old, current) if(old == current) then return true end if(cidTable[cid] and cidTable[cid] > os.clock()) then return false end cidTable[cid] = os.clock() + (delay/1000) return true end TAG:
    <event type="direction" name="NOME" event="script" value="NOME.lua"/> Login.lua:
    registerCreatureEvent(cid, "NOME")
  4. MaTTch's post in (Resolvido)NPCs respondendo em 2 Channels was marked as the answer   
    Tenta fazer assim (não testei):
     
    Vai em data/npc/lib e procura por um arquivo chamado npchandler.lua, abra ele e procure pela função:
    function NpcHandler:greet(cid) e dentro dessa função, apague essa parte:
    self:say(msg) e veja se deu certo.
     
    OBS: é pra apagar onde esta self:say(msg) e não self:say(msg, cid).
  5. MaTTch's post in (Resolvido)(Dúvida) Como alterar essa mensagem "Gratis Premium Account"? was marked as the answer   
    Isso fica no client, você precisa usar algum hex editor.
  6. Vá em config.lua e procure por:
    stairhopDelay e deixe-o no valor 0:
    stairhopDelay = 0
  7. MaTTch's post in (Resolvido)[PEDIDO] Quest de livro escrito was marked as the answer   
    local config = { langStorage = 8971, [55560] = {6533, eng = "Text1", pt = "Texto1"}, [55561] = {6533, eng = "Text2", pt = "Texto2"} } function onUse(cid, item, fromPosition, itemEx, toPosition) if(config[item.uid] ~= nil) then if(getPlayerStorageValue(cid, item.uid) == -1) then local book, text = doPlayerAddItem(cid, config[item.uid][1], 1), getPlayerStorageValue(cid, config.langStorage) >= 2 and config[item.uid].pt or config[item.uid].eng doSetItemText(book, text) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You have found a "..getItemNameById(config[item.uid][1])..".") setPlayerStorageValue(cid, item.uid, 1) else doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "It's empty.") end end return true end
  8. MaTTch's post in (Resolvido)Spell de empurrar was marked as the answer   
    Aé, esqueci kk
     
    Aqui:
    local configSpell = {     pushSqms = 3, -- quantos sqm vai empurrar     exhaustStorage = 55230, -- se quiser pode mudar     exhaustTime = 5 -- exhausted em segundos } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 20) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -7.3, 0) local function isWalkable(pos, creature, pz, proj)     if(getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0) then         return false     end     if(getTilePzInfo(pos) and not pz) then         return false     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     if(getTopCreature(pos).uid ~= 0 and not creature) then         return false     end     return true end local function doPushCreature(target, times)     if(isCreature(target) and times > 0) then         local pos = getCreatureLookPosition(target)         if(isWalkable(pos)) then             doTeleportThing(target, pos)             doSendMagicEffect(getThingPos(target), 2)             addEvent(doPushCreature, 1, target, times-1)         end     end end local function doSpell(cid, target, var)     local pos = getThingPos(target)     local config = {         [NORTH] = {SOUTH, {x=pos.x, y=pos.y+1, z=pos.z}},         [EAST] = {WEST, {x=pos.x-1, y=pos.y, z=pos.z}},         [SOUTH] = {NORTH, {x=pos.x, y=pos.y-1, z=pos.z}},         [WEST] = {EAST, {x=pos.x+1, y=pos.y, z=pos.z}}     }     local a, b = config[getCreatureLookDirection(target)], getCreatureLookPosition(target)     if(isWalkable(a[2]) and isWalkable(b)) then         doPushCreature(target, configSpell.pushSqms)         doTeleportThing(cid, a[2], false)         doCreatureSetLookDirection(cid, getCreatureLookDirection(target))         doCombat(cid, combat, var)     else         doPlayerSendCancel(cid, "Position blocked.")         return false     end     return true end function onCastSpell(cid, var)     if(isPlayer(cid) and exhaustion.check(cid, configSpell.exhaustStorage)) then         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wait "..exhaustion.get(cid, configSpell.exhaustStorage).." second"..(exhaustion.get(cid, configSpell.exhaustStorage) > 1 and "s" or "")..".")         return false     end     exhaustion.set(cid, configSpell.exhaustStorage, configSpell.exhaustTime)     return doSpell(cid, getCreatureTarget(cid), var) end
  9. MaTTch's post in (Resolvido)[Pedido] Recompensa Aleatória was marked as the answer   
    Tipo isso:
    local config = {     [13401] = "C16 Doll",     [13402] = "Goku Doll",     [13403] = "Vegeta Doll", } local rand = {} for itemid, _ in pairs(config) do     table.insert(rand, itemid) end rand = rand[math.random(#rand)] doItemSetAttribute(doPlayerAddItem(cid, rand), "name", ""..config[rand].." / "..getCreatureName(cid).." completou todas tasks") ?
  10. MaTTch's post in (Resolvido)Ajuda Spell was marked as the answer   
    Acho que entendi agora, o effect por ser "torto" tem que ter sua posição declarada. Tenta assim:
    local combat, combat_effect = createCombatObject(), createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -6.3, 0, -7.3, 0) local arrs = {     createCombatArea({ -- combat         {1,1,1,1,1},         {1,1,1,1,1},         {1,1,1,1,1},         {1,1,1,1,1},         {1,1,1,1,1},         {1,1,1,1,1},         {0,0,2,0,0}     }),     createCombatArea({ -- effect         {0,0,0,0,0},         {1,0,1,0,1},         {0,0,0,0,0},         {1,0,1,0,1},         {0,0,0,0,0},         {1,0,1,0,1},         {0,0,2,0,0}     }) } setCombatArea(combat, arrs[1]) setCombatArea(combat_effect, arrs[2]) function onTargetTile(cid, pos)     if(getCreatureLookDirection(cid) == NORTH) then -- (/\)         doSendMagicEffect(pos, 98) -- Se o effect for torto, da pra fazer assim "doSendMagicEffect({x=pos.x+1, y=pos.y+1, z=pos.z}, 98)"     elseif(getCreatureLookDirection(cid) == EAST) then -- (>>)         doSendMagicEffect(pos, 98)     elseif(getCreatureLookDirection(cid) == SOUTH) then -- (\/)         doSendMagicEffect(pos, 98)     elseif(getCreatureLookDirection(cid) == WEST) then -- (<<)         doSendMagicEffect(pos, 98)     end end setCombatCallback(combat_effect, CALLBACK_PARAM_TARGETTILE, "onTargetTile") function onCastSpell(cid, var)     return doCombat(cid, combat, var), doCombat(cid, combat_effect, var) end ali em "arrs" você coloca a area que o dano vai bater e a area que vai aparecer os efeitos, o resto eu acho que você deve saber configurar.
     
    OBS: Não se esqueça de colocar junto da TAG nas spell o parâmetro ( direction="1" ).
  11. MaTTch's post in (Resolvido)Talkaction que remove 1 frag was marked as the answer   
    function onSay(cid, words, param) if(param == "") then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command need a player name param.") end local pid = getPlayerByNameWildcard(param) if(not pid) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player not exist or is offline.") end local result, retInt = db.getResult("SELECT `unjustified` FROM `killers` WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = "..getPlayerGUID(pid)..");"), result:getDataInt("unjustified") if(result:getID() ~= -1) then if(retInt >= 0) then db.executeQuery("UPDATE `killers` SET `unjustified` = "..(retInt - 1).." WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = "..getPlayerGUID(pid)..");") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Frag removed successfully.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player do not have frag.") end result:free() else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Failed.") end return true end Não testei...
  12. MaTTch's post in (Resolvido)Teleport que fala e muda de cor was marked as the answer   
    Vá em globalevents/scripts crie um arquivo LUA e dentro coloque isso:
    local config = { --["nome do texto"] = {position} -- Lembrando que o texto é limitado para apenas 9 caracteres.     ["Texto1"] = {x=160, y=52, z=6},     ["Texto2"] = {x=160, y=52, z=6},     ["Etc..."] = {x=160, y=52, z=6} } function onThink(cid, interval, lastExecution)     for text, pos in pairs(config) do         doSendAnimatedText(pos, text, math.random(1,255))     end     return true end e em globalevents.xml adicione a TAG:
    <globalevent name="EVENT_NAME" interval="1000" event="script" value="NOME_DO_ARQUIVO.lua"/>
  13. MaTTch's post in (Resolvido)Como Colocar Minutos No Help 8.54 was marked as the answer   
    <channel id="9" name="Help" logged="yes" muted="120" conditionId="4" conditionMessage="Wait 2 minutes."/>
  14. MaTTch's post in (Resolvido)ERRO no CONSOLE was marked as the answer   
    local config = { timeToCreate = 1, -- minutes wallId = 9485, wallPos = { {x = 417, y = 65, z = 7}, {x = 417, y = 67, z = 7} } } function removeWalls() doBroadcastMessage("Somente para jogadores experientes.") addEvent(createWalls, config.timeToCreate * 60 * 1000) for _, pos in pairs(config.wallPos) do local a = getTileItemById(pos, config.wallId).uid if(a ~= 0) then doRemoveItem(a) doSendMagicEffect(pos, CONST_ME_MAGIC_RED) end end return true end function createWalls() for _, pos in pairs(config.wallPos) do local a = getTileItemById(pos, config.wallId).uid if(a == 0) then doCreateItem(config.wallId, 1, pos) doSendMagicEffect(pos, CONST_ME_MAGIC_GREEN) end end return true end function onThink(interval, lastExecution) doBroadcastMessage("Blood castle aberto!.") addEvent(removeWalls, 1000) return true end
  15. MaTTch's post in (Resolvido)Erro Quando Player Morre was marked as the answer   
    tenta assim que acho q é melhor:
    local tempo = 11 local position = {} function onCastSpell(cid, var)     local itemid = math.random (118, 118)     if(position[cid] == nil) then         position[cid] = getThingPos(cid)         doDecayItem(doCreateItem(itemid, position[cid]))         doSendMagicEffect(position[cid], 3)         addEvent(function()             if(isCreature(cid)) then                 doPlayerSendTextMessage(cid, 22, "Expiro A Hiraishin Kunai.")                 position[cid] = nil             end         end, 1000*tempo)     else         doTeleportThing(cid, position[cid])         doSendMagicEffect(getThingPos(cid), 82)     end     return true end
  16. MaTTch's post in (Resolvido)Limpa todas as Houses was marked as the answer   
    DELETE FROM `tile_items`; Executa esse comando na sua database com o server offline.
  17. MaTTch's post in (Resolvido)CreatureEvent OnKill, teleport was marked as the answer   
    local config = { boss = "nome", pos = {x=1000, y=1000, z=7}, msg = "You have been trapped by a nightmare.", time = 60 -- quantos segundos depois de matar o boss } function onKill(cid, target) if isMonster(target) and getCreatureName(target):lower() == config.boss:lower() then doTeleportThing(cid, config.pos) addEvent(function() if isPlayer(cid) then return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, config.msg) end end,config.time*1000) end return true end OBS: precisa registrar em login.lua
  18. MaTTch's post in (Resolvido)[Pedido] Spell - Envenenar arma was marked as the answer   
    Spell:
    local storage = 600 function onCastSpell(cid, var) if storage >= 1 then doPlayerSendCancel(cid, "You're already with Poisoned Attack.") doSendMagicEffect(getThingPos(cid), 2) return false end setPlayerStorageValue(cid, storage, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Now you are with Poisoned Attack.") return true end a tag você ja deve saber colocar.
     
     
    Em creaturescripts:
    local condition = createConditionObject(CONDITION_POISON) addDamageCondition(condition, 20, 700, -200) local storage = 600 function onCombat(cid, target) if isPlayer(cid) and getPlayerStorageValue(cid, storage) >= 1 then return doAddCondition(target, condition) and setPlayerStorageValue(cid, storage, -1) end return true end Tag:
    <event type="combat" name="PoisonedAttack" event="script" value="NOME DO ARQUIVO.lua" /> e finalmente em login.lua
    registerCreatureEvent(cid, "PoisonedAttack") o resto você ja deve saber o que fazer. Não sei se era isso que você tava querendo, mas ta ai.
  19. MaTTch's post in (Resolvido)[Pedido] AnimatedText nos monstros/players que sofrerem a magia was marked as the answer   
    local thecombat = createCombatObject() local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLASHARROW) local condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, 1000) setConditionFormula(condition, -0.4, 0, -0.4, 0) setCombatCondition(combat, condition) local arr = { {0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 3, 0, 0, 0} } local area = createCombatArea(arr) setCombatArea(thecombat, area) function getSpellDamage(cid, attackSkill, weaponAttack, attackFactor) local hit = ((getPlayerLevel(cid) * 0.2) + (getPlayerSkill(cid, 4) * 2.4)) local damage = -(math.random(hit * 0.5, hit)) return damage, damage end function onTargetTile(cid, pos) return doCombat(cid,combat,positionToVariant(pos)) end function onTargetCreature(cid, target) return doSendAnimatedText(getThingPos(target), "Slowed!", math.random(1,255)) end setCombatCallback(thecombat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") setCombatCallback(thecombat, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "getSpellDamage") function onCastSpell(cid, var) return doCombat(cid, thecombat, var) end
  20. MaTTch's post in (Resolvido)[Ajuda] Fazer magia que deixa target imóvel funcionar was marked as the answer   
    local time = 3 -- tempo em segundos que vai ficar imovel local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1) local condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, time*1000) setConditionParam(condition, CONDITION_PARAM_SPEED, -5000) local function doSpell(cid, target, var) if not isCreature(cid) or not isCreature(target) then return true end if isPlayer(target) then doCreatureSetNoMove(target, true) addEvent(function() if isPlayer(target) then return doCreatureSetNoMove(target, false) end end,time*1000) else doAddCondition(target, condition) end return doCombat(cid, combat, var) end function onCastSpell(cid, var) return doSpell(cid, getCreatureTarget(cid), var) end
  21. MaTTch's post in (Resolvido)[Pedido] Alguem Centraliza essa Spell was marked as the answer   
    local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 3) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1500.25, 6, -56.30, 6) function onCastSpell(cid, var) local cpos = {x=getThingPos(cid).x+1, y=getThingPos(cid).y+1, z=getThingPos(cid).z} local tpos = {x=getThingPos(getCreatureTarget(cid)).x+3, y=getThingPos(getCreatureTarget(cid)).y, z=getThingPos(getCreatureTarget(cid)).z} doSendMagicEffect(cpos, 00) addEvent(doCombat, 200, cid, combat, var) addEvent(doSendMagicEffect, 200, tpos, 43) return true end
  22. MaTTch's post in (Resolvido)duvida vocation was marked as the answer   
    Em server de narutibia geralmente fica na pasta talkactions nos arquivos chamados transformar.lua e reverter.lua.
  23. MaTTch's post in (Resolvido)[Duvida] Spell Torta was marked as the answer   
    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 end local n = not proj and 2 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 local area = { {1,1,1}, {1,3,1}, {1,1,1}, } local function onDash(cid) local poslook = getCreatureLookPosition(cid) poslook.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE if isWalkable(poslook) then if not isCreature(getThingfromPos(poslook).uid) then doMoveCreature(cid, getPlayerLookDirection(cid)) doSendMagicEffect({x=getThingPos(cid).x+1, y=getThingPos(cid).y, z=getThingPos(cid).z}, 245) return true else doMoveCreature(cid, getPlayerLookDirection(cid)) doAreaCombatHealth(0, 1, poslook, area, -getCreatureSpeed(cid)*2/(getCreatureHealth(cid)/500), -getCreatureSpeed(cid)*2/(getCreatureHealth(cid)/500), 240) doCreatureSay(getThingfromPos(poslook).uid, 'Auch', TALKTYPE_MONSTER) doSetItemOutfit(getThingfromPos(poslook).uid, 0, 1000*1000) doSendMagicEffect(getCreaturePosition(getThingfromPos(poslook).uid), 245) return true end end return true end function onCastSpell(cid, var) local distance = 2 for i = 0, distance do addEvent(onDash,90*i,cid) end return true end
  24. MaTTch's post in (Resolvido)Spell Parede was marked as the answer   
    local time = 5 -- tempo que vai durar as paredes function onCastSpell(cid, var) local cpos = getThingPos(cid) local dir = { [0] = {1026, from = {x=cpos.x-1, y=cpos.y-1, z=cpos.z}, to = {x=cpos.x+1, y=cpos.y-1, z=cpos.z}}, -- North (cima) [1] = {1025, from = {x=cpos.x+1, y=cpos.y-1, z=cpos.z}, to = {x=cpos.x+1, y=cpos.y+1, z=cpos.z}}, -- East (direita) [2] = {1026, from = {x=cpos.x-1, y=cpos.y+1, z=cpos.z}, to = {x=cpos.x+1, y=cpos.y+1, z=cpos.z}}, -- South (baixo) [3] = {1025, from = {x=cpos.x-1, y=cpos.y-1, z=cpos.z}, to = {x=cpos.x-1, y=cpos.y+1, z=cpos.z}}, -- West (esquerda) } local getDir = dir[getCreatureLookDirection(cid)] for x = getDir.from.x, getDir.to.x do for y = getDir.from.y, getDir.to.y do local pos = {x=x,y=y,z=cpos.z} if not getTileInfo(pos).house and not getTilePzInfo(pos) then doCreateItem(getDir[1], 1, pos) addEvent(function() if getTileItemById(pos, getDir[1]).uid > 0 then doRemoveItem(getTileItemById(pos, getDir[1]).uid) end end,time*1000) end end end return true end  Ali nos números 1026 e 1025 é o ID das paredes.
  25. MaTTch's post in (Resolvido)Como fazer para Npc aceita acentos was marked as the answer   
    Converta o script do NPC para ANSI com o notepad ou outro programa da sua preferencia. 

Informação Importante

Confirmação de Termo