Ir para conteúdo
  • 0

eickhoff

Pergunta

Galera, to com uma duvida grande aki, eu tava afim de colocar o atak dos summons do meu ot de acordo com uma storage do player, no caso a storage 6000, entao eu pensei em fazer o seguinte, criar uma magia para colocar no summon e a força da magia ser baseada na storage , tipo dano minimo getPlayerStorageValue(cid, 6000)*2 e dano maximo getPlayerStorageValue(cid, 6000)*4

depois disso eu fui la no monstro e coloquei:

<attack name="atak do monstro" interval="3000" skill="80" attack="200">

 

sendo q na hora de usar o atak , nao tira dano nenhum dos outros e ainda aparece aki na tela do meu ot:

<luaGetCreatureStorage> Creature not Found.

 

Como eu posso fazer pra conseguir colocar o atak do summon conforme o storage do player? :/

Link para o comentário
Compartilhar em outros sites

4 respostass a esta questão

Posts Recomendados

  • 0

se postase a spell para nos ver seria bom ^^

e se eh pra pegar a storage do player.. teria q usar..

getPlayerStorageValue(getCreatureMaster(cid), 6000)

Link para o comentário
Compartilhar em outros sites

  • 0

Bem, entao... eu peguei a spell do poketibia, queria colocar ela no meu ot, é a vine whip, no caso o storage 6000 é o level do summon:

 

 

local combatn = createCombatObject()

setCombatParam(combatn, COMBAT_PARAM_TYPE, COMBAT_PDAMAGE)

setCombatParam(combatn, COMBAT_PARAM_EFFECT, 80)

setCombatFormula(combatn, COMBAT_FORMULA_LEVELMAGIC, -0, -0, -0, -0, -0, -0, -0, -0)

 

local combats = createCombatObject()

setCombatParam(combats, COMBAT_PARAM_TYPE, COMBAT_PDAMAGE)

setCombatParam(combats, COMBAT_PARAM_EFFECT, 81)

setCombatFormula(combats, COMBAT_FORMULA_LEVELMAGIC, -0, -0, -0, -0, -0, -0, -0, -0)

 

local combate = createCombatObject()

setCombatParam(combate, COMBAT_PARAM_TYPE, COMBAT_PDAMAGE)

setCombatParam(combate, COMBAT_PARAM_EFFECT, 83)

setCombatFormula(combate, COMBAT_FORMULA_LEVELMAGIC, -0, -0, -0, -0, -0, -0, -0, -0)

 

local combatw = createCombatObject()

setCombatParam(combatw, COMBAT_PARAM_TYPE, COMBAT_PDAMAGE)

setCombatParam(combatw, COMBAT_PARAM_EFFECT, 82)

setCombatFormula(combatw, COMBAT_FORMULA_LEVELMAGIC, -0, -0, -0, -0, -0, -0, -0, -0)

 

local combatds1 = createCombatObject()

setCombatParam(combatds1, COMBAT_PARAM_TYPE, EARTHDAMAGE)

 

local combatdn1 = createCombatObject()

setCombatParam(combatdn1, COMBAT_PARAM_TYPE, EARTHDAMAGE)

 

local combatde1 = createCombatObject()

setCombatParam(combatde1, COMBAT_PARAM_TYPE, EARTHDAMAGE)

 

local combatdw1 = createCombatObject()

setCombatParam(combatdw1, COMBAT_PARAM_TYPE, EARTHDAMAGE)

 

 

north = {

{0, 0, 0},

{0, 0, 0},

{0, 2, 0},

{1, 0, 0}

}

 

south = {

{1, 0, 0},

{0, 0, 0},

{0, 2, 0},

{0, 0, 0},

{0, 0, 0}

}

 

east = {

{0, 0, 0, 0},

{1, 0, 0, 0},

{0, 0, 2, 0},

{0, 0, 0, 0},

{0, 0, 0, 0}

}

 

west = {

{0, 0, 0, 3},

{0, 0, 2, 0},

{0, 0, 0, 0},

{0, 0, 0, 0},

{0, 0, 0, 0}

}

 

damages = {

{1, 1, 1},

{1, 1, 1},

{0, 2, 0},

{0, 0, 0},

{0, 0, 0}

}

 

