Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
WIRED Effect: Change Furni Direction
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Arfeu" data-source="post: 435674" data-attributes="member: 77993"><p>Hello everyone, I saw some people selling this Wired with some bugs for an absurd price so I decided to post it for everyone.</p><p>I'm going to be worthy of support on this thank you.</p><p>Enjoy it.</p><p></p><p>[spoiler]</p><p>using System.Drawing;</p><p></p><p>namespace Achernar.HabboHotel.Items.Wired.Util</p><p>{</p><p> public enum MovementState</p><p> {</p><p> NONE = 0,</p><p> RANDOM = 1,</p><p> LEFT_RIGHT = 2,</p><p> UP_DOWN = 3,</p><p> UP = 4,</p><p> RIGHT = 5,</p><p> DOWN = 6,</p><p> LEFT = 7</p><p> }</p><p></p><p> public enum MovementDirection</p><p> {</p><p> UP = 0,</p><p> UP_RIGHT = 1,</p><p> RIGHT = 2,</p><p> DOWN_RIGHT = 3,</p><p> DOWN = 4,</p><p> DOWN_LEFT = 5,</p><p> LEFT = 6,</p><p> UP_LEFT = 7,</p><p> RANDOM = 8,</p><p> NONE = 9</p><p> }</p><p></p><p> public enum WhenMovementBlock</p><p> {</p><p> NONE = 0,</p><p> RIGHT45 = 1,</p><p> RIGHT90 = 2,</p><p> LEFT45 = 3,</p><p> LEFT90 = 4,</p><p> TURN_BACK = 5,</p><p> TURN_RANDOM = 6</p><p> }</p><p></p><p> public enum RotationState</p><p> {</p><p> NONE = 0,</p><p> CLOCK_WISE = 1,</p><p> COUNTER_CLOCK_WISE = 2,</p><p> RANDOM = 3</p><p> }</p><p></p><p> public class Movement</p><p> {</p><p> private static void HandleMovement(ref Point coordinate, MovementState state)</p><p> {</p><p> switch (state)</p><p> {</p><p> case MovementState.DOWN:</p><p> {</p><p> coordinate.Y++;</p><p> break;</p><p> }</p><p></p><p> case MovementState.UP:</p><p> {</p><p> coordinate.Y--;</p><p> break;</p><p> }</p><p></p><p> case MovementState.LEFT:</p><p> {</p><p> coordinate.X--;</p><p> break;</p><p> }</p><p></p><p> case MovementState.RIGHT:</p><p> {</p><p> coordinate.X++;</p><p> break;</p><p> }</p><p> }</p><p> }</p><p></p><p> private static void HandleMovementDir(ref Point coordinate, MovementDirection state)</p><p> {</p><p> switch (state)</p><p> {</p><p> case MovementDirection.DOWN:</p><p> {</p><p> coordinate.Y++;</p><p> break;</p><p> }</p><p></p><p> case MovementDirection.UP:</p><p> {</p><p> coordinate.Y--;</p><p> break;</p><p> }</p><p></p><p> case MovementDirection.LEFT:</p><p> {</p><p> coordinate.X--;</p><p> break;</p><p> }</p><p></p><p> case MovementDirection.RIGHT:</p><p> {</p><p> coordinate.X++;</p><p> break;</p><p> }</p><p></p><p> case MovementDirection.DOWN_RIGHT:</p><p> {</p><p> coordinate.X++;</p><p> coordinate.Y++;</p><p> break;</p><p> }</p><p></p><p> case MovementDirection.DOWN_LEFT:</p><p> {</p><p> coordinate.X--;</p><p> coordinate.Y++;</p><p> break;</p><p> }</p><p></p><p> case MovementDirection.UP_RIGHT:</p><p> {</p><p> coordinate.X++;</p><p> coordinate.Y--;</p><p> break;</p><p> }</p><p></p><p> case MovementDirection.UP_LEFT:</p><p> {</p><p> coordinate.X--;</p><p> coordinate.Y--;</p><p> break;</p><p> }</p><p> }</p><p> }</p><p></p><p> public static Point HandleMovement(Point newCoordinate, MovementState state, int newRotation)</p><p> {</p><p> var newPoint = new Point(newCoordinate.X, newCoordinate.Y);</p><p></p><p> switch (state)</p><p> {</p><p> case MovementState.UP:</p><p> case MovementState.DOWN:</p><p> case MovementState.LEFT:</p><p> case MovementState.RIGHT:</p><p> {</p><p> HandleMovement(ref newPoint, state);</p><p> break;</p><p> }</p><p></p><p> case MovementState.LEFT_RIGHT:</p><p> {</p><p> if (AchernarServer.GetRandomNumber(0, 2) == 1)</p><p> HandleMovement(ref newPoint, MovementState.LEFT);</p><p> else</p><p> HandleMovement(ref newPoint, MovementState.RIGHT);</p><p> break;</p><p> }</p><p></p><p> case MovementState.UP_DOWN:</p><p> {</p><p> if (AchernarServer.GetRandomNumber(0, 2) == 1)</p><p> HandleMovement(ref newPoint, MovementState.UP);</p><p> else</p><p> HandleMovement(ref newPoint, MovementState.DOWN);</p><p> break;</p><p> }</p><p></p><p> case MovementState.RANDOM:</p><p> {</p><p> switch (AchernarServer.GetRandomNumber(1, 5))</p><p> {</p><p> case 1:</p><p> {</p><p> HandleMovement(ref newPoint, MovementState.UP);</p><p> break;</p><p> }</p><p> case 2:</p><p> {</p><p> HandleMovement(ref newPoint, MovementState.DOWN);</p><p> break;</p><p> }</p><p></p><p> case 3:</p><p> {</p><p> HandleMovement(ref newPoint, MovementState.LEFT);</p><p> break;</p><p> }</p><p> case 4:</p><p> {</p><p> HandleMovement(ref newPoint, MovementState.RIGHT);</p><p> break;</p><p> }</p><p> }</p><p> break;</p><p> }</p><p> }</p><p></p><p> return newPoint;</p><p> }</p><p></p><p> public static Point HandleMovementDir(Point newCoordinate, MovementDirection state, int newRotation)</p><p> {</p><p> var newPoint = new Point(newCoordinate.X, newCoordinate.Y);</p><p></p><p> switch (state)</p><p> {</p><p> case MovementDirection.UP:</p><p> case MovementDirection.DOWN:</p><p> case MovementDirection.LEFT:</p><p> case MovementDirection.RIGHT:</p><p> case MovementDirection.DOWN_RIGHT:</p><p> case MovementDirection.DOWN_LEFT:</p><p> case MovementDirection.UP_RIGHT:</p><p> case MovementDirection.UP_LEFT:</p><p> {</p><p> HandleMovementDir(ref newPoint, state);</p><p> break;</p><p> }</p><p></p><p> case MovementDirection.RANDOM:</p><p> {</p><p> switch (AchernarServer.GetRandomNumber(1, 5))</p><p> {</p><p> case 1:</p><p> {</p><p> HandleMovementDir(ref newPoint, MovementDirection.UP);</p><p> break;</p><p> }</p><p> case 2:</p><p> {</p><p> HandleMovementDir(ref newPoint, MovementDirection.DOWN);</p><p> break;</p><p> }</p><p></p><p> case 3:</p><p> {</p><p> HandleMovementDir(ref newPoint, MovementDirection.LEFT);</p><p> break;</p><p> }</p><p> case 4:</p><p> {</p><p> HandleMovementDir(ref newPoint, MovementDirection.RIGHT);</p><p> break;</p><p> }</p><p> }</p><p> break;</p><p> }</p><p> }</p><p></p><p> return newPoint;</p><p> }</p><p></p><p> public static int HandleRotation(int oldRotation, RotationState state)</p><p> {</p><p> var rotation = oldRotation;</p><p> switch (state)</p><p> {</p><p> case RotationState.CLOCK_WISE:</p><p> {</p><p> HandleClockwiseRotation(ref rotation);</p><p> return rotation;</p><p> }</p><p></p><p> case RotationState.COUNTER_CLOCK_WISE:</p><p> {</p><p> HandleCounterClockwiseRotation(ref rotation);</p><p> return rotation;</p><p> }</p><p></p><p> case RotationState.RANDOM:</p><p> {</p><p> if (AchernarServer.GetRandomNumber(0, 3) == 1)</p><p> HandleClockwiseRotation(ref rotation);</p><p> else</p><p> HandleCounterClockwiseRotation(ref rotation);</p><p> return rotation;</p><p> }</p><p> }</p><p></p><p> return rotation;</p><p> }</p><p></p><p> private static void HandleClockwiseRotation(ref int rotation)</p><p> {</p><p> rotation = rotation + 2;</p><p> if (rotation > 6)</p><p> rotation = 0;</p><p> }</p><p></p><p> private static void HandleCounterClockwiseRotation(ref int rotation)</p><p> {</p><p> rotation = rotation - 2;</p><p> if (rotation < 0)</p><p> rotation = 6;</p><p> }</p><p> }</p><p>}</p><p>[/spoiler]</p></blockquote><p></p>
[QUOTE="Arfeu, post: 435674, member: 77993"] Hello everyone, I saw some people selling this Wired with some bugs for an absurd price so I decided to post it for everyone. I'm going to be worthy of support on this thank you. Enjoy it. [spoiler] using System.Drawing; namespace Achernar.HabboHotel.Items.Wired.Util { public enum MovementState { NONE = 0, RANDOM = 1, LEFT_RIGHT = 2, UP_DOWN = 3, UP = 4, RIGHT = 5, DOWN = 6, LEFT = 7 } public enum MovementDirection { UP = 0, UP_RIGHT = 1, RIGHT = 2, DOWN_RIGHT = 3, DOWN = 4, DOWN_LEFT = 5, LEFT = 6, UP_LEFT = 7, RANDOM = 8, NONE = 9 } public enum WhenMovementBlock { NONE = 0, RIGHT45 = 1, RIGHT90 = 2, LEFT45 = 3, LEFT90 = 4, TURN_BACK = 5, TURN_RANDOM = 6 } public enum RotationState { NONE = 0, CLOCK_WISE = 1, COUNTER_CLOCK_WISE = 2, RANDOM = 3 } public class Movement { private static void HandleMovement(ref Point coordinate, MovementState state) { switch (state) { case MovementState.DOWN: { coordinate.Y++; break; } case MovementState.UP: { coordinate.Y--; break; } case MovementState.LEFT: { coordinate.X--; break; } case MovementState.RIGHT: { coordinate.X++; break; } } } private static void HandleMovementDir(ref Point coordinate, MovementDirection state) { switch (state) { case MovementDirection.DOWN: { coordinate.Y++; break; } case MovementDirection.UP: { coordinate.Y--; break; } case MovementDirection.LEFT: { coordinate.X--; break; } case MovementDirection.RIGHT: { coordinate.X++; break; } case MovementDirection.DOWN_RIGHT: { coordinate.X++; coordinate.Y++; break; } case MovementDirection.DOWN_LEFT: { coordinate.X--; coordinate.Y++; break; } case MovementDirection.UP_RIGHT: { coordinate.X++; coordinate.Y--; break; } case MovementDirection.UP_LEFT: { coordinate.X--; coordinate.Y--; break; } } } public static Point HandleMovement(Point newCoordinate, MovementState state, int newRotation) { var newPoint = new Point(newCoordinate.X, newCoordinate.Y); switch (state) { case MovementState.UP: case MovementState.DOWN: case MovementState.LEFT: case MovementState.RIGHT: { HandleMovement(ref newPoint, state); break; } case MovementState.LEFT_RIGHT: { if (AchernarServer.GetRandomNumber(0, 2) == 1) HandleMovement(ref newPoint, MovementState.LEFT); else HandleMovement(ref newPoint, MovementState.RIGHT); break; } case MovementState.UP_DOWN: { if (AchernarServer.GetRandomNumber(0, 2) == 1) HandleMovement(ref newPoint, MovementState.UP); else HandleMovement(ref newPoint, MovementState.DOWN); break; } case MovementState.RANDOM: { switch (AchernarServer.GetRandomNumber(1, 5)) { case 1: { HandleMovement(ref newPoint, MovementState.UP); break; } case 2: { HandleMovement(ref newPoint, MovementState.DOWN); break; } case 3: { HandleMovement(ref newPoint, MovementState.LEFT); break; } case 4: { HandleMovement(ref newPoint, MovementState.RIGHT); break; } } break; } } return newPoint; } public static Point HandleMovementDir(Point newCoordinate, MovementDirection state, int newRotation) { var newPoint = new Point(newCoordinate.X, newCoordinate.Y); switch (state) { case MovementDirection.UP: case MovementDirection.DOWN: case MovementDirection.LEFT: case MovementDirection.RIGHT: case MovementDirection.DOWN_RIGHT: case MovementDirection.DOWN_LEFT: case MovementDirection.UP_RIGHT: case MovementDirection.UP_LEFT: { HandleMovementDir(ref newPoint, state); break; } case MovementDirection.RANDOM: { switch (AchernarServer.GetRandomNumber(1, 5)) { case 1: { HandleMovementDir(ref newPoint, MovementDirection.UP); break; } case 2: { HandleMovementDir(ref newPoint, MovementDirection.DOWN); break; } case 3: { HandleMovementDir(ref newPoint, MovementDirection.LEFT); break; } case 4: { HandleMovementDir(ref newPoint, MovementDirection.RIGHT); break; } } break; } } return newPoint; } public static int HandleRotation(int oldRotation, RotationState state) { var rotation = oldRotation; switch (state) { case RotationState.CLOCK_WISE: { HandleClockwiseRotation(ref rotation); return rotation; } case RotationState.COUNTER_CLOCK_WISE: { HandleCounterClockwiseRotation(ref rotation); return rotation; } case RotationState.RANDOM: { if (AchernarServer.GetRandomNumber(0, 3) == 1) HandleClockwiseRotation(ref rotation); else HandleCounterClockwiseRotation(ref rotation); return rotation; } } return rotation; } private static void HandleClockwiseRotation(ref int rotation) { rotation = rotation + 2; if (rotation > 6) rotation = 0; } private static void HandleCounterClockwiseRotation(ref int rotation) { rotation = rotation - 2; if (rotation < 0) rotation = 6; } } } [/spoiler] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
WIRED Effect: Change Furni Direction
Top