Vorab, das ist so noch nicht verwendbar!
Code:
/**
* This file was modified by [Only registered and activated users can see links. Click Here To Register...]
* Check the programming section for updates and further scripts
* Original Author: agor
* Last Update: 09/04/2010
*/
Include("libs/common/NTItemAlias.ntl");
function NTI_CheckLog()
{
var _dateString, _fhandle;
_dateString = new Date().toLocaleFormat("%m-%d-%y");
_fhandle = FileOpen("logs/" + me.charname + "/" + _dateString + "_itemlog.xml", 2);
if(_fhandle)
{
// Check if file already exists
if(!_fhandle.ReadLine())
{
Print("ÿc<Creating New Log File for "+me.charname+": " +_dateString+"_itemlog.xml");
// Creation of the new file
_fhandle.WriteLine("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>");
_fhandle.WriteLine("<?xml-stylesheet href=\"itemlog.xsl\" type=\"text/xsl\"?>");
_fhandle.WriteLine("<itemlog>");
_fhandle.WriteLine("</itemlog>");
}
_fhandle.Close();
return true;
}
return false;
}
// Writes items to itemlog.xml via E4X
// http://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Processing_XML_with_E4X
// item = Item Object
// isEthereal = 1 if Item is Ethereal, 0 if not
// mode = 0 -> Item Kept
// mode = 1 -> Item Sold
function NTI_WriteLog(item, isEthereal, mode, logStashed, whereAbouts)
{
var _fhandle, _filepath, _date, _content, _loops, _itemlog, _itemdesc, _location;
var _content2, _content3;
if(arguments.length < 4)
{
logStashed = false;
whereAbouts = "";
}
if(!item)
{
NTI_ErrorLog(null, 3);
return false;
}
if(!logStashed && !NTI_CheckLog())
NTI_ErrorLog(item, 2);
// Checks if there is already a (unid) item logged matching the current item object
if(!logStashed && !(item.itemflag&0x10) && NTI_IsLogged(item))
{
NTI_ErrorLog(item, 0);
return false;
}
_date = new Date();
_content = "";
_loops = 0;
if(logStashed)
{
_filepath = "logs/stashlogs/" + me.charname + "_StashedItems.xml";
_fhandle = FileOpen(_filepath, 2);
if(_fhandle)
{
while(!_fhandle.eof)
{
if(++_loops > 2) // Skips XML header lines because they cause errors when creating the E4X object
_content += _fhandle.ReadLine();
else
_fhandle.ReadLine();
}
_fhandle.Close();
}
else
{
NTI_ErrorLog(item, 1);
return false;
}
// Creation of the E4X Object
_itemlog = new XML(_content);
}
else
_filepath = "logs/"+ me.charname + "/Temp_itemlog";
if(item.itemdesc)
{
// Replaces all colors
_itemdesc = item.itemdesc.replace(/ÿc(.)/g, "");
// Replaces new lines with spaces
_itemdesc = _itemdesc.replace(/\n/g, '|');
// Skips the first part of the description
_itemdesc = _itemdesc.replace((_itemdesc.split("|")[0] + "|"), "");
}
else
_itemdesc = "undefined";
//Add the last location that was saved
if(logStashed)
_location = whereAbouts;
else
_location = NTI_ReadLoc(item);
if(logStashed)
{
// Creation of the file output, headers first and then the itemlog content
_itemlog.item += <item id={_date.getTime()} char={me.charname} time={_date.toLocaleFormat("%a %m/%d/%y %H:%M:%S")} quality={item.quality} ethereal={isEthereal} mode={mode} name={(item.name)?item.name.split("\n")[0]:"undefined"} ilvl={item.itemlevel} location={_location} type={item.classid} typedesc={NTI_NameItem(item.classid)}>{_itemdesc}</item>;
_content = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
_content += "<?xml-stylesheet href=\"stashlog.xsl\" type=\"text/xsl\"?>\n";
_content += _itemlog.toXMLString();
}
else
{
_content = "<item id=\"" + _date.getTime() + "\" char=\"" + me.charname + "\" time=\"" + _date.toLocaleFormat("%a %m/%d/%y %H:%M:%S") + "\" quality=\"" +
item.quality + "\" ethereal=\"" + isEthereal + "\" mode=\"" + mode + "\" name=\"" + ((item.name) ? item.name.split("\n")[0] : "undefined") + "\" ilvl=\"" +
item.itemlevel + "\" location=\"" + _location + "\" type=\"" + item.classid + "\" typedesc=\"" + NTI_NameItem(item.classid) + "\">";
_content2 = _itemdesc;
_content3 = "</item>";
}
if(logStashed)
_fhandle = FileOpen(_filepath, 1);
else
_fhandle = FileOpen(_filepath, 2);
if(!_fhandle)
{
NTI_ErrorLog(item, 1);
return false;
}
_fhandle.WriteLine(_content);
if (!logStashed)
{
_fhandle.WriteLine(_content2);
_fhandle.WriteLine(_content3);
}
_fhandle.Close();
return true;
}
function NTI_WriteTempLogToXML()
{
var _buffer, _itemData, _XMLData, _tempDate, _timeStamp, _fhandle, _count, _countXML, _filecontent, _lines, _ticks;
var _buffer2, _buffer3;
var i, k;
var lastIncomplete = false;
_itemData = new Array();
_count = 0;
_countXML = 0;
_buffer = "";
_filecontent = "";
NTC_SendMsgToScript("NTBotGame.ntj", "STOP_STATUS_TEXT_UPDATE");
SetStatusText("ÿc8Updating Your XML Log...");
_ticks = GetTickCount();
_fhandle = FileOpen("logs/"+ me.charname + "/Temp_itemlog", 2);
if(_fhandle)
{
//Print("Debug: Reading Temp File...")
while(!_fhandle.eof)
{
if (!_fhandle.eof)
_buffer = _fhandle.ReadLine();
if (!_fhandle.eof)
_buffer2 = _fhandle.ReadLine();
if (!_fhandle.eof)
_buffer3 = _fhandle.ReadLine();
//Print("Debug: Skip to next Item")
while(!(_buffer.indexOf("<item id=") > -1 && !isNaN(_timeStamp = parseInt(_buffer.split(/"/g)[1]))) && !_fhandle.eof)
{
// Get first opening Tag
_buffer = _buffer2;
_buffer2 = _buffer3;
_buffer3 = _fhandle.ReadLine();
}
//Print("Debug: Check if all 3 lines are correct")
// Check if other Tags match
if (_buffer.indexOf("<item id=") > -1 && _buffer2.indexOf("<") == -1 && _buffer2.indexOf(">") == -1 && _buffer3.indexOf("</item>") >= -1)
{
//Print("Debug: They are!")
// all is correct --> write lines
_tempDate = new Date(_timeStamp);
//Print("Debug: Put Item in Struct...")
if(_tempDate)
{
for(i = 0; i < _itemData.length; i++)
{
if(_itemData[i][0] == _tempDate.toLocaleFormat("%m-%d-%y"))
{
_itemData[i].push(_buffer);
_itemData[i].push(_buffer2);
_itemData[i].push(_buffer3);
break;
}
}
if(i >= _itemData.length)
{
_itemData.push([_tempDate.toLocaleFormat("%m-%d-%y"), _buffer, _buffer2, _buffer3]);
}
}
}else{
//Print("Debug Line1: " + _buffer);
//Print("Debug Line2: " + _buffer2);
//Print("Debug Line3: " + _buffer3);
}
}
_fhandle.Close();
if(_itemData.length < 1)
return false;
for(i = 0; i < _itemData.length; i++)
{
_fhandle = FileOpen("logs/" + me.charname + "/" + _itemData[i][0] + "_itemlog.xml", 2);
//Print("Debug: Reading Log File...")
if(_fhandle)
{
_XMLData = new Array();
while(!_fhandle.eof)
{
if (!_fhandle.eof)
_buffer = _fhandle.ReadLine();
if (!_fhandle.eof)
_buffer2 = _fhandle.ReadLine();
if (!_fhandle.eof)
_buffer3 = _fhandle.ReadLine();
//Print("Debug: Skipping to next Item in Log...")
while(!(_buffer.indexOf("<item id=") > -1) && !_fhandle.eof)
{
// Get first opening Tag
_buffer = _buffer2;
_buffer2 = _buffer3;
_buffer3 = _fhandle.ReadLine();
}
//Print("Debug: If this is a correct Item put it into Struct...")
if (_buffer.indexOf("<item id=") > -1 && _buffer2.indexOf("<") == -1 && _buffer2.indexOf(">") == -1 && _buffer3.indexOf("</item>") >= -1)
{
//Print("Correct Item read from Log");
_XMLData.push(_buffer);
_XMLData.push(_buffer2);
_XMLData.push(_buffer3);
}
//Print("Debug Line1: " + _buffer);
//Print("Debug Line2: " + _buffer2);
//Print("Debug Line3: " + _buffer3);
}
_fhandle.Close();
}
_fhandle = FileOpen("logs/" + me.charname + "/" + _itemData[i][0] + "_itemlog.xml", 1);
//Print("Debug: Writing Log File...")
if(_fhandle)
{
_fhandle.WriteLine("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>");
_fhandle.WriteLine("<?xml-stylesheet href=\"itemlog.xsl\" type=\"text/xsl\"?>");
_fhandle.WriteLine("<itemlog>");
for(k = 0; k < _XMLData.length; k++)
{
if (k % 3 == 0)
_countXML++;
_fhandle.WriteLine(_XMLData[k]);
}
for(k = 1; k < _itemData[i].length; k++)
{
if (k % 3 == 0)
_count++;
_fhandle.WriteLine(" " + _itemData[i][k]);
}
_fhandle.WriteLine("</itemlog>");
_fhandle.Close();
}
}
Print("ÿc<ÿc8" + _count + " ÿc<Item" + ((_count > 1) ? "s were" : " was") + " successfully added to your XML Logfile. (" + (GetTickCount() - _ticks) + "ms) [Total XML Items: " + (_count + _countXML) + "]" );
NTC_SendMsgToScript("NTBotGame.ntj", "SET_DEFAULT_STATUS");
return _count > 0;
}
return false;
}
function NTI_ClearTempLog()
{
var _fhandle, _date;
_fhandle = _fhandle = FileOpen("logs/" + me.charname + "/Temp_itemlog", 1);
_date = new Date();
if(_fhandle && _date)
{
_fhandle.WriteLine("//* The Item Data below will be added to the matching XML file at the beginning of every game - Temp Logfile Created: " + _date.toLocaleFormat("%a %m/%d/%y %H:%M:%S") + " */");
_fhandle.Close();
return true;
}
else if(_fhandle)
_fhandle.Close();
return false;
}
function NTI_WriteLoc(itemunit)
{
var _fhandle, _area;
if(arguments.length < 1 || !itemunit)
return;
_fhandle = FileOpen("logs/loc/" + me.charname + "_loc.txt", 2);
_area = GetArea();
if(_fhandle)
{
if(_area)
_fhandle.WriteLine(itemunit.gid + "<>" + _area.name);
else
_fhandle.WriteLine(itemunit.gid + "<>" + "undefined");
_fhandle.Close();
}
_fhandle = FileOpen("logs/loc/" + me.charname + "_simpleloc.txt", 1);
if(_fhandle)
{
if(_area)
_fhandle.WriteLine(_area.name);
else
_fhandle.WriteLine("undefined");
_fhandle.Close();
}
}
function NTI_ReadLoc(itemunit)
{
var _fhandle, _line, _loc;
if(arguments.length < 1 || !itemunit)
return "undefined";
_fhandle = FileOpen("logs/loc/" + me.charname + "_loc.txt", 2);
if(_fhandle)
{
while(!_fhandle.eof)
{
_line = _fhandle.ReadLine();
if(_line && parseInt(_line.split("<>")[0]) == itemunit.gid)
{
_fhandle.Close();
_loc = _line.split("<>")[1];
return _loc;
}
}
_fhandle.Close();
_fhandle = FileOpen("logs/loc/" + me.charname + "_simpleloc.txt", 2);
if(_fhandle)
{
_loc = _fhandle.ReadLine();
_fhandle.Close();
if(_loc)
return _loc;
else
return "undefined";
}
}
return "undefined";
}
function NTI_ClearLoc()
{
var _fhandle;
_fhandle = FileOpen("logs/loc/" + me.charname + "_loc.txt", 1);
if(_fhandle)
{
_fhandle.WriteLine("gid<>location");
_fhandle.Close();
}
}
function NTI_NameItem(itemid)
{
if(itemid >= 610 && itemid <= 642)
return "Rune";
if((itemid >= 509 && itemid <= 516) || (itemid >= 587 && itemid <= 596))
return "Potion";
if(itemid >= 518 && itemid <= 519)
return "Tome";
if(itemid >= 529 && itemid <= 530)
return "Scroll";
if((itemid >= 557 && itemid <= 586) || (itemid >= 597 && itemid <= 601))
return "Gem";
if((itemid >= 644 && itemid <= 657) || (itemid >= 544 && itemid <= 555))
return "Quest Item";
if(itemid == 653)
return "Token";
if(itemid >= 654 && itemid <= 657)
return "Essence";
if(!_NTIPIDToName[itemid])
return "Database Error";
else
return _NTIPIDToName[itemid];
}
function NTI_IsLogged(item)
{
var _checkTime, _itemdesc, _date, _fhandle, _templine, _XMLData, _dataSet;
_itemdesc = "";
_date = new Date();
_XMLData = new Array();
switch(item.quality)
{
// _checkTime in minutes!
case 1: // Low quality
_checkTime = 15;
break;
case 2: // Normal
switch(NTI_NameItem(item.classid))
{
case "Rune":
return false;
break;
case "Gem":
return false;
break;
case "Quest Item:":
return false;
break;
default:
_checkTime = 20;
}
break;
case 3: // Superior
_checkTime = 30;
break;
case 4: // Magic
_checkTime = 30;
break;
case 5: // Set
_checkTime = 30;
break;
case 6: // Rare
_checkTime = 60;
break;
case 7: // Unique
_checkTime = 90;
break;
case 8: // Crafted
_checkTime = 90;
break;
default:
_checkTime = 20;
break;
}
if(item.itemdesc)
{
_itemdesc = item.itemdesc.replace(/ÿc(.)/g, "");
_itemdesc = _itemdesc.replace(/\n/g, '|');
_itemdesc = _itemdesc.replace((_itemdesc.split("|")[0] + "|"), "");
}
else
_itemdesc = "Itemdesc undefined|";
_fhandle = FileOpen("logs/" + me.charname + "/" + _date.toLocaleFormat("%m-%d-%y") + "_itemlog.xml", 2);
if(_fhandle)
{
while(!_fhandle.eof)
{
if(((_templine = _fhandle.ReadLine()) != "</itemlog>"))
_XMLData.push(_templine);
}
_fhandle.Close();
_XMLData.pop();
_fhandle = FileOpen("logs/" + me.charname + "/Temp_itemlog", 2);
if(_fhandle)
{
while(!_fhandle.eof)
{
_templine = _fhandle.ReadLine();
if(_templine.indexOf("//*") == -1)
{
if(!_templine)
break;
_XMLData.push(_templine);
}
}
_fhandle.Close();
}
}
else
return false;
for(var i = _XMLData.length-1; i > 0; i--)
{
_dataSet = _XMLData[i].split(/"/g);
if((_date.getTime() - parseInt(_dataSet[1])) < _checkTime*6E4)
{
if(parseInt(_dataSet[19]) == item.classid) // Check itemtype
{
if(parseInt(_dataSet[7]) == item.quality) // Check quality
{
if(parseInt(_dataSet[15]) == item.itemlevel) // Check itemlevel
{
if(_dataSet[13] == item.name.split("\n")[0]) // Check itemname
{
if(_XMLData[i].split(/">/g)[1].replace("</item>", "") == _itemdesc) // Check itemdesc
return true;
else
continue;
}
else
continue;
}
else
continue;
}
else
continue;
}
else
continue;
}
else
break;
}
return false;
}
// 0 = item already logged
// 1 = filhandle error
// 2 = error creating logfile
// 3 = itemunit undefined
function NTI_ErrorLog(item, errorcode)
{
var _dateString, _errorOutput, _fhandle;
_dateString = new Date().toLocaleFormat("%a %m/%d/%y %H:%M:%S");
_errorOutput = "[" + _dateString + " <" + me.charname + "> ] ";
switch(errorcode)
{
case 0:
Print("ÿc8Itemlog Info: Item is already in log!");
_errorOutput += "Item Error: Item appears to be already logged (" + item.name.replace("\n", "") + ", " + NTI_NameItem(item.classid) + "[" + item.quality + "])";
break;
case 1:
Print("ÿc1Itemlog Error: Filehandle is null!");
_errorOutput += "File Error: Filehandle is null (Unable to log "+ item.name.replace("\n", "") + ", " + NTI_NameItem(item.classid) + "[" + item.quality + "])";
break;
case 2:
Print("ÿc1Itemlog Error: Logfile could not be created!");
_errorOutput += "File Error: Logfile could not be created (Unable to log "+ item.name.replace("\n", "") + ", " + NTI_NameItem(item.classid) + "[" + item.quality + "])";
break;
case 3:
Print("ÿc1Itemlog Error: Itemunit is undefined!");
_errorOutput += "File Error: Itemunit is undefined!";
break;
default:
_errorOutput += "Unknown Error";
break;
}
_fhandle = FileOpen("logs/ErrorLog.txt", 2);
if(_fhandle)
{
_fhandle.WriteLine(_errorOutput);
_fhandle.Close();
}
}
function NTI_GetGoldLogDate()
{
var _fhandle, _date, _templine;
_fhandle = FileOpen("gamble/" + me.charname + "_GambleInfo.txt", 2);
if(_fhandle)
{
_templine = _fhandle.ReadLine();
if(_templine)
{
for(var i = 0; i < 3; i++)
_templine = _fhandle.ReadLine();
if(_templine)
_date = _templine.split(": ")[1];
}
_fhandle.Close();
return _date;
}
else
return "Unknown";
}
function NTI_GetGoldLogSessions()
{
var _fhandle, _sessions, _templine;
_fhandle = FileOpen("gamble/" + me.charname + "_GambleInfo.txt", 2);
if(_fhandle)
{
_templine = _fhandle.ReadLine();
if(_templine)
{
for(var i = 0; i < 2; i++)
_templine = _fhandle.ReadLine();
if(_templine)
_sessions = parseInt(_templine.split(": ")[1]);
_fhandle.Close();
return _sessions;
}
_fhandle.Close();
return -1;
}
else
return -1;
}
function NTI_LogGold(spentGold, count)
{
if(arguments.length < 2)
count = false;
var _fhandle, _fileTimeStamp, _currentTimeStamp, _total, _date, _gambleCount, _templine;
_currentTimeStamp = new Date().getTime();
_date = new Date().toLocaleFormat("%a %m/%d/%y %H:%M:%S");
_total = 0;
_gambleCount = 0;
_fhandle = FileOpen("gamble/" + me.charname + "_GambleInfo.txt", 2);
if(_fhandle)
{
_templine = _fhandle.ReadLine();
if(_templine)
{
_fileTimeStamp = parseInt(_templine.split(": ")[1]);
if(true || _currentTimeStamp - _fileTimeStamp <= 3*60*60*1E3)
{
_templine = _fhandle.ReadLine();
if(_templine)
_total = parseInt(_templine.split(": ")[1]);
_templine = _fhandle.ReadLine();
if(_templine)
_gambleCount = parseInt(_templine.split(": ")[1]);
_templine = _fhandle.ReadLine();
if(_templine)
_date = _templine.split(": ")[1];
}
}
_fhandle.Close();
_total += spentGold;
_fhandle = FileOpen("gamble/" + me.charname + "_GambleInfo.txt", 1);
if(_fhandle)
{
_fhandle.WriteLine("Timestamp: " + _currentTimeStamp );
_fhandle.WriteLine("Gold: " + _total);
_fhandle.WriteLine("Gamble Counter: " + ((count) ? ++_gambleCount : _gambleCount));
_fhandle.WriteLine("File created: " + _date);
_fhandle.Close();
}
}
else
return -1;
return _total;
}
function NTI_LogStashedItems(LogToTxt)
{
var _isEthereal, _whereabouts, _content, _items, _fhandle, _date, _logToTxt, _dataSet, _fileContent, _hasCube, _room;
var j;
_items = me.GetItems();
if(!_items)
return false;
if(arguments.length < 1)
_logToTxt = NTConfig_LogStashToTxt;
else
_logToTxt = LogToTxt;
if(!_logToTxt)
{
_fhandle = FileOpen("logs/stashlogs/" + me.charname + "_StashedItems.xml", 1);
if(_fhandle)
{
_fhandle.WriteLine("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>");
_fhandle.WriteLine("<?xml-stylesheet href=\"stashlog.xsl\" type=\"text/xsl\"?>");
_fhandle.WriteLine("<itemlog>");
_fhandle.WriteLine("</itemlog>");
_fhandle.Close();
for(var i = 0 ; i < _items.length; i++)
{
if(!_items[i].itemloc && _items[i].mode == 2)
continue;
_isEthereal = (_items[i].itemflag & 0x400000) ? 1 : 0;
_whereabouts = NTI_ItemLocationToName(_items[i]);
if(!NTI_WriteLog(_items[i], _isEthereal, 0, true, _whereabouts))
return false;
}
return true;
}
return false;
}
else
{
_content = new Array();
_hasCube = false;
_room = 88; // Inventory + Stash size without cube
for(var i = 0 ; i < _items.length ; i++)
{
_whereabouts = NTI_ItemLocationToName(_items[i]);
if(!_items[i].itemloc && _items[i].mode == 2)
continue;
if(_items[i].itemdesc)
{
_dataSet = new ItemData(_whereabouts, NTI_NameItem(_items[i].classid), NTI_QualityToName(_items[i].quality), _items[i].itemlevel, _items[i].itemdesc.replace(/ÿc(.)/g, ""),_items[i].xsize*_items[i].ysize, _items[i].classid);
// Ignoring the size of equipped items
if(_dataSet.location == "Inventory" || _dataSet.location == "Stash" || _dataSet.location == "Cube")
_room -= _dataSet.size;
if(_dataSet.classid == 549)
{
_hasCube = true;
_room += 12;
}
for(j = 0; j < _content.length; j++)
{
if(_content[j].typename == _dataSet.typename &&
_content[j].qualityname == _dataSet.qualityname &&
_content[j].getGeneralDesc() == _dataSet.getGeneralDesc() &&
_content[j].classid == _dataSet.classid &&
_content[j].size == _dataSet.size)
break;
}
if(j < _content.length)
_content[j].amount++;
else
_content.push(_dataSet);
}
}
var _bbcode = true;
_fileContent = "";
for(var i = 0; i < _content.length; i++)
{
switch (_content[i].qualityname)
{
case "Set":
_fileContent += "[Color=\"DarkGreen\"]";
break;
case "Unique":
_fileContent += "[Color=#948064]";
break;
case "Rare":
_fileContent += "[Color=#c8c330]";
break;
case "Magic":
_fileContent += "[Color=\"DarkBlue\"]";
break;
default:
break;
}
if(_content[i].amount > 1)
_fileContent += _content[i].amount + "x ";
if(!(_content[i].typename != "Gem" && _content[i].typename != "Quest Item" && _content[i].typename != "Rune"))
_fileContent += ((_content[i].desc) ? _content[i].desc.split("\n")[0] : "undefined");
else if(!(_content[i].qualityname != "Set" && _content[i].qualityname != "Unique"))
{
if(_content[i].desc.indexOf("Unidentified") != -1)
_fileContent += "unid " + _content[i].qualityname + " " + ((_content[i].desc) ? _content[i].desc.split("\n")[0] : "undefined");
else
_fileContent += ((_content[i].desc) ? _content[i].desc.split("\n")[0] : "undefined") + " (" + NTI_GetShortForm(_content[i].desc,2,false) + ")";
}
else if(!(_content[i].qualityname != "Magic" && _content[i].qualityname != "Rare"))
{
if(_content[i].desc.indexOf("Unidentified") != -1)
_fileContent += "unid " + _content[i].qualityname + " " + ((_content[i].desc) ? _content[i].desc.split("\n")[0] : "undefined");
else
_fileContent +=_content[i].typename + " (" + NTI_GetShortForm(_content[i].desc,2,true) + ")";
}
else
{
if(_content[i].desc.indexOf("Unidentified") != -1)
_fileContent += "unid " + _content[i].qualityname + " " + ((_content[i].desc) ? _content[i].desc.split("\n")[0] : "undefined");
else
_fileContent +=_content[i].typename + " (" + NTI_GetShortForm(_content[i].desc,2,true) + ")";
}
switch (_content[i].qualityname)
{
case "Set":
_fileContent += "[/Color]";
break;
case "Unique":
_fileContent += "[/Color]";
break;
case "Rare":
_fileContent += "[/Color]";
break;
case "Magic":
_fileContent += "[/Color]";
break;
default:
break;
}
_fileContent += "\n";
}
// for(var i = 0; i < _content.length; i++)
// {
// _fileContent += "Location: " + me.charname + ((_content[i].amount == 1)?" (" + _content[i].location + ")":"") + "\n";
// _fileContent += "Type: " + _content[i].typename + "\n";
// _fileContent += "Quality: " + _content[i].qualityname + "\n";
// if(_content[i].amount == 1)
// _fileContent += "Item Level: " + _content[i].level + "\n";
// if(_content[i].amount > 1)
// _fileContent += "Amount carried: " + _content[i].amount + "\n\n";
// _fileContent += _content[i].desc;
// _fileContent += "\n----------------------------------------\n";
// }
if(!_fileContent)
_fileContent = "Empty! :(";
_date = new Date().toLocaleFormat("%a %m/%d/%y %H:%M:%S");
_fileContent = "----------------------------------------\n" + "----------------------------------------\n" +
me.charname + "'s Stashlog (Level " + me.GetStat(12) + " " + NTC_CharClassIdToString(me.classid) + ")\nFile created: " + _date + "\nItems carried: " + _items.length + "\nGold carried: " + NTC_MyGold() + "\nFree room: " + _room +" of " +((_hasCube)?"96":"88")+ "\n" +
"----------------------------------------\n" + "----------------------------------------\n"
+ _fileContent;
_fhandle = FileOpen("logs/stashlogs/" + me.charname + "_StashedItems.txt", 1);
if(_fhandle)
{
_fhandle.WriteLine(_fileContent);
_fhandle.Close();
}
else
return false;
return true;
}
}
function NTI_isUnusedLine(_str, _withlreq)
{
if (_str.indexOf("Angelic") != -1)
return true;
if (_str.indexOf("Tal Rasha") != -1)
return true;
if (_str.indexOf("Arcanna") != -1)
return true;
if (_str.indexOf("Arctic") != -1)
return true;
if (_str.indexOf("Berserker") != -1)
return true;
if (_str.indexOf("Cathan") != -1)
return true;
if (_str.indexOf("Civerb") != -1)
return true;
if (_str.indexOf("Cleglaw") != -1)
return true;
if (_str.indexOf("Hsarus") != -1)
return true;
if (_str.indexOf("Infernal") != -1)
return true;
if (_str.indexOf("Iratha") != -1)
return true;
if (_str.indexOf("Isenhart") != -1)
return true;
if (_str.indexOf("Milabrega") != -1)
return true;
if (_str.indexOf("Sigon") != -1)
return true;
if (_str.indexOf("Tancred") != -1)
return true;
if (_str.indexOf("Death's") != -1)
return true;
if (_str.indexOf("Vidala") != -1)
return true;
if (_str.indexOf("Heaven's") != -1)
return true;
if (_str.indexOf("Dangoon's") != -1)
return true;
if (_str.indexOf("Taebaek's") != -1)
return true;
if (_str.indexOf("Haemosu's") != -1)
return true;
if (_str.indexOf("Ondal's") != -1)
return true;
if (_str.indexOf("The Disciple") != -1)
return true;
if (_str.indexOf("Telling of Beads") != -1)
return true;
if (_str.indexOf("Laying of Hands") != -1)
return true;
if (_str.indexOf("Rite of Passage") != -1)
return true;
if (_str.indexOf("Dark Adherent") != -1)
return true;
if (_str.indexOf("Credendum") != -1)
return true;
if (_str.indexOf("Cow King") != -1)
return true;
if (_str.indexOf("Hwanin") != -1)
return true;
if (_str.indexOf("Naj") != -1)
return true;
if (_str.indexOf("Sander") != -1)
return true;
if (_str.indexOf("Sazabi") != -1)
return true;
if (_str.indexOf("Orphan") != -1)
return true;
if (_str.indexOf("Guillaume") != -1)
return true;
if (_str.indexOf("Wilhelm") != -1)
return true;
if (_str.indexOf("Mangus") != -1)
return true;
if (_str.indexOf("Whitstan") != -1)
return true;
if (_str.indexOf("Aldur") != -1)
return true;
if (_str.indexOf("Bul-Kathos") != -1)
return true;
if (_str.indexOf("Griswold") != -1)
return true;
if (_str.indexOf("M'avina") != -1)
return true;
if (_str.indexOf("Natalya") != -1)
return true;
if (_str.indexOf("Trang-Oul") != -1)
return true;
if (_str.indexOf("Immortal King") != -1)
return true;
if (_str.indexOf("Throw Damage") != -1)
return true;
if (_str.indexOf("One-Hand Damage") != -1)
return true;
if (_str.indexOf("Two-Hand Damage") != -1)
return true;
if (_str.indexOf("Durability") != -1)
return true;
if (_str.indexOf("Quantity") != -1)
return true;
if (!_withlreq && _str.indexOf("Required Level") != -1)
return true;
if (_str.indexOf("Required Strength") != -1)
return true;
if (_str.indexOf("Required Dexterity") != -1)
return true;
if (_str.indexOf("Class") != -1)
return true;
if (_str.indexOf("to cast") != -1)
return true;
if (_str.indexOf(" vs.") != -1)
return true;
if (_str.indexOf(" to Light Radius") != -1)
return true;
if (_str.indexOf("Chance to Block: ") != -1)
return true;
if (_str.indexOf("Smite Damage: ") != -1)
return true;
if (_str.indexOf("Heal Stamina Plus") != -1)
return true;
if (_str.indexOf("Attacker Takes") != -1)
return true;
if (_str.indexOf("(Paladin Only)") == 0)
return true;
if (_str.indexOf("(Necromancer Only)") == 0)
return true;
if (_str.indexOf("(Sorceress Only)") == 0)
return true;
if (_str.indexOf("(Assassine Only)") == 0)
return true;
if (_str.indexOf("(Barbarian Only)") == 0)
return true;
if (_str.indexOf("(Druid Only)") == 0)
return true;
if (_str.indexOf("(Amazone Only)") == 0)
return true;
if (_str.indexOf("Poison Length") != -1)
return true;
if (_str.indexOf("Undead") != -1)
return true;
if (_str.indexOf("Demons") != -1)
return true;
if (_str.indexOf("Charges") != -1)
{
if (_str.indexOf("Teleport") == -1 && _str.indexOf("Life Tap") == -1 && _str.indexOf("Lower Resist") == -1)
return true;
}
return false;
}
function NTI_GetShortForm(_desc, _startat, _withlreq)
{
var _result = "";
var _split = _desc.split("\n")
for (var i = _startat; i < _split.length; i++)
{
if (!NTI_isUnusedLine(_split[i], _withlreq))
{
if (_result != "" && _split[i] != "")
_result += ", ";
_split[i] = _split[i].replace("Defense: ","def ");
_split[i] = _split[i].replace("Required Level:","lvlreq");
_split[i] = _split[i].replace(" to Life","l");
_split[i] = _split[i].replace("Increase Maximum Life","maxlife");
_split[i] = _split[i].replace(" to Mana","m");
_split[i] = _split[i].replace("Increase Maximum Mana","maxmana");
_split[i] = _split[i].replace(" to Strength","str");
_split[i] = _split[i].replace(" to Dexterity","dex");
_split[i] = _split[i].replace(" to Vitality","vit");
_split[i] = _split[i].replace(" to Energy","ene");
_split[i] = _split[i].replace("% Increased Attack Speed","ias");
_split[i] = _split[i].replace("% Increased Chance of Blocking","icob");
_split[i] = _split[i].replace("% Faster Cast Rate","fcr");
_split[i] = _split[i].replace("% Faster Hit Recovery","fhr");
_split[i] = _split[i].replace("% Faster Block Rate","fbr");
_split[i] = _split[i].replace(" to Attack Rating","ar");
_split[i] = _split[i].replace("(Based on Character Level)","(on lvl)");
_split[i] = _split[i].replace(" Better Chance of Getting Magic Items","mf");
_split[i] = _split[i].replace(" Extra Gold from Monsters","eg");
_split[i] = _split[i].replace(" Enhanced Defense","edef");
_split[i] = _split[i].replace(" Defense","def");
_split[i] = _split[i].replace(" Enhanced Damage","ed");
_split[i] = _split[i].replace(" to Maximum Damage","max");
_split[i] = _split[i].replace(" to Minimum Damage","min");
_split[i] = _split[i].replace("Adds ","");
_split[i] = _split[i].replace("cold damage","cdmg");
_split[i] = _split[i].replace("lightning damage","ldmg");
_split[i] = _split[i].replace("fire damage","fdmg");
_split[i] = _split[i].replace("Replenishes quantity","refill");
_split[i] = _split[i].replace("Fire Resist ","fr ");
_split[i] = _split[i].replace("Lightning Resist +","lr ");
_split[i] = _split[i].replace("Cold Resist ","cr ");
_split[i] = _split[i].replace("Poison Resist ","pr ");
_split[i] = _split[i].replace("All Resistances ","allres ");
_split[i] = _split[i].replace(" to all Attributes","allattri");
_split[i] = _split[i].replace("Cold Absorb","cabs");
_split[i] = _split[i].replace("Fire Absorb","fabs");
_split[i] = _split[i].replace("Lightning Absorb","labs");
_split[i] = _split[i].replace("Cannot Be Frozen","cnbf");
_split[i] = _split[i].replace("Socketed","sox");
_split[i] = _split[i].replace("Chance of Crushing Blow","cb");
_split[i] = _split[i].replace("Knockback","kb");
_split[i] = _split[i].replace(" to Summoning Skills (Druid Only)"," druid summon");
_split[i] = _split[i].replace(" to Masteries (Barbarian Only)"," barb masteries");
_split[i] = _split[i].replace(" to Amazon Skill Levels"," ama");
_split[i] = _split[i].replace(" to Barbarian Skill Levels"," barb");
_split[i] = _split[i].replace(" to Paladin Skill Levels"," pala");
_split[i] = _split[i].replace(" to Druid Skill Levels"," druid");
_split[i] = _split[i].replace("Ethereal (Cannot be Repaired)","eth");
_split[i] = _split[i].replace("Damage Reduced by","damred");
_split[i] = _split[i].replace("Reduces all Vendor Prices ","price -");
_split[i] = _split[i].replace(" Faster Run/Walk","frw");
_split[i] = _split[i].replace("Regenerate Mana ","manaregen ");
_split[i] = _split[i].replace("Half Freeze Duration","1/2freez");
_split[i] = _split[i].replace("Damage Taken Goes To Mana","dtgtm");
_split[i] = _split[i].replace("Indestructible","indest");
_split[i] = _split[i].replace(" Life stolen per hit","ll");
_split[i] = _split[i].replace(" Mana stolen per hit","ml");
_split[i] = _split[i].replace("Bonus","");
_split[i] = _split[i].replace("Piercing Attack","pierc");
_split[i] = _split[i].replace("Freezes target","freez");
_split[i] = _split[i].replace("Magic ","m");
_split[i] = _split[i].replace("Replenish Life","liferep");
_split[i] = _split[i].replace(" seconds","s");
_split[i] = _split[i].replace(" poison damage over ","pdmg/");
// Necro Skills
_split[i] = _split[i].replace(" to Necromancer Skill Levels"," necro");
_split[i] = _split[i].replace(" to Skeleton Mastery (Necromancer Only)"," skele mastery");
// Sorc Skills
_split[i] = _split[i].replace(" to Sorceress Skill Levels"," sorc");
_split[i] = _split[i].replace(" to Fire Skills (Sorceress Only)"," fire");
_split[i] = _split[i].replace(" to Frozen Orb (Sorceress Only)"," fo");
_split[i] = _split[i].replace(" to Lightning Mastery (Sorceress Only)"," light mastery");
_split[i] = _split[i].replace(" to Nova (Sorceress Only)"," nova");
_split[i] = _split[i].replace(" after each Kill","aek");
_split[i] = _split[i].replace(" to All Skills"," all");
// Assa Skills
_split[i] = _split[i].replace(" to Assassine Skill Levels"," assa");
_split[i] = _split[i].replace(" to Shadow Disciplines (Assassin Only)"," shadow");
_result += _split[i];
}
}
if(_result[0] == " ")
_result = _result.replace(" ","");
_result = _result.replace(/\n/gi,",");
return _result;
}
function NTI_ShowItemInfo()
{
var _items, _itemsInCube, _nipRes, _cubingRes;
_itemsInCube = false;
_items = me.GetItems();
if(_items)
{
NTCU_InitCubing();
for(var i = 0; i < _items.length; i++)
{
if(_items[i].itemloc == 3 && _items[i].mode == 0)
{
_nipRes = NTIPCheckItem(_items[i], 0, true);
_cubingRes = NTCU_CheckItem(_items[i], _nipRes);
Print("ÿc0Item Level of " + NTC_ItemQualityToD2Color[NTC_GetItemColorInt(_items[i])] + _items[i].name.split("\n")[0] + "ÿc0:ÿc8 " + _items[i].itemlevel + " ÿc0 <> NIPCheckID:ÿc8 " + _nipRes + " (" + _cubingRes + ")");
_itemsInCube = true;
}
}
}
if(!_itemsInCube)
Print("Make sure the item you want to gather information about is placed in your cube ;)");
}
function NTI_ItemLocationToName(itemunit)
{
if(arguments.length < 1 || !itemunit)
return "Unknown";
if(!itemunit.itemloc && itemunit.mode == 2)
return "Belt";
switch(itemunit.itemloc)
{
case 0:
return "Inventory";
break;
case 1:
return "Head";
break;
case 2:
return "Amulet";
break;
case 3:
if(itemunit.mode == 1)
return "Torso";
else
return "Cube";
break;
case 4:
if(itemunit.mode == 1)
return "Right Hand I";
else
return "Stash";
break;
case 5:
return "Left hand I";
break;
case 6:
return "Right Ring";
break;
case 7:
return "Left Ring";
break;
case 8:
return "Belt";
break;
case 9:
return "Feet";
break;
case 10:
return "Gloves";
break;
case 11:
return "Right Hand II";
break;
case 12:
return "Left hand II";
break;
default:
return "Unknown";
break;
}
}
function NTI_QualityToName(quality)
{
switch(quality)
{
case 1:
return "Damaged";
break;
case 2:
return "Normal";
break;
case 3:
return "Superior";
break;
case 4:
return "Magic";
break;
case 5:
return "Set";
break;
case 6:
return "Rare";
break;
case 7:
return "Unique";
break;
case 8:
return "Crafted";
break;
default:
return "Unknown";
}
}
// Itemdata Class
function ItemData(loc, typename, quality, ilvl, desc, size, classid)
{
this.location = loc;
this.typename = typename;
this.qualityname = quality;
this.level = ilvl;
this.desc = desc;
this.size = size;
this.classid = classid;
this.amount = 1;
this.getGeneralDesc = function()
{
return this.desc.replace(/Durability:\s.+\sof\s.+\s/i, "");
}
}
Ergibt dann beispielsweise das hier:
Code:
----------------------------------------
----------------------------------------
<Charname>'s Stashlog (Level <Level> <Class>)
File created: <Date>
Items carried: 36
Gold carried: 1285
Free room: 17 of 88
----------------------------------------
----------------------------------------
[Color="DarkGreen"]unid Set Mesh Boots[/Color]
Thresher (lvlreq 53, sox (4))
4x Key of Hate
[Color="DarkBlue"]Circlet (lvlreq 45, +3 druid summon)[/Color]
[Color="DarkBlue"]Small Charm (lvlreq 16, +2str)[/Color]
[Color="DarkBlue"]Small Charm (lvlreq 32, cr 11%)[/Color]
[Color="DarkBlue"]Small Charm (lvlreq 16, +2str, fr 3%)[/Color]
[Color="DarkBlue"]Small Charm (lvlreq 40, +17m)[/Color]
[Color="DarkBlue"]Large Charm (lvlreq 52, +2min, +29l)[/Color]
[Color=#948064]Raven Frost (+218ar, 15-45 cdmg, +15dex, +40m, cabs 20%, cnbf)[/Color]
[Color=#948064]unid Unique Grim Shield[/Color]
[Color=#948064]unid Unique War Belt[/Color]
[Color=#948064]Frostburn (def 49, +5%ed, 1-6 cdmg, +19%edef, +30def, maxmana 40%)[/Color]
[Color=#948064]Giant Skull (def 406, 10% cb, kb, +268def, +26str, sox (1))[/Color]
2x Twisted Essence of Suffering
[Color=#948064]Raven Frost (+215ar, 15-45 cdmg, +15dex, +40m, cabs 20%, cnbf)[/Color]
2x Burning Essence of Terror
[Color="DarkBlue"]Small Charm (lvlreq 29, +5fhr)[/Color]
[Color="DarkGreen"]unid Set Death Mask[/Color]
[Color="DarkBlue"]Amulet (+3 barb masteries, +10fcr)[/Color]
[Color="DarkBlue"]Small Charm (lvlreq 39, +18l)[/Color]
[Color=#c8c330]Throwing Axe (lvlreq 10, +71%ed, +6max, +26ar, 1-4 cdmg, refill)[/Color]
[Color=#c8c330]Ring (lvlreq 43, +108ar, +25l, fr 20%, 37%eg)[/Color]
Lem Rune
[Color="DarkBlue"]Grand Charm (12%mf)[/Color]
[Color=#948064]Hellfire Torch (+3 necro, +20allattri, allres 18)[/Color]
[Color="DarkBlue"]Grand Charm (lvlreq 83, +41l)[/Color]
Wieso ist es nicht verwendbar?
Weil schlicht noch lange nicht alle Attribute entfernt respektive verkürzt werden. Darfst du aber gern selber hinzufügen in der Funktion "NTI_GetShortForm" respektive "NTI_isUnusedLine".
edit: Vorallem die 2 Funktionen müssten noch
massiv erweitert werden, damit alle Items schön geloggt werden.
Code:
function NTI_isUnusedLine(_str, _withlreq)
{
if (_str.indexOf("Angelic") != -1)
return true;
if (_str.indexOf("Tal Rasha") != -1)
return true;
if (_str.indexOf("Arcanna") != -1)
return true;
if (_str.indexOf("Arctic") != -1)
return true;
if (_str.indexOf("Berserker") != -1)
return true;
if (_str.indexOf("Cathan") != -1)
return true;
if (_str.indexOf("Civerb") != -1)
return true;
if (_str.indexOf("Cleglaw") != -1)
return true;
if (_str.indexOf("Hsarus") != -1)
return true;
if (_str.indexOf("Infernal") != -1)
return true;
if (_str.indexOf("Iratha") != -1)
return true;
if (_str.indexOf("Isenhart") != -1)
return true;
if (_str.indexOf("Milabrega") != -1)
return true;
if (_str.indexOf("Sigon") != -1)
return true;
if (_str.indexOf("Tancred") != -1)
return true;
if (_str.indexOf("Death's") != -1)
return true;
if (_str.indexOf("Vidala") != -1)
return true;
if (_str.indexOf("Heaven's") != -1)
return true;
if (_str.indexOf("Dangoon's") != -1)
return true;
if (_str.indexOf("Taebaek's") != -1)
return true;
if (_str.indexOf("Haemosu's") != -1)
return true;
if (_str.indexOf("Ondal's") != -1)
return true;
if (_str.indexOf("The Disciple") != -1)
return true;
if (_str.indexOf("Telling of Beads") != -1)
return true;
if (_str.indexOf("Laying of Hands") != -1)
return true;
if (_str.indexOf("Rite of Passage") != -1)
return true;
if (_str.indexOf("Dark Adherent") != -1)
return true;
if (_str.indexOf("Credendum") != -1)
return true;
if (_str.indexOf("Cow King") != -1)
return true;
if (_str.indexOf("Hwanin") != -1)
return true;
if (_str.indexOf("Naj") != -1)
return true;
if (_str.indexOf("Sander") != -1)
return true;
if (_str.indexOf("Sazabi") != -1)
return true;
if (_str.indexOf("Orphan") != -1)
return true;
if (_str.indexOf("Guillaume") != -1)
return true;
if (_str.indexOf("Wilhelm") != -1)
return true;
if (_str.indexOf("Mangus") != -1)
return true;
if (_str.indexOf("Whitstan") != -1)
return true;
if (_str.indexOf("Aldur") != -1)
return true;
if (_str.indexOf("Bul-Kathos") != -1)
return true;
if (_str.indexOf("Griswold") != -1)
return true;
if (_str.indexOf("M'avina") != -1)
return true;
if (_str.indexOf("Natalya") != -1)
return true;
if (_str.indexOf("Trang-Oul") != -1)
return true;
if (_str.indexOf("Immortal King") != -1)
return true;
if (_str.indexOf("Throw Damage") != -1)
return true;
if (_str.indexOf("One-Hand Damage") != -1)
return true;
if (_str.indexOf("Two-Hand Damage") != -1)
return true;
if (_str.indexOf("Durability") != -1)
return true;
if (_str.indexOf("Quantity") != -1)
return true;
if (!_withlreq && _str.indexOf("Required Level") != -1)
return true;
if (_str.indexOf("Required Strength") != -1)
return true;
if (_str.indexOf("Required Dexterity") != -1)
return true;
if (_str.indexOf("Class") != -1)
return true;
if (_str.indexOf("to cast") != -1)
return true;
if (_str.indexOf(" vs.") != -1)
return true;
if (_str.indexOf(" to Light Radius") != -1)
return true;
if (_str.indexOf("Chance to Block: ") != -1)
return true;
if (_str.indexOf("Smite Damage: ") != -1)
return true;
if (_str.indexOf("Heal Stamina Plus") != -1)
return true;
if (_str.indexOf("Attacker Takes") != -1)
return true;
if (_str.indexOf("(Paladin Only)") == 0)
return true;
if (_str.indexOf("(Necromancer Only)") == 0)
return true;
if (_str.indexOf("(Sorceress Only)") == 0)
return true;
if (_str.indexOf("(Assassine Only)") == 0)
return true;
if (_str.indexOf("(Barbarian Only)") == 0)
return true;
if (_str.indexOf("(Druid Only)") == 0)
return true;
if (_str.indexOf("(Amazone Only)") == 0)
return true;
if (_str.indexOf("Poison Length") != -1)
return true;
if (_str.indexOf("Undead") != -1)
return true;
if (_str.indexOf("Demons") != -1)
return true;
if (_str.indexOf("Charges") != -1)
{
if (_str.indexOf("Teleport") == -1 && _str.indexOf("Life Tap") == -1 && _str.indexOf("Lower Resist") == -1)
return true;
}
return false;
}
function NTI_GetShortForm(_desc, _startat, _withlreq)
{
var _result = "";
var _split = _desc.split("\n")
for (var i = _startat; i < _split.length; i++)
{
if (!NTI_isUnusedLine(_split[i], _withlreq))
{
if (_result != "" && _split[i] != "")
_result += ", ";
_split[i] = _split[i].replace("Defense: ","def ");
_split[i] = _split[i].replace("Required Level:","lvlreq");
_split[i] = _split[i].replace(" to Life","l");
_split[i] = _split[i].replace("Increase Maximum Life","maxlife");
_split[i] = _split[i].replace(" to Mana","m");
_split[i] = _split[i].replace("Increase Maximum Mana","maxmana");
_split[i] = _split[i].replace(" to Strength","str");
_split[i] = _split[i].replace(" to Dexterity","dex");
_split[i] = _split[i].replace(" to Vitality","vit");
_split[i] = _split[i].replace(" to Energy","ene");
_split[i] = _split[i].replace("% Increased Attack Speed","ias");
_split[i] = _split[i].replace("% Increased Chance of Blocking","icob");
_split[i] = _split[i].replace("% Faster Cast Rate","fcr");
_split[i] = _split[i].replace("% Faster Hit Recovery","fhr");
_split[i] = _split[i].replace("% Faster Block Rate","fbr");
_split[i] = _split[i].replace(" to Attack Rating","ar");
_split[i] = _split[i].replace("(Based on Character Level)","(on lvl)");
_split[i] = _split[i].replace(" Better Chance of Getting Magic Items","mf");
_split[i] = _split[i].replace(" Extra Gold from Monsters","eg");
_split[i] = _split[i].replace(" Enhanced Defense","edef");
_split[i] = _split[i].replace(" Defense","def");
_split[i] = _split[i].replace(" Enhanced Damage","ed");
_split[i] = _split[i].replace(" to Maximum Damage","max");
_split[i] = _split[i].replace(" to Minimum Damage","min");
_split[i] = _split[i].replace("Adds ","");
_split[i] = _split[i].replace("cold damage","cdmg");
_split[i] = _split[i].replace("lightning damage","ldmg");
_split[i] = _split[i].replace("fire damage","fdmg");
_split[i] = _split[i].replace("Replenishes quantity","refill");
_split[i] = _split[i].replace("Fire Resist ","fr ");
_split[i] = _split[i].replace("Lightning Resist +","lr ");
_split[i] = _split[i].replace("Cold Resist ","cr ");
_split[i] = _split[i].replace("Poison Resist ","pr ");
_split[i] = _split[i].replace("All Resistances ","allres ");
_split[i] = _split[i].replace(" to all Attributes","allattri");
_split[i] = _split[i].replace("Cold Absorb","cabs");
_split[i] = _split[i].replace("Fire Absorb","fabs");
_split[i] = _split[i].replace("Lightning Absorb","labs");
_split[i] = _split[i].replace("Cannot Be Frozen","cnbf");
_split[i] = _split[i].replace("Socketed","sox");
_split[i] = _split[i].replace("Chance of Crushing Blow","cb");
_split[i] = _split[i].replace("Knockback","kb");
_split[i] = _split[i].replace(" to Summoning Skills (Druid Only)"," druid summon");
_split[i] = _split[i].replace(" to Masteries (Barbarian Only)"," barb masteries");
_split[i] = _split[i].replace(" to Amazon Skill Levels"," ama");
_split[i] = _split[i].replace(" to Barbarian Skill Levels"," barb");
_split[i] = _split[i].replace(" to Paladin Skill Levels"," pala");
_split[i] = _split[i].replace(" to Druid Skill Levels"," druid");
_split[i] = _split[i].replace("Ethereal (Cannot be Repaired)","eth");
_split[i] = _split[i].replace("Damage Reduced by","damred");
_split[i] = _split[i].replace("Reduces all Vendor Prices ","price -");
_split[i] = _split[i].replace(" Faster Run/Walk","frw");
_split[i] = _split[i].replace("Regenerate Mana ","manaregen ");
_split[i] = _split[i].replace("Half Freeze Duration","1/2freez");
_split[i] = _split[i].replace("Damage Taken Goes To Mana","dtgtm");
_split[i] = _split[i].replace("Indestructible","indest");
_split[i] = _split[i].replace(" Life stolen per hit","ll");
_split[i] = _split[i].replace(" Mana stolen per hit","ml");
_split[i] = _split[i].replace("Bonus","");
_split[i] = _split[i].replace("Piercing Attack","pierc");
_split[i] = _split[i].replace("Freezes target","freez");
_split[i] = _split[i].replace("Magic ","m");
_split[i] = _split[i].replace("Replenish Life","liferep");
_split[i] = _split[i].replace(" seconds","s");
_split[i] = _split[i].replace(" poison damage over ","pdmg/");
// Necro Skills
_split[i] = _split[i].replace(" to Necromancer Skill Levels"," necro");
_split[i] = _split[i].replace(" to Skeleton Mastery (Necromancer Only)"," skele mastery");
// Sorc Skills
_split[i] = _split[i].replace(" to Sorceress Skill Levels"," sorc");
_split[i] = _split[i].replace(" to Fire Skills (Sorceress Only)"," fire");
_split[i] = _split[i].replace(" to Frozen Orb (Sorceress Only)"," fo");
_split[i] = _split[i].replace(" to Lightning Mastery (Sorceress Only)"," light mastery");
_split[i] = _split[i].replace(" to Nova (Sorceress Only)"," nova");
_split[i] = _split[i].replace(" after each Kill","aek");
_split[i] = _split[i].replace(" to All Skills"," all");
// Assa Skills
_split[i] = _split[i].replace(" to Assassine Skill Levels"," assa");
_split[i] = _split[i].replace(" to Shadow Disciplines (Assassin Only)"," shadow");
_result += _split[i];
}
}
if(_result[0] == " ")
_result = _result.replace(" ","");
_result = _result.replace(/\n/gi,",");
return _result;
}
Gibt's irgendwo ne Liste mit allen Attributen die's auf Items haben kann? Auf englisch und casesensitiv?