damagen = {

{0, 0, 0},

{0, 0, 0},

{0, 2, 0},

{1, 1, 1},

{1, 1, 1}

}

 

damagee = {

{0, 0, 0, 0},

{1, 1, 0, 0},

{1, 1, 2, 0},

{1, 1, 0, 0},

{0, 0, 0, 0}

}

 

damagew = {

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

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

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

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

{0, 0, 0, 0, 0}

}

 

local arean = createCombatArea(north)

local areas = createCombatArea(south)

local areae = createCombatArea(east)

local areaw = createCombatArea(west)

local areadn = createCombatArea(damagen)

local areads = createCombatArea(damages)

local areade = createCombatArea(damagee)

local areadw = createCombatArea(damagew)

 

setCombatArea(combatn, arean)

setCombatArea(combatw, areaw)

setCombatArea(combats, areas)

setCombatArea(combate, areae)

setCombatArea(combatdn1, areadn)

setCombatArea(combatds1, areads)

setCombatArea(combatde1, areade)

setCombatArea(combatdw1, areadw)

 

function onCastSpell(cid, var)

doCreatureSay(cid, "VINE WHIP!", TALKTYPE_MONSTER)

doTargetCombatHealth(getCreatureTarget(cid), cid, COMBAT_PHYSICALDAMAGE, -getPlayerStorageValue(getCreatureMaster(cid), 6000)*2, -getPlayerStorageValue(getCreatureMaster(cid), 6000)*4, 3)

if getCreatureLookDir(cid) == 0 then

doCombat(cid, combatn, var)

doCombat(cid, combatdn1, var)

elseif getCreatureLookDir(cid) == 1 then

doCombat(cid, combate, var)

doCombat(cid, combatde1, var)

elseif getCreatureLookDir(cid) == 2 then

doCombat(cid, combats, var)

doCombat(cid, combatds1, var)

elseif getCreatureLookDir(cid) == 3 then

doCombat(cid, combatw, var)

doCombat(cid, combatdw1, var)

end

return TRUE

end

 

 

 

Esse é o erro q aparece:

527559_381862835227394_1201167878_n.jpg

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

  • 0

tenta assim..

 

local combatn = createCombatObject()

setCombatParam(combatn, COMBAT_PARAM_TYPE, COMBAT_PDAMAGE)

setCombatParam(combatn, COMBAT_PARAM_EFFECT, 80)

setCombatFormula(combatn, COMBAT_FORMULA_LEVELMAGIC, -0, -0, -0, -0, -0, -0, -0, -0)

 

local combats = createCombatObject()

setCombatParam(combats, COMBAT_PARAM_TYPE, COMBAT_PDAMAGE)

setCombatParam(combats, COMBAT_PARAM_EFFECT, 81)

setCombatFormula(combats, COMBAT_FORMULA_LEVELMAGIC, -0, -0, -0, -0, -0, -0, -0, -0)

 

local combate = createCombatObject()

setCombatParam(combate, COMBAT_PARAM_TYPE, COMBAT_PDAMAGE)

setCombatParam(combate, COMBAT_PARAM_EFFECT, 83)

setCombatFormula(combate, COMBAT_FORMULA_LEVELMAGIC, -0, -0, -0, -0, -0, -0, -0, -0)

 

local combatw = createCombatObject()

setCombatParam(combatw, COMBAT_PARAM_TYPE, COMBAT_PDAMAGE)

setCombatParam(combatw, COMBAT_PARAM_EFFECT, 82)

setCombatFormula(combatw, COMBAT_FORMULA_LEVELMAGIC, -0, -0, -0, -0, -0, -0, -0, -0)

 

local combatds1 = createCombatObject()

setCombatParam(combatds1, COMBAT_PARAM_TYPE, EARTHDAMAGE)

 

local combatdn1 = createCombatObject()

setCombatParam(combatdn1, COMBAT_PARAM_TYPE, EARTHDAMAGE)

 

local combatde1 = createCombatObject()

setCombatParam(combatde1, COMBAT_PARAM_TYPE, EARTHDAMAGE)

 

local combatdw1 = createCombatObject()

