Postado Novembro 8, 2019 5 anos Queria uma spell reta que puxa-se o cara para sua frente, e depois que puxa-se ele tomaria um stun de 8 segundos e o player que conjurou não poderia se mover durante 8 segundos tambem. Depois de ter puxado e tomado o stun os dois, ele soltaria um area que bateria 8 vezes durante 8 segundos Obs: Vou Postar as duas scripts que tenho, se puderem juntar ja seria de muita ajuda, Obrigado. Spell Que Puxa Reta: Citar local function doPushCreature(target, cid) if target > 0 then if not isNpc(target) then local position = getThingPosition(cid) local fromPosition = getThingPosition(target) local x = ((fromPosition.x - position.x) < 0 and -1 or ((fromPosition.x - position.x) == 0 and 0 or 1)) local y = ((fromPosition.y - position.y) < 0 and -1 or ((fromPosition.y - position.y) == 0 and 0 or 1)) local toPosition = {x = fromPosition.x - x, y = fromPosition.y - y, z = fromPosition.z} if doTileQueryAdd(target, toPosition) == 1 and getTileInfo(toPosition).house == false then doTeleportThing(target, toPosition, true) end end end end local spell = {} spell.config = { [1] = { damageType = 1, areaEffect = 2, area = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 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}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } }, [2] = { damageType = 1, areaEffect = 2, area = { {0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 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} } }, [3] = { damageType = 1, areaEffect = 2, area = { {0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 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} } } } spell.combats = {} for _, config in ipairs(spell.config) do local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, config.damageType) setCombatParam(combat, COMBAT_PARAM_EFFECT, config.areaEffect) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -295.2, 1, -395.2, 1) function onTargetCreature(cid, target) doPushCreature(target, cid) end setCombatCallback(combat, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") setCombatArea(combat, createCombatArea(config.area)) table.insert(spell.combats, combat) end function onCastSpell(cid, var) local p = getCreaturePosition(cid) local x = { [0] = {x=p.x+1, y=p.y-1, z=p.z}, [1] = {x=p.x+4, y=p.y+1, z=p.z}, [2] = {x=p.x+1, y=p.y+4, z=p.z}, [3] = {x=p.x-1, y=p.y+1, z=p.z} } local y = { [0] = 473, [1] = 474, [2] = 475, [3] = 476 } pos = x[getCreatureLookDirection(cid)] eff = y[getCreatureLookDirection(cid)] doSendMagicEffect(pos, eff) exhaustion.set(cid, storage, waittime) doCombat(cid, combat, var) for n = 1, #spell.combats do addEvent(doCombat, (n * 120), cid, spell.combats[n], var) end return true end Spell area que solta depois de puxar: Citar -- SpellCreator generated. -- =============== COMBAT VARS =============== -- Areas/Combat for 0ms local combat0_Foice = createCombatObject() setCombatParam(combat0_Foice, COMBAT_PARAM_EFFECT, 492) setCombatParam(combat0_Foice, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat0_Foice,createCombatArea({{1, 0}, {0, 2}})) local combat0_Brush = createCombatObject() setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat0_Brush,createCombatArea({{0, 1, 1}, {1, 2, 1}, {1, 1, 1}})) setCombatFormula(combat0_Brush, COMBAT_FORMULA_SKILL, -190, 2, -190, 2) -- Areas/Combat for 5600ms local combat56_Foice = createCombatObject() setCombatParam(combat56_Foice, COMBAT_PARAM_EFFECT, 492) setCombatParam(combat56_Foice, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat56_Foice,createCombatArea({{1, 0}, {0, 2}})) -- Areas/Combat for 5500ms local combat55_Brush = createCombatObject() setCombatParam(combat55_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat55_Brush,createCombatArea({{1, 1, 1}, {1, 2, 1}, {1, 1, 1}})) setCombatFormula(combat55_Brush, COMBAT_FORMULA_SKILL, -190, 2, -190, 2) -- Areas/Combat for 4900ms local combat49_Jashin = createCombatObject() setCombatParam(combat49_Jashin, COMBAT_PARAM_EFFECT, 491) setCombatParam(combat49_Jashin, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat49_Jashin,createCombatArea({{1, 0}, {0, 2}})) -- Areas/Combat for 4800ms local combat48_Foice = createCombatObject() setCombatParam(combat48_Foice, COMBAT_PARAM_EFFECT, 492) setCombatParam(combat48_Foice, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat48_Foice,createCombatArea({{1, 0}, {0, 2}})) -- Areas/Combat for 4700ms local combat47_Brush = createCombatObject() setCombatParam(combat47_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat47_Brush,createCombatArea({{1, 1, 1}, {1, 2, 1}, {1, 1, 1}})) setCombatFormula(combat47_Brush, COMBAT_FORMULA_SKILL, -190, 2, -190, 2) -- Areas/Combat for 100ms local combat1_Jashin = createCombatObject() setCombatParam(combat1_Jashin, COMBAT_PARAM_EFFECT, 491) setCombatParam(combat1_Jashin, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat1_Jashin,createCombatArea({{1, 0}, {0, 2}})) local combat1_Brush = createCombatObject() setCombatParam(combat1_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat1_Brush,createCombatArea({{2}})) setCombatFormula(combat1_Brush, COMBAT_FORMULA_SKILL, -190, 2, -190, 2) -- Areas/Combat for 800ms local combat8_Foice = createCombatObject() setCombatParam(combat8_Foice, COMBAT_PARAM_EFFECT, 492) setCombatParam(combat8_Foice, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat8_Foice,createCombatArea({{1, 0}, {0, 2}})) -- Areas/Combat for 1500ms local combat15_Brush = createCombatObject() setCombatParam(combat15_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat15_Brush,createCombatArea({{1, 1, 1}, {1, 2, 1}, {1, 1, 1}})) setCombatFormula(combat15_Brush, COMBAT_FORMULA_SKILL, -190, 2, -190, 2) -- Areas/Combat for 2300ms local combat23_Brush = createCombatObject() setCombatParam(combat23_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat23_Brush,createCombatArea({{1, 1, 1}, {1, 2, 1}, {1, 1, 1}})) setCombatFormula(combat23_Brush, COMBAT_FORMULA_SKILL, -190, 2, -190, 2) -- Areas/Combat for 2400ms local combat24_Foice = createCombatObject() setCombatParam(combat24_Foice, COMBAT_PARAM_EFFECT, 492) setCombatParam(combat24_Foice, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat24_Foice,createCombatArea({{1, 0}, {0, 2}})) -- Areas/Combat for 3100ms local combat31_Brush = createCombatObject() setCombatParam(combat31_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat31_Brush,createCombatArea({{1, 1, 1}, {1, 2, 1}, {1, 1, 1}})) setCombatFormula(combat31_Brush, COMBAT_FORMULA_SKILL, -190, 2, -190, 2) -- Areas/Combat for 3200ms local combat32_Foice = createCombatObject() setCombatParam(combat32_Foice, COMBAT_PARAM_EFFECT, 492) setCombatParam(combat32_Foice, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat32_Foice,createCombatArea({{1, 0}, {0, 2}})) -- Areas/Combat for 3300ms local combat33_Jashin = createCombatObject() setCombatParam(combat33_Jashin, COMBAT_PARAM_EFFECT, 491) setCombatParam(combat33_Jashin, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat33_Jashin,createCombatArea({{1, 0}, {0, 2}})) -- Areas/Combat for 3900ms local combat39_Brush = createCombatObject() setCombatParam(combat39_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat39_Brush,createCombatArea({{1, 1, 1}, {1, 2, 1}, {1, 1, 1}})) setCombatFormula(combat39_Brush, COMBAT_FORMULA_SKILL, -190, 2, -190, 2) -- Areas/Combat for 4000ms local combat40_Foice = createCombatObject() setCombatParam(combat40_Foice, COMBAT_PARAM_EFFECT, 492) setCombatParam(combat40_Foice, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat40_Foice,createCombatArea({{1, 0}, {0, 2}})) -- =============== 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,y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1]) i = i + 2 end end endend function onCastSpell(cid, var) local startPos = getCreaturePosition(cid) RunPart(combat0_Foice,cid,var) RunPart(combat0_Brush,cid,var) addEvent(RunPart,5600,combat56_Foice,cid,var) addEvent(RunPart,5500,combat55_Brush,cid,var) addEvent(RunPart,4900,combat49_Jashin,cid,var) addEvent(RunPart,4800,combat48_Foice,cid,var) addEvent(RunPart,4700,combat47_Brush,cid,var) addEvent(RunPart,100,combat1_Jashin,cid,var) addEvent(RunPart,100,combat1_Brush,cid,var) addEvent(RunPart,800,combat8_Foice,cid,var) addEvent(RunPart,1500,combat15_Brush,cid,var) addEvent(RunPart,2300,combat23_Brush,cid,var) addEvent(RunPart,2400,combat24_Foice,cid,var) addEvent(RunPart,3100,combat31_Brush,cid,var) addEvent(RunPart,3200,combat32_Foice,cid,var) addEvent(RunPart,3300,combat33_Jashin,cid,var) addEvent(RunPart,3900,combat39_Brush,cid,var) addEvent(RunPart,4000,combat40_Foice,cid,var) return trueend Exemplo Abaixo \/ Primeiro Ele Solta o Push Depois de ter puxado o player e dando stun nos dois ele usaria esse area: e bateria 8 vezes Editado Novembro 18, 2019 5 anos por pokeluma100 tamanho da imagem esta muito grande (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.