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 Tutorials
BcStorm: Fixes (AdBlock fix!)
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="zMagenta" data-source="post: 205616" data-attributes="member: 4512"><p>Hi guys! As I own a BcStorm hotel, I thought I'd release a few fixes for alot of errors people I have with their BcStorm edit. Here you go then!</p><p></p><p>-------</p><p></p><p><u><strong>Missing Coloured Chat</strong></u></p><p></p><p><u><strong><img src="http://i.imgur.com/Shqqb80.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></u></p><p></p><p></p><p>Got the error where some chat bubbles are missing? Simple fix!</p><p></p><p>1) Go to your SWF folder and open `external_variables.txt`</p><p>2) Find the line; <span style="font-family: 'Verdana'"><span style="color: #333333">"disabled.custom.chat.styles"</span></span></p><p><span style="font-family: 'Verdana'"><span style="color: #333333">3) Make sure there are no numbers after. So it should only be: "disabled.custom.chat.styles="</span></span></p><p></p><p><span style="font-family: 'Verdana'"><span style="color: #333333">Reload once changed!</span></span></p><p></p><p>-------</p><p></p><p><u><strong>AdBlock Fix</strong></u></p><p></p><p>If your client stays black when an AdBlock is on - the fix is simple!</p><p></p><p>1) Go to your SWF folder and open `external_variables.txt`</p><p>2) Find the code 'banner.php'</p><p>3) Change it to 'banner.png'</p><p>4) Clear cache and reload!</p><p></p><p>-------</p><p></p><p><u><strong>Battle banzai: Tiles stay green/don't work at all</strong></u></p><p></p><p>If you use battle banzai and the tiles are only green, or don't light up, apply these fixes:</p><p></p><p>1) Open the file 'BattleBanzai.cs' (Butterfly/HabboHotel/Rooms/Games/BattleBanzai.cs)</p><p>2) Replace the whole file with this;</p><p>[CODE]using System;</p><p>using System.Collections;</p><p>using System.Collections.Generic;</p><p>using Butterfly.Collections;</p><p>using Butterfly.HabboHotel.GameClients;</p><p>using Butterfly.HabboHotel.Items;</p><p>using Butterfly.HabboHotel.Pathfinding;</p><p>using Butterfly.Messages;</p><p>using enclosuretest;</p><p>using System.Drawing;</p><p></p><p>namespace Butterfly.HabboHotel.Rooms.Games</p><p>{</p><p> class BattleBanzai</p><p> {</p><p> private Room room;</p><p> internal Hashtable banzaiTiles;</p><p> private bool banzaiStarted;</p><p> private QueuedDictionary<uint, RoomItem> pucks;</p><p> private byte[,] floorMap;</p><p> private GameField field;</p><p> public BattleBanzai(Room room)</p><p> {</p><p> this.room = room;</p><p> this.banzaiTiles = new Hashtable();</p><p> this.banzaiStarted = false;</p><p> this.pucks = new QueuedDictionary<uint, RoomItem>();</p><p> }</p><p></p><p> internal void AddTile(RoomItem item, uint itemID)</p><p> {</p><p> if (!banzaiTiles.ContainsKey(itemID))</p><p> banzaiTiles.Add(itemID, item);</p><p> }</p><p></p><p> internal void RemoveTile(uint itemID)</p><p> {</p><p> banzaiTiles.Remove(itemID);</p><p> }</p><p></p><p> internal void OnCycle()</p><p> {</p><p> pucks.OnCycle();</p><p> }</p><p></p><p> internal void AddPuck(RoomItem item)</p><p> {</p><p> if (!pucks.ContainsKey(item.Id))</p><p> pucks.Add(item.Id, item);</p><p> }</p><p></p><p> internal void RemovePuck(uint itemID)</p><p> {</p><p> pucks.Remove(itemID);</p><p> }</p><p></p><p> internal void OnUserWalk(RoomUser User)</p><p> {</p><p> if (User == null)</p><p> return;</p><p> foreach (RoomItem item in pucks.Values)</p><p> {</p><p> int differenceX = User.X - item.GetX;</p><p> int differenceY = User.Y - item.GetY;</p><p></p><p> if (differenceX <= 1 && differenceX >= -1 && differenceY <= 1 && differenceY >= -1)</p><p> {</p><p> int NewX = differenceX * -1;</p><p> int NewY = differenceY * -1;</p><p></p><p> NewX = NewX + item.GetX;</p><p> NewY = NewY + item.GetY;</p><p></p><p> if (item.interactingBallUser == User.userID && room.GetGameMap().ValidTile(NewX, NewY))</p><p> {</p><p> item.interactingBallUser = 0;</p><p></p><p> MovePuck(item, User.GetClient(), User.Coordinate, item.Coordinate, 6, User.team);</p><p> }</p><p> else if (room.GetGameMap().ValidTile(NewX, NewY))</p><p> {</p><p> MovePuck(item, User.GetClient(), NewX, NewY, User.team);</p><p> }</p><p> }</p><p> }</p><p></p><p> if (banzaiStarted)</p><p> {</p><p> HandleBanzaiTiles(User.Coordinate, User.team, User);</p><p> }</p><p> }</p><p></p><p> internal void BanzaiStart()</p><p> {</p><p> if (banzaiStarted)</p><p> return;</p><p> room.GetGameManager().StartGame();</p><p> floorMap = new byte[room.GetGameMap().Model.MapSizeY, room.GetGameMap().Model.MapSizeX];</p><p> field = new GameField(floorMap, true);</p><p> for (int i = 1; i < 5; i++)</p><p> {</p><p> room.GetGameManager().Points[i] = 0;</p><p> }</p><p></p><p> foreach (RoomItem tile in banzaiTiles.Values)</p><p> {</p><p> tile.ExtraData = "1";</p><p> tile.value = 0;</p><p> tile.team = Team.none;</p><p> tile.UpdateState();</p><p> }</p><p></p><p> room.GetRoomItemHandler().mFloorItems.QueueDelegate(new onCycleDoneDelegate(ResetTiles));</p><p> banzaiStarted = true;</p><p> }</p><p></p><p> internal void ResetTiles()</p><p> {</p><p> foreach (RoomItem item in room.GetRoomItemHandler().mFloorItems.Values)</p><p> {</p><p> InteractionType type = item.GetBaseItem().InteractionType;</p><p></p><p> switch (type)</p><p> {</p><p> case InteractionType.banzaiscoreblue:</p><p> case InteractionType.banzaiscoregreen:</p><p> case InteractionType.banzaiscorered:</p><p> case InteractionType.banzaiscoreyellow:</p><p> {</p><p> item.ExtraData = "0";</p><p> item.UpdateState();</p><p> break;</p><p> }</p><p> }</p><p> }</p><p> }</p><p></p><p> internal void BanzaiEnd()</p><p> {</p><p> room.GetGameManager().StopGame();</p><p> banzaiStarted = false;</p><p> field.destroy();</p><p> this.floorMap = null;</p><p> Team winners = room.GetGameManager().getWinningTeam();</p><p></p><p> if (winners != Team.none)</p><p> {</p><p> foreach (RoomItem tile in banzaiTiles.Values)</p><p> {</p><p> if (tile.team == winners)</p><p> {</p><p> tile.interactionCountHelper = 0;</p><p> tile.UpdateNeeded = true;</p><p> }</p><p> else if (tile.team == Team.none)</p><p> {</p><p> tile.ExtraData = "0";</p><p> tile.UpdateState();</p><p> }</p><p> }</p><p> }</p><p> }</p><p></p><p> internal void MovePuck(RoomItem item, GameClient mover, int newX, int newY, Team team)</p><p> {</p><p> if (!room.GetGameMap().itemCanBePlacedHere(newX, newY))</p><p> return;</p><p></p><p> Point oldRoomCoord = item.Coordinate;</p><p></p><p> Double NewZ = room.GetGameMap().Model.SqFloorHeight[newX, newY];</p><p></p><p> //ServerMessage Message = new ServerMessage(95);</p><p> //Message.AppendUInt(item.Id);</p><p> //Message.AppendUInt(3508);</p><p> //Message.AppendInt32(item.Coordinate.X);</p><p> //Message.AppendInt32(item.Coordinate.Y);</p><p> //Message.AppendInt32(newX);</p><p> //Message.AppendInt32(newY);</p><p> //Message.AppendUInt(4);</p><p> //Message.AppendStringWithBreak(NewZ.ToString());</p><p> //Message.AppendStringWithBreak("H11");</p><p> //Message.AppendInt32(-1);</p><p> //Message.AppendInt32(0);</p><p> //SendMessage(Message);</p><p></p><p> if (oldRoomCoord.X == newX && oldRoomCoord.Y == newY)</p><p> return;</p><p></p><p> item.ExtraData = ((int)team).ToString();</p><p> item.UpdateNeeded = true;</p><p> item.UpdateState();</p><p></p><p></p><p></p><p> ServerMessage mMessage = new ServerMessage();</p><p> mMessage.Init(230); // Cf</p><p> mMessage.AppendInt32(item.Coordinate.X);</p><p> mMessage.AppendInt32(item.Coordinate.Y);</p><p> mMessage.AppendInt32(newX);</p><p> mMessage.AppendInt32(newY);</p><p> mMessage.AppendInt32(1);</p><p> mMessage.AppendInt32(item.Id);</p><p> mMessage.AppendString(TextHandling.GetString(item.GetZ));</p><p> mMessage.AppendString(TextHandling.GetString(NewZ));</p><p> mMessage.AppendInt32(1);</p><p> room.SendMessage(mMessage);</p><p></p><p></p><p></p><p></p><p> //HandleBanzaiTiles(new Coord(item.GetX, item.GetY), team);</p><p> room.GetRoomItemHandler().SetFloorItem(mover, item, newX, newY, item.Rot, false, false, false, false);</p><p></p><p> if (mover == null || mover.GetHabbo() == null)</p><p> return;</p><p></p><p> RoomUser user = mover.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(mover.GetHabbo().Id);</p><p> if (banzaiStarted)</p><p> {</p><p> HandleBanzaiTiles(new Point(newX, newY), team, user);</p><p> }</p><p> }</p><p></p><p> internal void MovePuck(RoomItem item, GameClient client, Point user, Point ball, int length, Team team)</p><p> {</p><p> int differenceX = user.X - ball.X;</p><p> int differenceY = user.Y - ball.Y;</p><p></p><p> if (differenceX <= 1 && differenceX >= -1 && differenceY <= 1 && differenceY >= -1)</p><p> {</p><p> List<Point> affectedTiles = new List<Point>();</p><p> int newX = ball.X;</p><p> int newY = ball.Y;</p><p> for (int i = 1; i < length; i++)</p><p> {</p><p> newX = differenceX * -i;</p><p> newY = differenceY * -i;</p><p></p><p> newX = newX + item.GetX;</p><p> newY = newY + item.GetY;</p><p></p><p> if (!room.GetGameMap().itemCanBePlacedHere(newX, newY))</p><p> {</p><p> if (i == 1)</p><p> break;</p><p></p><p> if (i != length)</p><p> affectedTiles.Add(new Point(newX, newY));</p><p> i = i - 1;</p><p> newX = differenceX * -i;</p><p> newY = differenceY * -i;</p><p></p><p> newX = newX + item.GetX;</p><p> newY = newY + item.GetY;</p><p> break;</p><p> }</p><p> else</p><p> {</p><p> if (i != length)</p><p> affectedTiles.Add(new Point(newX, newY));</p><p> }</p><p> }</p><p> if (client == null || client.GetHabbo() == null)</p><p> return;</p><p></p><p> RoomUser _user = client.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(client.GetHabbo().Id);</p><p></p><p> foreach (Point coord in affectedTiles)</p><p> {</p><p> HandleBanzaiTiles(coord, team, _user);</p><p> }</p><p></p><p> if (newX != ball.X || newY != ball.Y)</p><p> MovePuck(item, client, newX, newY, team);</p><p> }</p><p> }</p><p></p><p> private void SetTile(RoomItem item, Team team, RoomUser user)</p><p> {</p><p> if (item.team == team)</p><p> {</p><p> if (item.value < 3)</p><p> {</p><p> item.value++;</p><p> if (item.value == 3)</p><p> {</p><p> ButterflyEnvironment.GetGame().GetQuestManager().GetQuests().UpdateState("GAME_BB_LOCK_TILE", user.GetClient());</p><p> room.GetGameManager().AddPointToTeam(item.team, user);</p><p> field.updateLocation(item.GetX, item.GetY, (byte)team);</p><p> List<PointField> gfield = field.doUpdate();</p><p> Team t;</p><p> foreach (PointField gameField in gfield)</p><p> {</p><p> t = (Team)gameField.forValue;</p><p> foreach (Point p in gameField.getPoints())</p><p> {</p><p> HandleMaxBanzaiTiles(new Point(p.X, p.Y), t, user);</p><p> floorMap[p.Y, p.X] = gameField.forValue;</p><p> }</p><p> }</p><p></p><p> }</p><p> }</p><p> }</p><p> else</p><p> {</p><p> if (item.value < 3)</p><p> {</p><p> item.team = team;</p><p> item.value = 1;</p><p> }</p><p> }</p><p></p><p></p><p> int newColor = item.value + ((int)item.team * 3) - 1;</p><p> item.ExtraData = newColor.ToString();</p><p> }</p><p></p><p> private void HandleBanzaiTiles(Point coord, Team team, RoomUser user)</p><p> {</p><p> if (team == Team.none)</p><p> return;</p><p></p><p> List<RoomItem> items = room.GetGameMap().GetCoordinatedItems(coord);</p><p> foreach (RoomItem _item in banzaiTiles.Values)</p><p> {</p><p> if (_item.GetBaseItem().InteractionType != InteractionType.banzaifloor)</p><p> continue;</p><p></p><p> if (_item.GetX != coord.X || _item.GetY != coord.Y)</p><p> continue;</p><p></p><p> SetTile(_item, team, user);</p><p> _item.UpdateState(false, true);</p><p> }</p><p> }</p><p></p><p> private void HandleMaxBanzaiTiles(Point coord, Team team, RoomUser user)</p><p> {</p><p> if (team == Team.none)</p><p> return;</p><p></p><p> List<RoomItem> items = room.GetGameMap().GetCoordinatedItems(coord);</p><p> foreach (RoomItem _item in banzaiTiles.Values)</p><p> {</p><p> if (_item.GetBaseItem().InteractionType != InteractionType.banzaifloor)</p><p> continue;</p><p></p><p> if (_item.GetX != coord.X || _item.GetY != coord.Y)</p><p> continue;</p><p> if (_item.value == 3)</p><p> return;</p><p></p><p> SetMaxForTile(_item, team);</p><p></p><p> room.GetGameManager().AddPointToTeam(team, user);</p><p></p><p> _item.UpdateState(false, true);</p><p> }</p><p> }</p><p></p><p> private static void SetMaxForTile(RoomItem item, Team team)</p><p> {</p><p> if (item.value < 3)</p><p> {</p><p> item.value = 3;</p><p> item.team = team;</p><p> }</p><p></p><p> int newColor = item.value + ((int)item.team * 3) - 1;</p><p> item.ExtraData = newColor.ToString();</p><p> }</p><p></p><p> internal bool isBanzaiActive { get { return banzaiStarted; } }</p><p></p><p> internal void Destroy()</p><p> {</p><p> banzaiTiles.Clear();</p><p> pucks.Clear();</p><p> Array.Clear(floorMap, 0, floorMap.Length);</p><p> field.destroy();</p><p></p><p> room = null;</p><p> banzaiTiles = null;</p><p> pucks = null;</p><p> floorMap = null;</p><p> field = null;</p><p> }</p><p> }</p><p>}[/CODE]</p><p></p><p><span style="font-size: 10px"><em>Credits to Nicholas (DDoS Attack)</em></span></p><p></p><p>-------</p><p></p><p><u><strong>Wall items: Wall interactions</strong></u></p><p></p><p>Interactions types don't work? Apply these fixes!</p><p></p><p>1) Find the file 'incoming.cs'</p><p>2) Find 'Incoming.HandleWallItem'</p><p>3) Change to;</p><p>[CODE]Incoming.HandleWallItem = 2622;[/CODE]</p><p></p><p>-------</p><p></p><p><u><strong>Eject Bug</strong></u></p><p></p><p>Got issue when a user places down furni it comes up with eject even via trade? Well just apply these fixes!</p><p></p><p>1) Find in trade.cs;</p><p>[CODE]adapter.runFastQuery(string.Concat(new object[] { "UPDATE items_users SET user_id = ", this.twoId, " WHERE item_id = ", item.Id })); [/CODE]</p><p></p><p>add this under;</p><p>[CODE]adapter.runFastQuery(string.Concat(new object[] { "UPDATE items SET placedBy = '", this.twoId, "' WHERE item_id = '", item.Id, "'" }));[/CODE]</p><p></p><p>2) Find in trade.cs;</p><p>[CODE]adapter.runFastQuery(string.Concat(new object[] { "UPDATE items_users SET user_id = ", this.oneId, " WHERE item_id = ", item.Id }));[/CODE]</p><p></p><p>add this under;</p><p>[CODE]adapter.runFastQuery(string.Concat(new object[] { "UPDATE items SET placedBy = '", this.oneId, "' WHERE item_id = '", item.Id, "'" }));[/CODE]</p><p></p><p>Should fix all ownage issues. (Credits to me; only 10 minutes work!)</p><p></p><p></p><p>Any other fixes you want done? Comment and I'll see if I can get them done. Likes are welcome! <img src="/styles/default/xenforo/smilies/emojione/smile.png" class="smilie" loading="lazy" alt=":)" title="Smile :)" data-shortname=":)" /></p></blockquote><p></p>
[QUOTE="zMagenta, post: 205616, member: 4512"] Hi guys! As I own a BcStorm hotel, I thought I'd release a few fixes for alot of errors people I have with their BcStorm edit. Here you go then! ------- [U][B]Missing Coloured Chat[/B][/U] [U][B][IMG]http://i.imgur.com/Shqqb80.png[/IMG][/B][/U] Got the error where some chat bubbles are missing? Simple fix! 1) Go to your SWF folder and open `external_variables.txt` 2) Find the line; [FONT=Verdana][COLOR=#333333]"disabled.custom.chat.styles" 3) Make sure there are no numbers after. So it should only be: "disabled.custom.chat.styles="[/COLOR][/FONT] [FONT=Verdana][COLOR=#333333]Reload once changed![/COLOR][/FONT] ------- [U][B]AdBlock Fix[/B][/U] If your client stays black when an AdBlock is on - the fix is simple! 1) Go to your SWF folder and open `external_variables.txt` 2) Find the code 'banner.php' 3) Change it to 'banner.png' 4) Clear cache and reload! ------- [U][B]Battle banzai: Tiles stay green/don't work at all[/B][/U] If you use battle banzai and the tiles are only green, or don't light up, apply these fixes: 1) Open the file 'BattleBanzai.cs' (Butterfly/HabboHotel/Rooms/Games/BattleBanzai.cs) 2) Replace the whole file with this; [CODE]using System; using System.Collections; using System.Collections.Generic; using Butterfly.Collections; using Butterfly.HabboHotel.GameClients; using Butterfly.HabboHotel.Items; using Butterfly.HabboHotel.Pathfinding; using Butterfly.Messages; using enclosuretest; using System.Drawing; namespace Butterfly.HabboHotel.Rooms.Games { class BattleBanzai { private Room room; internal Hashtable banzaiTiles; private bool banzaiStarted; private QueuedDictionary<uint, RoomItem> pucks; private byte[,] floorMap; private GameField field; public BattleBanzai(Room room) { this.room = room; this.banzaiTiles = new Hashtable(); this.banzaiStarted = false; this.pucks = new QueuedDictionary<uint, RoomItem>(); } internal void AddTile(RoomItem item, uint itemID) { if (!banzaiTiles.ContainsKey(itemID)) banzaiTiles.Add(itemID, item); } internal void RemoveTile(uint itemID) { banzaiTiles.Remove(itemID); } internal void OnCycle() { pucks.OnCycle(); } internal void AddPuck(RoomItem item) { if (!pucks.ContainsKey(item.Id)) pucks.Add(item.Id, item); } internal void RemovePuck(uint itemID) { pucks.Remove(itemID); } internal void OnUserWalk(RoomUser User) { if (User == null) return; foreach (RoomItem item in pucks.Values) { int differenceX = User.X - item.GetX; int differenceY = User.Y - item.GetY; if (differenceX <= 1 && differenceX >= -1 && differenceY <= 1 && differenceY >= -1) { int NewX = differenceX * -1; int NewY = differenceY * -1; NewX = NewX + item.GetX; NewY = NewY + item.GetY; if (item.interactingBallUser == User.userID && room.GetGameMap().ValidTile(NewX, NewY)) { item.interactingBallUser = 0; MovePuck(item, User.GetClient(), User.Coordinate, item.Coordinate, 6, User.team); } else if (room.GetGameMap().ValidTile(NewX, NewY)) { MovePuck(item, User.GetClient(), NewX, NewY, User.team); } } } if (banzaiStarted) { HandleBanzaiTiles(User.Coordinate, User.team, User); } } internal void BanzaiStart() { if (banzaiStarted) return; room.GetGameManager().StartGame(); floorMap = new byte[room.GetGameMap().Model.MapSizeY, room.GetGameMap().Model.MapSizeX]; field = new GameField(floorMap, true); for (int i = 1; i < 5; i++) { room.GetGameManager().Points[i] = 0; } foreach (RoomItem tile in banzaiTiles.Values) { tile.ExtraData = "1"; tile.value = 0; tile.team = Team.none; tile.UpdateState(); } room.GetRoomItemHandler().mFloorItems.QueueDelegate(new onCycleDoneDelegate(ResetTiles)); banzaiStarted = true; } internal void ResetTiles() { foreach (RoomItem item in room.GetRoomItemHandler().mFloorItems.Values) { InteractionType type = item.GetBaseItem().InteractionType; switch (type) { case InteractionType.banzaiscoreblue: case InteractionType.banzaiscoregreen: case InteractionType.banzaiscorered: case InteractionType.banzaiscoreyellow: { item.ExtraData = "0"; item.UpdateState(); break; } } } } internal void BanzaiEnd() { room.GetGameManager().StopGame(); banzaiStarted = false; field.destroy(); this.floorMap = null; Team winners = room.GetGameManager().getWinningTeam(); if (winners != Team.none) { foreach (RoomItem tile in banzaiTiles.Values) { if (tile.team == winners) { tile.interactionCountHelper = 0; tile.UpdateNeeded = true; } else if (tile.team == Team.none) { tile.ExtraData = "0"; tile.UpdateState(); } } } } internal void MovePuck(RoomItem item, GameClient mover, int newX, int newY, Team team) { if (!room.GetGameMap().itemCanBePlacedHere(newX, newY)) return; Point oldRoomCoord = item.Coordinate; Double NewZ = room.GetGameMap().Model.SqFloorHeight[newX, newY]; //ServerMessage Message = new ServerMessage(95); //Message.AppendUInt(item.Id); //Message.AppendUInt(3508); //Message.AppendInt32(item.Coordinate.X); //Message.AppendInt32(item.Coordinate.Y); //Message.AppendInt32(newX); //Message.AppendInt32(newY); //Message.AppendUInt(4); //Message.AppendStringWithBreak(NewZ.ToString()); //Message.AppendStringWithBreak("H11"); //Message.AppendInt32(-1); //Message.AppendInt32(0); //SendMessage(Message); if (oldRoomCoord.X == newX && oldRoomCoord.Y == newY) return; item.ExtraData = ((int)team).ToString(); item.UpdateNeeded = true; item.UpdateState(); ServerMessage mMessage = new ServerMessage(); mMessage.Init(230); // Cf mMessage.AppendInt32(item.Coordinate.X); mMessage.AppendInt32(item.Coordinate.Y); mMessage.AppendInt32(newX); mMessage.AppendInt32(newY); mMessage.AppendInt32(1); mMessage.AppendInt32(item.Id); mMessage.AppendString(TextHandling.GetString(item.GetZ)); mMessage.AppendString(TextHandling.GetString(NewZ)); mMessage.AppendInt32(1); room.SendMessage(mMessage); //HandleBanzaiTiles(new Coord(item.GetX, item.GetY), team); room.GetRoomItemHandler().SetFloorItem(mover, item, newX, newY, item.Rot, false, false, false, false); if (mover == null || mover.GetHabbo() == null) return; RoomUser user = mover.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(mover.GetHabbo().Id); if (banzaiStarted) { HandleBanzaiTiles(new Point(newX, newY), team, user); } } internal void MovePuck(RoomItem item, GameClient client, Point user, Point ball, int length, Team team) { int differenceX = user.X - ball.X; int differenceY = user.Y - ball.Y; if (differenceX <= 1 && differenceX >= -1 && differenceY <= 1 && differenceY >= -1) { List<Point> affectedTiles = new List<Point>(); int newX = ball.X; int newY = ball.Y; for (int i = 1; i < length; i++) { newX = differenceX * -i; newY = differenceY * -i; newX = newX + item.GetX; newY = newY + item.GetY; if (!room.GetGameMap().itemCanBePlacedHere(newX, newY)) { if (i == 1) break; if (i != length) affectedTiles.Add(new Point(newX, newY)); i = i - 1; newX = differenceX * -i; newY = differenceY * -i; newX = newX + item.GetX; newY = newY + item.GetY; break; } else { if (i != length) affectedTiles.Add(new Point(newX, newY)); } } if (client == null || client.GetHabbo() == null) return; RoomUser _user = client.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(client.GetHabbo().Id); foreach (Point coord in affectedTiles) { HandleBanzaiTiles(coord, team, _user); } if (newX != ball.X || newY != ball.Y) MovePuck(item, client, newX, newY, team); } } private void SetTile(RoomItem item, Team team, RoomUser user) { if (item.team == team) { if (item.value < 3) { item.value++; if (item.value == 3) { ButterflyEnvironment.GetGame().GetQuestManager().GetQuests().UpdateState("GAME_BB_LOCK_TILE", user.GetClient()); room.GetGameManager().AddPointToTeam(item.team, user); field.updateLocation(item.GetX, item.GetY, (byte)team); List<PointField> gfield = field.doUpdate(); Team t; foreach (PointField gameField in gfield) { t = (Team)gameField.forValue; foreach (Point p in gameField.getPoints()) { HandleMaxBanzaiTiles(new Point(p.X, p.Y), t, user); floorMap[p.Y, p.X] = gameField.forValue; } } } } } else { if (item.value < 3) { item.team = team; item.value = 1; } } int newColor = item.value + ((int)item.team * 3) - 1; item.ExtraData = newColor.ToString(); } private void HandleBanzaiTiles(Point coord, Team team, RoomUser user) { if (team == Team.none) return; List<RoomItem> items = room.GetGameMap().GetCoordinatedItems(coord); foreach (RoomItem _item in banzaiTiles.Values) { if (_item.GetBaseItem().InteractionType != InteractionType.banzaifloor) continue; if (_item.GetX != coord.X || _item.GetY != coord.Y) continue; SetTile(_item, team, user); _item.UpdateState(false, true); } } private void HandleMaxBanzaiTiles(Point coord, Team team, RoomUser user) { if (team == Team.none) return; List<RoomItem> items = room.GetGameMap().GetCoordinatedItems(coord); foreach (RoomItem _item in banzaiTiles.Values) { if (_item.GetBaseItem().InteractionType != InteractionType.banzaifloor) continue; if (_item.GetX != coord.X || _item.GetY != coord.Y) continue; if (_item.value == 3) return; SetMaxForTile(_item, team); room.GetGameManager().AddPointToTeam(team, user); _item.UpdateState(false, true); } } private static void SetMaxForTile(RoomItem item, Team team) { if (item.value < 3) { item.value = 3; item.team = team; } int newColor = item.value + ((int)item.team * 3) - 1; item.ExtraData = newColor.ToString(); } internal bool isBanzaiActive { get { return banzaiStarted; } } internal void Destroy() { banzaiTiles.Clear(); pucks.Clear(); Array.Clear(floorMap, 0, floorMap.Length); field.destroy(); room = null; banzaiTiles = null; pucks = null; floorMap = null; field = null; } } }[/CODE] [SIZE=2][I]Credits to Nicholas (DDoS Attack)[/I][/SIZE] ------- [U][B]Wall items: Wall interactions[/B][/U] Interactions types don't work? Apply these fixes! 1) Find the file 'incoming.cs' 2) Find 'Incoming.HandleWallItem' 3) Change to; [CODE]Incoming.HandleWallItem = 2622;[/CODE] ------- [U][B]Eject Bug[/B][/U] Got issue when a user places down furni it comes up with eject even via trade? Well just apply these fixes! 1) Find in trade.cs; [CODE]adapter.runFastQuery(string.Concat(new object[] { "UPDATE items_users SET user_id = ", this.twoId, " WHERE item_id = ", item.Id })); [/CODE] add this under; [CODE]adapter.runFastQuery(string.Concat(new object[] { "UPDATE items SET placedBy = '", this.twoId, "' WHERE item_id = '", item.Id, "'" }));[/CODE] 2) Find in trade.cs; [CODE]adapter.runFastQuery(string.Concat(new object[] { "UPDATE items_users SET user_id = ", this.oneId, " WHERE item_id = ", item.Id }));[/CODE] add this under; [CODE]adapter.runFastQuery(string.Concat(new object[] { "UPDATE items SET placedBy = '", this.oneId, "' WHERE item_id = '", item.Id, "'" }));[/CODE] Should fix all ownage issues. (Credits to me; only 10 minutes work!) Any other fixes you want done? Comment and I'll see if I can get them done. Likes are welcome! :) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Tutorials
BcStorm: Fixes (AdBlock fix!)
Top