Jump to content

[Ayuda] Slotbot Mata sin Tocar


Narutimmy

Recommended Posts

Hola lo que pasa esque tengo este scrip, y los usuarios se quejan de que aonque el boss no este si saltan de un lugar mueren, alex me dijo que faltaba agregar una linea que compruebe si lo ataco o no pero nose como :/

Otra cosa, yo tengo 2 Sloth Bot pero quiero que den diferente recompensa (Dinero, Exp) comoago eso?

Sv

--Tyrant 
local colshape2 = createColRectangle ( -1986.3155, 639.1424, 100, 100 ) 
zombiesMatados = 0 
function zona2 ( ) 
    if ( isElementWithinColShape ( source, colshape2 ) ) then 
zombiesMatados = ( zombiesMatados + 1 ) 
if ( zombiesMatados == 300 ) then -- ACA DONDE DICE =1 pone la cantidad de zombies que tienen que matar para que aparesca 
if ( not isElement ( tyrant ) ) then 
        tyrant = exports [ "slothbot" ]:spawnBot ( -2000, 730, 46, 90, 146, 0, 0, ex, 0, "hunting", true ) 
        exports.extra_health:setElementExtraHealth ( tyrant, 50000 ) 
        setGameSpeed ( tyrant, 5) 
outputChatBox ( "#ff0000Tyrant a Spawneado, Corre!", getRootElement(), 255, 255, 255, true ) 
onZomieWasted = 75 
myBlip2 = createBlipAttachedTo ( tyrant, 23 ) 
  
         end 
      end 
   end 
end 
addEvent ( "onZombieWasted", true ) 
addEventHandler ( "onZombieWasted", getRootElement(), zona2 ) 
  
function bot ( attacker ) 
  if attacker == tyrant then --Creo que 'tyrant' es la variable de tu 'BOSS' 
             killPed ( source, attacker ) 
         end 
end 
addEventHandler("onPlayerDamage", getRootElement(), bot) 
  
---Dinero 
addEvent ( "onBotWasted", true ) 
addEventHandler ( "onBotWasted", root, 
function( theKiller) 
    exports.exp_system:addPlayerEXP ( theKiller, 50000 ) 
    destroyElement(myBlip2) 
    givePlayerMoney ( theKiller, 1000000 ) 
    local r,g,b = getPlayerNametagColor ( theKiller ) --get the player's nametag colour 
    local chatterName = getPlayerName ( theKiller ) 
    outputChatBox (  chatterName.." #FF0000ha matado a un BOSS!!! *", getRootElement(), r, g, b, true ) 
end 
) 

Link to comment

creo que era

local colshape = createColRectangle ( 103.88594818115, 1302.0729980469, 220, 200 ) -- 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 ( ) 
    if ( isElementWithinColShape ( source, colshape ) ) then 
zombiesMatados = ( zombiesMatados + 1 ) 
if ( zombiesMatados == 1 ) then 
if ( not isElement ( slothbot1 ) ) then 
        slothbot1 = exports [ "slothbot" ]:spawnBot ( 111.79273223877, 1336.3046875, 10.5859375, 90, math.random(300, 302), 0, 0, ex, 38, "hunting", true ) 
myBlip = createBlipAttachedTo ( slothbot1, 23 ) 
local id = getElementModel ( slothbot1 ) 
if id == 300 then 
exports.extra_health:setElementExtraHealth(solthbot1, 400) 
outputChatBox("[bOSS]:Boss high spawned", getRootElement(), 155, 155, 155, false) 
elseif id == 301 then 
exports.extra_health:setElementExtraHealth(slothbot1, 7500) 
outputChatBox("[bOSS]:Boss medium spawned", getRootElement(), 155, 155, 155, false) 
elseif id == 302 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) 

fijate los models y cambialos a tu gusto

Link to comment
  • Recently Browsing   0 members

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