Jump to content

list maps command in shrubbot


JohnDory

Recommended Posts

  • Management

Sorry. I probably spoke little bit too soon. If you mean that a shrubbot command that would print your current cycle, then that would be difficult. Because that cycle is all in a script. I thought of printing all the maps from the etmain folder. The best way to do this feature is to make a Lua script that parses your map cycle cfg. Unfortunately I haven't seen one yet.

Link to comment
Share on other sites

Version = 1.0 

 ------------------------------------------------- 

 function et_InitGame(levelTime,randomSeed,restart) 
    et.G_Print("[Nextmap] Version:"..Version.." Loaded\n") 
       et.RegisterModname("Nextmap Announce") 
 end 

 ------------------------------------------------- 

 samplerate = 290000  --300000 
 map1 = "supply" 
 map2 = "oasis" 
 map3 = "goldrush" 
 map4 = "radar" 
 map5 = "tc_base" 
 map6 = "et_beach" 
 map7 = "frostbite" 
 map8 = "sp_delivery_te" 
 map9 = "adlernest" 
 map10 = "bremen_b2" 
 map11 = "braundorf_b4" 
 map12 = "et_ice" 
 map13 = "goldrush-ga" 
 map14 = "railgun" 
 map15 = "dubrovnik_final" 
 map16 = "sw_battery" 
 map17 = "et_village" 

 ------------------------------------------------- 

 function et_RunFrame( levelTime ) 
    if math.mod(levelTime, samplerate) ~= 0 then return end 
        mapname = et.trap_Cvar_Get( "mapname" )          
     if mapname == map1 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map2.."\n\"" ) 
     elseif mapname == map2 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map3.."\n\"" ) 
     elseif mapname == map3 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map4.."\n\"" ) 
     elseif mapname == map4 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map5.."\n\"" ) 
     elseif mapname == map5 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map6.."\n\"" ) 
     elseif mapname == map6 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map7.."\n\"" ) 
     elseif mapname == map7 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map8.."\n\"" ) 
     elseif mapname == map8 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map9.."\n\"" ) 
     elseif mapname == map9 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map10.."\n\"" ) 
     elseif mapname == map10 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map11.."\n\"" ) 
     elseif mapname == map11 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map12.."\n\"" ) 
     elseif mapname == map12 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map13.."\n\"" ) 
     elseif mapname == map13 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map14.."\n\"" ) 
     elseif mapname == map14 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map15.."\n\"" )      
     elseif mapname == map15 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map16.."\n\"" )  
     elseif mapname == map16 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map17.."\n\"" )  
     elseif mapname == map17 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map1.."\n\"" )        
          end 
        end 

   
 function et_ClientCommand(client, command) 
    local    mapname = et.trap_Cvar_Get( "mapname" ) 
   if string.lower(command) == "callvote" then 
    if et.trap_Argv(1) == "nextmap" then 
     if mapname == map1 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map2.."\n\"" ) 
     elseif mapname == map2 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map3.."\n\"" ) 
     elseif mapname == map3 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map4.."\n\"" ) 
     elseif mapname == map4 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map5.."\n\"" ) 
     elseif mapname == map5 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map6.."\n\"" ) 
     elseif mapname == map6 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map7.."\n\"" ) 
     elseif mapname == map7 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map8.."\n\"" ) 
     elseif mapname == map8 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map9.."\n\"" ) 
     elseif mapname == map9 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map10.."\n\"" ) 
     elseif mapname == map10 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map11.."\n\"" ) 
     elseif mapname == map11 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map12.."\n\"" ) 
     elseif mapname == map12 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map13.."\n\"" ) 
     elseif mapname == map13 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map14.."\n\"" ) 
     elseif mapname == map14 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map15.."\n\"" )      
     elseif mapname == map15 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map16.."\n\"" )  
     elseif mapname == map16 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map17.."\n\"" )  
     elseif mapname == map17 then 
             et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map1.."\n\"" )        
                end    
                 end 
        end 
    end

 

 

You can,t do this if you running mapvoting..but you can do something a announce like ..if nobody vote..nextmap will be...your mapvoterotation.cfg

 

source for this script is http://bani.anime.net/banimod/forums/viewtopic.php?p=66730  and is working on silentmod

cheers

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...