Don't waste your time.
HTML Code:
function onPlayerChats()
{
if (player.chat.starts("buy"))
{
temp.itemStuff = {
//buying Name, weapon Name, item Price
{"Juggaling", "Prizes/Juggle", 30}
};
for (temp.currentItem: temp.itemStuff)
{
if (temp.currentItem[0] == player.chat.substring(4))
{
if (player.clientr.etcoins >= temp.currentItem[2])
{
this.buyItem(temp.currentItem);
}
}
}
}
}
function buyItem(itemData)
{
if (player.findWeapon(temp.itemData[1]))
{
return false;
}
player.addWeapon(temp.itemData[1]);
player.clientr.etcoins -= temp.itemData[2];
player.chat = format(_("You've %s %s for %d event coins!"), randomString("purchased", "bought", "stolen"), temp.itemData[0], temp.itemData[2]);
}