mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Merge branch 'fix-pets-finally' into 'fix-pets-finally'
Add 4 new commands and cleanups See merge request morningstar/Arcturus-Community!525
This commit is contained in:
commit
56677c2e15
@ -49,7 +49,10 @@ public class PetManager {
|
||||
this.put(15, new ActionFollowLeft());
|
||||
this.put(16, new ActionFollowRight());
|
||||
this.put(17, new ActionPlayFootball());
|
||||
this.put(19, new ActionBounce());
|
||||
this.put(20, new ActionFlat());
|
||||
this.put(21, new ActionDance());
|
||||
this.put(22, new ActionSpin());
|
||||
this.put(24, new ActionMoveForward());
|
||||
this.put(25, new ActionTurnLeft());
|
||||
this.put(26, new ActionTurnRight());
|
||||
@ -66,6 +69,7 @@ public class PetManager {
|
||||
this.put(41, new ActionRoll());
|
||||
this.put(42, new ActionRingOfFire());
|
||||
this.put(43, new ActionEat());
|
||||
this.put(44, new ActionWagTail());
|
||||
this.put(46, new ActionBreed());
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,32 @@
|
||||
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 ActionBounce extends PetAction {
|
||||
public ActionBounce() {
|
||||
super(null, true);
|
||||
|
||||
this.minimumActionDuration = 1000;
|
||||
this.statusToSet.add(RoomUnitStatus.BOUNCE);
|
||||
}
|
||||
|
||||
// bouncy bounce
|
||||
@Override
|
||||
public boolean apply(Pet pet, Habbo habbo, String[] data) {
|
||||
|
||||
if (pet.getHappyness() > 50) {
|
||||
Emulator.getThreading().run(new PetClearPosture(pet, RoomUnitStatus.BOUNCE, null, false), this.minimumActionDuration);
|
||||
pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL));
|
||||
return true;
|
||||
} else {
|
||||
pet.say(pet.getPetData().randomVocal(PetVocalsType.DISOBEY));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
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 ActionFlat extends PetAction {
|
||||
public ActionFlat() {
|
||||
super(null, true);
|
||||
|
||||
this.minimumActionDuration = 4000;
|
||||
this.statusToSet.add(RoomUnitStatus.FLAT);
|
||||
}
|
||||
|
||||
// flat attack
|
||||
@Override
|
||||
public boolean apply(Pet pet, Habbo habbo, String[] data) {
|
||||
|
||||
if (pet.getHappyness() > 30) {
|
||||
Emulator.getThreading().run(new PetClearPosture(pet, RoomUnitStatus.FLAT, null, false), this.minimumActionDuration);
|
||||
pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL));
|
||||
return true;
|
||||
} else {
|
||||
pet.say(pet.getPetData().randomVocal(PetVocalsType.DISOBEY));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,32 @@
|
||||
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 ActionSpin extends PetAction {
|
||||
public ActionSpin() {
|
||||
super(null, true);
|
||||
|
||||
this.minimumActionDuration = 1500;
|
||||
this.statusToSet.add(RoomUnitStatus.SPIN);
|
||||
}
|
||||
|
||||
// spinny spin
|
||||
@Override
|
||||
public boolean apply(Pet pet, Habbo habbo, String[] data) {
|
||||
|
||||
if (pet.getHappyness() > 50) {
|
||||
Emulator.getThreading().run(new PetClearPosture(pet, RoomUnitStatus.SPIN, null, false), this.minimumActionDuration);
|
||||
pet.say(pet.getPetData().randomVocal(PetVocalsType.GENERIC_NEUTRAL));
|
||||
return true;
|
||||
} else {
|
||||
pet.say(pet.getPetData().randomVocal(PetVocalsType.DISOBEY));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
@ -3,50 +3,74 @@ package com.eu.habbo.habbohotel.rooms;
|
||||
public enum RoomUnitStatus {
|
||||
MOVE("mv", true),
|
||||
|
||||
// SIT
|
||||
SIT_IN("sit-in"),
|
||||
SIT("sit", true),
|
||||
SIT_OUT("sit-out"),
|
||||
|
||||
// lay or down
|
||||
LAY_IN("lay-in"),
|
||||
LAY("lay", true),
|
||||
LAY_OUT("lay-out"),
|
||||
|
||||
FLAT_CONTROL("flatctrl"),
|
||||
SIGN("sign"),
|
||||
GESTURE("gst"),
|
||||
WAVE("wav"),
|
||||
TRADING("trd"),
|
||||
|
||||
DIP("dip"),
|
||||
|
||||
// eat
|
||||
EAT_IN("eat-in"),
|
||||
EAT("eat"),
|
||||
EAT_OUT("eat-out"),
|
||||
|
||||
BEG("beg", true),
|
||||
// basic controls and gestures
|
||||
FLAT_CONTROL("flatctrl"),
|
||||
SIGN("sign"),
|
||||
GESTURE("gst"),
|
||||
WAVE("wav"), // this doesnt exist?
|
||||
TRADING("trd"), // this doesnt exist?
|
||||
KICK("kck"), // kicks leg, horse atleast
|
||||
SPEAK("spk"), // speak animation
|
||||
SRP("srp"), // SURPRISED very funny with monkey
|
||||
SRP_IN("srp-in"),
|
||||
SWIM("swm"), // supposedly should happen when monkey reaches water | essentially dip is useless
|
||||
|
||||
// sleep
|
||||
SLEEP_IN("slp-in"),
|
||||
SLEEP("slp", true), // sleep
|
||||
SLEEP_OUT("slp-out"),
|
||||
|
||||
// play dead
|
||||
DEAD_IN("ded-in"),
|
||||
DEAD("ded", true),
|
||||
DEAD("ded", true), // play dead
|
||||
DEAD_OUT("ded-out"),
|
||||
|
||||
// jump
|
||||
JUMP_IN("jmp-in"),
|
||||
JUMP("jmp", true),
|
||||
JUMP("jmp", true), // jump
|
||||
JUMP_OUT("jmp-out"),
|
||||
|
||||
// play with toy
|
||||
PLAY_IN("pla-in"),
|
||||
PLAY("pla", true),
|
||||
PLAY("pla", true), // play
|
||||
PLAY_OUT("pla-out"),
|
||||
|
||||
SPEAK("spk"),
|
||||
CROAK("crk"),
|
||||
// specific commands
|
||||
DIP("dip"), // walks towards random water
|
||||
BEG("beg", true), // begs for food
|
||||
WAG_TAIL("wag"), // self-explanatory
|
||||
DANCE("dan"), // dances, for example spider and monkey
|
||||
AMS("ams"), // SOME WEIRD PUPPET SHIT PROBABLY SPEAK FOR MONKEY
|
||||
TURN("trn"), // turns
|
||||
SPIN("spn"), // spinny spin
|
||||
CROAK("crk"), // speak but for frog
|
||||
FLAT("flt"), // flat, falls on stomach (spider n shit)
|
||||
FLAT_IN("flt-in"), // flat-in? dunno dc
|
||||
BOUNCE("bnc"), // bounces once
|
||||
RELAX("rlx"),
|
||||
WINGS("wng", true),
|
||||
FLAME("flm"),
|
||||
RINGOFFIRE("rng", true),
|
||||
SWING("swg", true),
|
||||
HANG("hg", true),
|
||||
ROLL("rll", true),
|
||||
WINGS("wng", true), // spreads wings dragon
|
||||
FLAME("flm"), // breathe fire
|
||||
RINGOFFIRE("rng"), // ring of fire for dragon related to toy
|
||||
SWING("swg"), // same as roll but less energic, related to Dragon tree toy.
|
||||
HANG("hg"), // hang, related to Dragon tree toy. just hangs under the branch
|
||||
ROLL("rll"), // roll, related to Dragon tree toy. rolls around the branch
|
||||
|
||||
// monsterplant shit i aint touching that
|
||||
RIP("rip"),
|
||||
GROW("grw"),
|
||||
GROW_1("grw1"),
|
||||
@ -55,21 +79,7 @@ public enum RoomUnitStatus {
|
||||
GROW_4("grw4"),
|
||||
GROW_5("grw5"),
|
||||
GROW_6("grw6"),
|
||||
GROW_7("grw7"),
|
||||
|
||||
KICK("kck"),
|
||||
WAG_TAIL("wag"),
|
||||
DANCE("dan"),
|
||||
AMS("ams"),
|
||||
SWIM("swm"),
|
||||
TURN("trn"),
|
||||
|
||||
SRP("srp"),
|
||||
SRP_IN("srp-in"),
|
||||
|
||||
SLEEP_IN("slp-in"),
|
||||
SLEEP("slp", true),
|
||||
SLEEP_OUT("slp-out");
|
||||
GROW_7("grw7");
|
||||
|
||||
public final String key;
|
||||
public final boolean removeWhenWalking;
|
||||
|
Loading…
Reference in New Issue
Block a user