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
SnowStorm - [CODES] - [JAVA]
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="Rossum" data-source="post: 213548" data-attributes="member: 35261"><p><em> Hi friends, I take the trouble to do a couple of things in the SnowStorm & in a hotel that I only want to benefit themselves, I leave some code (in Java) so that ye may be able to create libraries & imports may know <img src="/styles/default/xenforo/smilies/emojione/smile.png" class="smilie" loading="lazy" alt=":)" title="Smile :)" data-shortname=":)" /> I leave the code & the name of the documents that must of put, thanks to Itachi by the libraries & some codes, all credits to him bookstores.</em></p><p> </p><p> </p><p><strong>CurrentTimesToPlay</strong></p><p>[spoiler][code=java]</p><p>public class CurrentTimesToPlay extends Handler implements Runnable {</p><p> private ServerHandler Client;</p><p> private Environment Server;</p><p> private FutureTask T;</p><p> [URL='http://devbest.com/members/override.2227/']Override[/URL]</p><p> public void Load(ServerHandler Client, Environment Server, FutureTask T) throws Exception</p><p> {</p><p> this.Client = Client;</p><p> this.Server = Server;</p><p> this.T = T;</p><p> }</p><p> </p><p> public void run() {</p><p> try {</p><p> ServerMessage Plays = new ServerMessage(ServerEvents.CurrentSnowStormPlays);</p><p> Plays.writeInt(-1); // full play, anyway, 3 = 3 plays an more idiot things</p><p> Plays.Send(Client.Socket);</p><p> } catch (Exception e)</p><p> {</p><p> </p><p> }</p><p> }</p><p>}</p><p>[/code][/spoiler]</p><p> </p><p><strong>FriendLeaderBoard</strong></p><p> </p><p>[spoiler]</p><p>[code=java]</p><p>public class FriendLeaderBoard extends Handler implements Runnable {</p><p> private ServerHandler Client;</p><p> private Environment Server;</p><p> private FutureTask T;</p><p> [URL='http://devbest.com/members/override.2227/']Override[/URL]</p><p> public void Load(ServerHandler Client, Environment Server, FutureTask T) throws Exception</p><p> {</p><p> this.Client = Client;</p><p> this.Server = Server;</p><p> this.T = T;</p><p> }</p><p> </p><p> public void run() {</p><p> try {</p><p> Habbo User = Client.GetSession();</p><p> ServerMessage Board = new ServerMessage(ServerEvents.FriendsLeaderBoard);</p><p> Board.writeInt(1); // count</p><p> Board.writeInt(User.Id);</p><p> Board.writeInt(85000);</p><p> Board.writeInt(1); // position?</p><p> Board.writeUTF(User.UserName);</p><p> Board.writeUTF(User.Look);</p><p> Board.writeUTF(User.Gender.toLowerCase());</p><p> Board.writeInt(1); // repeat position (if it's me)</p><p> Board.Send(Client.Socket);</p><p> } catch (Exception e)</p><p> {</p><p> </p><p> }</p><p> }</p><p>}</p><p>[/code]</p><p>[/spoiler]</p><p> </p><p><strong>GeneralLeaderBoard</strong></p><p> </p><p>[spoiler]</p><p>[code=java]</p><p>public class GeneralLeaderBoard extends Handler implements Runnable {</p><p> private ServerHandler Client;</p><p> private Environment Server;</p><p> private FutureTask T;</p><p> [URL='http://devbest.com/members/override.2227/']Override[/URL]</p><p> public void Load(ServerHandler Client, Environment Server, FutureTask T) throws Exception</p><p> {</p><p> this.Client = Client;</p><p> this.Server = Server;</p><p> this.T = T;</p><p> }</p><p> </p><p> public void run() {</p><p> try {</p><p> Habbo User = Client.GetSession();</p><p> ServerMessage Board = new ServerMessage(ServerEvents.GeneralLeaderBoard);</p><p> Board.writeInt(2); // count </p><p> Board.writeInt(User.Id);</p><p> Board.writeInt(85000);</p><p> Board.writeInt(1); // position?</p><p> Board.writeUTF(User.UserName);</p><p> Board.writeUTF(User.Look);</p><p> Board.writeUTF(User.Gender.toLowerCase());</p><p> </p><p> // my data</p><p> Board.writeInt(User.Id);</p><p> Board.writeInt(85000);</p><p> Board.writeInt(1); // position?</p><p> Board.writeUTF(User.UserName);</p><p> Board.writeUTF(User.Look);</p><p> Board.writeUTF(User.Gender.toLowerCase());</p><p> Board.writeInt(1); // repeat position (if i'm not in the count?)</p><p> Board.Send(Client.Socket);</p><p> } catch (Exception e)</p><p> {</p><p> </p><p> }</p><p> }</p><p>}</p><p>[/code]</p><p>[/spoiler]</p><p> </p><p><strong>InitSnowStorm</strong></p><p> </p><p>[spoiler]</p><p>[code=java]</p><p> </p><p>public class InitSnowStorm extends Handler implements Runnable {</p><p> private ServerHandler Client;</p><p> private Environment Server;</p><p> private FutureTask T;</p><p> [URL='http://devbest.com/members/override.2227/']Override[/URL]</p><p> public void Load(ServerHandler Client, Environment Server, FutureTask T) throws Exception</p><p> {</p><p> this.Client = Client;</p><p> this.Server = Server;</p><p> this.T = T;</p><p> }</p><p> </p><p> public void run() {</p><p> try {</p><p> Habbo User = Client.GetSession();</p><p> SnowWar.SearchASnowWarForMe(User);</p><p> SnowWar CurrentWar = User.CurrentWar;</p><p> ServerMessage Waiting = new ServerMessage(ServerEvents.WaitingForUsers);</p><p> Waiting.writeInt(CurrentWar.Id); //</p><p> Waiting.writeUTF("SnowStorm level " + CurrentWar.ArenaId);</p><p> Waiting.writeInt(0);</p><p> Waiting.writeInt(CurrentWar.ArenaId); // level</p><p> Waiting.writeInt(CurrentWar.TeamCount);</p><p> Waiting.writeInt(CurrentWar.MaxPlayers);</p><p> Waiting.writeUTF(CurrentWar.Owner); // user name of room creator?</p><p> Waiting.writeInt(14);</p><p> Waiting.writeInt(CurrentWar.Players.size());</p><p> </p><p> Iterator reader = CurrentWar.Players.iterator();</p><p> while(reader.hasNext())</p><p> {</p><p> Habbo cUser = (Habbo)reader.next();</p><p> Waiting.writeInt(cUser.Id);</p><p> Waiting.writeUTF(cUser.UserName);</p><p> Waiting.writeUTF(cUser.Look);</p><p> Waiting.writeUTF(cUser.Gender.toLowerCase());</p><p> Waiting.writeInt(-1);</p><p> Waiting.writeInt(0); // stars</p><p> Waiting.writeInt(0); // points</p><p> Waiting.writeInt(10); // points for next level</p><p> } </p><p> Waiting.Send(Client.Socket);</p><p> </p><p> /*ServerMessage AddUser = new ServerMessage(ServerEvents.AddUsersToGame);</p><p> AddUser.writeInt(654);</p><p> AddUser.writeUTF("Itachi2");</p><p> AddUser.writeUTF(User.Look);</p><p> AddUser.writeUTF(User.Gender.toLowerCase());</p><p> AddUser.writeInt(-1);</p><p> AddUser.writeInt(0); // stars</p><p> AddUser.writeInt(0); // points</p><p> AddUser.writeInt(10); // points for next level</p><p> AddUser.writeBoolean(false);*/</p><p> //AddUser.Send(Client.Socket);</p><p> Thread.sleep(10000);</p><p> // 2807</p><p> ServerMessage Waiting2 = new ServerMessage(2807);</p><p> Waiting2.writeInt(CurrentWar.Id); //</p><p> Waiting2.writeUTF("SnowStorm level " + CurrentWar.ArenaId);</p><p> Waiting2.writeInt(0);</p><p> Waiting2.writeInt(CurrentWar.ArenaId); // level</p><p> Waiting2.writeInt(CurrentWar.TeamCount);</p><p> Waiting2.writeInt(CurrentWar.MaxPlayers);</p><p> Waiting2.writeUTF(CurrentWar.Owner); // user name of room creator?</p><p> Waiting2.writeInt(14);</p><p> Waiting2.writeInt(CurrentWar.Players.size());</p><p> </p><p> Iterator reader2 = CurrentWar.BlueTeam.iterator();</p><p> while(reader2.hasNext())</p><p> {</p><p> Habbo cUser = (Habbo)reader2.next();</p><p> Waiting2.writeInt(cUser.Id);</p><p> Waiting2.writeUTF(cUser.UserName);</p><p> Waiting2.writeUTF(cUser.Look);</p><p> Waiting2.writeUTF(cUser.Gender.toLowerCase());</p><p> Waiting2.writeInt(1); // team</p><p> Waiting2.writeInt(0); // stars</p><p> Waiting2.writeInt(0); // points</p><p> Waiting2.writeInt(10); // points for next level</p><p> }</p><p> </p><p> Iterator reader3 = CurrentWar.RedTeam.iterator();</p><p> while(reader3.hasNext())</p><p> {</p><p> Habbo cUser = (Habbo)reader3.next();</p><p> Waiting2.writeInt(cUser.Id);</p><p> Waiting2.writeUTF(cUser.UserName);</p><p> Waiting2.writeUTF(cUser.Look);</p><p> Waiting2.writeUTF(cUser.Gender.toLowerCase());</p><p> Waiting2.writeInt(2); // team</p><p> Waiting2.writeInt(10); // stars</p><p> Waiting2.writeInt(20000000); // points</p><p> Waiting2.writeInt(20000000); // points for next level</p><p> }</p><p> Waiting2.Send(Client.Socket);</p><p> //Thread.sleep(7000);</p><p> // StartGame!</p><p> ServerMessage StartGame = new ServerMessage(ServerEvents.StartSnowGame);</p><p> StartGame.writeInt(0);</p><p> StartGame.writeInt(CurrentWar.ArenaId);</p><p> StartGame.writeInt(CurrentWar.TeamCount);</p><p> StartGame.writeInt(CurrentWar.Players.size());</p><p> Iterator treader = CurrentWar.Players.iterator();</p><p> while(treader.hasNext())</p><p> {</p><p> Habbo cUser = (Habbo)treader.next();</p><p> StartGame.writeInt(cUser.Id);</p><p> StartGame.writeUTF(cUser.UserName);</p><p> StartGame.writeUTF(cUser.Look);</p><p> StartGame.writeUTF(cUser.Gender.toLowerCase());</p><p> StartGame.writeInt(2); // team?</p><p> }</p><p> StartGame.writeInt(2);</p><p> StartGame.writeInt(2);</p><p> StartGame.writeUTF(RoomModel.Models.get("snowstorm_model" + CurrentWar.ArenaId).SerializeMap);</p><p> StartGame.writeInt(0);</p><p> /*StartGame.writeUTF("ads_background");</p><p> StartGame.writeInt(0);</p><p> StartGame.writeInt(0);</p><p> StartGame.writeInt(0);</p><p> StartGame.writeInt(1);</p><p> StartGame.writeInt(1);</p><p> StartGame.writeInt(0);</p><p> StartGame.writeInt(1);</p><p> StartGame.writeBoolean(false);</p><p> StartGame.writeInt(1);</p><p> StartGame.writeInt(1);</p><p> StartGame.writeInt(5);</p><p> StartGame.writeUTF("state");</p><p> StartGame.writeUTF("0");</p><p> StartGame.writeUTF("offsetZ");</p><p> StartGame.writeUTF("10000");</p><p> StartGame.writeUTF("offsetY");</p><p> StartGame.writeUTF("1542");</p><p> StartGame.writeUTF("imageUrl");</p><p> StartGame.writeUTF("http://images.habbo.com/c_images/DEV_tests/snst_bg_1_a_big.png");</p><p> StartGame.writeUTF("offsetX");</p><p> StartGame.writeUTF("-1166");*/</p><p> </p><p> StartGame.Send(Client.Socket);</p><p> </p><p> ServerMessage UserInfo = new ServerMessage(3180);</p><p> UserInfo.writeInt(User.Id);</p><p> UserInfo.writeUTF(User.UserName);</p><p> UserInfo.writeUTF(User.Look);</p><p> UserInfo.writeUTF(User.Gender.toLowerCase());</p><p> UserInfo.writeInt(2);</p><p> UserInfo.Send(Client.Socket); // User ready!</p><p> </p><p> ServerMessage More = new ServerMessage(3630);</p><p> More.writeInt(0);</p><p> More.Send(Client.Socket);</p><p> </p><p> Thread.sleep(15000);</p><p> ServerMessage Arena = new ServerMessage(2873);</p><p> Arena.writeInt(0);</p><p> Arena.writeUTF("snowwar_arena_0");</p><p> /*Arena.writeInt(5);</p><p> Arena.writeInt(27);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(41535);</p><p> Arena.writeInt(47935);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(1);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(1);</p><p> Arena.writeInt(96000);</p><p> Arena.writeInt(22335);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(6);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(47935);</p><p> Arena.writeInt(32000);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(7);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(15935);</p><p> Arena.writeInt(76800);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(8);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4);</p><p> Arena.writeInt(83200);</p><p> Arena.writeInt(762800);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(5);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(10);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(5);</p><p> Arena.writeInt(150335);</p><p> Arena.writeInt(102400);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(16);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(6);</p><p> Arena.writeInt(83200);</p><p> Arena.writeInt(19200);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(16);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(6);</p><p> Arena.writeInt(83200);</p><p> Arena.writeInt(19200);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(20);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(7);</p><p> Arena.writeInt(7);</p><p> Arena.writeInt(28735);</p><p> Arena.writeInt(81727);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(37);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(8);</p><p> Arena.writeInt(19200);</p><p> Arena.writeInt(64000);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(450);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(9);</p><p> Arena.writeInt(156735);</p><p> Arena.writeInt(89600);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(41);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(10);</p><p> Arena.writeInt(79935);</p><p> Arena.writeInt(121600);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(52);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(1);</p><p> Arena.writeInt(64000);</p><p> Arena.writeInt(12800);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(53);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(12);</p><p> Arena.writeInt(115200);</p><p> Arena.writeInt(47935);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(55);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(13);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(56);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(14);</p><p> Arena.writeInt(143935);</p><p> Arena.writeInt(79935);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(59);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(15);</p><p> Arena.writeInt(47935);</p><p> Arena.writeInt(108800);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(65);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(16);</p><p> Arena.writeInt(32000);</p><p> Arena.writeInt(83200);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(82);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(17);</p><p> Arena.writeInt(64000);</p><p> Arena.writeInt(25600);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(92);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(2);</p><p> Arena.writeInt(18);</p><p> Arena.writeInt(86900);</p><p> Arena.writeInt(150335);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(4800);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(3);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(5);*/</p><p> // user serialize? wtf?</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(0);</p><p> /*</p><p> Arena.writeInt(5);</p><p> Arena.writeInt(21);</p><p> Arena.writeInt(60735);</p><p> Arena.writeInt(15935);</p><p> Arena.writeInt(19);</p><p> Arena.writeInt(5);</p><p> Arena.writeInt(4);</p><p> Arena.writeInt(5);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(19);</p><p> Arena.writeInt(5);</p><p> Arena.writeInt(60735);</p><p> Arena.writeInt(15935);</p><p> Arena.writeInt(0);</p><p> Arena.writeInt(2); //[1]¾?¨[0][10]julian6820[0][5]LOL!![0]+hr-893-31.hd-3095-8.ch-3111-82-62.lg-270-91[0][1]m[0][0][0][5][0][0][0][0][0]í?[0][0]>?[0][0][0][0][0][0][5][0][0][0][4][0][0][0][5][0][0][0][5][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][5][0][0]í?[0][0]>?[0][0][0][0][0][0][0]</p><p> Arena.writeInt(User.Id);</p><p> Arena.writeUTF(User.UserName);</p><p> Arena.writeUTF(User.Motto);</p><p> Arena.writeUTF(User.Look);</p><p> Arena.writeUTF(User.Gender.toLowerCase());*/</p><p> Arena.Send(Client.Socket);</p><p> //[INT] > [0]: [0][0][0][0]</p><p> } catch (Exception e)</p><p> {</p><p> Server.WriteLine(e);</p><p> }</p><p> }</p><p>}</p><p>[/code]</p><p>[/spoiler]</p><p> </p><p><strong>TalkOnSnow</strong></p><p> </p><p>[spoiler]</p><p>[code=java]</p><p> </p><p>public class TalkOnSnow extends Handler implements Runnable {</p><p> private ServerHandler Client;</p><p> private Environment Server;</p><p> private FutureTask T;</p><p> [URL='http://devbest.com/members/override.2227/']Override[/URL]</p><p> public void Load(ServerHandler Client, Environment Server, FutureTask T) throws Exception</p><p> {</p><p> this.Client = Client;</p><p> this.Server = Server;</p><p> this.T = T;</p><p> }</p><p> </p><p> public void run() {</p><p> try {</p><p> Habbo CurrentUser = Client.GetSession();</p><p> int RoomId = CurrentUser.CurrentRoomId;</p><p> Channel Socket = Client.Socket;</p><p> Room R = Room.Rooms.get(RoomId);</p><p> </p><p> String Message = Client.in.readUTF();</p><p> </p><p> ServerMessage Talk = new ServerMessage(ServerEvents.TalkOnSnow);</p><p> Talk.writeInt(CurrentUser.Id);</p><p> Talk.writeUTF(Message);</p><p> Talk.writeInt(0);</p><p> Talk.Send(Socket);</p><p> } catch (Exception e)</p><p> {</p><p> </p><p> }</p><p> </p><p> }</p><p> </p><p>}</p><p>[/code]</p><p>[/spoiler]</p><p> </p><p><em><strong><strong> <em> Greetings </em></strong></strong></em></p></blockquote><p></p>
[QUOTE="Rossum, post: 213548, member: 35261"] [I] Hi friends, I take the trouble to do a couple of things in the SnowStorm & in a hotel that I only want to benefit themselves, I leave some code (in Java) so that ye may be able to create libraries & imports may know :) I leave the code & the name of the documents that must of put, thanks to Itachi by the libraries & some codes, all credits to him bookstores.[/I] [B]CurrentTimesToPlay[/B] [spoiler][code=java] public class CurrentTimesToPlay extends Handler implements Runnable { private ServerHandler Client; private Environment Server; private FutureTask T; [URL='http://devbest.com/members/override.2227/']Override[/URL] public void Load(ServerHandler Client, Environment Server, FutureTask T) throws Exception { this.Client = Client; this.Server = Server; this.T = T; } public void run() { try { ServerMessage Plays = new ServerMessage(ServerEvents.CurrentSnowStormPlays); Plays.writeInt(-1); // full play, anyway, 3 = 3 plays an more idiot things Plays.Send(Client.Socket); } catch (Exception e) { } } } [/code][/spoiler] [B]FriendLeaderBoard[/B] [spoiler] [code=java] public class FriendLeaderBoard extends Handler implements Runnable { private ServerHandler Client; private Environment Server; private FutureTask T; [URL='http://devbest.com/members/override.2227/']Override[/URL] public void Load(ServerHandler Client, Environment Server, FutureTask T) throws Exception { this.Client = Client; this.Server = Server; this.T = T; } public void run() { try { Habbo User = Client.GetSession(); ServerMessage Board = new ServerMessage(ServerEvents.FriendsLeaderBoard); Board.writeInt(1); // count Board.writeInt(User.Id); Board.writeInt(85000); Board.writeInt(1); // position? Board.writeUTF(User.UserName); Board.writeUTF(User.Look); Board.writeUTF(User.Gender.toLowerCase()); Board.writeInt(1); // repeat position (if it's me) Board.Send(Client.Socket); } catch (Exception e) { } } } [/code] [/spoiler] [B]GeneralLeaderBoard[/B] [spoiler] [code=java] public class GeneralLeaderBoard extends Handler implements Runnable { private ServerHandler Client; private Environment Server; private FutureTask T; [URL='http://devbest.com/members/override.2227/']Override[/URL] public void Load(ServerHandler Client, Environment Server, FutureTask T) throws Exception { this.Client = Client; this.Server = Server; this.T = T; } public void run() { try { Habbo User = Client.GetSession(); ServerMessage Board = new ServerMessage(ServerEvents.GeneralLeaderBoard); Board.writeInt(2); // count Board.writeInt(User.Id); Board.writeInt(85000); Board.writeInt(1); // position? Board.writeUTF(User.UserName); Board.writeUTF(User.Look); Board.writeUTF(User.Gender.toLowerCase()); // my data Board.writeInt(User.Id); Board.writeInt(85000); Board.writeInt(1); // position? Board.writeUTF(User.UserName); Board.writeUTF(User.Look); Board.writeUTF(User.Gender.toLowerCase()); Board.writeInt(1); // repeat position (if i'm not in the count?) Board.Send(Client.Socket); } catch (Exception e) { } } } [/code] [/spoiler] [B]InitSnowStorm[/B] [spoiler] [code=java] public class InitSnowStorm extends Handler implements Runnable { private ServerHandler Client; private Environment Server; private FutureTask T; [URL='http://devbest.com/members/override.2227/']Override[/URL] public void Load(ServerHandler Client, Environment Server, FutureTask T) throws Exception { this.Client = Client; this.Server = Server; this.T = T; } public void run() { try { Habbo User = Client.GetSession(); SnowWar.SearchASnowWarForMe(User); SnowWar CurrentWar = User.CurrentWar; ServerMessage Waiting = new ServerMessage(ServerEvents.WaitingForUsers); Waiting.writeInt(CurrentWar.Id); // Waiting.writeUTF("SnowStorm level " + CurrentWar.ArenaId); Waiting.writeInt(0); Waiting.writeInt(CurrentWar.ArenaId); // level Waiting.writeInt(CurrentWar.TeamCount); Waiting.writeInt(CurrentWar.MaxPlayers); Waiting.writeUTF(CurrentWar.Owner); // user name of room creator? Waiting.writeInt(14); Waiting.writeInt(CurrentWar.Players.size()); Iterator reader = CurrentWar.Players.iterator(); while(reader.hasNext()) { Habbo cUser = (Habbo)reader.next(); Waiting.writeInt(cUser.Id); Waiting.writeUTF(cUser.UserName); Waiting.writeUTF(cUser.Look); Waiting.writeUTF(cUser.Gender.toLowerCase()); Waiting.writeInt(-1); Waiting.writeInt(0); // stars Waiting.writeInt(0); // points Waiting.writeInt(10); // points for next level } Waiting.Send(Client.Socket); /*ServerMessage AddUser = new ServerMessage(ServerEvents.AddUsersToGame); AddUser.writeInt(654); AddUser.writeUTF("Itachi2"); AddUser.writeUTF(User.Look); AddUser.writeUTF(User.Gender.toLowerCase()); AddUser.writeInt(-1); AddUser.writeInt(0); // stars AddUser.writeInt(0); // points AddUser.writeInt(10); // points for next level AddUser.writeBoolean(false);*/ //AddUser.Send(Client.Socket); Thread.sleep(10000); // 2807 ServerMessage Waiting2 = new ServerMessage(2807); Waiting2.writeInt(CurrentWar.Id); // Waiting2.writeUTF("SnowStorm level " + CurrentWar.ArenaId); Waiting2.writeInt(0); Waiting2.writeInt(CurrentWar.ArenaId); // level Waiting2.writeInt(CurrentWar.TeamCount); Waiting2.writeInt(CurrentWar.MaxPlayers); Waiting2.writeUTF(CurrentWar.Owner); // user name of room creator? Waiting2.writeInt(14); Waiting2.writeInt(CurrentWar.Players.size()); Iterator reader2 = CurrentWar.BlueTeam.iterator(); while(reader2.hasNext()) { Habbo cUser = (Habbo)reader2.next(); Waiting2.writeInt(cUser.Id); Waiting2.writeUTF(cUser.UserName); Waiting2.writeUTF(cUser.Look); Waiting2.writeUTF(cUser.Gender.toLowerCase()); Waiting2.writeInt(1); // team Waiting2.writeInt(0); // stars Waiting2.writeInt(0); // points Waiting2.writeInt(10); // points for next level } Iterator reader3 = CurrentWar.RedTeam.iterator(); while(reader3.hasNext()) { Habbo cUser = (Habbo)reader3.next(); Waiting2.writeInt(cUser.Id); Waiting2.writeUTF(cUser.UserName); Waiting2.writeUTF(cUser.Look); Waiting2.writeUTF(cUser.Gender.toLowerCase()); Waiting2.writeInt(2); // team Waiting2.writeInt(10); // stars Waiting2.writeInt(20000000); // points Waiting2.writeInt(20000000); // points for next level } Waiting2.Send(Client.Socket); //Thread.sleep(7000); // StartGame! ServerMessage StartGame = new ServerMessage(ServerEvents.StartSnowGame); StartGame.writeInt(0); StartGame.writeInt(CurrentWar.ArenaId); StartGame.writeInt(CurrentWar.TeamCount); StartGame.writeInt(CurrentWar.Players.size()); Iterator treader = CurrentWar.Players.iterator(); while(treader.hasNext()) { Habbo cUser = (Habbo)treader.next(); StartGame.writeInt(cUser.Id); StartGame.writeUTF(cUser.UserName); StartGame.writeUTF(cUser.Look); StartGame.writeUTF(cUser.Gender.toLowerCase()); StartGame.writeInt(2); // team? } StartGame.writeInt(2); StartGame.writeInt(2); StartGame.writeUTF(RoomModel.Models.get("snowstorm_model" + CurrentWar.ArenaId).SerializeMap); StartGame.writeInt(0); /*StartGame.writeUTF("ads_background"); StartGame.writeInt(0); StartGame.writeInt(0); StartGame.writeInt(0); StartGame.writeInt(1); StartGame.writeInt(1); StartGame.writeInt(0); StartGame.writeInt(1); StartGame.writeBoolean(false); StartGame.writeInt(1); StartGame.writeInt(1); StartGame.writeInt(5); StartGame.writeUTF("state"); StartGame.writeUTF("0"); StartGame.writeUTF("offsetZ"); StartGame.writeUTF("10000"); StartGame.writeUTF("offsetY"); StartGame.writeUTF("1542"); StartGame.writeUTF("imageUrl"); StartGame.writeUTF("http://images.habbo.com/c_images/DEV_tests/snst_bg_1_a_big.png"); StartGame.writeUTF("offsetX"); StartGame.writeUTF("-1166");*/ StartGame.Send(Client.Socket); ServerMessage UserInfo = new ServerMessage(3180); UserInfo.writeInt(User.Id); UserInfo.writeUTF(User.UserName); UserInfo.writeUTF(User.Look); UserInfo.writeUTF(User.Gender.toLowerCase()); UserInfo.writeInt(2); UserInfo.Send(Client.Socket); // User ready! ServerMessage More = new ServerMessage(3630); More.writeInt(0); More.Send(Client.Socket); Thread.sleep(15000); ServerMessage Arena = new ServerMessage(2873); Arena.writeInt(0); Arena.writeUTF("snowwar_arena_0"); /*Arena.writeInt(5); Arena.writeInt(27); Arena.writeInt(2); Arena.writeInt(0); Arena.writeInt(41535); Arena.writeInt(47935); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(0); Arena.writeInt(3); Arena.writeInt(0); Arena.writeInt(2); Arena.writeInt(1); Arena.writeInt(2); Arena.writeInt(1); Arena.writeInt(96000); Arena.writeInt(22335); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(6); Arena.writeInt(3); Arena.writeInt(0); Arena.writeInt(2); Arena.writeInt(47935); Arena.writeInt(32000); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(7); Arena.writeInt(3); Arena.writeInt(0); Arena.writeInt(2); Arena.writeInt(3); Arena.writeInt(15935); Arena.writeInt(76800); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(8); Arena.writeInt(3); Arena.writeInt(0); Arena.writeInt(4); Arena.writeInt(83200); Arena.writeInt(762800); Arena.writeInt(0); Arena.writeInt(5); Arena.writeInt(0); Arena.writeInt(10); Arena.writeInt(2); Arena.writeInt(5); Arena.writeInt(150335); Arena.writeInt(102400); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(16); Arena.writeInt(3); Arena.writeInt(0); Arena.writeInt(2); Arena.writeInt(6); Arena.writeInt(83200); Arena.writeInt(19200); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(16); Arena.writeInt(3); Arena.writeInt(0); Arena.writeInt(2); Arena.writeInt(6); Arena.writeInt(83200); Arena.writeInt(19200); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(20); Arena.writeInt(3); Arena.writeInt(7); Arena.writeInt(7); Arena.writeInt(28735); Arena.writeInt(81727); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(37); Arena.writeInt(3); Arena.writeInt(0); Arena.writeInt(2); Arena.writeInt(8); Arena.writeInt(19200); Arena.writeInt(64000); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(450); Arena.writeInt(3); Arena.writeInt(0); Arena.writeInt(2); Arena.writeInt(9); Arena.writeInt(156735); Arena.writeInt(89600); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(41); Arena.writeInt(3); Arena.writeInt(0); Arena.writeInt(2); Arena.writeInt(10); Arena.writeInt(79935); Arena.writeInt(121600); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(52); Arena.writeInt(3); Arena.writeInt(0); Arena.writeInt(2); Arena.writeInt(1); Arena.writeInt(64000); Arena.writeInt(12800); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(53); Arena.writeInt(3); Arena.writeInt(0); Arena.writeInt(2); Arena.writeInt(12); Arena.writeInt(115200); Arena.writeInt(47935); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(55); Arena.writeInt(3); Arena.writeInt(0); Arena.writeInt(2); Arena.writeInt(13); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(56); Arena.writeInt(3); Arena.writeInt(0); Arena.writeInt(2); Arena.writeInt(14); Arena.writeInt(143935); Arena.writeInt(79935); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(59); Arena.writeInt(3); Arena.writeInt(0); Arena.writeInt(2); Arena.writeInt(15); Arena.writeInt(47935); Arena.writeInt(108800); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(65); Arena.writeInt(3); Arena.writeInt(0); Arena.writeInt(2); Arena.writeInt(16); Arena.writeInt(32000); Arena.writeInt(83200); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(82); Arena.writeInt(3); Arena.writeInt(0); Arena.writeInt(2); Arena.writeInt(17); Arena.writeInt(64000); Arena.writeInt(25600); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(92); Arena.writeInt(3); Arena.writeInt(0); Arena.writeInt(2); Arena.writeInt(18); Arena.writeInt(86900); Arena.writeInt(150335); Arena.writeInt(0); Arena.writeInt(4800); Arena.writeInt(0); Arena.writeInt(3); Arena.writeInt(0); Arena.writeInt(5);*/ // user serialize? wtf? Arena.writeInt(0); Arena.writeInt(0); Arena.writeInt(0); Arena.writeInt(0); Arena.writeInt(0); /* Arena.writeInt(5); Arena.writeInt(21); Arena.writeInt(60735); Arena.writeInt(15935); Arena.writeInt(19); Arena.writeInt(5); Arena.writeInt(4); Arena.writeInt(5); Arena.writeInt(0); Arena.writeInt(0); Arena.writeInt(0); Arena.writeInt(19); Arena.writeInt(5); Arena.writeInt(60735); Arena.writeInt(15935); Arena.writeInt(0); Arena.writeInt(2); //[1]¾?¨[0][10]julian6820[0][5]LOL!![0]+hr-893-31.hd-3095-8.ch-3111-82-62.lg-270-91[0][1]m[0][0][0][5][0][0][0][0][0]í?[0][0]>?[0][0][0][0][0][0][5][0][0][0][4][0][0][0][5][0][0][0][5][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][5][0][0]í?[0][0]>?[0][0][0][0][0][0][0] Arena.writeInt(User.Id); Arena.writeUTF(User.UserName); Arena.writeUTF(User.Motto); Arena.writeUTF(User.Look); Arena.writeUTF(User.Gender.toLowerCase());*/ Arena.Send(Client.Socket); //[INT] > [0]: [0][0][0][0] } catch (Exception e) { Server.WriteLine(e); } } } [/code] [/spoiler] [B]TalkOnSnow[/B] [spoiler] [code=java] public class TalkOnSnow extends Handler implements Runnable { private ServerHandler Client; private Environment Server; private FutureTask T; [URL='http://devbest.com/members/override.2227/']Override[/URL] public void Load(ServerHandler Client, Environment Server, FutureTask T) throws Exception { this.Client = Client; this.Server = Server; this.T = T; } public void run() { try { Habbo CurrentUser = Client.GetSession(); int RoomId = CurrentUser.CurrentRoomId; Channel Socket = Client.Socket; Room R = Room.Rooms.get(RoomId); String Message = Client.in.readUTF(); ServerMessage Talk = new ServerMessage(ServerEvents.TalkOnSnow); Talk.writeInt(CurrentUser.Id); Talk.writeUTF(Message); Talk.writeInt(0); Talk.Send(Socket); } catch (Exception e) { } } } [/code] [/spoiler] [I][B][B] [I] Greetings [/I][/B][/B][/I] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
SnowStorm - [CODES] - [JAVA]
Top