forked from 2009Scape/Server
closes #231
This commit is contained in:
parent
217ac01c88
commit
3d1a00fe7a
2 changed files with 54 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package plugin.dialogue;
|
||||
|
||||
import org.crandor.game.content.dialogue.DialoguePlugin;
|
||||
import org.crandor.game.content.dialogue.FacialExpression;
|
||||
import org.crandor.game.node.entity.npc.NPC;
|
||||
import org.crandor.plugin.InitializablePlugin;
|
||||
import org.crandor.game.node.entity.player.Player;
|
||||
|
|
@ -38,8 +39,19 @@ public final class AhabDialogue extends DialoguePlugin {
|
|||
@Override
|
||||
public boolean open(Object... args) {
|
||||
npc = (NPC) args[0];
|
||||
npc("Arrr, matey!");
|
||||
stage = 0;
|
||||
if(args.length > 1) {
|
||||
boolean isTelegrab = (boolean) args[1];
|
||||
player.debug("" + isTelegrab);
|
||||
if (!isTelegrab) {
|
||||
npc(FacialExpression.FURIOUS, "Oi! Get yer hands off me beer!");
|
||||
} else {
|
||||
npc(FacialExpression.FURIOUS,"Don't ye go castin' spells on me beer!");
|
||||
}
|
||||
stage = 301;
|
||||
} else {
|
||||
npc("Arrr, matey!");
|
||||
stage = 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
package plugin.interaction.city.portsarim;
|
||||
|
||||
import org.crandor.cache.def.impl.NPCDefinition;
|
||||
import org.crandor.game.content.dialogue.DialoguePlugin;
|
||||
import org.crandor.game.content.dialogue.FacialExpression;
|
||||
import org.crandor.game.interaction.Interaction;
|
||||
import org.crandor.game.interaction.Option;
|
||||
import org.crandor.game.interaction.SpecialGroundInteraction;
|
||||
import org.crandor.game.interaction.SpecialGroundItems;
|
||||
import org.crandor.game.node.entity.npc.NPC;
|
||||
import org.crandor.game.node.entity.player.Player;
|
||||
import org.crandor.game.node.item.GroundItem;
|
||||
import org.crandor.game.node.item.GroundItemManager;
|
||||
import org.crandor.game.node.item.Item;
|
||||
import org.crandor.game.system.mysql.impl.GroundSpawnSQLHandler;
|
||||
import org.crandor.game.system.task.Pulse;
|
||||
import org.crandor.game.world.map.Location;
|
||||
import org.crandor.plugin.InitializablePlugin;
|
||||
import org.crandor.plugin.Plugin;
|
||||
|
||||
/**
|
||||
* Handles Ahab's beer in port sarim
|
||||
* @author ceik
|
||||
*/
|
||||
|
||||
public class AhabBeerInteraction extends SpecialGroundInteraction {
|
||||
//The dialogue key
|
||||
public static final int DIALOGUE_KEY = 2692;
|
||||
|
||||
@Override
|
||||
public void handle(final Player player, final Option option){
|
||||
configure();
|
||||
if(option.getName() == "take"){
|
||||
player.faceLocation(SpecialGroundItems.AHAB_BEER.getLocation());
|
||||
player.getDialogueInterpreter().open(DIALOGUE_KEY, new NPC(2692), false);
|
||||
} else {
|
||||
player.debug("Unhandled option: " + option.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue