Well depending on what you want to do, you would just copy the code of what youw ant to do, and add it to the specific Npc script. For example if you wanted to make the Npc repair all your equipment you would do something like this:
Code:
function npcRepair(player, npc) {
npc.turnTo(player);
menu = new GossipMenu(npc.getName(), "Hello there, what can I help you with today?");
menu.addOption(GossipMenu.CHAT_BUBBLE, "Can you repair my equipment?");
menu.addActionListener(new GossipMenuActionListener() {
public void gossipOptionClicked(option) {
if(option.getText() == "Can you repair my equipment?") {
menu = new GossipMenu(npc.getName(), "Of course I can.");
menu.addOption(menu.addOption(GossipMenu.CHAT_BUBBLE, "Thanks");
player.showGossipMenu(menu);
} else if (option.getText() == "Thanks.") {
menu.close(player);
for(item : player.getEquipment()) {
item.setDurability(item.getMaxDurability());
}
}
}
});
player.showGossipMenu(menu);
}