Jump to content

AKUKU597

Regular member
  • Posts

    12
  • Joined

  • Last visited

Posts posted by AKUKU597

  1. 5 minutes ago, Eagle_cz said:

    well, tbh, i'm not sure what exactly you need but basically, u can use smt like this (sure that there are lot of different scripts already available around the internet) so for example:

      Hide contents
    
    
    ----------------------------------------------------------------------
    -- AutoPromo - An Enemy Territory Auto Promoting Mod
    ----------------------------------------------------------------------
    description = "AutoPromo"
    version =          "1.1"
    ----------------------------------------------------------------------
    -- This script can be freely used and modified as long as the original
    -- authors are mentioned.
    -- Created by Perlo_0ung, edited by C!es..
    -- Zmienione na potrzeby N!tmoda
    ----------------------------------------------------------------------
    -- CONFIGURATION
    ----------------------------------------------------------------------
    
    lvl1xp = 500  -- XP needed for level 1
    lvl2xp = 1250 -- XP needed for level 2
    lvl3xp = 2000 -- XP needed for level 3
    lvl4xp = 5000 -- XP needed for level 4
    lvl5xp = 7000 -- XP needed for level 5
    lvl6xp = 10000 -- XP needed for level 6
    lvl7xp = 20000 -- XP needed for level 7
    lvl8xp = 30000 -- XP needed for level 8
    lvl9xp = 40000 -- XP needed for level 9
    lvl10xp = 50000 -- XP needed for level 10
    lvl11xp = 75000 -- XP needed for level 11
    lvl12xp = 90000 -- XP needed for level 12
    lvl13xp = 125000 -- XP needed for level 13
    lvl14xp = 150000 -- XP needed for level 14
    lvl15xp = 200000 -- XP needed for level 15
    
    ----------------------------------------------------------------------
    -- DO NOT EDIT BELOW THIS LINE
    -- UNLESS YOU KNOW WHAT YOU'RE DOING
    ----------------------------------------------------------------------
    
    function et_InitGame(levelTime,randomSeed,restart)
                    local modname = string.format("%s v%s", description, version)
                    et.G_Print(string.format("%s loaded\n", modname))
                    et.RegisterModname(modname)
    end
    
    -- TheSilencerPL - To make it better, faster and less aggravating
    -- for the game, store the XP locally and reuse it
    function et_ClientSpawn(clientNum, revived, teamChange, restoreHealth)
       local valXP = getXP(clientNum)
       if valXP >=  lvl1xp and valXP < lvl2xp then 
                      setlevel(clientNum,1,lvl1xp)
       elseif valXP >=  lvl2xp and valXP < lvl3xp then       
                      setlevel(clientNum,2,lvl2xp)
       elseif valXP >=  lvl3xp and valXP < lvl4xp then       
                      setlevel(clientNum,3,lvl3xp)
       elseif valXP >=  lvl4xp and valXP < lvl5xp then       
                      setlevel(clientNum,4,lvl4xp)
       elseif valXP >=  lvl5xp and valXP < lvl6xp then   
                      setlevel(clientNum,5,lvl5xp)
       elseif valXP >=  lvl6xp and valXP < lvl7xp then   
                      setlevel(clientNum,6,lvl6xp)
       elseif valXP >=  lvl7xp and valXP < lvl8xp then   
                      setlevel(clientNum,7,lvl7xp)
       elseif valXP >=  lvl8xp and valXP < lvl9xp then   
                      setlevel(clientNum,8,lvl8xp)
       elseif valXP >=  lvl9xp and valXP < lvl10xp then   
                      setlevel(clientNum,9,lvl9xp)
       elseif valXP >=  lvl10xp and valXP < lvl11xp then   
                      setlevel(clientNum,10,lvl10xp)
       elseif valXP >=  lvl11xp and valXP < lvl12xp then   
                      setlevel(clientNum,11,lvl11xp)
       elseif valXP >=  lvl12xp and valXP < lvl13xp then   
                      setlevel(clientNum,12,lvl12xp)
       elseif valXP >=  lvl13xp and valXP < lvl14xp then   
                      setlevel(clientNum,13,lvl13xp)
       elseif valXP >=  lvl14xp and valXP < lvl15xp then   
                      setlevel(clientNum,14,lvl14xp)
       elseif valXP >=  lvl15xp then   
                      setlevel(clientNum,15,lvl15xp)
       end
    end
    
    function getXP(playerID)
       return  et.gentity_get(playerID, "ps.persistant", 0)   
    end
    
    function getlevel(playerID)
       return et.G_shrubbot_level(playerID)
    end
    
    function setlevel(playerID, newlevel, xp)
       local name = et.gentity_get(playerID,"pers.netname")
       if isBot(playerID) then return end
       if newlevel <= getlevel(playerID) then return end
                      et.trap_SendServerCommand(-1,"bp \"^vGra^7tulation ^v"..name.."^7, ^7you ^7"..newlevel.." !\"")
                      et.trap_SendConsoleCommand( et.EXEC_APPEND, "setlevel ".. playerID.." "..newlevel.."\n" )
                      et.trap_SendConsoleCommand( et.EXEC_APPEND, "readconfig\n" )
    end
    
    function isBot(playerID)
       if et.gentity_get(playerID,"ps.ping") == 0 then
       return true
       end
    end

     

    this can work if you will have:

    - game mod with shrubbot lvl system complatible

    - working level system with levels that u want to use and script edited according to your level system

    was this what u want ?

    no, script lua which gives everyone with level 0 EXTRA XP (givexp)

  2. 4 hours ago, Eagle_cz said:

    sorry man, this will take a some time. I have to create test server first and then i can try to write it. Will have time for this on thursday or friday and then will let u know.

    I have no problem, I will wait
     

  3. On 3.02.2018 at 7:17 PM, Eagle_cz said:

    well, tbh im not so familiar with silent, but will take a look in to documentation if this possible ... im not sure now lol.

    btw. which version of LUA u are able to run ? (for example there are differences between LUA 5.1 and 5.2 and so ...)

    silEnT servers support Lua 5.1.4 scripts up till version 0.8.2.

×
×
  • Create New...