Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google Log In with Steam Sign In
  • Create Account
Photo

list maps command in shrubbot


  • Please log in to reply
7 replies to this topic

#1
OFFLINE   JohnDory

JohnDory

    Advanced Member

  • Subscriber
  • PipPipPipPip
  • 249 posts
55
Getting Better
  • LocationCornwall, UK

Is there a way of adding a list maps command to shrubbot without having to create a maplist.cfg every time the map cycle is changed ?



#2
OFFLINE   gaoesa

gaoesa

    Advanced Member

  • Management
  • PipPipPipPip
  • 4391 posts
341
Will become famous
  • LocationFinland

It is possible.



#3
OFFLINE   JohnDory

JohnDory

    Advanced Member

  • Subscriber
  • PipPipPipPip
  • 249 posts
55
Getting Better
  • LocationCornwall, UK

do you have a link to a tutorial on how to do this ?



#4
OFFLINE   gaoesa

gaoesa

    Advanced Member

  • Management
  • PipPipPipPip
  • 4391 posts
341
Will become famous
  • LocationFinland

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.



#5
OFFLINE   hellreturn

hellreturn

    Management

  • Management
  • PipPipPipPip
  • 2693 posts
158
On the road to fame

Their was one LUA i had seen ... it even flashed next map... I will search for it and see if I can find it again. It was something similar like you need. 



#6
OFFLINE   JohnDory

JohnDory

    Advanced Member

  • Subscriber
  • PipPipPipPip
  • 249 posts
55
Getting Better
  • LocationCornwall, UK

cheers :)



#7
OFFLINE   loudness

loudness

    Newbie

  • Members
  • Pip
  • 13 posts
6
A step in the right direction
  • LocationBucharest
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.ne...pic.php?p=66730  and is working on silentmod

cheers



#8
OFFLINE   JohnDory

JohnDory

    Advanced Member

  • Subscriber
  • PipPipPipPip
  • 249 posts
55
Getting Better
  • LocationCornwall, UK

thanks I'll have a go tomorrow






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users