Ir para conteúdo

Tuka

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    htdocs\system\application\views -- create.php
     
     e o resto dos samples no config.php da pasta htdocs.
  2. Gostei
    Tuka deu reputação a xWhiteWolf em (Resolvido)Spell para ficar intocavel   
    remove essa linha:
    doAddCondition(cid, outfit)
  3. Gostei
    Tuka deu reputação a psychonaut em (Resolvido)[PEDIDO] Spell que suga mana   
    Removi efeitos que não funcionavam.
    local MIN = 30 -- minimo de drain local MAX = 100 -- max de drain local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, 0, -MIN, 0, -MAX) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, 0, -MIN, 0, -MAX) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) setCombatParam(combat3, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, 0, -MIN, 0, -MAX) local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) setCombatParam(combat4, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, 0, -MIN, 0, -MAX) arr1 = { {0, 0, 0, 0, 0}, {0, 1, 1, 1, 0}, {0, 1, 3, 1, 0}, {0, 1, 1, 1, 0}, {0, 0, 0, 0, 0} } arr2 = { {0, 0, 0, 0, 0}, {0, 1, 1, 1, 0}, {0, 1, 3, 1, 0}, {0, 1, 1, 1, 0}, {0, 0, 0, 0, 0} } arr3 = { {0, 0, 0, 0, 0}, {0, 1, 1, 1, 0}, {0, 1, 3, 1, 0}, {0, 1, 1, 1, 0}, {0, 0, 0, 0, 0} } arr4 = { {0, 0, 0, 0, 0}, {1, 1, 1, 1, 1}, {1, 1, 3, 1, 1}, {1, 1, 1, 1, 1}, {0, 0, 0, 0, 0} } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) local area3 = createCombatArea(arr3) local area4 = createCombatArea(arr4) setCombatArea(combat1, area1) setCombatArea(combat2, area2) setCombatArea(combat3, area3) setCombatArea(combat4, area4) local function onCastSpell1(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var) end local function onCastSpell2(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat2, parameters.var) end local function onCastSpell3(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat3, parameters.var) end local function onCastSpell4(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat4, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var} addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 400, parameters) addEvent(onCastSpell3, 800, parameters) addEvent(onCastSpell4, 1000, parameters) return true end CONST_ME_MAGIC_RED você pode mudar, alterei quando não estava funcionando, bem, testa ai se ta funfando.
  4. Gostei
    Tuka deu reputação a psychonaut em (Resolvido)[PEDIDO] Colocar cooldown em spell.   
    Agora acho que vai!
    http://pastebin.com/GiG69Zqi
     
    Tem uma parte que ta assim:
    end end end setGlobalStorageValue(45000, os.time() + 5) end return true   Remove o setGlobalStorageValue(45000, os.time() + 5)   E coloca la em cima depois do else   if getGlobalStorageValue(45000) >= os.time() then doPlayerSendCancel(cid,"Voce tem que esperar ".. getGlobalStorageValue(45000) - os.time() .." pra usar denovo.")   else setGlobalStorageValue(45000, os.time() + 5)   5 É o cooldown
  5. Gostei
    Tuka deu reputação a psychonaut em (Resolvido)[PEDIDO] Colocar cooldown em spell.   
    local quant_hit = 4 -- quantidade de hits que ira dar no target local timeHit = 0.5 -- segundos de diferença para cada hit local quant_sqm = 1 -- sqms que ira empurrar o target local sqmTime = 0.01 -- segundos para empurrar após hitar, exemplo de meio segundo. local tempodecooldown = 5 --- COOLDOWN local playerEffect = 134 -- efeito no player. local tiles_exception = {8277,8283,410,459,6169,6130,411,369,1385,1394,1395,5260,9574,9573,5023,1387,470,4836} -- sqms que não podera ser criado os itens, ou seja, os buracos de escada. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0) local condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, -1) setConditionParam(condition, CONDITION_PARAM_SPEED, -100) setConditionFormula(condition, 0, 0, 0, 0) setCombatCondition(combat, condition) local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, tempodecooldown) function onCastSpell(cid, var) local target = getCreatureTarget(cid) if exhaustion.check(cid,288) then doPlayerSendCancel(cid, "Sua magia esta em "..exhaustion.get(cid, 288).." segundos de cooldown.") return false end if target > 0 then local position_target = nil local cont = 0 for i=-1, 1 do for j=-1,1 do position_target = {x=getCreaturePosition(target).x+i, y=getCreaturePosition(target).y+j, z=getCreaturePosition(target).z} if isWalkable(position_target) then cont = cont+1 break end end if cont > 0 then break end position_target = nil end local px = math.random(-1,1) local py = 0 if px == -1 or px == 1 then py = 0 elseif px == 0 then local n = {1,-1} py = n[math.random(1,#n)] end local poscentral = {x=getCreaturePosition(target).x+px, y=getCreaturePosition(target).y+py, z=getCreaturePosition(target).z} if isWalkable(poscentral) then position_target = poscentral end if getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(target)) <= 1 then position_target = getCreaturePosition(cid) end if position_target == nil then doPlayerSendCancel(cid, "Você não pode atravesar isso!") return false end local pos = position_target posTile1 = {{x=pos.x,y=pos.y,z=pos.z,stackpos=1}, 5579} -- embaixo do player posTile2 = {{x=pos.x+1,y=pos.y+1,z=pos.z,stackpos=1}, 5585} posTile3 = {{x=pos.x+1,y=pos.y,z=pos.z,stackpos=1}, 5580} posTile4 = {{x=pos.x+1,y=pos.y-1,z=pos.z,stackpos=1}, 5575} posTile5 = {{x=pos.x,y=pos.y-1,z=pos.z,stackpos=1}, 5574} posTile6 = {{x=pos.x-1,y=pos.y-1,z=pos.z,stackpos=1}, 5573} posTile7 = {{x=pos.x-1,y=pos.y,z=pos.z,stackpos=1}, 5578} posTile8 = {{x=pos.x-1,y=pos.y+1,z=pos.z,stackpos=1}, 5583} posTile9 = {{x=pos.x,y=pos.y+1,z=pos.z,stackpos=1}, 5584} posTile10 = {{x=pos.x,y=pos.y+2,z=pos.z,stackpos=1}, 5588} posTile11 = {{x=pos.x+1,y=pos.y+2,z=pos.z,stackpos=1}, 5589} posTile12 = {{x=pos.x+2,y=pos.y+1,z=pos.z,stackpos=1}, 5586} posTile13 = {{x=pos.x+2,y=pos.y,z=pos.z,stackpos=1}, 5581} posTile14 = {{x=pos.x+2,y=pos.y-1,z=pos.z,stackpos=1}, 5576} posTile15 = {{x=pos.x+1,y=pos.y-2,z=pos.z,stackpos=1}, 5571} posTile16 = {{x=pos.x,y=pos.y-2,z=pos.z,stackpos=1}, 5570} posTile17 = {{x=pos.x-1,y=pos.y-2,z=pos.z,stackpos=1}, 5569} posTile18 = {{x=pos.x-2,y=pos.y-1,z=pos.z,stackpos=1}, 5572} posTile19 = {{x=pos.x-2,y=pos.y,z=pos.z,stackpos=1}, 5577} posTile20 = {{x=pos.x-2,y=pos.y+1,z=pos.z,stackpos=1}, 5582} posTile21 = {{x=pos.x-1,y=pos.y+2,z=pos.z,stackpos=1}, 5587} posTile22 = {{x=pos.x,y=pos.y-3,z=pos.z,stackpos=1}, 5590} posTile23 = {{x=pos.x+2,y=pos.y-2,z=pos.z,stackpos=1}, 5592} posTile24 = {{x=pos.x-2,y=pos.y-2,z=pos.z,stackpos=1}, 5591} posTile25 = {{x=pos.x-3,y=pos.y,z=pos.z,stackpos=1}, 5593} posTile26 = {{x=pos.x-2,y=pos.y+2,z=pos.z,stackpos=1}, 5595} posTile27 = {{x=pos.x+3,y=pos.y,z=pos.z,stackpos=1}, 5594} posAllTeste = {posTile1,posTile2,posTile3,posTile4,posTile5,posTile6,posTile7,posTile8,posTile9,posTile10,posTile11,posTile12,posTile13,posTile14,posTile15,posTile16,posTile17,posTile18,posTile19,posTile20,posTile21,posTile22,posTile23,posTile24,posTile25,posTile26,posTile27} posAll = {} for i=1, #posAllTeste do if isWalkable2(posAllTeste[i][1]) then posAll[#posAll+1] = posAllTeste[i] end end if position_target ~= nil then doTeleportThing(cid, position_target) local tempo = 0 while (tempo ~= quant_hit*(timeHit*1000)) do addEvent(sendEffect813, tempo, cid, target) tempo = tempo + 500 end tempo = 0 while (tempo ~= quant_hit*(timeHit*1000)) do addEvent(hitTarget35, tempo, cid, target) tempo = tempo + (timeHit*1000) end local temp = tempo while (tempo ~= temp+quant_sqm*(sqmTime*1000)) do addEvent(empurrar2Target, tempo, cid, target, tempo, posAll) tempo = tempo + (sqmTime*1000) end doAddCondition(cid, condition) doAddCondition(target, condition) local mana_hit = (getPlayerLevel(cid)*2 + getPlayerMagLevel(cid)*2 + 24700) doCreatureAddMana(target, -mana_hit) for o=1, #posAll do local check = true for j=0, 255 do pos_stack = {x=posAll[o][1].x,y=posAll[o][1].y,z=posAll[o][1].z,stackpos=j} removeTile = getThingfromPos(pos_stack) if isInArray(tiles_exception, removeTile.itemid) then check = false end end if check then if isWalkable2(posAll[o][1]) then doCreateItem(posAll[o][2], 1, posAll[o][1]) end end end exhaustion.set(cid,288,cooldown) return true else doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) end else doPlayerSendCancel(cid, "Você precisa de um target!") end end 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 local creature = getTopCreature(pos) if creature.type > 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 return true end function isWalkable2(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 return true end function hitTarget35(cid, target) if isCreature(target) and isPlayer(cid) then local effect813 = 9 -- efeito do hit na creatura. doAddCondition(target, condition) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -getHit35(cid), -getHit35(cid), effect813) end end function getHit35(cid) local hit35 = getPlayerLevel(cid)*1 + getPlayerMagLevel(cid)*1 + math.random(55000,56000) return hit35 end function empurrar2Target(cid, target, tempo, posAll) if isPlayer(cid) then doRemoveCondition(cid, CONDITION_PARALYZE) end if not isCreature(target) then for k=1, #posAll do for j=0, 255 do pos_stack = {x=posAll[k][1].x,y=posAll[k][1].y,z=posAll[k][1].z,stackpos=j} removeTile = getThingfromPos(pos_stack) if removeTile.itemid == posAll[k][2] then doRemoveItem(removeTile.uid) end end end end if isCreature(target) and isPlayer(cid) then local positions = nil doAddCondition(target, condition) if getPlayerLookDir(cid) == 0 then positions = {x=getCreaturePosition(target).x, y=getCreaturePosition(target).y-1, z=getCreaturePosition(target).z} elseif getPlayerLookDir(cid) == 1 then positions = {x=getCreaturePosition(target).x+1, y=getCreaturePosition(target).y, z=getCreaturePosition(target).z} elseif getPlayerLookDir(cid) == 2 then positions = {x=getCreaturePosition(target).x, y=getCreaturePosition(target).y+1, z=getCreaturePosition(target).z} elseif getPlayerLookDir(cid) == 3 then positions = {x=getCreaturePosition(target).x-1, y=getCreaturePosition(target).y, z=getCreaturePosition(target).z} end if positions ~= nil and isWalkable(positions) then doTeleportThing(target, positions) end local tp = sqmTime*1000*(quant_sqm-1)+quant_hit*timeHit*1000 if tempo == tp then doRemoveCondition(target, CONDITION_PARALYZE) for k=1, #posAll do for j=0, 255 do pos_stack = {x=posAll[k][1].x,y=posAll[k][1].y,z=posAll[k][1].z,stackpos=j} removeTile = getThingfromPos(pos_stack) if removeTile.itemid == posAll[k][2] then doRemoveItem(removeTile.uid) end end end end end end function sendEffect813(cid, target) local position1 = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} if isCreature(target) and isPlayer(cid) then doSendMagicEffect(position1, playerEffect) end end
  6. Gostei
    Tuka deu reputação a psychonaut em (Resolvido)[PEDIDO] Colocar cooldown em spell.   
    Vamo la, é por causa da versão do TFS, tenta esse agora(coloquei no paste):
    #edit, Agora vai
    http://pastebin.com/GQNs6P00
  7. Gostei
    Tuka deu reputação a psychonaut em (Resolvido)[PEDIDO] Colocar cooldown em spell.   
    Tenta isso aqui. Ta aí
    local quant_hit = 4 -- quantidade de hits que ira dar no target local timeHit = 0.5 -- segundos de diferença para cada hit   local quant_sqm = 1 -- sqms que ira empurrar o target local sqmTime = 0.01 -- segundos para empurrar após hitar, exemplo de meio segundo. local tempodecooldown = 5 --- COOLDOWN    local playerEffect = 134 -- efeito no player.   local tiles_exception = {8277,8283,410,459,6169,6130,411,369,1385,1394,1395,5260,9574,9573,5023,1387,470,4836} -- sqms que não podera ser criado os itens, ou seja, os buracos de escada.   local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0)   local condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, -1) setConditionParam(condition, CONDITION_PARAM_SPEED, -100) setConditionFormula(condition, 0, 0, 0, 0) setCombatCondition(combat, condition)   local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, tempodecooldown)   function onCastSpell(cid, var) local target = getCreatureTarget(cid)   if exhaustion.check(cid,288) then doPlayerSendCancel(cid, "Sua magia esta em "..exhaustion.get(cid, 288).." segundos de cooldown.") return false   if target > 0 then local position_target = nil local cont = 0 for i=-1, 1 do for j=-1,1 do position_target = {x=getCreaturePosition(target).x+i, y=getCreaturePosition(target).y+j, z=getCreaturePosition(target).z} if isWalkable(position_target) then cont = cont+1 break end end if cont > 0 then break end position_target = nil end   local px = math.random(-1,1) local py = 0 if px == -1 or px == 1 then py = 0 elseif px == 0 then local n = {1,-1} py = n[math.random(1,#n)] end local poscentral = {x=getCreaturePosition(target).x+px, y=getCreaturePosition(target).y+py, z=getCreaturePosition(target).z} if isWalkable(poscentral) then position_target = poscentral end   if getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(target)) <= 1 then position_target = getCreaturePosition(cid) end   if position_target == nil then doPlayerSendCancel(cid, "Você não pode atravesar isso!") return false end local pos = position_target posTile1 = {{x=pos.x,y=pos.y,z=pos.z,stackpos=1}, 5579} -- embaixo do player posTile2 = {{x=pos.x+1,y=pos.y+1,z=pos.z,stackpos=1}, 5585} posTile3 = {{x=pos.x+1,y=pos.y,z=pos.z,stackpos=1}, 5580} posTile4 = {{x=pos.x+1,y=pos.y-1,z=pos.z,stackpos=1}, 5575} posTile5 = {{x=pos.x,y=pos.y-1,z=pos.z,stackpos=1}, 5574} posTile6 = {{x=pos.x-1,y=pos.y-1,z=pos.z,stackpos=1}, 5573} posTile7 = {{x=pos.x-1,y=pos.y,z=pos.z,stackpos=1}, 5578} posTile8 = {{x=pos.x-1,y=pos.y+1,z=pos.z,stackpos=1}, 5583} posTile9 = {{x=pos.x,y=pos.y+1,z=pos.z,stackpos=1}, 5584} posTile10 = {{x=pos.x,y=pos.y+2,z=pos.z,stackpos=1}, 5588} posTile11 = {{x=pos.x+1,y=pos.y+2,z=pos.z,stackpos=1}, 5589} posTile12 = {{x=pos.x+2,y=pos.y+1,z=pos.z,stackpos=1}, 5586} posTile13 = {{x=pos.x+2,y=pos.y,z=pos.z,stackpos=1}, 5581} posTile14 = {{x=pos.x+2,y=pos.y-1,z=pos.z,stackpos=1}, 5576} posTile15 = {{x=pos.x+1,y=pos.y-2,z=pos.z,stackpos=1}, 5571} posTile16 = {{x=pos.x,y=pos.y-2,z=pos.z,stackpos=1}, 5570} posTile17 = {{x=pos.x-1,y=pos.y-2,z=pos.z,stackpos=1}, 5569} posTile18 = {{x=pos.x-2,y=pos.y-1,z=pos.z,stackpos=1}, 5572} posTile19 = {{x=pos.x-2,y=pos.y,z=pos.z,stackpos=1}, 5577} posTile20 = {{x=pos.x-2,y=pos.y+1,z=pos.z,stackpos=1}, 5582} posTile21 = {{x=pos.x-1,y=pos.y+2,z=pos.z,stackpos=1}, 5587} posTile22 = {{x=pos.x,y=pos.y-3,z=pos.z,stackpos=1}, 5590} posTile23 = {{x=pos.x+2,y=pos.y-2,z=pos.z,stackpos=1}, 5592} posTile24 = {{x=pos.x-2,y=pos.y-2,z=pos.z,stackpos=1}, 5591} posTile25 = {{x=pos.x-3,y=pos.y,z=pos.z,stackpos=1}, 5593} posTile26 = {{x=pos.x-2,y=pos.y+2,z=pos.z,stackpos=1}, 5595} posTile27 = {{x=pos.x+3,y=pos.y,z=pos.z,stackpos=1}, 5594} posAllTeste = {posTile1,posTile2,posTile3,posTile4,posTile5,posTile6,posTile7,posTile8,posTile9,posTile10,posTile11,posTile12,posTile13,posTile14,posTile15,posTile16,posTile17,posTile18,posTile19,posTile20,posTile21,posTile22,posTile23,posTile24,posTile25,posTile26,posTile27} posAll = {} for i=1, #posAllTeste do if isWalkable2(posAllTeste[i][1]) then posAll[#posAll+1] = posAllTeste[i] end end if position_target ~= nil then doTeleportThing(cid, position_target) local tempo = 0 while (tempo ~= quant_hit*(timeHit*1000)) do addEvent(sendEffect813, tempo, cid, target) tempo = tempo + 500 end tempo = 0 while (tempo ~= quant_hit*(timeHit*1000)) do addEvent(hitTarget35, tempo, cid, target) tempo = tempo + (timeHit*1000) end local temp = tempo while (tempo ~= temp+quant_sqm*(sqmTime*1000)) do addEvent(empurrar2Target, tempo, cid, target, tempo, posAll) tempo = tempo + (sqmTime*1000) end doAddCondition(cid, condition) doAddCondition(target, condition) local mana_hit = (getPlayerLevel(cid)*2 + getPlayerMagLevel(cid)*2 + 24700) doCreatureAddMana(target, -mana_hit) for o=1, #posAll do local check = true for j=0, 255 do pos_stack = {x=posAll[o][1].x,y=posAll[o][1].y,z=posAll[o][1].z,stackpos=j} removeTile = getThingfromPos(pos_stack) if isInArray(tiles_exception, removeTile.itemid) then check = false end end if check then if isWalkable2(posAll[o][1]) then doCreateItem(posAll[o][2], 1, posAll[o][1]) end end end exhaustion.set(cid,288,cooldown) return true else doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) end else doPlayerSendCancel(cid, "Você precisa de um target!") end end   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 local creature = getTopCreature(pos) if creature.type > 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 return true end   function isWalkable2(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 return true end   function hitTarget35(cid, target) if isCreature(target) and isPlayer(cid) then local effect813 = 9 -- efeito do hit na creatura. doAddCondition(target, condition) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -getHit35(cid), -getHit35(cid), effect813) end end   function getHit35(cid) local hit35 = getPlayerLevel(cid)*1 + getPlayerMagLevel(cid)*1 + math.random(55000,56000) return hit35 end   function empurrar2Target(cid, target, tempo, posAll) if isPlayer(cid) then doRemoveCondition(cid, CONDITION_PARALYZE) end if not isCreature(target) then for k=1, #posAll do for j=0, 255 do pos_stack = {x=posAll[k][1].x,y=posAll[k][1].y,z=posAll[k][1].z,stackpos=j} removeTile = getThingfromPos(pos_stack) if removeTile.itemid == posAll[k][2] then doRemoveItem(removeTile.uid) end end end end if isCreature(target) and isPlayer(cid) then local positions = nil doAddCondition(target, condition) if getPlayerLookDir(cid) == 0 then positions = {x=getCreaturePosition(target).x, y=getCreaturePosition(target).y-1, z=getCreaturePosition(target).z} elseif getPlayerLookDir(cid) == 1 then positions = {x=getCreaturePosition(target).x+1, y=getCreaturePosition(target).y, z=getCreaturePosition(target).z} elseif getPlayerLookDir(cid) == 2 then positions = {x=getCreaturePosition(target).x, y=getCreaturePosition(target).y+1, z=getCreaturePosition(target).z} elseif getPlayerLookDir(cid) == 3 then positions = {x=getCreaturePosition(target).x-1, y=getCreaturePosition(target).y, z=getCreaturePosition(target).z} end if positions ~= nil and isWalkable(positions) then doTeleportThing(target, positions) end local tp = sqmTime*1000*(quant_sqm-1)+quant_hit*timeHit*1000 if tempo == tp then doRemoveCondition(target, CONDITION_PARALYZE) for k=1, #posAll do for j=0, 255 do pos_stack = {x=posAll[k][1].x,y=posAll[k][1].y,z=posAll[k][1].z,stackpos=j} removeTile = getThingfromPos(pos_stack) if removeTile.itemid == posAll[k][2] then doRemoveItem(removeTile.uid) end end end end end end   function sendEffect813(cid, target) local position1 = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} if isCreature(target) and isPlayer(cid) then doSendMagicEffect(position1, playerEffect) end end #edit, mudei denovo pra mostrar os segundos. E lembra de na spells.xml deixar
    exhaustion="2000"
    Porquê tem um cooldown independente no script.
  8. Gostei
    Tuka deu reputação a xWhiteWolf em (Resolvido)[PEDIDO] Spell Ficar invuneravel por 10 segundos   
    http://www.tibiaking.com/forum/topic/39215-spell-para-ficar-intocavel/
  9. Gostei
    Tuka deu reputação a xADMx em (Resolvido)[AJUDA] como mudar o effect de cada damage.   
    vá na source do servidor em game.cpp tu aperta ctrl+f e procure por COMBAT_FIREDAMAGE até achar


    case COMBAT_FIREDAMAGE: { textColor = TEXTCOLOR_ORANGE; magicEffect = MAGIC_EFFECT_HITBY_FIRE; break; } em magicEffect = MAGIC_EFFECT_HITBY_FIRE; tu muda pro efeito que você quer no combat, pode usar numero também o numero do effect e tal se ajudei REP +
  10. Gostei
    Tuka deu reputação a xWhiteWolf em (Resolvido)Spell para ficar intocavel   
    podia pelo menos me agradecer dando rep no tópico né, to fazendo tudo de boa vontade..
  11. Gostei
    Tuka deu reputação a xWhiteWolf em (Resolvido)Spell para ficar intocavel   
    só muda a spell e tira a condition invisible:
     
    local config = {  storage = 3482101, cooldown = 30,  --- tempo entre um uso e outro duration = 5, --- duração effect1 = 29 -- efeito que sai ao falar a spell }  function onCastSpell(cid, var)      if os.time() - getPlayerStorageValue(cid, 55695) >= config.cooldown then setPlayerStorageValue(cid, 55695, os.time()) doSendMagicEffect(getCreaturePosition(cid), config.effect1) setPlayerStorageValue(cid, config.storage, os.time() + config.duration) doCreatureSay(cid,"UNTOUCHABLE!!!", 19) doPlayerSendTextMessage(cid, 27, "You have now ".. config.duration .." seconds of invulnerability.") else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, 55695))).." seconds.") return false end       return true end
  12. Gostei
    Tuka deu reputação a xWhiteWolf em Volatile Spiderling   
    Fala galera do TK, hoje eu venho mais uma vez trazer uma das magias mais incríveis que eu já vi até hoje (sério). A magia original foi feita em outro fórum mas para a versão 10.1... como eu vi que ninguém conseguiu adaptar pra versões inferiores eu decidi criar a minha própria volatile spiderling.
    Confesso que no começo eu tive muita dificuldade em achar as funções certas mas depois de tentar ajudar o membro @234567890z no suporte eu tive uma epifania. Sem mais delongas eu vou explicar oque o script faz e em seguida ensinar a colocá-lo no seu server.

    • Explicação: A magia foi feita baseada na personagem Elise do jogo League of Legends: você faz uma cria que anda até os oponentes e se explodem causando dano em area e deixando eles envenenados. Aqui tem um gif da magia funcionando  
    obs: note que esse gif não fui eu que fiz mas ele demonstra exatamente como a magia funciona.
     
     
    • Instalação: Pra instalá-lo no seu servidor vai ser um pouco complicado pois ele requer diversas modificações... antes de mais nada, coloque essas linhas no seu spells.xml:
    <instant name="Volatile Spiderling" words="utevo res tera" lvl="40" mana="20" prem="1" selftarget="1" exhaustion="2000" groups="1,2000" icon="88" needlearn="0" event="script" value="especiais/spiderling.lua"> <vocation id="3"/> <vocation id="7"/> </instant> <instant name="poison explosion" words="poison explosion" lvl="0" mana="0" prem="0" aggressive="1" exhaustion="3000" needlearn="1" event="script" value="especiais/newspider.lua"> </instant> Agora você vai ter que criar os dois arquivos na pasta spells\scripts\especiais.
    Em newspider.lua coloque o seguinte:
    agora em spiderling.lua coloque o seguinte: Agora feito isso vc vai precisar criar o monstro que usará essa spell.. vá em monster\monsters.xml e adicione a seguinte linha: <monster name="Clone Spider" file="arachnids/newspider.xml"/> agora crie o arquivo data\monsters\arachnids\newspider.xml e adicione o seguinte nele:
    Agora eu vou ensinar vocês a editarem... não tem muito oque mudar, apenas se vc quiser alterar os danos da spell vá em newspider.lua e será possível editar os danos do poison e da explosão:
     
    local damageTable = {     {4, -3},     {9, -2},     {20, -1} }   aqui você muda quantos danos serão e quanto cada um tirará.. no caso serão 4 hits de -3, depois 9 hits de -2 e por fim 20 hits de -1 até o poison parar. Lembrando que esses danos saem de 4 em 4 segundos. Se você quiser que eles sejam mais rápidos é só editar aqui:
    addDamageCondition(poisonpowder, t[1], 4000, t[2]) (4000 significa 4 segundos).
    Feito isso será possível editar também a area e o dano da explosão respectivamente em: Area:    
    Dano:
    doAreaCombatHealth(cid, 1, getThingPos(cid), area, -1, -30, 20)
    Em vermelho temos o dano mínimo, analogamente, em azul, temos o dano máximo.
    Em verde é possível editar o efeito da explosão
    Só lembrando que as edições que forem feitas no newspider.lua devem ser feitas no spider.lua para que a magia tenha graça.. se não o dano da explosão/poison ao explodir será diferente caso ela morrer antes.  Em spiderling.lua vc pode editar a quantidade máxima de crias que um player pode ter... o normal está setado para 2 mas vc pode sentir-se livre pra colocar quantas queira.
    local maxsummon = 2   (Só lembre-se que ao explodir uma aranha pode acertar outra então não é muito bom deixar um numero maior que 3);
     
    Se você for daqueles bem chatinhos com a magia você ainda pode editar algumas coisas importantes tais como:
    O efeito que sai quando ela explode por morte ou pela spell:
     doSendMagicEffect(getThingPos(cid), 16) O tempo em que ela executa a spell, a chance da spell sair naquele tempo e quantos sqm de distancia a criatura alvo deve estar pra aranha se explodir: 
    <attack name="poison explosion" interval="1000" range="1" chance="50"/> interval = de quantos em quantos segundos ela executa a spell
    range = distancia em sqm que o alvo deve estar pra que ela execute a spell
    chance = chance de executar a spell a cada interval (nesse caso a cada 1 segundo tem 50% de chance dela soltar a magia)
     
    Você ainda pode editar aqui em vermelho:
    o tempo que leva pra criatura executar a magia.. Por padrão eu deixei 2 segundos, ou seja... eu sumono a aranha, ela vai até o alvo e a cada segundo q ela passa grudada no alvo (1 sqm de distancia) ela tem 50% de chance de ativar a spell e ficar parada no lugar durante 2 segundos até explodir. Se você quiser que ela leve menos tempo pra explodir é só baixar o 2000 (em milisegundos).. Se você quiser aumentar o dano e deixar ela parada por mais tempo até explodir pode editar a vontade aumentando os 2000.

    • Bom, isso é tudo que dava pra eu explicar... é óbvio que dá pra editar muito mais coisa mas se você não é scripter e não tem muita idéia de como editar eu dei uma ensinada básica doque você está autorizado a mexer. Espero que vocês curtam a spell e deem aquele REP+ pra fortalecer kkkk
    Eu não pretendia liberar essa spell visto que ela é extremamente complexa e nenhum servidor tem ela, mas, acho que seria muito babaca da minha parte ficar guardando um script tão bonito hahaha. Qualquer erro ou dúvida postem nos comentários que eu tento ajudar.
     
    ah, mais uma coisa: Os créditos são 90% meus visto que eu fiz praticamente tudo.. 9% é pro cara que fez a magia original (se vcs derem uma procurada vcs vão ver que não tem quase nada a ver com a minha mas os créditos dele são por ele ter me dado a idéia) e 1% pro cara no suporte que me pediu ajuda numa spell do mesmo gênero e me fez correr atrás de uma forma de fazer essa magia pra versões inferiores a TFS 1.0
  13. Gostei
    Tuka deu reputação a xWhiteWolf em (Resolvido)Deixa Clone Com Buff   
    Coloquei uma variavel chamada names onde vc coloca todos os nomes que quiser sempre separando por virgula e entre aspas
  14. Gostei
    Tuka deu reputação a xWhiteWolf em (Resolvido)Deixa Clone Com Buff   
    o efeito se vai entrar nos summons se o nome deles for um desses? "Clone Das Sombras", "clone das sombras" e "clone"?
  15. Gostei
    Tuka recebeu reputação de gbik em (Resolvido)[DUVIDA] como abrir a soucer descompilada   
    vlw
  16. Gostei
    Tuka deu reputação a luanluciano93 em (Resolvido)[PEDIDO] Soucer de tfs 1.0   
    https://github.com/otland/forgottenserver/tree/v1.0
  17. Gostei
    Tuka deu reputação a Matheus Lirou em (Resolvido)[DUVIDA] como abrir a soucer descompilada   
    Amigo, Não Sei Se Vai Te Ajudar Muito Porem Oque Eu Entendi é Que Você Quer Mudar Alguns Arquivos Antes De Compilar Sua Source Certo? Se Sim Só Basta Acompanhar Esse Tutorial: http://www.tibiaking.com/forum/topic/33548-dev-c-compilando-tfs-no-windows/Que Vai Lhe Ensinar a Compilar e No Meio Do Caminho Tem Os Arquivos Abertos Pra Você Editar Antes Mesmo De Compilar.
  18. Gostei
    Tuka deu reputação a gbik em (Resolvido)[DUVIDA] como abrir a soucer descompilada   
    Basta baixar um arquivo chamado notepad c++ ou até mesmo usar o seu compilador, la quando voce dá load ele mostra os arquivos. ;s
  19. Gostei
    Tuka deu reputação a klipstyle em (Resolvido)[AJUDA] Cooldown em Spell   
    testa ae.



  20. Gostei
    Tuka deu reputação a Wend II em (Resolvido)[AJUDA] Cooldown em Spell   
    local remove_time = 4 -- tempo em segundos para remover as magic wall local item_id = 5750 -- id da magic wall   function onCastSpell(cid, var) if exhaustion.check(cid, 23006) == false then exhaustion.set(cid, 23006, 10) else doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid, 23006).."]") return false end   local pos = getThingPosition(getCreatureTarget(cid)) posTile1 = {x=pos.x+1,y=pos.y+1,z=pos.z,stackpos=1} posTile2 = {x=pos.x+1,y=pos.y,z=pos.z,stackpos=1} posTile3 = {x=pos.x+1,y=pos.y-1,z=pos.z,stackpos=1} posTile4 = {x=pos.x,y=pos.y-1,z=pos.z,stackpos=1} posTile5 = {x=pos.x-1,y=pos.y-1,z=pos.z,stackpos=1} posTile6 = {x=pos.x-1,y=pos.y,z=pos.z,stackpos=1} posTile7 = {x=pos.x-1,y=pos.y+1,z=pos.z,stackpos=1} posTile8 = {x=pos.x,y=pos.y+1,z=pos.z,stackpos=1} posAll = {posTile1,posTile2,posTile3,posTile4,posTile5,posTile6,posTile7,posTile8}   for i=1, #posAll do if isWalkable(posAll[i]) then doCreateItem(item_id, 1, posAll[i]) end end addEvent(removeItem, remove_time*1000, posAll)   return true end   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 local creature = getTopCreature(pos) if creature.type > 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 return true end   function removeItem(posAll) for i=1, #posAll do for j=0, 255 do pos_stack = {x=posAll[i].x,y=posAll[i].y,z=posAll[i].z,stackpos=j} removeTile = getThingfromPos(pos_stack) if removeTile.itemid == item_id then doRemoveItem(removeTile.uid) end end end end
  21. Gostei
    Tuka deu reputação a Wakon em (Resolvido)Piso que desloga e loga em outra pocição   
    Em "Data/movements/scripts", copie e cole um arquivo.LUA e renomeie para o nome_desejado.lua, apague tudo e cole:
    local t = {     pos = {x = 160, y = 54, z = 7} -- Local para onde o player será teleportado ao pisar no tile. } function onStepIn(cid, item, pos, fromPosition) doTeleportThing(cid, t.pos) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) doRemoveCreature(cid)   return true end Em "Data/movements", abra o arquivo movements.xml e adicione a TAG:
    <movevent type="StepIn" actionid="25203" event="script" value="nome_desejado.lua" /> Em actionid="25203", você pode trocar a actionID para outra caso queira, depois é só colocar ela no piso.
    Em value="nome_desejado.lua", coloque o nome do script que você colocou na pasta "Data/movements/scripts".
  22. Gostei
    Tuka deu reputação a Yugami em Ajudem...Quero saber como ajeito o nível máximo   
    se não me engano precisa ir em Config.lua e configura a parte das rates
     
    procure por 
    experienceStages = false se tivé do geito acima false coloke assim
    experienceStages = true salve e va em pasta do seu ot/data/xml e procure o stages.xml la se configura as Rates e o Level Max
  23. Gostei
    Tuka deu reputação a D i M i T r E s C u em (Resolvido){Pedido} Lista de cores   
    AQUI AMIGO
     
    Cor / Numero da cor
     
    COLOR_BLACK = 0 COLOR_BLUE = 5 COLOR_GREEN = 18 COLOR_TEAL = 35 COLOR_LIGHTGREEN = 66 COLOR_DARKBROWN = 78 COLOR_LIGHTBLUE = 89 COLOR_DARKPURPLE = 112 COLOR_BROWN = 120 COLOR_GREY = 129 COLOR_DARKRED = 144 COLOR_DARKPINK = 152 COLOR_PURPLE = 154 COLOR_DARKORANGE = 156 COLOR_RED = 180 COLOR_PINK = 190 COLOR_ORANGE = 192 COLOR_DARKYELLOW = 205 COLOR_YELLOW = 210 COLOR_WHITE = 215 COLOR_NONE = 255
  24. Gostei
    Tuka deu reputação a Yugami em Preciso de ajuda ne 1 scripts "Hiraishin Seal"   
    esse script não fui eu que fis,se não me engano foi auguem do TK que pegou o script do xwhitewolfx e atualizou para otro membro,mas ele funciona 100%
     
    local storage = 9873 -- storage local item = 2181 -- id do item local time = 30 -- tempo em segundos que o item vai ficar na posição. local pos = {}     function terminus(cid)      local a = getTileItemById(pos[1], item)        if a.uid > 0 then           doRemoveItem(a.uid)        end        if isPlayer(cid) then           doPlayerSendTextMessage(cid, 22, "Expirou Seu Hiraishin Seal.")        end         table.remove(pos, 1)     end function onCastSpell(cid, var) if getPlayerStorageValue(cid, storage) - os.time() <= 0 then   table.insert(pos, getCreaturePosition(cid))     setPlayerStorageValue(cid, storage, os.time()+time)      doCreateItem(item, getCreaturePosition(cid))     doSendMagicEffect(getCreaturePosition(cid), 3)   addEvent(terminus, time*1000, cid) elseif getPlayerStorageValue (cid, storage) - os.time() >= 1 then   doTeleportThing(cid, pos[1])   doSendMagicEffect(getCreaturePosition(cid), 10) end return true end
  25. Gostei
    Tuka deu reputação a Featzen em Preciso de ajuda ne 1 scripts "Hiraishin Seal"   
    local s = {5668,5669,5667} local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) function x(p, d) local t = {{x=p.x,y=p.y-1,z=p.z},{x=p.x+1,y=p.y,z=p.z},{x=p.x,y=p.y+1,z=p.z},{x=p.x-1,y=p.y,z=p.z}} return t[d+1] end function onCastSpell(cid, var) local position1 = {x=getPlayerPosition(cid).x+1, y=getPlayerPosition(cid).y+1, z=getPlayerPosition(cid).z} local pos = getCreaturePosition(cid) local item = 2335 --id da kunai local theItem = doCreateItem(item, pos) local mystr = "return {x=xx,y=yy,z=zz}" local mystr = string.gsub(mystr, "xx", pos.x) local mystr = string.gsub(mystr, "yy", pos.y) local mystr = string.gsub(mystr, "zz", pos.z) local position112 = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} setPlayerStorageValue(cid, s[1], mystr) setPlayerStorageValue(cid, s[2], os.time()+0) setPlayerStorageValue(cid, s[3], 1) for i = 1, 5 do end doCombat(cid, combat, var) if theItem ~= 0 then addEvent(doRemoveItem,10000,theItem) -- 10000 = 10 segundos, 1000 = 1 segundo end return true end Ah meu Deus, vou me aposentar...

Informação Importante

Confirmação de Termo