Jump to content

[APORTE] : AL SUBIR NIVEL [CASTILLO-EXP-SYSTEM] TE DA VIDA


Recommended Posts

Posted
function NivelesPremio(thePlayer) 
    local nivel = getElementData(thePlayer,"level") 
    if nivel == 5 then 
      setElementData(thePlayer, "blood",25000) 
      outputChatBox("#5000FF[sistema de Niveles]#FFFFFF:Vida Aumentada !", thePlayer, 255, 255, 255,true) 
    elseif nivel == 7 then 
      setElementData(thePlayer, "blood",27000) 
      outputChatBox("#5000FF[sistema de Niveles]#FFFFFF:Vida Aumentada !", thePlayer, 255, 255, 255,true) 
    elseif nivel == 9 then 
      setElementData(thePlayer, "blood",29000) 
      outputChatBox("#5000FF[sistema de Niveles]#FFFFFF:Vida Aumentada ", thePlayer, 255, 255, 255,true) 
    elseif nivel == 11 then 
      setElementData(thePlayer, "blood",25000) 
      outputChatBox("#5000FF[sistema de Niveles]#FFFFFF:Vida Aumentada !", thePlayer, 255, 255, 255,true) 
    elseif nivel == 13 then 
      setElementData(thePlayer, "blood",31000) 
      outputChatBox("#5000FF[sistema de Niveles]#FFFFFF:Vida Aumentada !", thePlayer, 255, 255, 255,true) 
    elseif nivel == 15 then 
      setElementData(thePlayer, "blood",33000) 
      outputChatBox("#5000FF[sistema de Niveles]#FFFFFF:Vida Aumentada !", thePlayer, 255, 255, 255,true) 
    elseif nivel == 17 then 
      setElementData(thePlayer, "blood",35000)  
      outputChatBox("#5000FF[sistema de Niveles]#FFFFFF:Vida Aumentada !", thePlayer, 255, 255, 255,true) 
    elseif nivel == 19 then 
      setElementData(thePlayer, "blood",37000)  
      outputChatBox("#5000FF[sistema de Niveles]#FFFFFF:Vida Aumentada !", thePlayer, 255, 255, 255,true) 
    elseif nivel == 21 then 
      setElementData(thePlayer, "blood",39000) 
      outputChatBox("#5000FF[sistema de Niveles]#FFFFFF:Vida Aumentada !", thePlayer, 255, 255, 255,true) 
    elseif nivel == 23 then 
      setElementData(thePlayer, "blood",41000) 
      outputChatBox("#5000FF[sistema de Niveles]#FFFFFF:Vida Aumentada !", thePlayer, 255, 255, 255,true) 
    elseif nivel == 25 then 
      setElementData(thePlayer, "blood",43000)  
      outputChatBox("#5000FF[sistema de Niveles]#FFFFFF:Vida Aumentada !", thePlayer, 255, 255, 255,true) 
    elseif nivel == 27 then 
      setElementData(thePlayer, "blood",45000)   
      outputChatBox("#5000FF[sistema de Niveles]#FFFFFF:Vida Aumentada !", thePlayer, 255, 255, 255,true) 
      else 
     outputChatBox("#5000FF[sistema de Niveles]#FFFFFF: No Tienes El Nivel Suficiente!", thePlayer, 255, 255, 255,true)   
    end 
end 
addCommandHandler("nivel", NivelesPremio) 

Posted
es para la gm tipo dayz , ya que hay se usa el set element data y el blood es la vida del jugador , ese scripts es para mta dayz

Pero entonces al usar el comando, me recargaria infinitamente la vida como tantas veces lo usara no? xD

Posted
se xD te dara la vida que dice hay me falta ponerle un settimer para evitar el abuso xD

Tome su script optimizado señor :v

