this in itemselect.java:
Code:
case ####:
for(Player pl : Engine.players) {
if (pl != null) {
Engine.newSummonNPC2(####, p.absX, p.absY, p.heightLevel);
pl.createGlobalObject(####, p.heightLevel, p.absX, p.absY, -1, 10);
pi.deleteItem(p, itemId, itemSlot, 1);
}
}
break;
it works great: summons the npc and object for all players, but why this doesnt work:
in NPC.java:
Code:
if (npcType == ####)
{
for(Player pl : Engine.players) {
if (pl != null) {
pl.createGlobalObject(6951, p.heightLevel, absX, absY, 0, 10);
return;
}
}
}
this removes the object only from the killer, how to make it remove it from all players???