setCombatParam(combatdw1, COMBAT_PARAM_TYPE, EARTHDAMAGE)

 

 

north = {

{0, 0, 0},

{0, 0, 0},

{0, 2, 0},

{1, 0, 0}

}

 

south = {

{1, 0, 0},

{0, 0, 0},

{0, 2, 0},

{0, 0, 0},

{0, 0, 0}

}

 

east = {

{0, 0, 0, 0},

{1, 0, 0, 0},

{0, 0, 2, 0},

{0, 0, 0, 0},

{0, 0, 0, 0}

}

 

west = {

{0, 0, 0, 1},

{0, 0, 2, 0},

{0, 0, 0, 0},

{0, 0, 0, 0},

{0, 0, 0, 0}

}

 

damages = {

{1, 1, 1},

{1, 1, 1},

{0, 2, 0},

{0, 0, 0},

{0, 0, 0}

}

 

damagen = {

{0, 0, 0},

{0, 0, 0},

{0, 2, 0},

{1, 1, 1},

{1, 1, 1}

}

 

damagee = {

{0, 0, 0, 0},

{1, 1, 0, 0},

{1, 1, 2, 0},

{1, 1, 0, 0},

{0, 0, 0, 0}

}

 

damagew = {

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

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

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

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

{0, 0, 0, 0, 0}

}

 

local arean = createCombatArea(north)

local areas = createCombatArea(south)

local areae = createCombatArea(east)

local areaw = createCombatArea(west)

local areadn = createCombatArea(damagen)

local areads = createCombatArea(damages)

local areade = createCombatArea(damagee)

local areadw = createCombatArea(damagew)

 

setCombatArea(combatn, arean)

setCombatArea(combatw, areaw)

setCombatArea(combats, areas)

setCombatArea(combate, areae)

setCombatArea(combatdn1, areadn)

setCombatArea(combatds1, areads)

setCombatArea(combatde1, areade)

setCombatArea(combatdw1, areadw)

 

function onCastSpell(cid, var)

doCreatureSay(cid, "VINE WHIP!", TALKTYPE_MONSTER)

 

local MIN = getPlayerStorageValue(getCreatureMaster(cid), 6000)*2

local MAX = getPlayerStorageValue(getCreatureMaster(cid), 6000)*4

local EFF = 3

 

if getCreatureLookDir(cid) == 0 then

doCombat(cid, combatn, var)

doCombat(cid, combatdn1, var)

doAreaCombatHealth(cid, COMBAT_PHYSICALDAMAGE, getPlayerPosition(cid), arean, -MIN, -MAX, EFF)

elseif getCreatureLookDir(cid) == 1 then

doCombat(cid, combate, var)

doCombat(cid, combatde1, var)

doAreaCombatHealth(cid, COMBAT_PHYSICALDAMAGE, getPlayerPosition(cid), areae, -MIN, -MAX, EFF)

elseif getCreatureLookDir(cid) == 2 then

doCombat(cid, combats, var)

doCombat(cid, combatds1, var)

doAreaCombatHealth(cid, COMBAT_PHYSICALDAMAGE, getPlayerPosition(cid), areas, -MIN, -MAX, EFF)

elseif getCreatureLookDir(cid) == 3 then

doCombat(cid, combatw, var)

doCombat(cid, combatdw1, var)

doAreaCombatHealth(cid, COMBAT_PHYSICALDAMAGE, getPlayerPosition(cid), areaw, -MIN, -MAX, EFF)

end

return TRUE

end

 

 

detalhe: eu n sei nd sobre spells, e se a area do dano tiver errada.. soh arruma em..

doAreaCombatHealth(cid, COMBAT_PHYSICALDAMAGE, getPlayerPosition(cid), arean, -MIN, -MAX, EFF)

 

e nos outros ali...

Link para o comentário
Compartilhar em outros sites

  • 0

Brother.... na boa... Eu te amo... to atras disso a mais de uma semana e ninguem me respondia em topico algum, e agora surgiu vc, a luz *--------*

Unica coisa q ta errada mesmo é oq vc falou, a area do dano, mas isso é o de menos, eu ajeito aki de boa....

MUITO OBRIGADO MESMO!!!!

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...