@NoFatChicks
The easiest way to add items into the source is to find how other items are done. For example you want to use pk amulets. Ask yourself what other items have the same function more or less as the pk ammy? So take twin city scroll for example. The item id is 1060020. Look for it in the source, then see how it is coded.
PHP Code:
case 1060020:
{
if (Loc.Map != 6000 && Loc.Map != 6001)
{
Teleport(1002, 429, 378);
RemoveItem(I);
}
else
MyClient.LocalMessage(2005, "Cannot use teleport scrolls in jail.");
break;
}
The important part there is the "Teleport(1002, 429, 378);" since that is what actually does the moving.
So now, what you want to do is find the pk ammy item id which is 723727 (PenitenceAmulet), from Items.txt in oldcodb.
Now that you have the itemid you want to add a case for it and write the code for what you want it to do, for pk ammy the "important part" would be reducing pk points so:
PHP Code:
case 723727:
{
if (PKPoints >= 30)
{
PKPoints -= 30;
RemoveItem(I);
}
else
MyClient.LocalMessage(2005, "only Red name players can use this item.");
break;
}
So the point is if you can think of something similar, you can tweak the code a bit to make it work how you want it to work. As for cases, so you wont be confused with the brackets, just go one line above some other case in the same section.