Ir para conteúdo
  • 0

Colokando Templo Pra Usa Spells


Creatserv

Pergunta

Eu vir aki pergunta se tem como coloka templo pra usar a magias.

a magias que eu quero que tenha templo;

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 134)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
local def = 100 -- quantos de defesa vai aumentar
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, def)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
local position = {x=getPlayerPosition(cid).x+2, y=getPlayerPosition(cid).y+1, z=getPlayerPosition(cid).z}
doSendMagicEffect(position, 123)
return doCombat(cid, combat, var)
end
Exemplo: quando usar a magia pra usar dnv vaii ter que espera 1 minunto pra usa novalmente.
Editado por Creatserv
Link para o comentário
Compartilhar em outros sites

15 respostass a esta questão

Posts Recomendados

  • 0

testa ae..

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 134)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local def = 100 -- quantos de defesa vai aumentar
local condition = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, def)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
local time = 10 -- tempo em segundos
local storage = 12345
if getPlayerStorageValue(cid, storage) -os.time() <= 0 then
local position = {x=getPlayerPosition(cid).x+2, y=getPlayerPosition(cid).y+1, z=getPlayerPosition(cid).z}
doSendMagicEffect(position, 123)
setPlayerStorageValue(cid, storage, os.time()+time*1000)
return doCombat(cid, combat, var)
end
end
Link para o comentário
Compartilhar em outros sites

  • 0


local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_EFFECT, 134)

setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

 

local def = 100 -- quantos de defesa vai aumentar

local condition = createConditionObject(CONDITION_ATTRIBUTES)

 

setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)

setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, def)

setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)

setCombatCondition(combat, condition)

 

function onCastSpell(cid, var)

local time = 10 -- tempo em segundos

local storage = 12345

if getPlayerStorageValue(cid, storage) -os.time() <= 0 then

local position = {x=getPlayerPosition(cid).x+2, y=getPlayerPosition(cid).y+1, z=getPlayerPosition(cid).z}

doSendMagicEffect(position, 123)

setPlayerStorageValue(cid, storage, os.time()+time*1000)

return doCombat(cid, combat, var)

else

doPlayerSendCancel(cid, "Você só pode usar essa magia a cada "..time.." segundos!")

end

end

Link para o comentário
Compartilhar em outros sites

  • 0


local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_EFFECT, 134)

setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local def = 100 -- quantos de defesa vai aumentar

local condition = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)

setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, def)

setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)

setCombatCondition(combat, condition)

function onCastSpell(cid, var)

local position = {x=getPlayerPosition(cid).x+2, y=getPlayerPosition(cid).y+1, z=getPlayerPosition(cid).z}

local exausted = 10 --Exausted (tempo).

local storage = 918381

if getPlayerStorageValue(cid, storage) > os.time() then

return doPlayerSendCancel(cid, "Wait "..getPlayerStorageValue(cid, storage) - os.time().." second"..(getPlayerStorageValue(cid, storage) - os.time() > 1 and "s" or "")..".")

else

doSendMagicEffect(position, 123)

return setPlayerStorageValue(cid, storage, os.time() + exausted) and doCombat(cid, combat, var)

end

end

Editado por zipter98
Link para o comentário
Compartilhar em outros sites

  • 0

eu colokeiii asim e pegou >>>>

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 134)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
local def = 1000 -- quantos de defesa vai aumentar
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, def)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
local waittime = 20 -- Tempo de exhaustion
local storage = 115819
if exhaustion.check(cid, storage) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.")
return false
end
local position1 = {x=getPlayerPosition(cid).x+2, y=getPlayerPosition(cid).y+1, z=getPlayerPosition(cid).z}
doSendMagicEffect(position1, 123)
exhaustion.set(cid, storage, waittime)
return doCombat(cid, combat, var)
end
tag:
<instant name="Mokuton Mokujoheki" words="mokuton mokujoheki" lvl="60" mana="2100" prem="1" exhaustion="1200" needlearn="0" script="yamato/defesa.lua">
<vocation id="254"/>
<vocation id="255"/>
<vocation id="256"/>
<vocation id="257"/>
<vocation id="258"/>
<vocation id="259"/>
<vocation id="260"/>
<vocation id="261"/>
</instant>
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...