BlackTibia

No estás conectado. Conéctate o registrate

 » Open Tibia » Pedido de Scripts » 

Wand que pegue por nivel.

Wand que pegue por nivel.

#1 Wand que pegue por nivel. el Sáb Ene 17, 2015 8:40 pm

Healersitito


Novato
necesito que editen esta wand
Código:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 43)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, -1349, 0, -1351)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 31)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, 0, -1349, 0, -1351)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 5)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, 0, -1349, 0, -1351)

local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 17)
setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, 0, -1349, 0, -1351)

local combat5 = createCombatObject()
setCombatParam(combat5, COMBAT_PARAM_TYPE, 1)
setCombatParam(combat5, COMBAT_PARAM_EFFECT, 25)
setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, 0, -1349, 0, -1351)

local combat6 = createCombatObject()
setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat6, COMBAT_PARAM_EFFECT, 48)
setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, 0, -1349, 0, -1351)

local combat7 = createCombatObject()
setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE)
setCombatParam(combat7, COMBAT_PARAM_EFFECT, 20)
setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, 0, -1349, 0, -1351)

function onUseWeapon(cid, var)
  doCreatureAddHealth(cid, 1 + getPlayerMagLevel(cid) * getPlayerLevel(cid) * 0.005)
  doSendAnimatedText(getCreaturePosition(cid), '+'..(1 + getPlayerMagLevel(cid) * getPlayerLevel(cid) * 0.005), COLOR_89)

  lucky = math.random(1, 7)
  if lucky == 1 then
      return doCombat(cid, combat, var)
  elseif lucky == 2 then
      return doCombat(cid, combat2, var)
  elseif lucky == 3 then
      return doCombat(cid, combat3, var)
  elseif lucky == 4 then
      return doCombat(cid, combat4, var)
  elseif lucky == 5 then
      return doCombat(cid, combat5, var)
  elseif lucky == 6 then
      return doCombat(cid, combat6, var)
  elseif lucky == 7 then
      return doCombat(cid, combat7, var)
  end
end

para que en vez de que siempre pegue lo mismo, pegue dependiendo del nivel del jugador.

#2 Re: Wand que pegue por nivel. el Dom Ene 18, 2015 2:36 am

Daek97


Estudiante
Creo que ya está, lo hice rápido en el cel
Código:

local nvl = getPlayerLevel(cid)
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 43)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, -1349-nvl, 0, -1351-nvl)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 31)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, 0, -1349-nvl, 0, -1351-nvl)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 5)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, 0, -1349-nvl, 0, -1351-nvl)

local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 17)
setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, 0, -1349-nvl, 0, -1351-nvl)

local combat5 = createCombatObject()
setCombatParam(combat5, COMBAT_PARAM_TYPE, 1)
setCombatParam(combat5, COMBAT_PARAM_EFFECT, 25)
setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, 0, -1349-nvl, 0, -1351-nvl)

local combat6 = createCombatObject()
setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat6, COMBAT_PARAM_EFFECT, 48)
setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, 0, -1349-nvl, 0, -1351-nvl)

local combat7 = createCombatObject()
setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE)
setCombatParam(combat7, COMBAT_PARAM_EFFECT, 20)
setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, 0, -1349-nvl, 0, -1351-nvl)

function onUseWeapon(cid, var)
  doCreatureAddHealth(cid, 1 + getPlayerMagLevel(cid) * getPlayerLevel(cid) * 0.005)
  doSendAnimatedText(getCreaturePosition(cid), '+'..(1 + getPlayerMagLevel(cid) * getPlayerLevel(cid) * 0.005), COLOR_89)

  lucky = math.random(1, 7)
  if lucky == 1 then
      return doCombat(cid, combat, var)
  elseif lucky == 2 then
      return doCombat(cid, combat2, var)
  elseif lucky == 3 then
      return doCombat(cid, combat3, var)
  elseif lucky == 4 then
      return doCombat(cid, combat4, var)
  elseif lucky == 5 then
      return doCombat(cid, combat5, var)
  elseif lucky == 6 then
      return doCombat(cid, combat6, var)
  elseif lucky == 7 then
      return doCombat(cid, combat7, var)
  end
