Customizable Sold Messages In-Game
Step 1:
Navigate to: D2NT\scripts\libs\common\
File: NTTownManager.ntl
Find: function NTTMGR_IDItems(npc)
Scroll down to the part with the switch.
Add:
if(NTCommon_announceSoldItems)
{
NTCommon_announceSale(_items[i]);
}
Here: (in the default)
switch(NTSI_CheckItem(_items[i]))
{
case 1:
sendToItemLog(_items[i], 2);
case 2:
break;
default:
if(NTCommon_announceSoldItems)
{
NTCommon_announceSale(_items[i]);
}
sendToItemLog(_items[i], 2);
NTT_ShopItem(_items[i], npc, 1);
break;
}
Step 2:
Navigate to: D2NT\scripts\libs\common\
File: NTCommon.ntl
Add: (at the top)
// Announce Sold In-Game
// -------------------------------------------------------------------------------------------
var NTCommon_announceSoldItems = true;
var NTCommon_announceSoldQuality = [1,2,3,4,5,6,7,8];
//["lowquality"]=1;
//["normal"]=2;
//["superior"]=3;
//["magic"]=4;
//["set"]=5;
//["rare"]=6;
//["unique"]=7;
//["crafted"]=8;
// -------------------------------------------------------------------------------------------
Add: (at the bottom)
function NTCommon_announceSale(_item)
{
// Function By Mythosis
//////////////////////////////////////
var i;
var announceIt = 0;
var soldString = new Array();
// Attach Sold
soldString = "Sold ";
// Attach Quality
for( i=0; i < NTCommon_announceSoldQuality.length; i++ )
{
if(NTCommon_announceSoldQuality[i] == _item.quality)
{
announceIt = NTCommon_announceSoldQuality[i];
}
}
switch(announceIt)
{
case 1: //lowquality
case 2: //normal
case 3: //superior
soldString = (soldString + "White/Grey: ");
break;
case 4: //magic
soldString = (soldString + "Magic: ");
break;
case 5: //set
soldString = (soldString + "Set: ");
break;
case 6: //rare
soldString = (soldString + "Rare: ");
break;
case 7: //unique
soldString = (soldString + "Unique: ");
break;
case 8: //crafted
soldString = (soldString + "Crafted: ");
break;
default:
announceIt = 0;
Say("announce Sold! error");
break;
}
// Attach Name
soldString = (soldString + ": " + _item.name.split("\n")[0] + " ");
if(announceIt > 0)
{
Say(soldString);
}
}