Added dialogue for Artimeus

This commit is contained in:
Ceikry 2020-03-14 08:47:17 -05:00
parent 0576b353ae
commit 3e06143e8e

View file

@ -0,0 +1,68 @@
package plugin.interaction.city.nardah;
import org.crandor.game.content.dialogue.DialoguePlugin;
import org.crandor.game.node.entity.npc.NPC;
import org.crandor.game.node.entity.player.Player;
import org.crandor.plugin.InitializablePlugin;
/**
* Handles dialogue for Artimeus
* @author ceik
*/
@InitializablePlugin
public class ArtimeusDialogue extends DialoguePlugin {
public ArtimeusDialogue(){
/**
* Empty
*/
}
public ArtimeusDialogue(Player player){
super(player);
}
@Override
public DialoguePlugin newInstance(Player player){return new ArtimeusDialogue(player);}
@Override
public boolean open(Object... args){
npc("Greetings, friend; my business here deals with Hunter","related items. Is there anything in which I can interest you?");
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId){
switch(stage){
case 0:
interpreter.sendOptions("Select one","What kind of items do you stock?","I'm not in the market for Hunter equipment right now, thanks.");
stage++;
break;
case 1:
switch(buttonId){
case 1:
player("What kind of items do you stock?");
stage++;
break;
case 2:
player("I'm not in the market for Hunter equipment","right now, thanks.");
stage = 10;
break;
}
break;
case 2:
npc("Have a look for yourself.");
stage++;
break;
case 3:
end();
NPC Artimeus = new NPC(5109);
Artimeus.openShop(player);
break;
case 10:
end();
break;
}
return true;
}
public int[] getIds() {return new int[] {5109};}
}