Ir para conteúdo
Entre para seguir isso  
Ukirow

Bomba para 8.1

Recommended Posts

Ukirow    0
Ukirow

  • Nome: Bomba
  • Autor: Colex (Mas eu[ukiro] editei umas coisinhas que tava bugando)
  • Versão Testada: Aries 8.10 (PowerEketera)
  • Informações Adicionais: Eh mais uma versão do script da BOMBA mas essa eh diferente, pois eh 8.10 e eh como uma Bomba relogio, esplode em 3~5 segundos.

 

Oi ! Esse eh meu primeiro post, então qualquer coisa eh soh falar ai, que eu ageito !

 

Instalando[/b]:

Abra seu actions.xml (Data/Actions), e coloque a tag:

<action itemid="4852" script="bomb.lua" />

depois.. vá na pasta Scripts dentro da pasta Actions (Data/Actions/Scripts) copie qualquer arquivo .lua e coloque isto dentro (eu sei que eh grandinho):

local PLANTING_DELAY = 3 --seconds
local EXPLOSION_DELAY = 1000 --milliseconds
local MAX_HIT = 50000000
local MIN_HIT = 10000000
local PVP = true -- true for PVP, false for Non-PVP

local PLAYERS = {}
function isInArray(table, valor)
 for i,j in pairs(table) do
if (j == valor) then
  return i
end
 end
 return 0
end
function explosion(info)
  area = {
 {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},
   }
hitpos = {x=info.pos.x, y=info.pos.y, z=info.pos.z, stackpos=253}
 center = {}
 center.y = math.floor(table.getn(area)/2)+1
for i in ipairs(area) do
   center.x = math.floor(table.getn(area[i])/2)+1
   for j, v in ipairs(area[i]) do
  if (v == 1) then
   hitpos.x = info.pos.x + (j - center.x)
   hitpos.y = info.pos.y + (i - center.y)
   if (getTilePzInfo(hitpos) == 0) then   
  victim = getThingfromPos(hitpos)
 effect = 4
 if ((j == center.x) and (i == center.y)) then
   doSendAnimatedText(hitpos,"KABOOOOMM!!!",TEXTCOLOR_RED)
   hitpoints = MAX_HIT
   effect = 5
 else
   hitpoints = math.random(MIN_HIT,MAX_HIT)
 end
   if (isPlayer(victim.uid) == 1) then
   if (PVP == true) then
     doPlayerSendTextMessage(victim.uid,20,"Voce perdeu "..hitpoints.." de vida pela bomba do "..getPlayerName(info.player).."") 
     else
    hitpoints = 0
     end
   end
 if (isCreature(victim.uid) == 1) then
   doPlayerAddHealth(victim.uid,-hitpoints)
   end
  doSendMagicEffect(hitpos,effect)
    end
  end
  end
end
 PLAYERS[isInArray(PLAYERS, info.player)] = 0
 return 1
end
function planting(info)
 if info.num == PLANTING_DELAY then
addEvent(explosion,EXPLOSION_DELAY,info)
 else
info.num = info.num + 1
doPlayerSendTextMessage(info.player,22,info.num.."...")
addEvent(planting,1000,info)
 end
 return 1
end
function onUse(cid, item, frompos, item2, topos) 
 position = getThingPos(item.uid)
 if (getTilePzInfo(position) == 0) then
   if (isInArray(PLAYERS, cid) == 0) then 
 table.insert(PLAYERS, cid) 
 doSendMagicEffect(frompos,3) 
 info = {player = cid, pos = position, num = 1} 
 doRemoveItem(item.uid,1)
 addEvent(planting,1000,info)
else
 doPlayerSendCancel(cid,"Voce soh pode plantar uma bomba por vez.")
end
 else
doPlayerSendCancel(cid,"Voce naum pode explodir isso aqui!")
 end 
 return 1
end

É Isso ai ! Vlw :alegre:

Editado por Kaotar

Compartilhar este post


Link para o post
Kaotar    5
Kaotar

Bom o script parece bem feito, e a idéia dele é bem legal. Irei aprovar.

 

Aprovado e Movido.

Script sem remuneração, usuário com menos de 50 posts

Compartilhar este post


Link para o post
jedian    0
jedian

Vou te processar

UAHSUahsuaHSUahszuasA'

OMG, cara, esse script é estranho, quando vi o nome, pensei que era um fã meu adaptando pra 8.1 '-'

HSUAhsuaHSU'

boa rapaz!

belo script!

embora, seja estranho, pelo que percebi, ele não usa a função doAreaCombatHealth, não sei se existia pra 8.1 mas

é realmente estranho, ver se tem jogadores em tal area e , tira vida deles, :fuu:

mas blz né,

Tchau :)

Editado por jedian

Compartilhar este post


Link para o post
Ukirow    0
Ukirow

Vlws " :D

Compartilhar este post


Link para o post
Heitorzimn    0
Heitorzimn

Muito bom em Dan...

 

Me ajudo bastante...

Compartilhar este post


Link para o post
CauaRules    0
CauaRules

Oush Eu Dexeei Um Okaay !

IOEHAHIOEAHIOHIO'

é nooix

Compartilhar este post


Link para o post
Visitante
Este tópico está impedido de receber novos posts.
Entre para seguir isso  
  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×