Ir para conteúdo
  • 0

Problema Com Storage Help ?


hithfrin

Pergunta

Bom Dia xtibia !

eu tenho uma magia que preciso coloca uma storage e exausted,se puder ajudar serei mto grato

tentei colocar a storage mais a magia buga e ela ta sem exhausted.

 

local acombat1 = createCombatObject()

local acombat2 = createCombatObject()

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 9)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 40)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -20.85, -80, -0.9, -127)

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 9)

setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 40)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -20.85, -80, -0.9, -127)

local condition = createConditionObject(CONDITION_PHYSICAL)

setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)

--setConditionParam(condition, CONDITION_PARAM_SPEED, -200)

setConditionFormula(condition, -0.9, 0, -0.9, 0)

setCombatCondition(combat1, condition)

setCombatCondition(combat2, condition)

arr1 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 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, 2, 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}

}

arr2 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 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, 1, 0, 0, 0, 0},

{0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0},

{0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0},

{0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0},

{0, 0, 0, 0, 1, 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},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

}

local area1 = createCombatArea(arr1)

local area2 = createCombatArea(arr2)

setCombatArea(acombat1, area1)

setCombatArea(acombat2, area2)

function onTargetTile(cid, pos)

doCombat(cid,combat1,positionToVariant(pos))

end

function onTargetTile2(cid, pos)

doCombat(cid,combat2,positionToVariant(pos))

end

setCombatCallback(acombat1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

setCombatCallback(acombat2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")

local function onCastSpell1(parameters)

doCombat(parameters.cid, acombat1, parameters.var)

end

local function onCastSpell2(parameters)

doCombat(parameters.cid, acombat2, parameters.var)

end

function onCastSpell(cid, var)

local parameters = { cid = cid, var = var}

addEvent(onCastSpell1, 0, parameters)

addEvent(onCastSpell2, 200, parameters)

return

true

end

Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts Recomendados

  • 0

A sua magia ta sem exhauted, mesmo colocando na tag lá na spells.xml ?

 

Eu fiz uma aqui, com storage .. só por a storage que você quer no lugar certo.

 


local acombat1 = createCombatObject()
local acombat2 = createCombatObject()
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 9)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 40)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -20.85, -80, -0.9, -127)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 9)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 40)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -20.85, -80, -0.9, -127)
local condition = createConditionObject(CONDITION_PHYSICAL) 
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
--setConditionParam(condition, CONDITION_PARAM_SPEED, -200)
setConditionFormula(condition, -0.9, 0, -0.9, 0)
setCombatCondition(combat1, condition)
setCombatCondition(combat2, condition)
arr1 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 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, 2, 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}
}
arr2 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 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, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 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},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
setCombatArea(acombat1, area1)
setCombatArea(acombat2, area2)
function onTargetTile(cid, pos)
doCombat(cid,combat1,positionToVariant(pos))
end
function onTargetTile2(cid, pos)
doCombat(cid,combat2,positionToVariant(pos))
end
setCombatCallback(acombat1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
setCombatCallback(acombat2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2") 
local function onCastSpell1(parameters)
doCombat(parameters.cid, acombat1, parameters.var)
end
local function onCastSpell2(parameters)
doCombat(parameters.cid, acombat2, parameters.var)
end
function onCastSpell(cid, var)
local storage = ida da sua storage
local msg = "Desculpe voce nao tem a storage necessária"
local parameters = { cid = cid, var = var}
if getPlayerStorageValue(cid,storage) == -1 then
addEvent(onCastSpell1, 0, parameters)
addEvent(onCastSpell2, 200, parameters)
else
doPlayerSendCancel(cid, msg)
end
return true
end

 

Estou voltando aos poucos em scripts, não lembro mais nada ;P

Link para o comentário
Compartilhar em outros sites

  • 0

Muito Obrigado sky vc sempre ajudando vc é foda vo testa aqui ai lhe digo.

 

[Error Spell Interface]

data/spells/scripts/attack/fierce berserk2.lua

<luaSetConditionFormula> Condition not found

 

n funciono aqui =/ vo explica td aqui ai vc me diz oque está errado fazendo favor.

o player consegue usar a magia com ou sem a storage

 

a action e uid é 15967

 

a script actions é

 

function onUse(cid, item, frompos, item2, topos)

 

if item.uid ==15967 then

queststatus = getPlayerStorageValue(cid,15234)

if queststatus == 1 then

doPlayerSendTextMessage(cid,22,"Você jah pegou sua recompensa.")

 

else

doPlayerSendTextMessage(cid,22,"Voce agora Tem uma magia nova.")

doSendMagicEffect(topos,12)

coins_uid = doPlayerAddItem(cid,2160,100)

coins_uid = doPlayerAddItem(cid,9693,1)

setPlayerStorageValue(cid,15234,1)

end

return 0

end

return 1

end

 

xml

<action uniqueid="15967" script="spelltest.lua" />

 

na spelltest.lua

 

local acombat1 = createCombatObject()

local acombat2 = createCombatObject()

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 9)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 40)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -20.85, -80, -0.9, -127)

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 9)

setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 40)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -20.85, -80, -0.9, -127)

local condition = createConditionObject(CONDITION_PHYSICAL)

setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)

--setConditionParam(condition, CONDITION_PARAM_SPEED, -200)

setConditionFormula(condition, -0.9, 0, -0.9, 0)

setCombatCondition(combat1, condition)

setCombatCondition(combat2, condition)

arr1 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 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, 2, 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}

}

arr2 = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 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, 1, 0, 0, 0, 0},

{0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0},

{0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0},

{0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0},

{0, 0, 0, 0, 1, 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},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

}

local area1 = createCombatArea(arr1)

local area2 = createCombatArea(arr2)

setCombatArea(acombat1, area1)

setCombatArea(acombat2, area2)

function onTargetTile(cid, pos)

doCombat(cid,combat1,positionToVariant(pos))

end

function onTargetTile2(cid, pos)

doCombat(cid,combat2,positionToVariant(pos))

end

setCombatCallback(acombat1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

setCombatCallback(acombat2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")

local function onCastSpell1(parameters)

doCombat(parameters.cid, acombat1, parameters.var)

end

local function onCastSpell2(parameters)

doCombat(parameters.cid, acombat2, parameters.var)

end

function onCastSpell(cid, var)

local storage = 15234

local msg = "Desculpe voce nao tem a storage necessária"

local parameters = { cid = cid, var = var}

if getPlayerStorageValue(cid,storage) == -1 then

addEvent(onCastSpell1, 0, parameters)

addEvent(onCastSpell2, 200, parameters)

else

doPlayerSendCancel(cid, msg)

end

return true

end

 

o exausted funciono certinho (y)

soh falto isso =/ storage

malz por ta dando trabalho,mais linguagem de script pra mim é de otro mundo.

 

o ot é 8.60 e é baiak deve ser isso tbm =/

baiak é triste dependendo da script ot cai

 

mais a sua não fez cair,só n pego a storage

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

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...