spam = {} 
function NivelesPremio(thePlayer) 
    if spam[thePlayer] < getTickCount() then 
    local nivel = getElementData(thePlayer,"level") 
    setElementData(thePlayer, "blood", 20000+((getElementData(thePlayer,"level") or 1)*1000)) 
    outputChatBox("#5000FF[sistema de Niveles]#FFFFFF:Vida Aumentada a "..tostring(getElementData(thePlayer, "blood")).."!", thePlayer, 0, 0, 0,true) 
    spam[thePlayer] = getTickCount()+10*60000 
    else 
    outputChatBox("#5000FF[sistema de Niveles]#FFFFFF: Espera antes de usar este comando! ("..tostring(math.floor(spam[thePlayer]/1000)).." segundos)", thePlayer, 0,0,0,true) 
    end 
end 
addCommandHandler("nivel", NivelesPremio) 

Posted
se xD te dara la vida que dice hay me falta ponerle un settimer para evitar el abuso xD

Tome su script optimizado señor :v

spam = {} 
function NivelesPremio(thePlayer) 
    if spam[thePlayer] < getTickCount() then 
    local nivel = getElementData(thePlayer,"level") 
    setElementData(thePlayer, "blood", 20000+((getElementData(thePlayer,"level") or 1)*1000)) 
    outputChatBox("#5000FF[sistema de Niveles]#FFFFFF:Vida Aumentada a "..tostring(getElementData(thePlayer, "blood")).."!", thePlayer, 0, 0, 0,true) 
    spam[thePlayer] = getTickCount()+10*60000 
    else 
    outputChatBox("#5000FF[sistema de Niveles]#FFFFFF: Espera antes de usar este comando! ("..tostring(math.floor(spam[thePlayer]/1000)).." segundos)", thePlayer, 0,0,0,true) 
    end 
end 
addCommandHandler("nivel", NivelesPremio) 

tu script esta mal hecho ya que blood y exp sos 2 variables distintas .

mejor te puedes explicar con otra funcion mas sencilla acerca del abuso del comando?

Posted
se xD te dara la vida que dice hay me falta ponerle un settimer para evitar el abuso xD

Tome su script optimizado señor :v

spam = {} 
function NivelesPremio(thePlayer) 
    if spam[thePlayer] < getTickCount() then 
    local nivel = getElementData(thePlayer,"level") 
    setElementData(thePlayer, "blood", 20000+((getElementData(thePlayer,"level") or 1)*1000)) 
    outputChatBox("#5000FF[sistema de Niveles]#FFFFFF:Vida Aumentada a "..tostring(getElementData(thePlayer, "blood")).."!", thePlayer, 0, 0, 0,true) 
    spam[thePlayer] = getTickCount()+10*60000 
    else 
    outputChatBox("#5000FF[sistema de Niveles]#FFFFFF: Espera antes de usar este comando! ("..tostring(math.floor(spam[thePlayer]/1000)).." segundos)", thePlayer, 0,0,0,true) 
    end 
end 
addCommandHandler("nivel", NivelesPremio) 

tu script esta mal hecho ya que blood y exp sos 2 variables distintas .

mejor te puedes explicar con otra funcion mas sencilla acerca del abuso del comando?

Lo unico que hice fue multiplicar el nivel por la vida inicial, es lo que hace tu script LOL xD

Posted
no xD mi script lo que hace es verificiar si tiene un nivel especifico y al poner el comando te da el set osea la vida

Y el mio te da la vida en funcion del nivel que tengas, independientemente de un maximo, pero los valores son los mismos, ya que si tienes nivel 5, te pone 25.000 y si tienes nivel 15, te pone 35.000 de sangre

spam = {} 
function NivelesPremio(thePlayer) 
    if spam[thePlayer] == nil then spam[thePlayer] = 0 end 
    if spam[thePlayer] < getTickCount() then 
    local nivel = getElementData(thePlayer,"level") 
    setElementData(thePlayer, "blood", 20000+((getElementData(thePlayer,"level") or 1)*1000)) 
    outputChatBox("#5000FF[sistema de Niveles]#FFFFFF:Vida Aumentada a "..tostring(getElementData(thePlayer, "blood")).."!", thePlayer, 0, 0, 0,true) 
    spam[thePlayer] = getTickCount()+10*60000 
    else 
    outputChatBox("#5000FF[sistema de Niveles]#FFFFFF: Espera antes de usar este comando! ("..tostring(math.floor(spam[thePlayer]/1000)).." segundos)", thePlayer, 0,0,0,true) 
    end 
