Ir para conteúdo
  • Cadastre-se

(Resolvido)[PEDIDO]


Ir para solução Resolvido por Nogard,

Posts Recomendados

Olá, pessoal vim pedir ajuda em um script, meu ot é 8.4 PS: Amo versao 8.4 e 8.6 mas amo mais 8.4.

 

O script é que quando eu mato o bixo Zabolick eu ganhe o poder extreme paralyze 3 vezes para usar. Att Ribeiro

 

Otro problema é q so o god fala extreme paralyze e o player quando digita e manda n sai nada nem fala extreme paralyze se possivel me ajudar!

TRABALHOS

 

 

[iTEM.XML] Ancient Helmt dar HP e Duration: http://www.tibiaking.com/forum/topic/35010-itemxml-helmet-dar-vida-e-duration/

 

[CreatureScripts] OwNeD ao character morrerhttp://www.tibiaking.com/forum/topic/35733-creaturescripta-owned-quando-morrer/

 

Link para o post
Compartilhar em outros sites

UPPP.

TRABALHOS

 

 

[iTEM.XML] Ancient Helmt dar HP e Duration: http://www.tibiaking.com/forum/topic/35010-itemxml-helmet-dar-vida-e-duration/

 

[CreatureScripts] OwNeD ao character morrerhttp://www.tibiaking.com/forum/topic/35733-creaturescripta-owned-quando-morrer/

 

Link para o post
Compartilhar em outros sites

Te passei em pm me manda em pm plx!

TRABALHOS

 

 

[iTEM.XML] Ancient Helmt dar HP e Duration: http://www.tibiaking.com/forum/topic/35010-itemxml-helmet-dar-vida-e-duration/

 

[CreatureScripts] OwNeD ao character morrerhttp://www.tibiaking.com/forum/topic/35733-creaturescripta-owned-quando-morrer/

 

Link para o post
Compartilhar em outros sites
  • Solução

Primeiro, vá em data/creaturescripts/scripts, crie um novo arquivo .lua chamado killzabolick, e adicione isso dentro:

function onKill(cid, target, lastHit)

if  (isCreature(cid)) and getCreatureName(target) == 'Zabolic' then
setPlayerStorageValue(cid, 7449, 1)
doPlayerLearnInstantSpell(cid, 'Extreme Paralyze')
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você acaba de receber a magia Extreme Paralyze! Pode usá-la 3 vezes')
end
return true
end

salve, feche.

 

 

 

Vá em data/creaturescripts, e abra creaturescripts.xml, adicione essa tag:

 <event type="kill" name="Kill Zabolick" event="script" value="killzabolick.lua"/> 

Salve, feche.

 

 

 

 

 

Novamente, vá em data/creaturescripts/scripts, abra o arquivo login.lua, de ctrl+f e procure por registerCreatureEvent, assim que achar, adicione essa linha abaixo dos demais:

registerCreatureEvent(cid,  "Kill Zabolick")

Salve, feche.

 

 

 

 

 

 

 

Agora, substitua o arquivo da sua spell, por esse:



local water = {490, 491, 492, 493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625}

local combat = createCombatObject()

local meteor = createCombatObject()
setCombatParam(meteor, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(meteor, COMBAT_PARAM_EFFECT, 52)

local stun = createConditionObject(CONDITION_PARALYZE)
setConditionParam(stun, CONDITION_PARAM_TICKS, 5000)
setConditionFormula(stun, -0.8, 0, -0.9, 0)
setCombatCondition(meteor, stun)

local meteor_water = createCombatObject()
setCombatParam(meteor_water, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(meteor_water, COMBAT_PARAM_EFFECT, 52)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.8, 0, -1.3, 0)


combat_arr = {
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}
}

local combat_area = createCombatArea(combat_arr)
setCombatArea(combat, combat_area)

local function meteorCast(p)
doCombat(p.cid, p.combat, positionToVariant(p.pos))
end

local function stunEffect(cid)
doSendMagicEffect(getThingPos(cid), CONST_ME_STUN)
end

function onTargetTile(cid, pos)
if (math.random(0, 1) == 1) then
local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0})
if (isInArray(water, ground.itemid) == TRUE) then
local newpos = {x = pos.x - 7, y = pos.y - 6, z = pos.z}
doSendDistanceShoot(newpos, pos, CONST_ANI_FIRE)
addEvent(meteorCast, 300, {cid = cid, pos = pos, combat = meteor_water})
else
local newpos = {x = pos.x - 7, y = pos.y - 6, z = pos.z}
doSendDistanceShoot(newpos, pos, CONST_ANI_ICE)
addEvent(meteorCast, 300, {cid = cid,pos = pos, combat = meteor})
end
end
end

setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 7449) == 1  then
     setPlayerStorageValue(cid, 7450, 1)
       setPlayerStorageValue(cid, 7449, 0)
       doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você acaba de usar a magia uma vez')

return doCombat(cid, combat, var) 


elseif     
          getPlayerStorageValue(cid, 7450) == 1 then
             setPlayerStorageValue(cid, 7451, 1)
               setPlayerStorageValue(cid, 7450, 0)
           doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você acaba de usar a magia duas vezes')
           return doCombat(cid, combat, var) 
           
       elseif
       
              getPlayerStorageValue(cid, 7451) == 1 then
               doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Você acaba de usar a magia pela terceira e última vez')
                doPlayerUnlearnInstantSpell(cid, 'Extreme Paralyze')
                  setPlayerStorageValue(cid, 7451, 0)
              end    
                  return true    
       
end

Salve.

 

 

F5MHzGo.gif

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo