mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-19 21:10:17 -07:00
yhh
This commit is contained in:
parent
fe09558cd6
commit
2da55ddef0
2 changed files with 22 additions and 19 deletions
|
|
@ -3,7 +3,7 @@ package core.game.interaction;
|
|||
import core.game.node.item.GroundItem;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.interaction.city.falador.WineOfZamorakInteraction;
|
||||
import rs09.game.interaction.region.falador.WineOfZamorakInteraction;
|
||||
import core.game.interaction.city.portsarim.AhabBeerInteraction;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,24 +1,27 @@
|
|||
package core.game.interaction.city.falador;
|
||||
package rs09.game.interaction.region.falador
|
||||
|
||||
import core.game.interaction.Option;
|
||||
import core.game.interaction.SpecialGroundInteraction;
|
||||
import core.game.interaction.SpecialGroundItems;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.world.map.RegionManager;
|
||||
import core.game.node.item.GroundItem
|
||||
import core.game.world.map.RegionManager
|
||||
import org.rs09.consts.Items
|
||||
import rs09.game.content.global.action.PickupHandler
|
||||
import rs09.game.interaction.InteractionListener
|
||||
|
||||
import java.util.List;
|
||||
class WineOfZamorakInteraction : InteractionListener() {
|
||||
|
||||
public class WineOfZamorakInteraction extends SpecialGroundInteraction {
|
||||
@Override
|
||||
public void handle(Player player, Option option){
|
||||
player.faceLocation(SpecialGroundItems.WINE_OF_ZAMORAK.getLocation());
|
||||
final List<NPC> npcs = RegionManager.getLocalNpcs(player);
|
||||
for (NPC n : npcs) {
|
||||
if (n.getId() == 188) {
|
||||
n.sendChat("Hands off zamorak's wine!");
|
||||
n.getProperties().getCombatPulse().attack(player);
|
||||
}
|
||||
override fun defineListeners() {
|
||||
on(Items.WINE_OF_ZAMORAK_245,ITEM,"take"){player, wine ->
|
||||
if(player.location.regionId != 11574){
|
||||
PickupHandler.take(player, wine as GroundItem)
|
||||
return@on true
|
||||
}
|
||||
val npcs = RegionManager.getLocalNpcs(player)
|
||||
for (n in npcs) {
|
||||
if (n.id == 188) {
|
||||
n.sendChat("Hands off zamorak's wine!")
|
||||
n.properties.combatPulse.attack(player)
|
||||
}
|
||||
}
|
||||
return@on true
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue