I have made a successful custom gachapon NPC, but I wish it could show world message to everyone what the item get by the player, like regular gachapon NPC. But the worldmessage didn't work. Can anyone help me? Thank you very much!
This is part of the script:
} else if (status == 2) {
cm.gainItem(5220000, -5);
if (chance > 0 && chance <= 12) {
cm.gainItem(icommon, 1);
} else if (chance >= 13 && chance <= 14) {
cm.gainItem(inormal, 1);
} else {
cm.gainItem(irare, 1);
}
cm.worldMessage(6, "[Gacha] Congratulations to " + cm.getChar().getName() + " on getting " + cm.gainItem() + "!");
cm.dispose();
}



Reply With Quote


