Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var myDate = new Date();
- var TLoop = true;
- var time = MyTime();
- var Winner;
- var Loser;
- var CurDiff = (me.diff == 1) ? "Nightmare" : (me.diff == 2) ? "Hell" : "Normal";
- function NTMain()
- {
- Delay(1000);
- Include("libs/common/NTCommon.ntl");
- RegisterEvent(EVENT_GAMEMSG, PvPCatch);
- RegisterEvent(EVENT_KEYDOWN, Keyz);
- SetStatusText("PvP Tourny Logging Is On!");
- Print("ÿc2PvP Tracking by MoD-Tru");
- Delay(Random(500,800));
- Print("ÿc5Press 5 (NumPad) for help!");
- var tournyLog = FileOpen("PvP Tracking/Logs/tournyLog.txt", 2);
- if(!tournyLog)
- tournyLog = FileOpen("PvP Tracking/Logs/tournyLog.txt", 2);
- tournyLog.WriteLine("---------" + me.gamename + "---------");
- tournyLog.WriteLine("Date: " + myDate.toDateString());
- tournyLog.WriteLine("Start Time: " + time);
- tournyLog.WriteLine("Difficulty: " + CurDiff);
- tournyLog.WriteLine(" ");
- tournyLog.Close();
- Delay(Random(200,400));
- while(TLoop)
- Delay(Random(250,500));
- }
- function PvPCatch(msg, type)
- {
- if(type == 4 && msg.indexOf(" was slain by ") != -1)
- {
- Print("ÿc3Logging Duel!");
- Winner = msg.split(" was slain by ")[1];
- Loser = msg.split(" was slain by ")[0];
- Delay(Random(400,800));
- tournyLog = FileOpen("PvP Tracking/Logs/tournyLog.txt", 2);
- if(!tournyLog)
- tournyLog = FileOpen("PvP Tracking/Logs/tournyLog.txt", 2);
- tournyLog.WriteLine(Winner + " VS " + Loser + ". Winner: " + Winner);
- tournyLog.WriteLine(" ");
- tournyLog.Close();
- Delay(Random(200,400));
- }
- return;
- }
- function MyTime()
- {
- var now = new Date();
- var HR = now.getHours();
- var MM = now.getMinutes();
- var SS = now.getSeconds();
- var DT = "AM";
- var Civ = true;
- if(Civ)
- {
- if (HR > 11) { DT = "PM"; }
- if (HR > 12) { HR = HR - 12 }
- if (HR == 0) { HR = 12}
- }
- if (HR < 10) { HR = "0" + HR }
- if (MM < 10) { MM = "0" + MM }
- if (SS < 10) { SS = "0" + SS }
- var time = HR + ":" + MM + ":" + SS + " " + DT;
- return time;
- }
- function Keyz(keycode)
- {
- switch(keycode)
- {
- case 96: // '0' (NumPad)
- UnregisterEvent(EVENT_GAMEMSG, (PvPCatch, OppInfo, MyInfo));
- Print("ÿc2PvP Logging has been turned off!");
- SetStatusText("PvP Logging Is OFF!");
- break;
- case 97: // '1' (NumPad)
- RegisterEvent(EVENT_GAMEMSG, (PvPCatch, OppInfo, MyInfo));
- Print("ÿc2PvP Logging has been turned back on!");
- SetStatusText("PvP Logging Is On!");
- break;
- case 99: // '3' (NumPad)
- tournyLog = FileOpen("PvP Tracking/Logs/tournyLog.txt", 1);
- tournyLog.Close();
- Print("ÿc2tournyLog.txt erased!");
- break;
- case 101: // '5' (NumPad)
- HelpButton()
- break;
- }
- }
- function HelpButton()
- {
- Print("ÿc2Press '0' (NumPad) to turn off Logging");
- Print("ÿc2Press '1' (NumPad) to turn on Logging");
- Print("ÿc2Press '3' (NumPad) to clear your tournyLog.txt");
- Print("ÿc2Press '5' (NumPad) to see this help");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement