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
[PlusEMU] Gate opens for specific rank
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="Michell" data-source="post: 448679" data-attributes="member: 9190"><p>Hi.</p><p></p><p>I want a piece of furni (in this case Sci-Fi door) to open for a specific rank. I put this:</p><p></p><p><strong>In GameMap.cs</strong></p><p></p><p>[spoiler]</p><p></p><p> if (HasCorrectRank)</p><p> {</p><p> Item I = Items.FirstOrDefault(x => x.GetBaseItem().ItemName.ToLower().Equals("<strong>scifidoor</strong>*6"));</p><p> if (I != null)</p><p> {</p><p> if (User.GetClient() == null || User.GetClient().GetHabbo() == null)</p><p> return false;</p><p></p><p> if (User.GetClient().GetHabbo().Rank == 9)</p><p> {</p><p> I.InteractingUser = User.GetClient().GetHabbo().Id;</p><p> I.ExtraData = "1";</p><p> I.UpdateState(false, true);</p><p></p><p> I.RequestUpdate(4, true);</p><p></p><p> return true;</p><p> }</p><p> else</p><p> {</p><p> if (User.Path.Count > 0)</p><p> User.Path.Clear();</p><p> User.PathRecalcNeeded = false;</p><p> return false;</p><p> }</p><p> }</p><p> }</p><p> }</p><p>[/spoiler]</p><p></p><p></p><p><strong>GameMap.cs 2/2</strong></p><p>[spoiler]</p><p> /*</p><p> * 0 = blocked</p><p> * 1 = open</p><p> * 2 = last step</p><p> * 3 = door</p><p> * */</p><p></p><p> List<Item> Items = _room.GetGameMap().GetAllRoomItemForSquare(To.X, To.Y);</p><p> if (Items.Count > 0)</p><p> {</p><p> bool HasGroupGate = Items.ToList().Where(x => x.GetBaseItem().InteractionType == InteractionType.GUILD_GATE).ToList().Count() > 0;</p><p> bool HasCorrectRank = Items.ToList().Where(x => x.GetBaseItem().ItemName.ToLower().Equals("scifidoor*6")).ToList().Count() > 0;</p><p> if (HasGroupGate)</p><p> {</p><p></p><p>[/spoiler]</p><p></p><p>As you can see I'm using it the way the group gates would open to. <strong>The problem is:</strong></p><p></p><p><strong>Rank 7 can walk over the gate, others ranks cannot, but I must manually open the gate by double clicking it first, I want that it opens automatically when you click the tile on the other side of the gate. Like the way a groupgate works.</strong>[/spoiler][/spoiler][/spoiler][/spoiler]</p></blockquote><p></p>
[QUOTE="Michell, post: 448679, member: 9190"] Hi. I want a piece of furni (in this case Sci-Fi door) to open for a specific rank. I put this: [B]In GameMap.cs[/B] [spoiler] if (HasCorrectRank) { Item I = Items.FirstOrDefault(x => x.GetBaseItem().ItemName.ToLower().Equals("[B]scifidoor[/B]*6")); if (I != null) { if (User.GetClient() == null || User.GetClient().GetHabbo() == null) return false; if (User.GetClient().GetHabbo().Rank == 9) { I.InteractingUser = User.GetClient().GetHabbo().Id; I.ExtraData = "1"; I.UpdateState(false, true); I.RequestUpdate(4, true); return true; } else { if (User.Path.Count > 0) User.Path.Clear(); User.PathRecalcNeeded = false; return false; } } } } [/spoiler] [B]GameMap.cs 2/2[/B] [spoiler] /* * 0 = blocked * 1 = open * 2 = last step * 3 = door * */ List<Item> Items = _room.GetGameMap().GetAllRoomItemForSquare(To.X, To.Y); if (Items.Count > 0) { bool HasGroupGate = Items.ToList().Where(x => x.GetBaseItem().InteractionType == InteractionType.GUILD_GATE).ToList().Count() > 0; bool HasCorrectRank = Items.ToList().Where(x => x.GetBaseItem().ItemName.ToLower().Equals("scifidoor*6")).ToList().Count() > 0; if (HasGroupGate) { [/spoiler] As you can see I'm using it the way the group gates would open to. [B]The problem is:[/B] [B]Rank 7 can walk over the gate, others ranks cannot, but I must manually open the gate by double clicking it first, I want that it opens automatically when you click the tile on the other side of the gate. Like the way a groupgate works.[/B][/spoiler][/spoiler][/spoiler][/spoiler] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[PlusEMU] Gate opens for specific rank
Top