Jump to content

Proconrulz Need Help


piupiupiu

Recommended Posts

Hello guys!
I can not figure out proconrulz.
How to do
1. Challenge for killing an attack helicopter with Smaw, RPG, MVT LAW, Sraw prize issuing vip status in vipslotmanager
2. Reward anyone with a reserved slot who help start your server
Tried through insanelimit, but it does not work ( plugin version of Insane Limits - 0.9.17.0

https://myrcon.net/topic/307-bf4-insane-limits-vip-slot-manager-vip-slot-for-help-server-start-v10/

Link to comment

About first one i am not sure if it is possible.  But here is Insane Limits code for server start. I am not able to find it anymore here on Myrcon but it is in one of my Disabled Limits


Config 
limit_evaluation: OnAnyChat 
first_check:Code  

 

int TimeFrom = 6;   // time from
int TimeTill = 14;   // time till
int MinPlaytime = 60;   // min. playtime in minutes to win a vip slot
int MinPlayersOnline = 1;   // min. players on server
int WinVipSlotDays = 5;   // vip slot for how many days 
 
int t_TimeTill = TimeTill;
int t_MinPlaytime = MinPlaytime - 5;

//if ((DateTime.Now.ToString("ddd") != "Sa") && (DateTime.Now.ToString("ddd") != "So")) {t_TimeTill = TimeTill + 1;}
if (server.PlayerCount < MinPlayersOnline) {return false;}

double tmp_playtime = 0;
string tmp_memory = String.Empty;
if ((DateTime.Now.Hour >= TimeFrom) && (DateTime.Now.Hour < t_TimeTill)) {
    List<String> starterList = new List<String>();
    bool tmp_winner = false;
    //Thread.Sleep(20);
    if (DateTime.Now.Minute <= 25) {
        plugin.SendGlobalMessage("####      FREE !VIP SLOT for Server Starter    ####");
        plugin.SendGlobalMessage("##   Play between " + TimeFrom.ToString("00") + ":00 till " + TimeTill.ToString() + ":00 o'clock for       ##");
        plugin.SendGlobalMessage("##   min. " + (MinPlaytime / 60).ToString() + " hours to win a !VIP SLOT for " + WinVipSlotDays.ToString() + " days   ##");
        plugin.SendGlobalMessage("Type !playtime in chat to check your playtime");
        plugin.PRoConChat("####      FREE !VIP SLOT for Server Starter    ####");
        plugin.PRoConChat("##   Play between " + TimeFrom.ToString("00") + ":00 till " + TimeTill.ToString() + ":00 o'clock for       ##");
        plugin.PRoConChat("##   min. " + (MinPlaytime / 60).ToString() + " hours to win a !VIP SLOT for " + WinVipSlotDays.ToString() + " days   ##");
        plugin.PRoConChat("Type !playtime in chat to check your playtime");
    }


    List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
    players.AddRange(team1.players);
    players.AddRange(team2.players);
    players.AddRange(team3.players);
    players.AddRange(team4.players);
    if (!plugin.Data.issetObject("server_starter_list")) plugin.Data.setObject("server_starter_list", new List<String>());
    starterList = (List<String>)plugin.Data.getObject("server_starter_list");
    foreach(PlayerInfoInterface player_info in players) {
        tmp_playtime = Math.Round((player_info.TimeTotal / 60), 0);
        if (tmp_playtime >= t_MinPlaytime) {
            tmp_memory = DateTime.Now.ToString("dd-MM") + "_" + player_info.Name;
            if (!starterList.Contains(tmp_memory)) {
                //vip slot winner
                starterList.Add(tmp_memory);
                if ((DateTime.Now.Minute > 25) && (!tmp_winner)) {
                    plugin.SendGlobalMessage("####      FREE !VIP SLOT for Server Starter    ####");
                    plugin.SendGlobalMessage("##   Play between " + TimeFrom.ToString("00") + ":00 till " + TimeTill.ToString() + ":00 o'clock for       ##");
                    plugin.SendGlobalMessage("##   min. " + (MinPlaytime / 60).ToString() + " hours to win a !VIP SLOT for " + WinVipSlotDays.ToString() + " days   ##");
                    plugin.SendGlobalMessage("Type !playtime in chat to check your playtime");
                    plugin.PRoConChat("####      FREE !VIP SLOT for Server Starter    ####");
                    plugin.PRoConChat("##   Play between " + TimeFrom.ToString("00") + ":00 till " + TimeTill.ToString() + ":00 o'clock for       ##");
                    plugin.PRoConChat("##   min. " + (MinPlaytime / 60).ToString() + " hours to win a !VIP SLOT for " + WinVipSlotDays.ToString() + " days   ##");
                    plugin.PRoConChat("Type !playtime in chat to check your playtime");
                }
                if (!tmp_winner) plugin.SendGlobalYell("\n***   FREE !VIP SLOT for Server Starter   ***\n" + player_info.Name + " has won a !VIP SLOT for " + WinVipSlotDays.ToString() + " days!", 12);
                tmp_winner = true;
                plugin.ConsoleWrite("IL-VIP-Slot-Server-Starter > ^2^b" + player_info.Name + "^0^n has won a VIP Slot for " + WinVipSlotDays.ToString() + " days (playtime: " + tmp_playtime + " min.)");
                plugin.SendGlobalMessage("/vsm-addvip " + player_info.Name + " +" + WinVipSlotDays.ToString());
                plugin.SendGlobalMessage(player_info.Name + " has won a !VIP SLOT for " + WinVipSlotDays.ToString() + " days! Type in chat !playtime for more infos");
                plugin.SendPlayerYell(player_info.Name, "\n***   FREE !VIP SLOT for Server Starter   ***\n" + player_info.Name + " has won a !VIP SLOT for " + WinVipSlotDays.ToString() + " days! \nThanks for your help to fill up the Server", 17);
                plugin.PRoConChat("IL-VIP-Slot-Server-Starter > ^2^b" + player_info.Name + "^0^n has won a VIP Slot for " + WinVipSlotDays.ToString() + " days (playtime: " + tmp_playtime + " min.)");
                plugin.PRoConChat(player_info.Name + " has won a !VIP SLOT for " + WinVipSlotDays.ToString() + " days!");
            }
        } else {
            //info spammer playtime
            if ((tmp_playtime < 6) || ((tmp_playtime >= 70) && (tmp_playtime < 80))) {
                //TimeSpan tmp_TimeFrom = new TimeSpan(TimeFrom, 0, 0); 
                TimeSpan tmp_TimeTill = new TimeSpan(TimeTill, 0, 0);
                //TimeSpan tmp_joined = DateTime.Now.AddSeconds(((player_info.TimeTotal *-1) + (t_MinPlaytime * 60))).TimeOfDay;
                TimeSpan tmp_joined = DateTime.Now.AddSeconds((player_info.TimeTotal *-1)).AddSeconds((t_MinPlaytime * 60)).TimeOfDay;
                if ((DateTime.Now.Hour >= TimeFrom) && (tmp_joined < tmp_TimeTill)) {
                    //stay on server to get a slot
                    if (DateTime.Now.Minute > 25) {
                        plugin.SendPlayerMessage(player_info.Name,"####      FREE !VIP SLOT for Server Starter    ####");
                        plugin.SendPlayerMessage(player_info.Name,"##   Play between " + TimeFrom.ToString("00") + ":00 till " + TimeTill.ToString() + ":00 o'clock for       ##");
                        plugin.SendPlayerMessage(player_info.Name,"##   min. " + (MinPlaytime / 60).ToString() + " hours to win a !VIP SLOT for " + WinVipSlotDays.ToString() + " days   ##");
                    }
                    plugin.SendPlayerMessage(player_info.Name,player_info.Name + " !playtime: " + tmp_playtime.ToString() + "/" + MinPlaytime.ToString() + " minutes to win a !VIP");
                    plugin.PRoConChat("VIP Server Starter > " + player_info.Name + " !playtime: " + tmp_playtime.ToString() + "/" + MinPlaytime.ToString() + " minutes to win a !VIP");
                    plugin.SendPlayerYell(player_info.Name, "\n***   FREE !VIP SLOT for Server Starter   ***\n" + player_info.Name + " stay on Server to win a !VIP SLOT", 15);
                }
            }
        }
    }
    if (tmp_winner) {
        plugin.Data.setObject("server_starter_list", starterList);
        plugin.SendGlobalMessage("Congrats - enjoy your !VIP SLOT");
        plugin.PRoConChat("Congrats - enjoy your !VIP SLOT");
    }
} else if (DateTime.Now.Hour >= 16) {
    if (plugin.Data.issetObject("server_starter_list")) plugin.Data.unsetObject("server_starter_list");
}

 

Link to comment
23 hours ago, piupiupiu said:

RTFM before using a plugin!!!!!!!!!!!!!!!! You enabled virtual mode. InsaneLimits will only log actions, but not execute them....

Need new plugin features? I can change: Adkats, AdKatsLRT, LanguageEnforcer, InsaneLimits, xVotemap for you. Also working on new plugins. Have an idea? Share it and I might include it in my repos. Github.com/hedius

 

Check out E4GLAdKats for an advancded and maintained AdKats version.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.