Jump to content

[BOSS] Spawn


Narutimmy

Recommended Posts

Posted

Hola, lo que pasa es que ya e usado y editado varios diferentes, desde que cada cierto tiempo spawne en cordenadas aleatorias de una tabla. Tambien que al entrar a una Area al matar Cierta cantidad de zombis Spawne, pero lo que yo quiero es que spawnee en ciertos lugares pero en lugar de cierto tiempo pero cuando aya cierta concentracion de personas.

Pense en crear varias coldshare creo se llaman que abarquen todo el mapa como estilo... un tablero de ajedres y que de igual manera al matar muchos zombis spawnee... pero es mas laborioso creo yo.

Que me aconsejan?

mtasa://66.85.14.178:22003

350x20_FFFFFF_FFFFFF_000000_000000.png

Ts3: thezombiworld.com:7777

350x20_FFFFFF_FFFFFF_000000_000000.png

Posted

Al final quedo asi

local colshape = createColRectangle ( -2960, -2960, 5920, 5920 ) -- estas son las coordenadas donde se va a crear el boss para cambiarlas solamente copien la posicion x e y de su admin panel 
zombiesMatados = 0 
function zona (attacker, weapon, bodypart) 
 if ( isElementWithinColShape ( source, colshape ) ) then 
  zombiesMatados = ( zombiesMatados + 1 ) 
  if ( zombiesMatados == 10 ) then --Numero de Zombis por Matar 
   if ( not isElement ( slothbot1 ) ) then 
    local x, y, z = getElementPosition(attacker) 
    slothbot1 = exports [ "slothbot" ]:spawnBot ( x+10, y, z, 90, math.random(33, 35), 0, 0, ex, 38, "hunting", true ) 
    myBlip = createBlipAttachedTo ( slothbot1, 23 ) 
    local id = getElementModel ( slothbot1 ) 
    if id == 33 then 
     exports.extra_health:setElementExtraHealth(slothbot1, 10000) 
     outputChatBox("[bOSS]:Boss medium spawned", getRootElement(), 155, 155, 155, false) 
      
     elseif id == 34 then 
     exports.extra_health:setElementExtraHealth(slothbot1, 50000) 
     outputChatBox("[bOSS]:Boss high spawned", getRootElement(), 155, 155, 155, false) 
    elseif id == 35 then 
     exports.extra_health:setElementExtraHealth(slothbot1, 5000) 
     outputChatBox("[bOSS]:Boss low spawned", getRootElement(), 155, 155, 155, false) 
    end 
            end 
        end 
    end 
end 
addEventHandler ( "onZombieWasted", getRootElement(), zona ) 
addEventHandler("onBotSpawn",getRootElement(),zona) 

el problema es que quiero que tengan distintas armas y paguen diferente exp y dinero

mtasa://66.85.14.178:22003

350x20_FFFFFF_FFFFFF_000000_000000.png

Ts3: thezombiworld.com:7777

350x20_FFFFFF_FFFFFF_000000_000000.png

Posted
addEventHandler ( "onBotWasted", root, 
    function ( theKiller ) 
model = getElemntModel(slothbot1) -- slothbot 1 cambialo 
if model == 300 then 
        exports.exp_system:addPlayerEXP ( theKiller, 5000 ) 
                givePlayerMoney(theKiller, 5000) 
elseif model == 301 then 
                exports.exp_system:addPlayerEXP(theKiller, 2500) 
                givePlayerMoney(theKiller, 2500) 
elseif model == 302 then 
                exports.exp_system:addPlayerEXP(theKiler, 1000) 
                givePlayerMoney(theKiller, 1000) 
   end 
end 
) 
  
  

eso es para dar exp y plata despues para las armas usa giveWeapon

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted
addEventHandler ( "onBotWasted", root, 
    function ( theKiller ) 
model = getElemntModel(slothbot1) -- slothbot 1 cambialo 
if model == 300 then 
        exports.exp_system:addPlayerEXP ( theKiller, 5000 ) 
                givePlayerMoney(theKiller, 5000) 
elseif model == 301 then 
                exports.exp_system:addPlayerEXP(theKiller, 2500) 
                givePlayerMoney(theKiller, 2500) 
elseif model == 302 then 
                exports.exp_system:addPlayerEXP(theKiler, 1000) 
                givePlayerMoney(theKiller, 1000) 
   end 
end 
) 
  
  

