Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var TLoop = true;
- var MyDate = new Date();
- var time = MyTime();
- var _player;
- var OppClass = OppInfo();
- var OppLevel = OppInfo();
- var MyClass = MyInfo();
- var CurDiff = (me.diff == 1) ? "Nightmare" : (me.diff == 2) ? "Hell" : "Normal";
- var DiffMod = (me.diff == 1) ? -40 : (me.diff == 2) ? -100 : 0;
- function NTMain()
- {
- Delay(1000);
- Include("libs/common/NTCommon.ntl");
- NTC_IncludeLibs();
- RegisterEvent(EVENT_GAMEMSG, PvPCatch);
- RegisterEvent(EVENT_KEYDOWN, Keyz);
- SetStatusText("PvP Logging Is On!");
- Print("ÿc2PvP Tracking Enabled");
- Delay(Random(500,800));
- Print("ÿc5Press 5 (NumPad) for help!");
- var PvPLog = FileOpen("PvP Tracking/Logs/PvPLog.txt", 2);
- if(!PvPLog)
- PvPLog = FileOpen("PvP Tracking/Logs/PvPLog.txt", 2);
- PvPLog.WriteLine("---------" + me.gamename + "---------");
- PvPLog.WriteLine("Date: " + MyDate.toDateString());
- PvPLog.WriteLine("Time: " + time);
- PvPLog.WriteLine("Char: " + me.name + " (" + MyClass + "/" + me.GetStat(12) + ")");
- PvPLog.WriteLine("Difficulty: " + CurDiff);
- PvPLog.WriteLine(" ");
- PvPLog.Close();
- Delay(Random(250,500));
- while(TLoop)
- Delay(Random(250,500));
- }
- function PvPCatch(msg, type)
- {
- if(type == 4 && msg.indexOf(" was slain by ") != -1)
- {
- Print("ÿc3Logging Duel!");
- var Winner = msg.split(" was slain by ")[1];
- var Loser = msg.split(" was slain by ")[0];
- Delay(Random(400,800));
- PvPLog = FileOpen("PvP Tracking/Logs/PvPLog.txt", 2);
- if(!PvPLog)
- PvPLog = FileOpen("PvP Tracking/Logs/PvPLog.txt", 2);
- if(Winner == me.charname)
- PvPLog.WriteLine("Opponent: " + Loser + " (" + OppClass + "/" + OppLevel + ")" + " Outcome: Win");
- else
- PvPLog.WriteLine("Opponent: " + Winner + " (" + OppClass + "/" + OppLevel + ")" + " Outcome: Loss");
- PvPLog.WriteLine(" ");
- PvPLog.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)
- PvPLog = FileOpen("Logs/PvPLog.txt", 1);
- PvPLog.Close();
- Print("ÿc2PvPLog.txt erased!");
- break;
- case 101: // '5' (NumPad)
- HelpButton()
- break;
- case 103: // '7' (NumPad)
- Print("ÿc2Logging shortened stats");
- LogShortStats()
- break;
- case 105: // '9' (NumPad)
- Print("ÿc2Logging full stats");
- LogFullStats()
- break;
- }
- }
- function OppInfo()
- {
- _player = GetPlayerUnit();
- if(_player)
- {
- do
- {
- switch(_player.classid)
- {
- case 0: OppClass = "Amazon"; break;
- case 1: OppClass = "Sorceress"; break;
- case 2: OppClass = "Necromancer"; break;
- case 3: OppClass = "Paladin"; break;
- case 4: OppClass = "Barbarian"; break;
- case 5: OppClass = "Druid"; break;
- case 6: OppClass = "Assassin"; break;
- }
- OppLevel = _player.level;
- return OppLevel;
- return OppClass;
- }while(_player.GetNext())
- }
- }
- function MyInfo()
- {
- if(me.ingame)
- {
- do
- {
- switch(me.classid)
- {
- case 0: MyClass = "Amazon"; break;
- case 1: MyClass = "Sorceress"; break;
- case 2: MyClass = "Necromancer"; break;
- case 3: MyClass = "Paladin"; break;
- case 4: MyClass = "Barbarian"; break;
- case 5: MyClass = "Druid"; break;
- case 6: MyClass = "Assassin"; break;
- }
- return MyClass;
- }while(me.GetNext())
- }
- }
- 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 PvPLog.txt");
- Print("ÿc2Press '5' (NumPad) to see this help");
- Print("ÿc2Press '7' (NumPad) to log shortened stats in StatsLog.txt");
- Print("ÿc2Press '9' (NumPad) to log full stats in StatsLog.txt");
- }
- function LogShortStats()
- {
- var StatLogShort = FileOpen("PvP Tracking/Logs/StatsLog.txt", 2);
- if(!StatLogShort)
- StatLogShort = FileOpen("PvP Tracking/Logs/StatsLog.txt", 2);
- StatLogShort.WriteLine("-----Short Stat-----");
- StatLogShort.WriteLine(me.charname + "(" + me.GetStat(12) + ") in " + CurDiff);
- StatLogShort.WriteLine("F Res: " + (me.GetStat(39) + DiffMod) + " CLD Res: " + (me.GetStat(41) + DiffMod));
- StatLogShort.WriteLine("LT Res: " + (me.GetStat(43) + DiffMod) + " PSN Res: " + (me.GetStat(45) + DiffMod));
- StatLogShort.WriteLine("FCR: " + me.GetStat(105) + " FHR: " + me.GetStat(99) + " %DR: " + me.GetStat(36) + " FRW: " + me.GetStat(96));
- StatLogShort.WriteLine("--------------------");
- StatLogShort.WriteLine(" ");
- StatLogShort.Close();
- Delay(Random(200,500));
- }
- function LogFullStats()
- {
- var StatLogFull = FileOpen("PvP Tracking/Logs/StatsLog.txt", 2);
- if(!StatLogFull)
- StatLogFull = FileOpen("PvP Tracking/Logs/StatsLog.txt", 2);
- StatLogFull.WriteLine("-----Full Stats-----");
- StatLogFull.WriteLine("Character: " + me.charname);
- StatLogFull.WriteLine("Difficulty: " + CurDiff);
- StatLogFull.WriteLine("Level: " + me.GetStat(12));
- StatLogFull.WriteLine("HP/Max : " + me.GetStat(6) + "/" + me.GetStat(7));
- StatLogFull.WriteLine("MP/Max: " + me.GetStat(8) + "/" + me.GetStat(9));
- StatLogFull.WriteLine("Str: " + me.GetStat(0) + " Dex: " + me.GetStat(2));
- StatLogFull.WriteLine("Vit: " + me.GetStat(3) + " Enr: " + me.GetStat(1));
- StatLogFull.WriteLine("Fire Res: " + (me.GetStat(39) + DiffMod));
- StatLogFull.WriteLine("Cold Res: " + (me.GetStat(41) + DiffMod));
- StatLogFull.WriteLine("Light Res: " + (me.GetStat(43) + DiffMod));
- StatLogFull.WriteLine("Pois Res: " + (me.GetStat(45) + DiffMod));
- StatLogFull.WriteLine("Faster Cast Rate: " + me.GetStat(105));
- StatLogFull.WriteLine("Faster Hit Recovery: " + me.GetStat(99));
- StatLogFull.WriteLine("% Damage Reduced: " + me.GetStat(36));
- StatLogFull.WriteLine("Faster Run/Walk: " + me.GetStat(96));
- StatLogFull.WriteLine("--------------------");
- StatLogFull.WriteLine(" ");
- StatLogFull.Close();
- Delay(Random(200,500));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement