Tudo que Danves postou
-
allowedMaxSizePackets - Dúvida
local postarg = getThingPos(target) local free = getClosestFreeTile(cid, postarg) if not isWalkable(free) and not getTileInfo(postarg).protection then doTeleportThing(cid, postarg, false) elseif not getTileInfo(free).protection then doTeleportThing(cid, free, false) end Frequencias dos tps: addEvent(teleport, 2, cid, target) addEvent(teleport, 450, cid, target) addEvent(teleport, 900, cid, target) addEvent(teleport2, 1200, cid, pos) -- esse volta pra pos que castou addEvent(movfin, 1202, cid) -- esse altera pra poder mover o char de volta addEvent(mudarsto, 1203, cid) -- esse altera storage Os seguintes sao de causar dmg: addEvent(onCastSpell1, 3, parameters) addEvent(onCastSpell1, 203, parameters) addEvent(onCastSpell1, 402, parameters) addEvent(onCastSpell1, 602, parameters) addEvent(onCastSpell1, 803, parameters) addEvent(onCastSpell1, 1002, parameters) addEvent(onCastSpell1, 1203, parameters) A spell RARAMENTE causa dbug, é só se a net dar uma travada de 1sec por exemplo no momento que esta castando. Daí acontece esse dbug aí.. @Edit: Não entendi "parte do código" Tudo que poderia causar dbug já está aí O resto faz exatamente o que citei local function teleport2(cid, pos) if not isCreature(cid) then return false end doTeleportThing(cid, pos, false) setPlayerStorageValue(cid, 57608, 0) end local function movfin(cid) if not isCreature(cid) then return false end mayNotMove(cid, false) end local function mudarsto(cid) if not isCreature(cid) then return false end setPlayerStorageValue(cid, 40941, -1) end e o oncastspell1 executa o combat que é só um combat normal pra causar dano físico..
-
allowedMaxSizePackets - Dúvida
Bom, como definido na maioria dos config.lua possui allowedMaxSizePackets = 20 Eu tenho um problema com uma spell que ocorre varios eventos, e geralmente qualquer travada pequena na net no momento dela causa um dbug com explicação: Network.cpp 954: assertion failed (BufferSize = 0) (NextToWrite = 24590), reason: BufferSize>0Se aumentasse o allowedMaxSizePackets iria reduzir a frequência desses dbugs? O que ele influencia em um servidor? Eu entendo que significa mais ou menos quantos pacotes a pessoa pode enviar em algum período de tempo, mas queria saber se iria ajudar a evitar dbugs e quais seriam os pontos negativos disso.
-
BufferSize>0 em uma spell de teleports
Seguinte, eu tenho uma spell que o atacante fica teleportando ao redor do cara e tirando dmg, mas o problema é que em alguns pcs eles tomam dbug. Aparece Network.cpp 954: assertion failed (BufferSize = 0) (NextToWrite = 24590), reason: BufferSize>0 E o interessante é que onde mais ocorre é em um mapa de gelo que temos, não sei porque. Quantidade/tempo dos teleports: 0, 300, 600, 900, 1200 OBS: Client normal da cipsoft
-
Magnus Challenger
No meu ondeath eu verifico só até o deathList[4], todos que tiverem retirado pelo menos 30% recebem storage. E claro, se estiver em um certo range, pra não receber se sair distribuindo 30% em cada um.. Vendo que o deathlist é numero pela ordem de dano tirado(sem ser o o [1], que é ultimo hit).
-
Magnus Challenger
Porque todos que fazem tasks criam por Onkill? Quando fui criar uma task eu criei via onDeath e funcionou perfeitamente Só precisei criar um script de statschange pra saber se realmente o lasthit deu pelo menos 30% de dano total do hp do monstro, mas de boa Usei notepad++ pra acrescentar em todos os arquivos de monstro a linha do evento de death Não curto onkill porque aí você até dando 1 de dano já entra.
-
(Resolvido)SummonAttack
function onTarget(cid, target) if isSummon(target) and isPlayer(cid) and getCreatureMaster(target) == cid then return false end return true end function onStatsChange(cid, attacker, type, combat, value) if type == STATSCHANGE_HEALTHLOSS and isSummon(cid) and isPlayer(attacker) and getCreatureMaster(cid) == attacker then return false end return true end Acredito que não precisa do Oncast, vendo que você não poderá targetar ele e nem tirar dano com AOE por causa do statschange.
-
Problemas com Spell
Qual o erro das que não funcionaram?
-
Problemas com Spell
Funcionou? Se funcionar marca a resposta do script como melhor, pra fechar o tópico
-
Problemas com Spell
Cara deixa essa spell assim que iria acertar todas as outras, eu pus uma function global nela, todas as outras spells lerão essa function.
-
Problemas com Spell
Pelo que percebi essa função só pega o lado que a pessoa esta olhando.. Podia ser simplesmente substituído, mas já que usa em vários lugares, colocarei a função na spell Deixa a spell assim: function getPatrzJacolos(cid) return getCreatureLookDirection(cid) end local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 87) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -5.0, 0, -5.1, 0) local arr1 = { {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {1, 0, 0, 0, 0}, {1, 2, 0, 0, 0}, {1, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) setCombatArea(combat1, area1) local combat10 = createCombatObject() setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat10, COMBAT_PARAM_EFFECT, 88) setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, -5.0, 0, -5.1, 0) local arr10 = { {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, 1, 0, 0}, {0, 1, 1, 1, 0, 2}, {0, 0, 1, 1, 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}, } local area10 = createCombatArea(arr10) setCombatArea(combat10, area10) local combat100 = createCombatObject() setCombatParam(combat100, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat100, COMBAT_PARAM_EFFECT, 89) setCombatFormula(combat100, COMBAT_FORMULA_LEVELMAGIC, -5.0, 0, -5.1, 0) local arr100 = { {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}, {1, 0, 0, 0, 0, 2}, {0, 1, 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}, } local area100 = createCombatArea(arr100) setCombatArea(combat100, area100) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 89) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -5.0, 0, -5.1, 0) local arr2 = { {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 1, 0, 0, 0}, {2, 1, 0, 0, 0}, {0, 1, 0, 0, 0}, {0, 0, 0, 0, 0}, } local area2 = createCombatArea(arr2) setCombatArea(combat2, area2) local combat20 = createCombatObject() setCombatParam(combat20, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat20, COMBAT_PARAM_EFFECT, 88) setCombatFormula(combat20, COMBAT_FORMULA_LEVELMAGIC, -5.0, 0, -5.1, 0) local arr20 = { {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, 1, 0}, {0, 2, 0, 1, 1, 1}, {0, 0, 0, 1, 1, 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}, } local area20 = createCombatArea(arr20) setCombatArea(combat20, area20) local combat200 = createCombatObject() setCombatParam(combat200, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat200, COMBAT_PARAM_EFFECT, 87) setCombatFormula(combat200, COMBAT_FORMULA_LEVELMAGIC, -5.0, 0, -5.1, 0) local arr200 = { {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}, {2, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 1, 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}, } local area200 = createCombatArea(arr200) setCombatArea(combat200, area200) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat3, COMBAT_PARAM_EFFECT, 92) setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -5.0, 0, -5.1, 0) local arr3 = { {0, 0, 0, 0, 0}, {0, 0, 0, 2, 0}, {0, 0, 1, 1, 1}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, } local area3 = createCombatArea(arr3) setCombatArea(combat3, area3) local combat30 = createCombatObject() setCombatParam(combat30, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat30, COMBAT_PARAM_EFFECT, 91) setCombatFormula(combat30, COMBAT_FORMULA_LEVELMAGIC, -5.0, 0, -5.1, 0) local arr30 = { {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 2, 0, 0}, {0, 0, 0, 0, 0}, {0, 1, 1, 1, 0}, {0, 1, 1, 1, 0}, {0, 0, 1, 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}, } local area30 = createCombatArea(arr30) setCombatArea(combat30, area30) local combat300 = createCombatObject() setCombatParam(combat300, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat300, COMBAT_PARAM_EFFECT, 90) setCombatFormula(combat300, COMBAT_FORMULA_LEVELMAGIC, -5.0, 0, -5.1, 0) local arr300 = { {0, 0, 2, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 1, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, } local area300 = createCombatArea(arr300) setCombatArea(combat300, area300) local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat4, COMBAT_PARAM_EFFECT, 90) setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -5.0, 0, -5.1, 0) local arr4 = { {0, 0, 0, 0, 0}, {0, 0, 1, 1, 1}, {0, 0, 0, 2, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, } local area4 = createCombatArea(arr4) setCombatArea(combat4, area4) local combat40 = createCombatObject() setCombatParam(combat40, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat40, COMBAT_PARAM_EFFECT, 91) setCombatFormula(combat40, COMBAT_FORMULA_LEVELMAGIC, -5.0, 0, -5.1, 0) local arr40 = { {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 1, 1, 1, 0}, {0, 1, 1, 1, 0}, {0, 0, 0, 0, 0}, {0, 0, 2, 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}, } local area40 = createCombatArea(arr40) setCombatArea(combat40, area40) local combat400 = createCombatObject() setCombatParam(combat400, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat400, COMBAT_PARAM_EFFECT, 92) setCombatFormula(combat400, COMBAT_FORMULA_LEVELMAGIC, -5.0, 0, -5.1, 0) local arr400 = { {0, 0, 1, 0, 0, 0}, {0, 1, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 2, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, } local area400 = createCombatArea(arr400) setCombatArea(combat400, area400) function hf(cid) if getPatrzJacolos(cid) == 1 then doCombat(cid, combat1, numberToVariant(cid)) doCombat(cid, combat10, numberToVariant(cid)) doCombat(cid, combat100, numberToVariant(cid)) doPlayerSay(cid, 'Haaaa!', TALKTYPE_ORANGE_1) elseif getPatrzJacolos(cid) == 2 then doCombat(cid, combat4, numberToVariant(cid)) doCombat(cid, combat40, numberToVariant(cid)) doCombat(cid, combat400, numberToVariant(cid)) doPlayerSay(cid, 'Haaaa!', TALKTYPE_ORANGE_1) elseif getPatrzJacolos(cid) == 3 then doCombat(cid, combat2, numberToVariant(cid)) doCombat(cid, combat20, numberToVariant(cid)) doCombat(cid, combat200, numberToVariant(cid)) doPlayerSay(cid, 'Haaaa!', TALKTYPE_ORANGE_1) elseif getPatrzJacolos(cid) == 0 then doCombat(cid, combat3, numberToVariant(cid)) doCombat(cid, combat30, numberToVariant(cid)) doCombat(cid, combat300, numberToVariant(cid)) doPlayerSay(cid, 'Haaaa!', TALKTYPE_ORANGE_1) end end function mf2(cid) doPlayerSay(cid, 'Ha Me!', TALKTYPE_ORANGE_1) addEvent(hf,0,cid) end function hf2(cid) doPlayerSay(cid, 'Ka Me!', TALKTYPE_ORANGE_1) addEvent(mf2,0,cid) end function mf(cid) doPlayerSay(cid, 'Bang!', TALKTYPE_ORANGE_1) addEvent(hf2,0,cid) end function kf(cid) doPlayerSay(cid, 'Big!', TALKTYPE_ORANGE_1) addEvent(mf,0,cid) end function onCastSpell(cid, var) addEvent(kf,0,cid) end
-
(Resolvido)NoDamageParty
Esse aqui iria só anular os danos(seja de ataque normal ou de magias) entre pessoas da mesma party. function onStatsChange(cid, attacker, type, combat, value) if type == STATSCHANGE_HEALTHLOSS then if isPlayer(cid) and isPlayer(attacker) and isInParty(cid) and isInParty(attacker) and getPlayerParty(cid) == getPlayerParty(attacker) then return false end end return true end Até onde sei não tem como identificar se o dano que está a acontecer é proveniente de uma spell ou ataque básico. Teria que fazer uns arranjos de storage em Oncast, mas que não seria 100% funcional.
-
Spell de cura
Me mostra como ela está no seu spells.xml Mas de qualquer forma tente assim -- SpellCreator generated. -- =============== COMBAT VARS =============== -- Areas/Combat for 0ms local combat0_Brush = createCombatObject() setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatArea(combat0_Brush,createCombatArea({{2}})) function getDmg_Brush(cid, level, maglevel) return (2000),(3000) end setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") local con___combat0_Brush = createConditionObject(0+CONDITION_REGENERATION) setConditionParam(con___combat0_Brush, CONDITION_PARAM_HEALTHGAIN, 2500) setConditionParam(con___combat0_Brush, CONDITION_PARAM_SPEED, 500) addDamageCondition(con___combat0_Brush, 3, 1000, -100) setCombatCondition(combat0_Brush, con___combat0_Brush)local combat0_Brush_2 = createCombatObject() setCombatParam(combat0_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) setCombatParam(combat0_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat0_Brush_2,createCombatArea({{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, 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, 3, 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}})) -- Areas/Combat for 700ms local combat7_Brush_2 = createCombatObject() setCombatParam(combat7_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) setCombatParam(combat7_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat7_Brush_2,createCombatArea({{1, 0, 1}, {0, 3, 0}, {1, 0, 1}})) -- Areas/Combat for 600ms local combat6_Brush_2 = createCombatObject() setCombatParam(combat6_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) setCombatParam(combat6_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat6_Brush_2,createCombatArea({{0, 1, 0}, {1, 3, 1}, {0, 1, 0}})) -- Areas/Combat for 500ms local combat5_Brush_2 = createCombatObject() setCombatParam(combat5_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) setCombatParam(combat5_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat5_Brush_2,createCombatArea({{1, 0, 1}, {0, 3, 0}, {1, 0, 1}})) local combat5_Brush = createCombatObject() setCombatParam(combat5_Brush, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat5_Brush, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatArea(combat5_Brush,createCombatArea({{3}})) function getDmg_Brush(cid, level, maglevel) return (2000),(3000) end setCombatCallback(combat5_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") local con___combat5_Brush = createConditionObject(0+CONDITION_REGENERATION) setConditionParam(con___combat5_Brush, CONDITION_PARAM_HEALTHGAIN, 2500) setConditionParam(con___combat5_Brush, CONDITION_PARAM_SPEED, 500) addDamageCondition(con___combat5_Brush, 3, 1000, -100) setCombatCondition(combat5_Brush, con___combat5_Brush) -- Areas/Combat for 400ms local combat4_Brush_2 = createCombatObject() setCombatParam(combat4_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) setCombatParam(combat4_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat4_Brush_2,createCombatArea({{0, 0, 0, 1, 0}, {1, 0, 0, 0, 0}, {0, 0, 3, 0, 0}, {0, 0, 0, 0, 1}, {0, 1, 0, 0, 0}})) -- Areas/Combat for 300ms local combat3_Brush_2 = createCombatObject() setCombatParam(combat3_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) setCombatParam(combat3_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat3_Brush_2,createCombatArea({{0, 0, 0, 0, 0, 1, 0}, {1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 3, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 1}, {0, 1, 0, 0, 0, 0, 0}})) -- Areas/Combat for 200ms local combat2_Brush_2 = createCombatObject() setCombatParam(combat2_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) setCombatParam(combat2_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat2_Brush_2,createCombatArea({{0, 0, 0, 0, 0, 0, 0, 1, 0}, {1, 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, 3, 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, 1, 0, 0, 0, 0, 0, 0, 0}})) -- Areas/Combat for 100ms local combat1_Brush_2 = createCombatObject() setCombatParam(combat1_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) setCombatParam(combat1_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat1_Brush_2,createCombatArea({{0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {1, 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, 3, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}})) -- =============== CORE FUNCTIONS =============== local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part if (isCreature(cid)) then doCombat(cid, c, var) if (dirList ~= nil) then -- Emit distance effects local i = 2; while (i < #dirList) do doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1]) i = i + 2 end end end end function onCastSpell(cid, var) local startPos = getCreaturePosition(cid) RunPart(combat0_Brush,cid,var) RunPart(combat0_Brush_2,cid,var) addEvent(RunPart,700,combat7_Brush_2,cid,var) addEvent(RunPart,600,combat6_Brush_2,cid,var) addEvent(RunPart,500,combat5_Brush_2,cid,var) addEvent(RunPart,500,combat5_Brush,cid,var) addEvent(RunPart,400,combat4_Brush_2,cid,var) addEvent(RunPart,300,combat3_Brush_2,cid,var) addEvent(RunPart,200,combat2_Brush_2,cid,var) addEvent(RunPart,100,combat1_Brush_2,cid,var) return true end
-
Problemas com Spell
Seu ot não tem a função "getPatrzJacolos". Poste a spell aqui e eu vejo o que posso por no lugar dessa função para ela funcionar como deveria.
-
Script sumon com bug (doconvincecreature not found)
Bom, se ele quiser que o summon nasça na pos do player ta aí o meu.
-
Script sumon com bug (doconvincecreature not found)
É só pra tirar o erro do console? PS: Não achei o "playerpos" então criei outro function onCastSpell(cid, var) local playerpos = getThingPos(cid) local MaximoSummon = 3 local summons = getCreatureSummons(cid) if(table.maxn(summons) < MaximoSummon) then -- no summons local clone = doCreateMonster("demon", playerpos) if isCreature(clone) then doConvinceCreature(cid, clone) else return doPlayerSendCancel(cid, "Não há espaço para criar o summon.") end return TRUE end end
-
(Resolvido)SPELL SEM MAGIC EFFECT
local tempo = 5 -- tempo do paralyze em segundos local effect = 221 -- efeito que vai sair ao redor do player local exausted = 8 -- exhausted em segundos local storage = 13098 -- storage do exausted local condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_SPEED, -5000) function onCastSpell(cid, var) local target = getCreatureTarget(cid) local function Efect() if not isCreature(target) then return true end local positions = { [1] = {x=getCreaturePosition(target).x+1, y=getCreaturePosition(target).y+1, z=getCreaturePosition(target).z}, [2] = {x=getCreaturePosition(target).x+1, y=getCreaturePosition(target).y, z=getCreaturePosition(target).z}, [3] = {x=getCreaturePosition(target).x+1, y=getCreaturePosition(target).y-1, z=getCreaturePosition(target).z}, [4] = {x=getCreaturePosition(target).x-1, y=getCreaturePosition(target).y+1, z=getCreaturePosition(target).z}, [5] = {x=getCreaturePosition(target).x-1, y=getCreaturePosition(target).y, z=getCreaturePosition(target).z}, [6] = {x=getCreaturePosition(target).x-1, y=getCreaturePosition(target).y-1, z=getCreaturePosition(target).z}, [7] = {x=getCreaturePosition(target).x, y=getCreaturePosition(target).y+1, z=getCreaturePosition(target).z}, [8] = {x=getCreaturePosition(target).x, y=getCreaturePosition(target).y-1, z=getCreaturePosition(target).z} } for i=1, #positions do if isWalkable(positions[i]) then end end end local function No_Move_Target() if isCreature(target) then doCreatureSetNoMove(target, 0) end return TRUE end if isPlayer(cid) and exhaustion.check(cid, storage) == TRUE then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar novamente.") return false end exhaustion.set(cid, storage, exausted) doCreatureSetNoMove(target, 1) doAddCondition(target, condition) local posefe = getCreaturePosition(target) posefe.x = posefe.x+3 doSendMagicEffect(posefe, effect) addEvent(No_Move_Target, tempo*1000) local t = 0 while t <= tempo*1000 do addEvent(Efect, t) t = t+300 end return true end
-
New Library v. 1.2
Dá pra saber se tem algum bloqueio de passagem entre 2 posições com alguma dessas funções? " if creatureGoToPos(uid, position, delay) == TRUE then" Isso voltaria a informação se tem bloqueio entre as 2? Queria usar isso pra saber se entre 2 creatures não tem bloqueio pra eu jogar uma spell que usa distanceshoot, por exemplo. Exemplo: Usaria pra bloquear a doBlast caso tivesse uma mw entre as 2 creatures. Bom, caso não, aí vai minha sugestão de função.
-
Causar dano a uma Pos
Deu certo com spells de áreas iguais, mas em spells digamos em linha reta, ele muda o resto do percurso da linha reta pra outra direção quando eu me movo..(mas se baseando na pos marcada ao usar a spell) Do jeito que pedi acho que só causando dano em X pos. Queria que tivesse alguma função pra causar dano em x pos, mas pelo visto só usando função pra pegar criatura do topo e usar addhealth ou targetcombathealth, o que infelizmente não iria aparecer o magiceffect nas outras pós(se colocasse pra aparecer sem combat iria pegar pos com paredes ou posições que deveriam ter sido bloqueada pela parede anterior)
-
Causar dano a uma Pos
Vou tentar, valeu.
-
Causar dano a uma Pos
Sim, pois as spells por tempo em área acompanham mesmo sem direcional ou self, a área é sempre baseada na pos atual do usuario, não da ´pra ficar usando área/docombat..
-
Causar dano a uma Pos
Exemplo: Se eu quero uma magia que dá uma onda de fogo na minha frente, mas que ela não altere a sequencia caso eu me mexa, não existe nada como "dê dano em X área baseado na área inicial que o cara tava quando soltou a spell" ? Up, preciso fazer uma spell dar dano em áreas por segundo mas sem que ao me mover mude o trajeto da mesma zz
-
Causar dano a uma Pos
Queria saber uma função para causar dano a uma determinada pos, independente do lugar onde a criatura causadora está, ou se possível, um dano sem criatura causadora. Queria colocar, no statschange pra acontecer um dano em tal Pos, pode ser causado pelo Cid mesmo. Não entendi muito bem a função doAreaCombatHealth pois ela tambem além de pos pede uma area, creio que seria algo como {1} então? Pois recentemente tentei criar uma spell que causava dano em tais pos, em cada tempo, mas a pos mudava de acordo com a pos nova que eu andava, mesmo determinando uma pos via x y z, mas enfim não vem ao caso.
-
Seu Último Trabalho
É um Beerus em topdown(tipo dbo, esses troço)
-
[DUVIDA] Personagem perder todo seu level e itens após morte !
Na verdade você disse pra ele colocar <event type="death" name="reset_all" event="script" value="reset"/> <event type="login" name="reset_all_" event="script" value="reset"/> O que deveria ser <event type="death" name="reset_all" event="script" value="reset.lua"/> <event type="login" name="reset_all_" event="script" value="reset.lua"/>
-
[Sprite] Sword
Tive a leve impressão de que o luan está procurando a abórbora