Jump to content
Sign in to follow this  
NathanAmaro

TFS 0.3.6 {Ajuda} Colocar storage em spell.

Recommended Posts

Olá!

 

tenho tentado colocar uma storage em uma spell a muito tempo e não consigo... É coisa simples eu acho kkk é só colocar para lançar a spell só se tiver a storage 21203

 

script:

 

-- SpellCreator generated.

-- =============== COMBAT VARS ===============
-- Areas/Combat for 0ms
local combat0_Brush_2 = createCombatObject()
setCombatParam(combat0_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO)
setCombatParam(combat0_Brush_2, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatArea(combat0_Brush_2,createCombatArea({{2}}))
function getDmg_Brush_2(cid, level, maglevel)
	return (1500)*-1,(3000)*-1 
end
setCombatCallback(combat0_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat0_Brush_2 = {CONST_ANI_SMALLICE}local combat0_Brush_2 = createCombatObject()
setCombatParam(combat0_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK)
setCombatParam(combat0_Brush_2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatArea(combat0_Brush_2,createCombatArea({{2}}))
function getDmg_Brush_2(cid, level, maglevel)
	return (1600)*-1,(3200)*-1 
end
setCombatCallback(combat0_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat0_Brush_2 = {CONST_ANI_EXPLOSION}local combat0_Brush = createCombatObject()
setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_SOUND_BLUE)
setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatArea(combat0_Brush,createCombatArea({{2}}))
function getDmg_Brush(cid, level, maglevel)
	return (1700)*-1,(3400)*-1 
end
setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat0_Brush = {CONST_ANI_POWERBOLT}local combat0_Brush = createCombatObject()
setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_Brush,createCombatArea({{0, 0, 2, 0, 0},
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1}}))
function getDmg_Brush(cid, level, maglevel)
	return (1800)*-1,(3500)*-1 
end
setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat0_Brush = {CONST_ANI_WHIRLWINDAXE,0,1,1,2,0,2,-1,2,-2,2,-1,1,2,2,1,1}

-- Areas/Combat for 100ms
local combat1_Brush = createCombatObject()
setCombatParam(combat1_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GIANTICE)
setCombatParam(combat1_Brush, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatArea(combat1_Brush,createCombatArea({{2}}))
function getDmg_Brush(cid, level, maglevel)
	return (1500)*-1,(3000)*-1 
end
setCombatCallback(combat1_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat1_Brush = {CONST_ANI_ICE}local combat1_Brush = createCombatObject()
setCombatParam(combat1_Brush, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
setCombatParam(combat1_Brush, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatArea(combat1_Brush,createCombatArea({{2}}))
function getDmg_Brush(cid, level, maglevel)
	return (1600)*-1,(3200)*-1 
end
setCombatCallback(combat1_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat1_Brush = {CONST_ANI_FIRE}local combat1_Brush_2 = createCombatObject()
setCombatParam(combat1_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat1_Brush_2, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatArea(combat1_Brush_2,createCombatArea({{2}}))
function getDmg_Brush_2(cid, level, maglevel)
	return (1700)*-1,(3400)*-1 
end
setCombatCallback(combat1_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat1_Brush_2 = {CONST_ANI_HOLY}local combat1_Brush_2 = createCombatObject()
setCombatParam(combat1_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_CRAPS)
setCombatParam(combat1_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat1_Brush_2,createCombatArea({{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
{0, 0, 2, 0, 0}}))
function getDmg_Brush_2(cid, level, maglevel)
	return (1800)*-1,(3500)*-1 
end
setCombatCallback(combat1_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat1_Brush_2 = {CONST_ANI_WHIRLWINDSWORD,2,-2,1,-2,0,-2,-1,-2,-2,-2,0,-1,-1,-1,1,-1}

-- Areas/Combat for 200ms
local combat2_Brush_2 = createCombatObject()
setCombatParam(combat2_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK)
setCombatParam(combat2_Brush_2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatArea(combat2_Brush_2,createCombatArea({{2}}))
function getDmg_Brush_2(cid, level, maglevel)
	return (1600)*-1,(3200)*-1 
end
setCombatCallback(combat2_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat2_Brush_2 = {CONST_ANI_EXPLOSION}local combat2_Brush_3 = createCombatObject()
setCombatParam(combat2_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST)
setCombatParam(combat2_Brush_3, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatArea(combat2_Brush_3,createCombatArea({{2}}))
function getDmg_Brush_3(cid, level, maglevel)
	return (1700)*-1,(3400)*-1 
end
setCombatCallback(combat2_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3")
local dfcombat2_Brush_3 = {CONST_ANI_SMALLHOLY}local combat2_Brush_3 = createCombatObject()
setCombatParam(combat2_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
setCombatParam(combat2_Brush_3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat2_Brush_3,createCombatArea({{1, 0, 0, 0, 1},
{1, 1, 2, 1, 1},
{1, 0, 0, 0, 1}}))
function getDmg_Brush_3(cid, level, maglevel)
	return (1800)*-1,(3500)*-1 
end
setCombatCallback(combat2_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3")
local dfcombat2_Brush_3 = {CONST_ANI_WHIRLWINDCLUB,-2,-1,-2,1,-2,0,-1,0,2,1,2,-1,2,0,1,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_2,cid,var,dfcombat0_Brush_2,startPos)
	RunPart(combat0_Brush_2,cid,var,dfcombat0_Brush_2,startPos)
	RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos)
	RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos)
	addEvent(RunPart,100,combat1_Brush,cid,var,dfcombat1_Brush,startPos)
	addEvent(RunPart,100,combat1_Brush,cid,var,dfcombat1_Brush,startPos)
	addEvent(RunPart,100,combat1_Brush_2,cid,var,dfcombat1_Brush_2,startPos)
	addEvent(RunPart,100,combat1_Brush_2,cid,var,dfcombat1_Brush_2,startPos)
	addEvent(RunPart,200,combat2_Brush_2,cid,var,dfcombat2_Brush_2,startPos)
	addEvent(RunPart,200,combat2_Brush_3,cid,var,dfcombat2_Brush_3,startPos)
	addEvent(RunPart,200,combat2_Brush_3,cid,var,dfcombat2_Brush_3,startPos)
	return true
	end
end

Edited by NathanAmaro (see edit history)

Oi

Share this post


Link to post
Share on other sites

Tenta ai:

-- SpellCreator generated.

-- =============== COMBAT VARS ===============
-- Areas/Combat for 0ms
local combat0_Brush_2 = createCombatObject()
setCombatParam(combat0_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO)
setCombatParam(combat0_Brush_2, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatArea(combat0_Brush_2,createCombatArea({{2}}))
function getDmg_Brush_2(cid, level, maglevel)
    return (1500)*-1,(3000)*-1
end
setCombatCallback(combat0_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat0_Brush_2 = {CONST_ANI_SMALLICE}local combat0_Brush_2 = createCombatObject()
setCombatParam(combat0_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK)
setCombatParam(combat0_Brush_2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatArea(combat0_Brush_2,createCombatArea({{2}}))
function getDmg_Brush_2(cid, level, maglevel)
    return (1600)*-1,(3200)*-1
end
setCombatCallback(combat0_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat0_Brush_2 = {CONST_ANI_EXPLOSION}local combat0_Brush = createCombatObject()
setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_SOUND_BLUE)
setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatArea(combat0_Brush,createCombatArea({{2}}))
function getDmg_Brush(cid, level, maglevel)
    return (1700)*-1,(3400)*-1
end
setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat0_Brush = {CONST_ANI_POWERBOLT}local combat0_Brush = createCombatObject()
setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_Brush,createCombatArea({{0, 0, 2, 0, 0},
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1}}))
function getDmg_Brush(cid, level, maglevel)
    return (1800)*-1,(3500)*-1
end
setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat0_Brush = {CONST_ANI_WHIRLWINDAXE,0,1,1,2,0,2,-1,2,-2,2,-1,1,2,2,1,1}

-- Areas/Combat for 100ms
local combat1_Brush = createCombatObject()
setCombatParam(combat1_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GIANTICE)
setCombatParam(combat1_Brush, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatArea(combat1_Brush,createCombatArea({{2}}))
function getDmg_Brush(cid, level, maglevel)
    return (1500)*-1,(3000)*-1
end
setCombatCallback(combat1_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat1_Brush = {CONST_ANI_ICE}local combat1_Brush = createCombatObject()
setCombatParam(combat1_Brush, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
setCombatParam(combat1_Brush, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatArea(combat1_Brush,createCombatArea({{2}}))
function getDmg_Brush(cid, level, maglevel)
    return (1600)*-1,(3200)*-1
end
setCombatCallback(combat1_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat1_Brush = {CONST_ANI_FIRE}local combat1_Brush_2 = createCombatObject()
setCombatParam(combat1_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat1_Brush_2, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatArea(combat1_Brush_2,createCombatArea({{2}}))
function getDmg_Brush_2(cid, level, maglevel)
    return (1700)*-1,(3400)*-1
end
setCombatCallback(combat1_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat1_Brush_2 = {CONST_ANI_HOLY}local combat1_Brush_2 = createCombatObject()
setCombatParam(combat1_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_CRAPS)
setCombatParam(combat1_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat1_Brush_2,createCombatArea({{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
{0, 0, 2, 0, 0}}))
function getDmg_Brush_2(cid, level, maglevel)
    return (1800)*-1,(3500)*-1
end
setCombatCallback(combat1_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat1_Brush_2 = {CONST_ANI_WHIRLWINDSWORD,2,-2,1,-2,0,-2,-1,-2,-2,-2,0,-1,-1,-1,1,-1}

-- Areas/Combat for 200ms
local combat2_Brush_2 = createCombatObject()
setCombatParam(combat2_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK)
setCombatParam(combat2_Brush_2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatArea(combat2_Brush_2,createCombatArea({{2}}))
function getDmg_Brush_2(cid, level, maglevel)
    return (1600)*-1,(3200)*-1
end
setCombatCallback(combat2_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat2_Brush_2 = {CONST_ANI_EXPLOSION}local combat2_Brush_3 = createCombatObject()
setCombatParam(combat2_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST)
setCombatParam(combat2_Brush_3, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatArea(combat2_Brush_3,createCombatArea({{2}}))
function getDmg_Brush_3(cid, level, maglevel)
    return (1700)*-1,(3400)*-1
end
setCombatCallback(combat2_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3")
local dfcombat2_Brush_3 = {CONST_ANI_SMALLHOLY}local combat2_Brush_3 = createCombatObject()
setCombatParam(combat2_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
setCombatParam(combat2_Brush_3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat2_Brush_3,createCombatArea({{1, 0, 0, 0, 1},
{1, 1, 2, 1, 1},
{1, 0, 0, 0, 1}}))
function getDmg_Brush_3(cid, level, maglevel)
    return (1800)*-1,(3500)*-1
end
setCombatCallback(combat2_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3")
local dfcombat2_Brush_3 = {CONST_ANI_WHIRLWINDCLUB,-2,-1,-2,1,-2,0,-1,0,2,1,2,-1,2,0,1,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 storage = 21203
    if getPlayerStorageValue(cid, storage) <= 0 then
    doPlayerSendCancel(cid, "Blocked.")
    return true
    end
    local startPos = getCreaturePosition(cid)
    RunPart(combat0_Brush_2,cid,var,dfcombat0_Brush_2,startPos)
    RunPart(combat0_Brush_2,cid,var,dfcombat0_Brush_2,startPos)
    RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos)
    RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos)
    addEvent(RunPart,100,combat1_Brush,cid,var,dfcombat1_Brush,startPos)
    addEvent(RunPart,100,combat1_Brush,cid,var,dfcombat1_Brush,startPos)
    addEvent(RunPart,100,combat1_Brush_2,cid,var,dfcombat1_Brush_2,startPos)
    addEvent(RunPart,100,combat1_Brush_2,cid,var,dfcombat1_Brush_2,startPos)
    addEvent(RunPart,200,combat2_Brush_2,cid,var,dfcombat2_Brush_2,startPos)
    addEvent(RunPart,200,combat2_Brush_3,cid,var,dfcombat2_Brush_3,startPos)
    addEvent(RunPart,200,combat2_Brush_3,cid,var,dfcombat2_Brush_3,startPos)
    return true
end

Marque a melhor resposta, deixando assim o tópico resolvido e ajudando outros membros a identificar a solução do problema.
Não dou suporte via PM, não insista. ✉

  wakon.here@gmail.com ★

 

Regras | Seções OTServ | Seções BOT

Share this post


Link to post
Share on other sites

 

Tenta ai:

-- SpellCreator generated.

-- =============== COMBAT VARS ===============
-- Areas/Combat for 0ms
local combat0_Brush_2 = createCombatObject()
setCombatParam(combat0_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO)
setCombatParam(combat0_Brush_2, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatArea(combat0_Brush_2,createCombatArea({{2}}))
function getDmg_Brush_2(cid, level, maglevel)
    return (1500)*-1,(3000)*-1
end
setCombatCallback(combat0_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat0_Brush_2 = {CONST_ANI_SMALLICE}local combat0_Brush_2 = createCombatObject()
setCombatParam(combat0_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK)
setCombatParam(combat0_Brush_2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatArea(combat0_Brush_2,createCombatArea({{2}}))
function getDmg_Brush_2(cid, level, maglevel)
    return (1600)*-1,(3200)*-1
end
setCombatCallback(combat0_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat0_Brush_2 = {CONST_ANI_EXPLOSION}local combat0_Brush = createCombatObject()
setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_SOUND_BLUE)
setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatArea(combat0_Brush,createCombatArea({{2}}))
function getDmg_Brush(cid, level, maglevel)
    return (1700)*-1,(3400)*-1
end
setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat0_Brush = {CONST_ANI_POWERBOLT}local combat0_Brush = createCombatObject()
setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_Brush,createCombatArea({{0, 0, 2, 0, 0},
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1}}))
function getDmg_Brush(cid, level, maglevel)
    return (1800)*-1,(3500)*-1
end
setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat0_Brush = {CONST_ANI_WHIRLWINDAXE,0,1,1,2,0,2,-1,2,-2,2,-1,1,2,2,1,1}

-- Areas/Combat for 100ms
local combat1_Brush = createCombatObject()
setCombatParam(combat1_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GIANTICE)
setCombatParam(combat1_Brush, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatArea(combat1_Brush,createCombatArea({{2}}))
function getDmg_Brush(cid, level, maglevel)
    return (1500)*-1,(3000)*-1
end
setCombatCallback(combat1_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat1_Brush = {CONST_ANI_ICE}local combat1_Brush = createCombatObject()
setCombatParam(combat1_Brush, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
setCombatParam(combat1_Brush, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatArea(combat1_Brush,createCombatArea({{2}}))
function getDmg_Brush(cid, level, maglevel)
    return (1600)*-1,(3200)*-1
end
setCombatCallback(combat1_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat1_Brush = {CONST_ANI_FIRE}local combat1_Brush_2 = createCombatObject()
setCombatParam(combat1_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat1_Brush_2, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatArea(combat1_Brush_2,createCombatArea({{2}}))
function getDmg_Brush_2(cid, level, maglevel)
    return (1700)*-1,(3400)*-1
end
setCombatCallback(combat1_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat1_Brush_2 = {CONST_ANI_HOLY}local combat1_Brush_2 = createCombatObject()
setCombatParam(combat1_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_CRAPS)
setCombatParam(combat1_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat1_Brush_2,createCombatArea({{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
{0, 0, 2, 0, 0}}))
function getDmg_Brush_2(cid, level, maglevel)
    return (1800)*-1,(3500)*-1
end
setCombatCallback(combat1_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat1_Brush_2 = {CONST_ANI_WHIRLWINDSWORD,2,-2,1,-2,0,-2,-1,-2,-2,-2,0,-1,-1,-1,1,-1}

-- Areas/Combat for 200ms
local combat2_Brush_2 = createCombatObject()
setCombatParam(combat2_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK)
setCombatParam(combat2_Brush_2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatArea(combat2_Brush_2,createCombatArea({{2}}))
function getDmg_Brush_2(cid, level, maglevel)
    return (1600)*-1,(3200)*-1
end
setCombatCallback(combat2_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat2_Brush_2 = {CONST_ANI_EXPLOSION}local combat2_Brush_3 = createCombatObject()
setCombatParam(combat2_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST)
setCombatParam(combat2_Brush_3, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatArea(combat2_Brush_3,createCombatArea({{2}}))
function getDmg_Brush_3(cid, level, maglevel)
    return (1700)*-1,(3400)*-1
end
setCombatCallback(combat2_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3")
local dfcombat2_Brush_3 = {CONST_ANI_SMALLHOLY}local combat2_Brush_3 = createCombatObject()
setCombatParam(combat2_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
setCombatParam(combat2_Brush_3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat2_Brush_3,createCombatArea({{1, 0, 0, 0, 1},
{1, 1, 2, 1, 1},
{1, 0, 0, 0, 1}}))
function getDmg_Brush_3(cid, level, maglevel)
    return (1800)*-1,(3500)*-1
end
setCombatCallback(combat2_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3")
local dfcombat2_Brush_3 = {CONST_ANI_WHIRLWINDCLUB,-2,-1,-2,1,-2,0,-1,0,2,1,2,-1,2,0,1,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 storage = 21203
    if getPlayerStorageValue(cid, storage) <= 0 then
    doPlayerSendCancel(cid, "Blocked.")
    return true
    end
    local startPos = getCreaturePosition(cid)
    RunPart(combat0_Brush_2,cid,var,dfcombat0_Brush_2,startPos)
    RunPart(combat0_Brush_2,cid,var,dfcombat0_Brush_2,startPos)
    RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos)
    RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos)
    addEvent(RunPart,100,combat1_Brush,cid,var,dfcombat1_Brush,startPos)
    addEvent(RunPart,100,combat1_Brush,cid,var,dfcombat1_Brush,startPos)
    addEvent(RunPart,100,combat1_Brush_2,cid,var,dfcombat1_Brush_2,startPos)
    addEvent(RunPart,100,combat1_Brush_2,cid,var,dfcombat1_Brush_2,startPos)
    addEvent(RunPart,200,combat2_Brush_2,cid,var,dfcombat2_Brush_2,startPos)
    addEvent(RunPart,200,combat2_Brush_3,cid,var,dfcombat2_Brush_3,startPos)
    addEvent(RunPart,200,combat2_Brush_3,cid,var,dfcombat2_Brush_3,startPos)
    return true
end

 

Funcionou perfeitamente!


Oi

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By L3K0T
      L3K0TTFS 04 e TFS 0.3.6
      Olá galera, hoje vim trazer um sistema chamado "First to Speak Summon" mais pera ai L3K0T, como funciona? Bom ele sumonar um monstro numa posição setada por sua preferencia, também verifica uma posxyz que você pode setar também e assim falar o comando "!fss"... mais pera ai L3K0T oque tem de diferente??? ... calma ... esse comando só pode ser pronunciado por 1 player somente, no caso se alguém falar o comando depois de você... não irá sumonar até que o tempo pra falar novamente acabe "configurado" e BORA PRO TUTORIAL???
       
       
      TUTORIAL;;
       
      1° vai na pasta Servidor\data\talkactions\scripts copia um arquivo.lua e renomeia para fss e dentro coloque;;
       
      local t = { sto = 565674, --Storage global; temp = 300, --Tempo para falar em milesimo 300 = 5 minutos // segundos o comando; monstro = "Demon", --Nome monstrinho que vá nascer; localmapa = {x=1569, y=214, z=7}, --Posição aonde o monstrinho vai nascer; pisomapa = {x=1565, y=215, z=7}, --Posição aonde o player precisa estar para falar o comando de sua preferencia; msgsucesso = "monstro foi criado!!!", --Mensagem que manda ao player ao criar o monstrinho; msgsono = "Demon Está dormindo zzzZZZ", --Mensagem ao tentar usar o comando com intervalo de espera do comando; msgnull = "Está acordado corra lá", --Mensagem quando o monstro acordar } function onSay(cid, words, param, channel) local tp = getThingPos(cid) --verficação --inicio if tp.x == t.pisomapa.x and tp.y == t.pisomapa.y and tp.z == t.pisomapa.z then --verificação if getPlayerStorageValue(cid, t.sto) > os.time() then --verificação tempo doPlayerSendTextMessage(cid, 27, t.msgsono) return true end for _, cid in ipairs(getPlayersOnline()) do --verificação players global setPlayerStorageValue(cid, t.sto, os.time() + t.temp) --seta storage end doCreateMonster(t.monstro, t.localmapa) doPlayerSendTextMessage(cid, 27, t.msgsucesso) else --fora do tile if getPlayerStorageValue(cid, t.sto) > os.time() then --verificação tempo doPlayerSendTextMessage(cid, 27, t.msgsono) return true end if getPlayerStorageValue(cid, t.sto) < os.time() then --verificação tempo doPlayerSendTextMessage(cid, 27, t.msgnull) return true end end --fim script BY L3K0T return true end tag xml;;
       
      <talkaction words="!fss" event="script" value="fss.lua"/> feito isso salva tudinho e use da melhor forma que achar.
       
      Video;;
       
       
      Créditos: @L3K0T
       
       
    • By Matt Shadows
      Olá Caros membros, hoje estou trazendo um servidor para vocês no qual eu fui contratado para adaptar uma source, me "calotaram" e eu achei justo postar a base adaptada. Desfrutem...
       
       

       
       

       
       
       
       

       
       

       
       

       
    • By Lord Stryton
      Removido até segunda causa
    • By WhiteBubble
      Olá pessoal, a uns 2 anos atras eu estava procurando source 8.54 com limite de efeitos aumentado e não achei e os tutorial que achei na época para aumentar os efeito não funcionava então passei a usar o server com o limite original do tibia que não me recordo qual é, enfim hoje em dia aprendi e como vi que tem gente com o mesmo problema que eu tinha resolvi compartilhar-las.
       
      Lembrando elas estão só com o limite de efeitos e distance effect aumentados para 255 e 81 respectivamente. Testei ambas compilando com o dev-cpp e esta compilando normal, e a source 0.4 também testei em linux e também esta compilando normal.
       
      Source, Tfs 0.3.6 (8.54): Download    Scan
       
      Source, Tfs 0.4 (8.60): Download    Scan
       
      Caso não saibam compilar usando o Dev-cpp vejam esse tutorial que usei quando eu não sabia: Tutorial
       
    • By Jair Kevick
      Pokémon HP
      8.54 Open Source
      [+] Catch médio
      [+] Up Médio
      [+] Sem ip changer
      [+] Sem hamachi
      [+] 1º 2º 3º 4º Geração
      [+] Base Shiny
      [+] 24/7 online
      [+] Points
      [+] Elite four
      [+] BrotherHood
      [+] Task System
      [+] Mega evolução
      [+] Eventos automaticos
      [+] Passiva por clan
      [+] 78 Quests
      [+] TV SYSTEM
      [+] Ditto Memory System
      [+] Outfits da Pokexgames
      Pagina: https://www.facebook.com/pokexjirachi/
      Site: http://www.pokemonhp.tk/
      blog: http://pokemonhpblog.blogspot.com.br/
  • Recently Browsing   0 members

    No registered users viewing this page.


Open Tibia Server

Quer aprender a criar seu próprio servidor de Tibia? Então está no lugar certo, aqui você encontrará milhares de tutorias, scripts, códigos, mapas e utilitários para que você possa fazer o seu próprio servidor de Tibia começando do zero.

Redes Sociais

Anuncie no Tibia King

Precisa de mais visibilidade em seus projetos? Quer fazer um plano publicitário para o seu servidor? Anuncie no Tibia King e faça sua divulgação, possuímos centenas de acessos simultâneos e milhares diários, com certeza será a sua solução!

×
×
  • Create New...