Ir para conteúdo
  • 0

spell com storage


jhony157

Pergunta

alguem pode arruma essa spell pramin so pode usar ela quando player tivre a storage 19896

o player q tem as storage consegui usar normal mais o effeito da spell n sai
como faço pra fica igual magia de buff normal so q precisa da storage pra pode usar

 

aqui a spell

 

local tempo = 120 -- tempo em segundos.

local effect = {118} -- effect no player, caso queira apenas 1, basta remover os outros numeros.
local ml = 70 -- quantos ira aumentar o skill de ML
local skillfist = 60 -- quantos ira aumentar o skill de Fist
local skillsword = 60 -- quantos ira aumentar o skill de Sword
local skillaxe = 60 -- quantos ira aumentar o skill de Axe
local skillclub = 60 -- quantos ira aumentar o skill de Club
local skilldistance = 60 -- quantos ira aumentar o skill de Distance
local skillshield = 60 -- quantos ira aumentar o skill de Shield
local health = 1299 -- A cada 1 segundo quantos aumentar de vida
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml)
setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, skillfist)
setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, skillsword)
setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, skillaxe)
setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub)
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, skilldistance)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield)
setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit)
setCombatCondition(combat, condition)
local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000)
setCombatCondition(combat, condition)
function magicEffect118(tempo2,tempo3,cid)
if (isCreature(cid)) then
if getPlayerStorageValue(cid, 19896) > 0 and getCreatureCondition(cid, CONDITION_REGENERATION, 1) then
for i=1, #effect do
local position = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z}
doSendMagicEffect(position, effect)
end
end
end
end
function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 19896) ~= 1 or getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then
doCombat(cid, combat, var)
doPlayerSendTextMessage(cid,27,'mode sannin esta ativado.')
doPlayerSay(cid, 'mode sannin!', TALKTYPE_ORANGE_1)
tempo2 = 0
while (tempo2 ~= (tempo*1000)) do
addEvent(magicEffect118, tempo2, tempo2, tempo*1000, cid)
tempo2 = tempo2 + 300
end
setPlayerStorageValue(cid, 19896,1) -- storage verifica transformado, quando = 1 player esta transformado.
else
doPlayerSendCancel(cid, "Sorry, you are transformed.")
end
end
local storage = 19896
function onCastSpell(cid, var)
if getPlayerStorageValue(cid,storage) >= 1 then -- para ver se ele pode usar a storage
return doCombat(cid, combat, var)
else
doPlayerSendCancel(cid, "Desculpe,Você tem que terminar a quest para usar está magia.")
doSendMagicEffect(getCreaturePosition(cid), 118)
end
return FALSE
end
Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0


local tempo = 120 -- tempo em segundos.

local effect = {118} -- effect no player, caso queira apenas 1, basta remover os outros numeros.

 

local points = 70 -- quantos ira aumentar os skills

local health = 1299 -- A cada 1 segundo quantos aumentar de vida

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

 

local condition = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)

setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, points)

setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, points)

setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, points)

setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, points)

setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, points)

setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, points)

setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, points)

setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)

setCombatCondition(combat, condition)

 

local condition = createConditionObject(CONDITION_REGENERATION)

setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)

setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)

setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000)

setCombatCondition(combat, condition)

 

local function Efect(cid)

if isCreature(cid) then

for i=1, #effect do

local position = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z}

doSendMagicEffect(position, effect)

end

end

end

 

 

function onCastSpell(cid, var)

local storage = 19896

 

if getPlayerStorageValue(cid, storage) < 1 then

doPlayerSendCancel(cid, "Desculpe, Você tem que terminar a quest para usar está magia.")

return false

end

 

if getCreatureCondition(cid, CONDITION_ATTRIBUTES) == false then

doCombat(cid, combat, var)

doPlayerSendTextMessage(cid,27,'mode sannin esta ativado.')

doPlayerSay(cid, 'mode sannin!', TALKTYPE_ORANGE_1)

local tempo2 = 0

while (tempo2 <= (tempo*1000)) do

addEvent(Efect, tempo2, cid)

tempo2 = tempo2 + 300

end

else

doPlayerSendCancel(cid, "Sorry, you are transformed.")

end

end

 

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

×
×
  • Criar Novo...