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 Q&A
Plus Emulator - Websockets doesn't work
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="RobinLA" data-source="post: 465480" data-attributes="member: 97285"><p>Hello everyone, </p><p></p><p>I try to explain my problem.</p><p>I just try to setup a RP-Hotel, but the websockets doesn't work perfectly.</p><p></p><p>Near the catalogue icon is another icon, when I click on it it's opening the "Gang"-Menu (Websockets) without any problems. (So the Websockets should work)</p><p></p><p>But every websockets which hasn't any button to click doen't work.</p><p></p><p>For examble: </p><p>I have a "Taxi"-Function. When you walk over a "Taxi"-Sign, then it should open a websockets window - but it doesn't work. (The furni is correctly linked)</p><p></p><p>Another examble:</p><p>At the top left corner of the client it should have an "health" and "energy" bar, but they aren't there...</p><p></p><p>Here is the source code for the "Taxi"-function.</p><p>Can someone please help me?</p><p></p><p>File: InteractorTaxi.cs</p><p>[CODE=csharp]using System;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Threading;</p><p>using System.Collections.Generic;</p><p>using System.Windows.Forms;</p><p>using Plus.Database.Interfaces;</p><p>using Plus.HabboHotel.Moderation;</p><p>using Plus.HabboHotel.GameClients;</p><p>using System.Collections;</p><p>using System.Collections.Concurrent;</p><p>using System.Drawing;</p><p></p><p>using Plus.Communication.Packets.Outgoing.Rooms.Avatar;</p><p>using Plus.Core;</p><p>using Plus.HabboHotel.Items;</p><p>using Plus.HabboHotel.Rooms;</p><p>using Plus.HabboHotel.Rooms.AI;</p><p>using Plus.HabboHotel.Quests;</p><p>using Plus.HabboHotel.Rooms.Games;</p><p></p><p>using Plus.HabboHotel.Users;</p><p>using Plus.HabboHotel.Users.Inventory;</p><p>using Plus.Communication.Packets.Incoming;</p><p></p><p>using Plus.Utilities;</p><p></p><p>using System.Data;</p><p>using Plus.Communication.Packets.Outgoing.Rooms.Session;</p><p>using Plus.Communication.Packets.Outgoing.Rooms.Engine;</p><p>using Plus.Communication.Packets.Outgoing.Rooms.Permissions;</p><p>using Plus.Communication.Packets.Outgoing.Handshake;</p><p>using System.Text.RegularExpressions;</p><p>using Plus.HabboHotel.Rooms.Games.Teams;</p><p>using System.Threading.Tasks;</p><p>using Plus.Communication.Packets.Outgoing.Rooms.Notifications;</p><p>using Plus.HabboHotel.Pathfinding;</p><p>using Plus.Communication.Packets.Outgoing;</p><p>using Plus.Communication.Packets.Outgoing.Inventory.Purse;</p><p>using Plus.Communication.Packets.Outgoing.Rooms.Chat;</p><p></p><p>namespace Plus.HabboHotel.Items.Interactor</p><p>{</p><p> public class InteractorTaxi : IFurniInteractor</p><p> {</p><p> public void OnPlace(GameClient Session, Item Item)</p><p> {</p><p> }</p><p></p><p> public void OnRemove(GameClient Session, Item Item)</p><p> {</p><p> }</p><p></p><p> public void OnTrigger(GameClient Session, Item Item, int Request, bool HasRights)</p><p> {</p><p> RoomUser User = Item.GetRoom().GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);</p><p> if (!Gamemap.TilesTouching(Item.GetX, Item.GetY, User.Coordinate.X, User.Coordinate.Y) && Item.GetBaseItem().SpriteId != 3090) //6116</p><p> {</p><p> User.MoveToIfCanWalk(Item.SquareInFront);</p><p> return;</p><p> }</p><p></p><p> User.usingTaxi = true;</p><p> User.SetRot(Pathfinding.Rotation.Calculate(User.Coordinate.X, User.Coordinate.Y, Item.GetX, Item.GetY), false);</p><p> PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Session, "TaxiWebEvent;open;");</p><p></p><p> }</p><p></p><p> public void OnWiredTrigger(Item Item)</p><p> {</p><p> }</p><p> }</p><p>}[/CODE]</p><p></p><p>File: TaxiWebEvent.cs</p><p>[CODE=csharp]using System;</p><p>using System.Collections.Generic;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Threading.Tasks;</p><p>using Plus;</p><p>using Fleck;</p><p>using Plus.HabboHotel.GameClients;</p><p>using System.Text.RegularExpressions;</p><p>using Plus.Database.Interfaces;</p><p>using Plus.HabboHotel.Rooms;</p><p>using Plus.Communication.Packets.Outgoing.Inventory.Purse;</p><p>using System.Data;</p><p>using System.Threading;</p><p></p><p>namespace Bobba.HabboRoleplay.Web.Outgoing</p><p>{</p><p> class TaxiWebEvent : IWebEvent</p><p> {</p><p> /// <summary></p><p> /// Executes socket data.</p><p> /// </summary></p><p> /// <param name="Client"></param></p><p> /// <param name="Data"></param></p><p> /// <param name="Socket"></param></p><p> public void Execute(GameClient Client, string Data, IWebSocketConnection Socket)</p><p> {</p><p></p><p> if (!PlusEnvironment.GetGame().GetWebEventManager().SocketReady(Client, true) || !PlusEnvironment.GetGame().GetWebEventManager().SocketReady(Socket))</p><p> return;</p><p></p><p> string Action = (Data.Contains(',') ? Data.Split(',')[0] : Data);</p><p></p><p> switch (Action)</p><p> {</p><p></p><p> #region Highland Hospital</p><p> case "Genesungshalt":</p><p> {</p><p> Room Room = Client.GetHabbo().CurrentRoom;</p><p> if (Room == null)</p><p> return;</p><p></p><p> RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Client.GetHabbo().Id);</p><p> if (User == null)</p><p> return;</p><p></p><p> if (Convert.ToInt32(13) == Client.GetHabbo().CurrentRoomId)</p><p> {</p><p> Client.SendWhisper("Du befindest dich bereits im Genesungshalt.");</p><p> return;</p><p> }</p><p></p><p> if (Client.GetHabbo().Credits < 13)</p><p> {</p><p> Client.SendWhisper("Du brauchst 13 Euro, um ein Taxi zu Genesungshalt zu rufen.");</p><p> return;</p><p> }</p><p></p><p> PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "taxi;close;");</p><p> User.GetClient().Shout("*Ruft ein Taxi zu Genesungshalt*", 5);</p><p> User.ApplyEffect(596);</p><p> User.usingTaxi = true;</p><p> System.Timers.Timer Timer = new System.Timers.Timer(5000);</p><p> Timer.Interval = 5000;</p><p> Timer.Elapsed += delegate</p><p> {</p><p> if (User.usingTaxi == true)</p><p> {</p><p> Client.GetHabbo().Credits -= 13;</p><p> Client.GetHabbo().CanChangeRoom = true;</p><p> Client.GetHabbo().PrepareRoom(13, "");</p><p> }</p><p> Timer.Stop();</p><p> };</p><p> Timer.Start();</p><p> Client.SendMessage(new CreditBalanceComposer(Client.GetHabbo().Credits));</p><p> PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "my_stats;" + Client.GetHabbo().Credits + ";" + Client.GetHabbo().Duckets + ";" + Client.GetHabbo().EventPoints);</p><p> }</p><p> break;</p><p> #endregion</p><p></p><p> #region Lehkreuz</p><p> case "Lehkreuz":</p><p> {</p><p> Room Room = Client.GetHabbo().CurrentRoom;</p><p> if (Room == null)</p><p> return;</p><p></p><p> RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Client.GetHabbo().Id);</p><p> if (User == null)</p><p> return;</p><p></p><p> if (Convert.ToInt32(14) == Client.GetHabbo().CurrentRoomId)</p><p> {</p><p> Client.SendWhisper("Du befindest dich bereits im Lehkreuz.");</p><p> return;</p><p> }</p><p></p><p> if (Client.GetHabbo().Credits < 13)</p><p> {</p><p> Client.SendWhisper("Du brauchst 13 Euro, um ein Taxi zu Lehkreuz zu rufen.");</p><p> return;</p><p> }</p><p></p><p> PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "taxi;close;");</p><p> User.GetClient().Shout("*Ruft ein Taxi zu Lehkreuz*", 5);</p><p> User.ApplyEffect(596);</p><p> User.usingTaxi = true;</p><p> User.Frozen = true;</p><p> Thread.Sleep(5000);</p><p> Client.GetHabbo().Credits -= 13;</p><p> Client.GetHabbo().CanChangeRoom = true;</p><p> Client.GetHabbo().PrepareRoom(14, "");</p><p></p><p> Client.SendMessage(new CreditBalanceComposer(Client.GetHabbo().Credits));</p><p> PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "my_stats;" + Client.GetHabbo().Credits + ";" + Client.GetHabbo().Duckets + ";" + Client.GetHabbo().EventPoints);</p><p> }</p><p> break;</p><p> #endregion</p><p></p><p> #region TiffsWeg</p><p> case "TiffsWeg":</p><p> {</p><p> Room Room = Client.GetHabbo().CurrentRoom;</p><p> if (Room == null)</p><p> return;</p><p></p><p> RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Client.GetHabbo().Id);</p><p> if (User == null)</p><p> return;</p><p></p><p> if (Convert.ToInt32(15) == Client.GetHabbo().CurrentRoomId)</p><p> {</p><p> Client.SendWhisper("Du befindest dich bereits im Tiff's Weg.");</p><p> return;</p><p> }</p><p></p><p> if (Client.GetHabbo().Credits < 13)</p><p> {</p><p> Client.SendWhisper("Du brauchst 13 Euro, um ein Taxi zu Tiff's Weg zu rufen.");</p><p> return;</p><p> }</p><p></p><p> PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "taxi;close;");</p><p> User.GetClient().Shout("*Ruft ein Taxi zu Tiff's Weg*", 5);</p><p> User.ApplyEffect(596);</p><p> User.usingTaxi = true;</p><p> User.Frozen = true;</p><p> Thread.Sleep(5000);</p><p> Client.GetHabbo().Credits -= 13;</p><p> Client.GetHabbo().CanChangeRoom = true;</p><p> Client.GetHabbo().PrepareRoom(15, "");</p><p></p><p> Client.SendMessage(new CreditBalanceComposer(Client.GetHabbo().Credits));</p><p> PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "my_stats;" + Client.GetHabbo().Credits + ";" + Client.GetHabbo().Duckets + ";" + Client.GetHabbo().EventPoints);</p><p> }</p><p> break;</p><p> #endregion</p><p></p><p> #region ZudenEchos</p><p> case "ZudenEchos":</p><p> {</p><p> Room Room = Client.GetHabbo().CurrentRoom;</p><p> if (Room == null)</p><p> return;</p><p></p><p> RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Client.GetHabbo().Id);</p><p> if (User == null)</p><p> return;</p><p></p><p> if (Convert.ToInt32(18) == Client.GetHabbo().CurrentRoomId)</p><p> {</p><p> Client.SendWhisper("Du befindest dich bereits im Zu den Echos.");</p><p> return;</p><p> }</p><p></p><p> if (Client.GetHabbo().Credits < 13)</p><p> {</p><p> Client.SendWhisper("Du brauchst 13 Euro, um ein Taxi zu Zu den Echos zu rufen.");</p><p> return;</p><p> }</p><p></p><p> PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "taxi;close;");</p><p> User.GetClient().Shout("*Ruft ein Taxi zu Zu den Echos*", 5);</p><p> User.ApplyEffect(596);</p><p> User.usingTaxi = true;</p><p> User.Frozen = true;</p><p> Thread.Sleep(5000);</p><p> Client.GetHabbo().Credits -= 13;</p><p> Client.GetHabbo().CanChangeRoom = true;</p><p> Client.GetHabbo().PrepareRoom(18, "");</p><p></p><p> Client.SendMessage(new CreditBalanceComposer(Client.GetHabbo().Credits));</p><p> PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "my_stats;" + Client.GetHabbo().Credits + ";" + Client.GetHabbo().Duckets + ";" + Client.GetHabbo().EventPoints);</p><p> }</p><p> break;</p><p> #endregion</p><p></p><p> #region BeidenWohlhabenden</p><p> case "BeidenWohlhabenden":</p><p> {</p><p> Room Room = Client.GetHabbo().CurrentRoom;</p><p> if (Room == null)</p><p> return;</p><p></p><p> RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Client.GetHabbo().Id);</p><p> if (User == null)</p><p> return;</p><p></p><p> if (Convert.ToInt32(21) == Client.GetHabbo().CurrentRoomId)</p><p> {</p><p> Client.SendWhisper("Du befindest dich bereits im Bei den Wohlhabenden");</p><p> return;</p><p> }</p><p></p><p> if (Client.GetHabbo().Credits < 13)</p><p> {</p><p> Client.SendWhisper("Du brauchst 13 Euro, um ein Taxi zu Bei den Wohlhabenden zu rufen.");</p><p> return;</p><p> }</p><p></p><p> PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "taxi;close;");</p><p> User.GetClient().Shout("*Ruft ein Taxi zu Bei den Wohlhabenden*", 5);</p><p> User.ApplyEffect(596);</p><p> User.usingTaxi = true;</p><p> User.Frozen = true;</p><p> Thread.Sleep(5000);</p><p> Client.GetHabbo().Credits -= 13;</p><p> Client.GetHabbo().CanChangeRoom = true;</p><p> Client.GetHabbo().PrepareRoom(21, "");</p><p></p><p> Client.SendMessage(new CreditBalanceComposer(Client.GetHabbo().Credits));</p><p> PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "my_stats;" + Client.GetHabbo().Credits + ";" + Client.GetHabbo().Duckets + ";" + Client.GetHabbo().EventPoints);</p><p> }</p><p> break;</p><p> #endregion</p><p> }</p><p> }</p><p> }</p><p>}[/CODE]</p><p></p><p>File: ClientGetTaxi.php</p><p>[CODE]<div class="taxiroom"></p><p> Genesungshalt</p><p> <div class="taxibutton"><input type="submit" id="Genesungshalt" value="Taxi rufen"></input></div></p><p> </div></p><p> <div class="taxiroom"></p><p> Lehkreuz</p><p> <div class="taxibutton"><input type="submit" id="Lehkreuz" value="Taxi rufen"></input></div></p><p> </div></p><p> <div class="taxiroom"></p><p> Tiff's Weg</p><p> <div class="taxibutton"><input type="submit" id="TiffsWeg" value="Taxi rufen"></input></div></p><p> </div></p><p> <!--</p><p> <div class="taxiroom"></p><p> Zu den Echos</p><p> <div class="taxibutton"><input type="submit" id="ZudenEchos" value="Taxi rufen"></input></div></p><p> </div></p><p> --></p><p> <div class="taxiroom"></p><p> Bei den Wohlhabenden</p><p> <div class="taxibutton"><input type="submit" id="BeidenWohlhabenden" value="Taxi rufen"></input></div></p><p> </div></p><p> </p><p> </div>[/CODE]</p></blockquote><p></p>
[QUOTE="RobinLA, post: 465480, member: 97285"] Hello everyone, I try to explain my problem. I just try to setup a RP-Hotel, but the websockets doesn't work perfectly. Near the catalogue icon is another icon, when I click on it it's opening the "Gang"-Menu (Websockets) without any problems. (So the Websockets should work) But every websockets which hasn't any button to click doen't work. For examble: I have a "Taxi"-Function. When you walk over a "Taxi"-Sign, then it should open a websockets window - but it doesn't work. (The furni is correctly linked) Another examble: At the top left corner of the client it should have an "health" and "energy" bar, but they aren't there... Here is the source code for the "Taxi"-function. Can someone please help me? File: InteractorTaxi.cs [CODE=csharp]using System; using System.Linq; using System.Text; using System.Threading; using System.Collections.Generic; using System.Windows.Forms; using Plus.Database.Interfaces; using Plus.HabboHotel.Moderation; using Plus.HabboHotel.GameClients; using System.Collections; using System.Collections.Concurrent; using System.Drawing; using Plus.Communication.Packets.Outgoing.Rooms.Avatar; using Plus.Core; using Plus.HabboHotel.Items; using Plus.HabboHotel.Rooms; using Plus.HabboHotel.Rooms.AI; using Plus.HabboHotel.Quests; using Plus.HabboHotel.Rooms.Games; using Plus.HabboHotel.Users; using Plus.HabboHotel.Users.Inventory; using Plus.Communication.Packets.Incoming; using Plus.Utilities; using System.Data; using Plus.Communication.Packets.Outgoing.Rooms.Session; using Plus.Communication.Packets.Outgoing.Rooms.Engine; using Plus.Communication.Packets.Outgoing.Rooms.Permissions; using Plus.Communication.Packets.Outgoing.Handshake; using System.Text.RegularExpressions; using Plus.HabboHotel.Rooms.Games.Teams; using System.Threading.Tasks; using Plus.Communication.Packets.Outgoing.Rooms.Notifications; using Plus.HabboHotel.Pathfinding; using Plus.Communication.Packets.Outgoing; using Plus.Communication.Packets.Outgoing.Inventory.Purse; using Plus.Communication.Packets.Outgoing.Rooms.Chat; namespace Plus.HabboHotel.Items.Interactor { public class InteractorTaxi : IFurniInteractor { public void OnPlace(GameClient Session, Item Item) { } public void OnRemove(GameClient Session, Item Item) { } public void OnTrigger(GameClient Session, Item Item, int Request, bool HasRights) { RoomUser User = Item.GetRoom().GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); if (!Gamemap.TilesTouching(Item.GetX, Item.GetY, User.Coordinate.X, User.Coordinate.Y) && Item.GetBaseItem().SpriteId != 3090) //6116 { User.MoveToIfCanWalk(Item.SquareInFront); return; } User.usingTaxi = true; User.SetRot(Pathfinding.Rotation.Calculate(User.Coordinate.X, User.Coordinate.Y, Item.GetX, Item.GetY), false); PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Session, "TaxiWebEvent;open;"); } public void OnWiredTrigger(Item Item) { } } }[/CODE] File: TaxiWebEvent.cs [CODE=csharp]using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Plus; using Fleck; using Plus.HabboHotel.GameClients; using System.Text.RegularExpressions; using Plus.Database.Interfaces; using Plus.HabboHotel.Rooms; using Plus.Communication.Packets.Outgoing.Inventory.Purse; using System.Data; using System.Threading; namespace Bobba.HabboRoleplay.Web.Outgoing { class TaxiWebEvent : IWebEvent { /// <summary> /// Executes socket data. /// </summary> /// <param name="Client"></param> /// <param name="Data"></param> /// <param name="Socket"></param> public void Execute(GameClient Client, string Data, IWebSocketConnection Socket) { if (!PlusEnvironment.GetGame().GetWebEventManager().SocketReady(Client, true) || !PlusEnvironment.GetGame().GetWebEventManager().SocketReady(Socket)) return; string Action = (Data.Contains(',') ? Data.Split(',')[0] : Data); switch (Action) { #region Highland Hospital case "Genesungshalt": { Room Room = Client.GetHabbo().CurrentRoom; if (Room == null) return; RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Client.GetHabbo().Id); if (User == null) return; if (Convert.ToInt32(13) == Client.GetHabbo().CurrentRoomId) { Client.SendWhisper("Du befindest dich bereits im Genesungshalt."); return; } if (Client.GetHabbo().Credits < 13) { Client.SendWhisper("Du brauchst 13 Euro, um ein Taxi zu Genesungshalt zu rufen."); return; } PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "taxi;close;"); User.GetClient().Shout("*Ruft ein Taxi zu Genesungshalt*", 5); User.ApplyEffect(596); User.usingTaxi = true; System.Timers.Timer Timer = new System.Timers.Timer(5000); Timer.Interval = 5000; Timer.Elapsed += delegate { if (User.usingTaxi == true) { Client.GetHabbo().Credits -= 13; Client.GetHabbo().CanChangeRoom = true; Client.GetHabbo().PrepareRoom(13, ""); } Timer.Stop(); }; Timer.Start(); Client.SendMessage(new CreditBalanceComposer(Client.GetHabbo().Credits)); PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "my_stats;" + Client.GetHabbo().Credits + ";" + Client.GetHabbo().Duckets + ";" + Client.GetHabbo().EventPoints); } break; #endregion #region Lehkreuz case "Lehkreuz": { Room Room = Client.GetHabbo().CurrentRoom; if (Room == null) return; RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Client.GetHabbo().Id); if (User == null) return; if (Convert.ToInt32(14) == Client.GetHabbo().CurrentRoomId) { Client.SendWhisper("Du befindest dich bereits im Lehkreuz."); return; } if (Client.GetHabbo().Credits < 13) { Client.SendWhisper("Du brauchst 13 Euro, um ein Taxi zu Lehkreuz zu rufen."); return; } PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "taxi;close;"); User.GetClient().Shout("*Ruft ein Taxi zu Lehkreuz*", 5); User.ApplyEffect(596); User.usingTaxi = true; User.Frozen = true; Thread.Sleep(5000); Client.GetHabbo().Credits -= 13; Client.GetHabbo().CanChangeRoom = true; Client.GetHabbo().PrepareRoom(14, ""); Client.SendMessage(new CreditBalanceComposer(Client.GetHabbo().Credits)); PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "my_stats;" + Client.GetHabbo().Credits + ";" + Client.GetHabbo().Duckets + ";" + Client.GetHabbo().EventPoints); } break; #endregion #region TiffsWeg case "TiffsWeg": { Room Room = Client.GetHabbo().CurrentRoom; if (Room == null) return; RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Client.GetHabbo().Id); if (User == null) return; if (Convert.ToInt32(15) == Client.GetHabbo().CurrentRoomId) { Client.SendWhisper("Du befindest dich bereits im Tiff's Weg."); return; } if (Client.GetHabbo().Credits < 13) { Client.SendWhisper("Du brauchst 13 Euro, um ein Taxi zu Tiff's Weg zu rufen."); return; } PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "taxi;close;"); User.GetClient().Shout("*Ruft ein Taxi zu Tiff's Weg*", 5); User.ApplyEffect(596); User.usingTaxi = true; User.Frozen = true; Thread.Sleep(5000); Client.GetHabbo().Credits -= 13; Client.GetHabbo().CanChangeRoom = true; Client.GetHabbo().PrepareRoom(15, ""); Client.SendMessage(new CreditBalanceComposer(Client.GetHabbo().Credits)); PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "my_stats;" + Client.GetHabbo().Credits + ";" + Client.GetHabbo().Duckets + ";" + Client.GetHabbo().EventPoints); } break; #endregion #region ZudenEchos case "ZudenEchos": { Room Room = Client.GetHabbo().CurrentRoom; if (Room == null) return; RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Client.GetHabbo().Id); if (User == null) return; if (Convert.ToInt32(18) == Client.GetHabbo().CurrentRoomId) { Client.SendWhisper("Du befindest dich bereits im Zu den Echos."); return; } if (Client.GetHabbo().Credits < 13) { Client.SendWhisper("Du brauchst 13 Euro, um ein Taxi zu Zu den Echos zu rufen."); return; } PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "taxi;close;"); User.GetClient().Shout("*Ruft ein Taxi zu Zu den Echos*", 5); User.ApplyEffect(596); User.usingTaxi = true; User.Frozen = true; Thread.Sleep(5000); Client.GetHabbo().Credits -= 13; Client.GetHabbo().CanChangeRoom = true; Client.GetHabbo().PrepareRoom(18, ""); Client.SendMessage(new CreditBalanceComposer(Client.GetHabbo().Credits)); PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "my_stats;" + Client.GetHabbo().Credits + ";" + Client.GetHabbo().Duckets + ";" + Client.GetHabbo().EventPoints); } break; #endregion #region BeidenWohlhabenden case "BeidenWohlhabenden": { Room Room = Client.GetHabbo().CurrentRoom; if (Room == null) return; RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Client.GetHabbo().Id); if (User == null) return; if (Convert.ToInt32(21) == Client.GetHabbo().CurrentRoomId) { Client.SendWhisper("Du befindest dich bereits im Bei den Wohlhabenden"); return; } if (Client.GetHabbo().Credits < 13) { Client.SendWhisper("Du brauchst 13 Euro, um ein Taxi zu Bei den Wohlhabenden zu rufen."); return; } PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "taxi;close;"); User.GetClient().Shout("*Ruft ein Taxi zu Bei den Wohlhabenden*", 5); User.ApplyEffect(596); User.usingTaxi = true; User.Frozen = true; Thread.Sleep(5000); Client.GetHabbo().Credits -= 13; Client.GetHabbo().CanChangeRoom = true; Client.GetHabbo().PrepareRoom(21, ""); Client.SendMessage(new CreditBalanceComposer(Client.GetHabbo().Credits)); PlusEnvironment.GetGame().GetWebEventManager().SendDataDirect(Client, "my_stats;" + Client.GetHabbo().Credits + ";" + Client.GetHabbo().Duckets + ";" + Client.GetHabbo().EventPoints); } break; #endregion } } } }[/CODE] File: ClientGetTaxi.php [CODE]<div class="taxiroom"> Genesungshalt <div class="taxibutton"><input type="submit" id="Genesungshalt" value="Taxi rufen"></input></div> </div> <div class="taxiroom"> Lehkreuz <div class="taxibutton"><input type="submit" id="Lehkreuz" value="Taxi rufen"></input></div> </div> <div class="taxiroom"> Tiff's Weg <div class="taxibutton"><input type="submit" id="TiffsWeg" value="Taxi rufen"></input></div> </div> <!-- <div class="taxiroom"> Zu den Echos <div class="taxibutton"><input type="submit" id="ZudenEchos" value="Taxi rufen"></input></div> </div> --> <div class="taxiroom"> Bei den Wohlhabenden <div class="taxibutton"><input type="submit" id="BeidenWohlhabenden" value="Taxi rufen"></input></div> </div> </div>[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Plus Emulator - Websockets doesn't work
Top