eso es para dar exp y plata despues para las armas usa giveWeapon

Asi?

local colshape = createColRectangle ( -2960, -2960, 5920, 5920 ) -- estas son las coordenadas donde se va a crear el boss para cambiarlas solamente copien la posicion x e y de su admin panel 
zombiesMatados = 0 
function zona (attacker, weapon, bodypart) 
 if ( isElementWithinColShape ( source, colshape ) ) then 
  zombiesMatados = ( zombiesMatados + 1 ) 
  if ( zombiesMatados == 10 ) then --Numero de Zombis por Matar 
   if ( not isElement ( slothbot1 ) ) then 
    local x, y, z = getElementPosition(attacker) 
    slothbot1 = exports [ "slothbot" ]:spawnBot ( x+10, y, z+3, 90, math.random(33, 35), 0, 0, ex, 0, "hunting", true ) 
    myBlip = createBlipAttachedTo ( slothbot1, 23 ) 
    local id = getElementModel ( slothbot1 ) 
    if id == 33 then 
     exports.extra_health:setElementExtraHealth(slothbot1, 10000) 
     giveWeapon( slothbot1, 38, 9999, true ) 
     outputChatBox("[bOSS]:Boss medium spawned", getRootElement(), 155, 155, 155, false) 
    elseif id == 34 then 
     exports.extra_health:setElementExtraHealth(slothbot1, 50000) 
     outputChatBox("[bOSS]:Boss high spawned", getRootElement(), 155, 155, 155, false) 
    elseif id == 35 then 
     exports.extra_health:setElementExtraHealth(slothbot1, 5000) 
     giveWeapon( slothbot1, 8, 1, true ) 
     outputChatBox("[bOSS]:Boss low spawned", getRootElement(), 155, 155, 155, false) 
    end 
            end 
        end 
    end 
end 
addEventHandler ( "onZombieWasted", getRootElement(), zona ) 
addEventHandler("onBotSpawn",getRootElement(),zona) 

mtasa://66.85.14.178:22003

350x20_FFFFFF_FFFFFF_000000_000000.png

Ts3: thezombiworld.com:7777

350x20_FFFFFF_FFFFFF_000000_000000.png

Posted
Entonces usa
giveWeapon 
setPedWeaponSlot 
setTimer 

eso

Ya lo ise deotra manera.Gracias, ahora creo tengo un bug... creo que estan spawneando con mas vida de la que els pongo.

mtasa://66.85.14.178:22003

350x20_FFFFFF_FFFFFF_000000_000000.png

Ts3: thezombiworld.com:7777

350x20_FFFFFF_FFFFFF_000000_000000.png

Posted

Comproba la vida del bot

function vida() 
local vida = exports.extra_health:getElementExtraHealth(slothbot1) -- acordate de cambiar esto de slothbot1  
outputChatBox("la vida del boss es ".. vida.."", 255, 0, 255) 
end 
addCommandHanlder("lavida", vida) 

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted
Comproba la vida del bot
function vida() 
local vida = exports.extra_health:getElementExtraHealth(slothbot1) -- acordate de cambiar esto de slothbot1  
outputChatBox("la vida del boss es ".. vida.."", 255, 0, 255) 
end 
addCommandHanlder("lavida", vida) 

addCommandHandler*

Developer @ MYVAL

Posted
Fail por escribir rapido

jeje , ahora intento tratar de ponerlo junto a la exp la vida del boss o algo asi xD

mtasa://66.85.14.178:22003

350x20_FFFFFF_FFFFFF_000000_000000.png

Ts3: thezombiworld.com:7777

350x20_FFFFFF_FFFFFF_000000_000000.png

Posted

Yo entendi mal pense que queria mesclar el script para dar experiencia con el script para spawnear el boss

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...