From 49f62727f9678051b690d3ceaaa49d74a763e103 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 8 Apr 2022 22:45:05 +0000 Subject: [PATCH] Upload New File --- .../pets/actions/ActionWagTail.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionWagTail.java diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionWagTail.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionWagTail.java new file mode 100644 index 00000000..04e3d594 --- /dev/null +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionWagTail.java @@ -0,0 +1,34 @@ +package com.eu.habbo.habbohotel.pets.actions; + +import com.eu.habbo.Emulator; +import com.eu.habbo.habbohotel.pets.Pet; +import com.eu.habbo.habbohotel.pets.PetAction; +import com.eu.habbo.habbohotel.pets.PetVocalsType; +import com.eu.habbo.habbohotel.rooms.RoomUnitStatus; +import com.eu.habbo.habbohotel.users.Habbo; +import com.eu.habbo.threading.runnables.PetClearPosture; + +public class ActionWagTail extends PetAction { + public ActionWagTail() { + super(null, false); + + this.minimumActionDuration = 2000; + this.statusToRemove.add(RoomUnitStatus.MOVE); + this.statusToSet.add(RoomUnitStatus.WAG_TAIL); + } + + // waggy waggy + @Override + public boolean apply(Pet pet, Habbo habbo, String[] data) { + pet.clearPosture(); + + if (pet.getHappyness() > 40) { + Emulator.getThreading().run(new PetClearPosture(pet, RoomUnitStatus.WAG_TAIL, null, false), this.minimumActionDuration); + pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL)); + return true; + } else { + pet.say(pet.getPetData().randomVocal(PetVocalsType.DISOBEY)); + return false; + } + } +}