end 
addCommandHandler("nivel", NivelesPremio) 

Posted
xD

puedes hacer un ejemplo con m iscript :

function SkinCuenta ( player)

if getElementType ( player ) == "player" then

local registro = getPlayerAccount(player)

local cuenta = getAccountName(registro)

if ( registro and cuenta or "") == "Death" then

setElementModel(player, 299)

setElementData(player, "skin",299)

outputChatBox("#5000FF[skin]:#FFFFFFTes has puesto tu Skin",player,255,255,255,true)

else

outputChatBox("#5000FF[skin]:#FFFFFFAcceso Denegado",player,84,84,84,true)

end

end

end

addCommandHandler("skin",SkinCuenta)

Posted
xD

puedes hacer un ejemplo con m iscript :

function SkinCuenta ( player)

if getElementType ( player ) == "player" then

local registro = getPlayerAccount(player)

local cuenta = getAccountName(registro)

if ( registro and cuenta or "") == "Death" then

setElementModel(player, 299)

setElementData(player, "skin",299)

outputChatBox("#5000FF[skin]:#FFFFFFTes has puesto tu Skin",player,255,255,255,true)

else

outputChatBox("#5000FF[skin]:#FFFFFFAcceso Denegado",player,84,84,84,true)

end

end

end

addCommandHandler("skin",SkinCuenta)

la proxima vez usa el tag de lua

 

local spam = {} 
function SkinCuenta ( player) 
    if getElementType ( player ) == "player" and (spam[player] or 0) --[[Compruebo si existe, sino 0]] < getTickCount() then 
    local cuenta = getAccountName(getPlayerAccount(player)) 
        if cuenta or "" == "Death" then 
        setElementModel(player, 299)     
        setElementData(player, "skin",299)  
        outputChatBox("#5000FF[skin]:#FFFFFFTe has puesto tu Skin",player,255,255,255,true) 
        spam[player] = getTickCount()+5*60000 --5 minutos de antispam 
        else 
        outputChatBox("#5000FF[skin]:#FFFFFFAcceso Denegado",player,84,84,84,true)  
        end 
    end 
end 
addCommandHandler("skin",SkinCuenta) 

Antispam hecho para que cuando cambie la skin, se ponga antispam, puedes modificarlo cambiando el spam[player] de sitio y modificando los valores, getTickCount() devuelve en MS

Posted
xD

puedes hacer un ejemplo con m iscript :

function SkinCuenta ( player)

if getElementType ( player ) == "player" then

local registro = getPlayerAccount(player)

local cuenta = getAccountName(registro)

if ( registro and cuenta or "") == "Death" then

setElementModel(player, 299)

setElementData(player, "skin",299)

outputChatBox("#5000FF[skin]:#FFFFFFTes has puesto tu Skin",player,255,255,255,true)

else

outputChatBox("#5000FF[skin]:#FFFFFFAcceso Denegado",player,84,84,84,true)

end

end

end

addCommandHandler("skin",SkinCuenta)

la proxima vez usa el tag de lua

 

local spam = {} 
function SkinCuenta ( player) 
    if getElementType ( player ) == "player" and (spam[player] or 0) --[[Compruebo si existe, sino 0]] < getTickCount() then 
    local cuenta = getAccountName(getPlayerAccount(player)) 
        if cuenta or "" == "Death" then 
        setElementModel(player, 299)     
        setElementData(player, "skin",299)  
        outputChatBox("#5000FF[skin]:#FFFFFFTe has puesto tu Skin",player,255,255,255,true) 
        spam[player] = getTickCount()+5*60000 --5 minutos de antispam 
        else 
        outputChatBox("#5000FF[skin]:#FFFFFFAcceso Denegado",player,84,84,84,true)  
        end 
    end 
end 
addCommandHandler("skin",SkinCuenta) 

Antispam hecho para que cuando cambie la skin, se ponga antispam, puedes modificarlo cambiando el spam[player] de sitio y modificando los valores, getTickCount() devuelve en MS

gracias xD

  • Recently Browsing   0 members

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