end

#3 Re: Wand que pegue por nivel. el Dom Ene 18, 2015 7:17 pm

Healersitito


Novato
[Tienes que estar registrado y conectado para ver este vínculo] escribió:Creo que ya está, lo hice rápido en el cel
Código:

local nvl = getPlayerLevel(cid)
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 43)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, -1349-nvl, 0, -1351-nvl)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 31)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, 0, -1349-nvl, 0, -1351-nvl)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 5)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, 0, -1349-nvl, 0, -1351-nvl)

local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 17)
setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, 0, -1349-nvl, 0, -1351-nvl)

local combat5 = createCombatObject()
setCombatParam(combat5, COMBAT_PARAM_TYPE, 1)
setCombatParam(combat5, COMBAT_PARAM_EFFECT, 25)
setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, 0, -1349-nvl, 0, -1351-nvl)

local combat6 = createCombatObject()
setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat6, COMBAT_PARAM_EFFECT, 48)
setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, 0, -1349-nvl, 0, -1351-nvl)

local combat7 = createCombatObject()
setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE)
setCombatParam(combat7, COMBAT_PARAM_EFFECT, 20)
setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, 0, -1349-nvl, 0, -1351-nvl)

function onUseWeapon(cid, var)
  doCreatureAddHealth(cid, 1 + getPlayerMagLevel(cid) * getPlayerLevel(cid) * 0.005)
  doSendAnimatedText(getCreaturePosition(cid), '+'..(1 + getPlayerMagLevel(cid) * getPlayerLevel(cid) * 0.005), COLOR_89)

  lucky = math.random(1, 7)
  if lucky == 1 then
      return doCombat(cid, combat, var)
  elseif lucky == 2 then
      return doCombat(cid, combat2, var)
  elseif lucky == 3 then
      return doCombat(cid, combat3, var)
  elseif lucky == 4 then
      return doCombat(cid, combat4, var)
  elseif lucky == 5 then
      return doCombat(cid, combat5, var)
  elseif lucky == 6 then
      return doCombat(cid, combat6, var)
  elseif lucky == 7 then
      return doCombat(cid, combat7, var)
  end
end

me sale esto

Código:
[18/01/2015 19:16:05] [Error - Weapon Interface]
[18/01/2015 19:16:05] data/weapons/scripts/WandRandom_Life.lua
[18/01/2015 19:16:05] Description:
[18/01/2015 19:16:05] (internalGetPlayerInfo) Player not found when requesting player info #3

[18/01/2015 19:16:05] [Error - Weapon Interface]
[18/01/2015 19:16:05] data/weapons/scripts/WandRandom_Life.lua
[18/01/2015 19:16:05] Description:
[18/01/2015 19:16:05] data/weapons/scripts/WandRandom_Life.lua:7: attempt to perform arithmetic on local 'nvl' (a boolean value)
[18/01/2015 19:16:05] [Warning - Event::loadScript] Cannot load script (data/weapons/scripts/WandRandom_Life.lua)

#4 Re: Wand que pegue por nivel. el Dom Ene 18, 2015 8:27 pm

Daek97


Estudiante
Oh, perdón novatie jaja ahorita lo reparo

#5 Re: Wand que pegue por nivel. el Dom Feb 15, 2015 2:37 pm

Godz4t4n1c


Miembro
[Tienes que estar registrado y conectado para ver este vínculo] escribió:Oh, perdón novatie jaja ahorita lo reparo

We y lo terminaste reparando ??

#6 Re: Wand que pegue por nivel. Hoy a las 3:53 am

Contenido patrocinado


Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje [Página 1 de 1.]

Permisos de este foro:
No puedes responder a temas en este foro.

 

¿Quién está en línea?

En total hay 0 usuarios en línea: 0 Registrados, 0 Ocultos y 0 Invitado

Usuarios navegando en este foro: Ninguno

Forum Statistics

Nuestros miembros han públicado un total de posts en temas.
Actualmente hay miembros registrados.
Démosle la bienvenida al miembro más reciente,
La mayor cantidad de usuarios en línea ha sido de .