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 R2] Wired help?
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="Stee" data-source="post: 451851" data-attributes="member: 3969"><p>Emu is in the title and here is everything I have for it. I think I got it now tho.</p><p>The wired is TimerReset </p><p></p><p>[SPOILER="TimerReset.cs"]</p><p>[CODE=cpp]using System;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Collections.Generic;</p><p>using System.Collections.Concurrent;</p><p>using Plus.Communication.Packets.Outgoing.Moderation;</p><p>using Plus.Communication.Packets.Incoming;</p><p>using Plus.HabboHotel.Rooms;</p><p>using Plus.HabboHotel.Users;</p><p>using Plus.Communication.Packets.Outgoing.Rooms.Chat;</p><p></p><p>namespace Plus.HabboHotel.Items.Wired.Boxes.Effects</p><p>{</p><p> class TimerReset : IWiredItem, IWiredCycle</p><p> {</p><p> public Room Instance { get; set; }</p><p> public Item Item { get; set; }</p><p> public WiredBoxType Type { get { return WiredBoxType.EffectTimerReset; } }</p><p> public ConcurrentDictionary<int, Item> SetItems { get; set; }</p><p> public int TickCount { get; set; }</p><p> public string StringData { get; set; }</p><p> public bool BoolData { get; set; }</p><p> public int Delay { get { return this._delay; } set { this._delay = value; this.TickCount = value; } }</p><p> public string ItemsData { get; set; }</p><p></p><p> private long _next;</p><p> private int _delay = 0;</p><p> private bool Requested = false;</p><p></p><p> public TimerReset(Room Instance, Item Item)</p><p> {</p><p> this.Instance = Instance;</p><p> this.Item = Item;</p><p> this.SetItems = new ConcurrentDictionary<int, Item>();</p><p> }</p><p></p><p> public void HandleSave(ClientPacket Packet)</p><p> {</p><p> this.SetItems.Clear();</p><p> int Unknown = Packet.PopInt();</p><p> string Unknown2 = Packet.PopString();</p><p></p><p> int FurniCount = Packet.PopInt();</p><p> for (int i = 0; i < FurniCount; i++)</p><p> {</p><p> Item SelectedItem = Instance.GetRoomItemHandler().GetItem(Packet.PopInt());</p><p> if (SelectedItem != null)</p><p> SetItems.TryAdd(SelectedItem.Id, SelectedItem);</p><p> }</p><p></p><p> int Delay = Packet.PopInt();</p><p> this.Delay = Delay;</p><p> }</p><p></p><p> public bool Execute(params object[] Params)</p><p> {</p><p> if (this._next == 0 || this._next < PlusEnvironment.Now())</p><p> this._next = PlusEnvironment.Now() + this.Delay;</p><p></p><p></p><p> this.Requested = true;</p><p> this.TickCount = Delay;</p><p> return true;</p><p> }</p><p></p><p> public bool OnCycle()</p><p> {</p><p> if (this.SetItems.Count == 0 || !Requested)</p><p> return false;</p><p></p><p> long Now = PlusEnvironment.Now();</p><p> if (_next < Now)</p><p> {</p><p> foreach (Item Item in this.SetItems.Values.ToList())</p><p> {</p><p> if (Item == null)</p><p> continue;</p><p></p><p> if (!Instance.GetRoomItemHandler().GetFloor.Contains(Item))</p><p> {</p><p> SetItems.TryRemove(Item.Id, out Item n);</p><p> continue;</p><p> }</p><p></p><p> Item.Interactor.OnWiredTrigger(Item);</p><p> }</p><p></p><p> Requested = false;</p><p></p><p> this._next = 5;</p><p> this.TickCount = Delay;</p><p></p><p> }</p><p> return true;</p><p> }</p><p> }</p><p>}</p><p>[/CODE]</p><p>[/SPOILER]</p><p>[SPOILER="WiredBoxTypeUtility.cs"]</p><p>[CODE=cpp]using System;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Collections.Generic;</p><p></p><p>namespace Plus.HabboHotel.Items.Wired</p><p>{</p><p> static class WiredBoxTypeUtility</p><p> {</p><p> public static WiredBoxType FromWiredId(int Id)</p><p> {</p><p> switch (Id)</p><p> {</p><p> default:</p><p> return WiredBoxType.None;</p><p> case 1:</p><p> return WiredBoxType.TriggerUserSays;</p><p> case 2:</p><p> return WiredBoxType.TriggerStateChanges;</p><p> case 3:</p><p> return WiredBoxType.TriggerRepeat;</p><p> case 4:</p><p> return WiredBoxType.TriggerRoomEnter;</p><p> case 8:</p><p> return WiredBoxType.TriggerWalkOnFurni;</p><p> case 9:</p><p> return WiredBoxType.TriggerWalkOffFurni;</p><p> case 5:</p><p> return WiredBoxType.EffectShowMessage;</p><p> case 6:</p><p> return WiredBoxType.EffectTeleportToFurni;</p><p> case 7:</p><p> return WiredBoxType.EffectToggleFurniState;</p><p> case 10:</p><p> return WiredBoxType.EffectKickUser;</p><p> case 11:</p><p> return WiredBoxType.ConditionFurniHasUsers;</p><p> case 12:</p><p> return WiredBoxType.ConditionFurniHasFurni;</p><p> case 13:</p><p> return WiredBoxType.ConditionTriggererOnFurni;</p><p> case 14:</p><p> return WiredBoxType.EffectMatchPosition;</p><p> case 21:</p><p> return WiredBoxType.ConditionIsGroupMember;</p><p> case 22:</p><p> return WiredBoxType.ConditionIsNotGroupMember;</p><p> case 23:</p><p> return WiredBoxType.ConditionTriggererNotOnFurni;</p><p> case 24:</p><p> return WiredBoxType.ConditionFurniHasNoUsers;</p><p> case 25:</p><p> return WiredBoxType.ConditionIsWearingBadge;</p><p> case 26:</p><p> return WiredBoxType.ConditionIsWearingFX;</p><p> case 27:</p><p> return WiredBoxType.ConditionIsNotWearingBadge;</p><p> case 28:</p><p> return WiredBoxType.ConditionIsNotWearingFX;</p><p> case 29:</p><p> return WiredBoxType.ConditionMatchStateAndPosition;</p><p> case 30:</p><p> return WiredBoxType.ConditionUserCountInRoom;</p><p> case 31:</p><p> return WiredBoxType.ConditionUserCountDoesntInRoom;</p><p> case 32:</p><p> return WiredBoxType.EffectMoveAndRotate;</p><p> case 33:</p><p> return WiredBoxType.ConditionDontMatchStateAndPosition;</p><p> case 34:</p><p> return WiredBoxType.ConditionFurniTypeMatches;</p><p> case 35:</p><p> return WiredBoxType.ConditionFurniTypeDoesntMatch;</p><p> case 36:</p><p> return WiredBoxType.ConditionFurniHasNoFurni;</p><p> case 37:</p><p> return WiredBoxType.EffectMoveFurniToNearestUser;</p><p> case 38:</p><p> return WiredBoxType.EffectMoveFurniFromNearestUser;</p><p> case 39:</p><p> return WiredBoxType.EffectMuteTriggerer;</p><p> case 40:</p><p> return WiredBoxType.EffectGiveReward;</p><p> case 41:</p><p> return WiredBoxType.AddonRandomEffect;</p><p> case 42:</p><p> return WiredBoxType.TriggerGameStarts;</p><p> case 43:</p><p> return WiredBoxType.TriggerGameEnds;</p><p> case 44:</p><p> return WiredBoxType.TriggerUserFurniCollision;</p><p> case 45:</p><p> return WiredBoxType.EffectMoveFurniToNearestUser;</p><p> case 46:</p><p> return WiredBoxType.EffectExecuteWiredStacks;</p><p> case 47:</p><p> return WiredBoxType.EffectTeleportBotToFurniBox;</p><p> case 48:</p><p> return WiredBoxType.EffectBotChangesClothesBox;</p><p> case 49:</p><p> return WiredBoxType.EffectBotMovesToFurniBox;</p><p> case 50:</p><p> return WiredBoxType.EffectBotCommunicatesToAllBox;</p><p> case 51:</p><p> return WiredBoxType.EffectBotCommunicatesToUserBox;</p><p> case 52:</p><p> return WiredBoxType.EffectBotFollowsUserBox;</p><p> case 53:</p><p> return WiredBoxType.EffectBotGivesHanditemBox;</p><p> case 54:</p><p> return WiredBoxType.ConditionActorHasHandItemBox;</p><p> case 55:</p><p> return WiredBoxType.ConditionActorIsInTeamBox;</p><p> case 56:</p><p> return WiredBoxType.EffectAddActorToTeam;</p><p> case 57:</p><p> return WiredBoxType.EffectRemoveActorFromTeam;</p><p> case 58:</p><p> return WiredBoxType.TriggerUserSaysCommand;</p><p> case 59:</p><p> return WiredBoxType.EffectSetRollerSpeed;</p><p> case 60:</p><p> return WiredBoxType.EffectRegenerateMaps;</p><p> case 61:</p><p> return WiredBoxType.EffectGiveUserBadge;</p><p> case 62:</p><p> return WiredBoxType.EffectTimerReset;</p><p> }</p><p> }</p><p></p><p> public static int GetWiredId(WiredBoxType Type)</p><p> {</p><p> switch (Type)</p><p> {</p><p> case WiredBoxType.TriggerUserSays:</p><p> case WiredBoxType.TriggerUserSaysCommand:</p><p> case WiredBoxType.ConditionMatchStateAndPosition:</p><p> return 0;</p><p> case WiredBoxType.TriggerWalkOnFurni:</p><p> case WiredBoxType.TriggerWalkOffFurni:</p><p> case WiredBoxType.ConditionFurniHasUsers:</p><p> case WiredBoxType.ConditionFurniHasFurni:</p><p> case WiredBoxType.ConditionTriggererOnFurni:</p><p> return 1;</p><p> case WiredBoxType.EffectMatchPosition:</p><p> return 3;</p><p> case WiredBoxType.EffectMoveAndRotate:</p><p> case WiredBoxType.TriggerStateChanges:</p><p> return 4;</p><p> case WiredBoxType.ConditionUserCountInRoom:</p><p> return 5;</p><p> case WiredBoxType.ConditionActorIsInTeamBox:</p><p> case WiredBoxType.TriggerRepeat:</p><p> return 6;</p><p> case WiredBoxType.TriggerRoomEnter:</p><p> case WiredBoxType.EffectShowMessage:</p><p> return 7;</p><p> case WiredBoxType.TriggerGameStarts:</p><p> case WiredBoxType.TriggerGameEnds:</p><p> case WiredBoxType.EffectTeleportToFurni:</p><p> case WiredBoxType.EffectToggleFurniState:</p><p> case WiredBoxType.ConditionFurniTypeMatches:</p><p> return 8;</p><p> case WiredBoxType.EffectGiveUserBadge:</p><p> case WiredBoxType.EffectRegenerateMaps:</p><p> case WiredBoxType.EffectKickUser:</p><p> case WiredBoxType.EffectSetRollerSpeed:</p><p> return 7;</p><p> case WiredBoxType.EffectAddActorToTeam:</p><p> return 9;</p><p> case WiredBoxType.EffectRemoveActorFromTeam:</p><p> case WiredBoxType.ConditionIsGroupMember:</p><p> return 10;</p><p> case WiredBoxType.TriggerUserFurniCollision:</p><p> case WiredBoxType.ConditionIsWearingBadge:</p><p> case WiredBoxType.EffectMoveFurniToNearestUser:</p><p> return 11;</p><p> case WiredBoxType.ConditionIsWearingFX:</p><p> case WiredBoxType.EffectMoveFurniFromNearestUser:</p><p> return 12;</p><p> case WiredBoxType.ConditionFurniHasNoUsers:</p><p> return 14;</p><p> case WiredBoxType.ConditionTriggererNotOnFurni:</p><p> return 15;</p><p> case WiredBoxType.ConditionUserCountDoesntInRoom:</p><p> return 16;</p><p> case WiredBoxType.EffectGiveReward:</p><p> return 17;</p><p> case WiredBoxType.EffectExecuteWiredStacks:</p><p> case WiredBoxType.ConditionFurniHasNoFurni:</p><p> return 18;</p><p> case WiredBoxType.ConditionFurniTypeDoesntMatch:</p><p> return 19;</p><p> case WiredBoxType.EffectMuteTriggerer:</p><p> return 20;</p><p> case WiredBoxType.ConditionIsNotGroupMember:</p><p> case WiredBoxType.EffectTeleportBotToFurniBox:</p><p> return 21;</p><p> case WiredBoxType.ConditionIsNotWearingBadge:</p><p> case WiredBoxType.EffectBotMovesToFurniBox:</p><p> return 22;</p><p> case WiredBoxType.ConditionIsNotWearingFX:</p><p> case WiredBoxType.EffectBotCommunicatesToAllBox:</p><p> return 23;</p><p> case WiredBoxType.EffectBotGivesHanditemBox:</p><p> return 24;</p><p> case WiredBoxType.EffectBotFollowsUserBox:</p><p> case WiredBoxType.ConditionActorHasHandItemBox:</p><p> return 25;</p><p> case WiredBoxType.EffectBotChangesClothesBox:</p><p> return 26;</p><p> case WiredBoxType.EffectBotCommunicatesToUserBox:</p><p> return 27;</p><p> }</p><p> return 0;</p><p> }</p><p></p><p> public static List<int> ContainsBlockedTrigger(IWiredItem Box, ICollection<IWiredItem> Triggers)</p><p> {</p><p> List<int> BlockedItems = new List<int>();</p><p></p><p> if (Box.Type != WiredBoxType.EffectShowMessage && Box.Type != WiredBoxType.EffectMuteTriggerer && Box.Type != WiredBoxType.EffectTeleportToFurni && Box.Type != WiredBoxType.EffectKickUser && Box.Type != WiredBoxType.ConditionTriggererOnFurni)</p><p> return BlockedItems;</p><p></p><p> foreach (IWiredItem Item in Triggers)</p><p> {</p><p> if (Item.Type == WiredBoxType.TriggerRepeat)</p><p> {</p><p> if (!BlockedItems.Contains(Item.Item.GetBaseItem().SpriteId))</p><p> BlockedItems.Add(Item.Item.GetBaseItem().SpriteId);</p><p> else continue;</p><p> }</p><p> else continue;</p><p> }</p><p></p><p> return BlockedItems;</p><p> }</p><p></p><p> public static List<int> ContainsBlockedEffect(IWiredItem Box, ICollection<IWiredItem> Effects)</p><p> {</p><p> List<int> BlockedItems = new List<int>();</p><p></p><p> if (Box.Type != WiredBoxType.TriggerRepeat)</p><p> return BlockedItems;</p><p></p><p> bool HasMoveRotate = Effects.Where(x => x.Type == WiredBoxType.EffectMoveAndRotate).ToList().Count > 0;</p><p> bool HasMoveNear = Effects.Where(x => x.Type == WiredBoxType.EffectMoveFurniToNearestUser).ToList().Count > 0;</p><p></p><p> foreach (IWiredItem Item in Effects)</p><p> {</p><p> if (Item.Type == WiredBoxType.EffectKickUser || Item.Type == WiredBoxType.EffectMuteTriggerer || Item.Type == WiredBoxType.EffectShowMessage || Item.Type == WiredBoxType.EffectTeleportToFurni || Item.Type == WiredBoxType.EffectBotFollowsUserBox)</p><p> {</p><p> if (!BlockedItems.Contains(Item.Item.GetBaseItem().SpriteId))</p><p> BlockedItems.Add(Item.Item.GetBaseItem().SpriteId);</p><p> else continue;</p><p> }</p><p> else if((Item.Type == WiredBoxType.EffectMoveFurniToNearestUser && HasMoveRotate) || (Item.Type == WiredBoxType.EffectMoveAndRotate && HasMoveNear))</p><p> {</p><p> if (!BlockedItems.Contains(Item.Item.GetBaseItem().SpriteId))</p><p> BlockedItems.Add(Item.Item.GetBaseItem().SpriteId);</p><p> else continue;</p><p> }</p><p> }</p><p></p><p> return BlockedItems;</p><p> }</p><p> }</p><p>}</p><p>[/CODE]</p><p>[/SPOILER]</p></blockquote><p></p>
[QUOTE="Stee, post: 451851, member: 3969"] Emu is in the title and here is everything I have for it. I think I got it now tho. The wired is TimerReset [SPOILER="TimerReset.cs"] [CODE=cpp]using System; using System.Linq; using System.Text; using System.Collections.Generic; using System.Collections.Concurrent; using Plus.Communication.Packets.Outgoing.Moderation; using Plus.Communication.Packets.Incoming; using Plus.HabboHotel.Rooms; using Plus.HabboHotel.Users; using Plus.Communication.Packets.Outgoing.Rooms.Chat; namespace Plus.HabboHotel.Items.Wired.Boxes.Effects { class TimerReset : IWiredItem, IWiredCycle { public Room Instance { get; set; } public Item Item { get; set; } public WiredBoxType Type { get { return WiredBoxType.EffectTimerReset; } } public ConcurrentDictionary<int, Item> SetItems { get; set; } public int TickCount { get; set; } public string StringData { get; set; } public bool BoolData { get; set; } public int Delay { get { return this._delay; } set { this._delay = value; this.TickCount = value; } } public string ItemsData { get; set; } private long _next; private int _delay = 0; private bool Requested = false; public TimerReset(Room Instance, Item Item) { this.Instance = Instance; this.Item = Item; this.SetItems = new ConcurrentDictionary<int, Item>(); } public void HandleSave(ClientPacket Packet) { this.SetItems.Clear(); int Unknown = Packet.PopInt(); string Unknown2 = Packet.PopString(); int FurniCount = Packet.PopInt(); for (int i = 0; i < FurniCount; i++) { Item SelectedItem = Instance.GetRoomItemHandler().GetItem(Packet.PopInt()); if (SelectedItem != null) SetItems.TryAdd(SelectedItem.Id, SelectedItem); } int Delay = Packet.PopInt(); this.Delay = Delay; } public bool Execute(params object[] Params) { if (this._next == 0 || this._next < PlusEnvironment.Now()) this._next = PlusEnvironment.Now() + this.Delay; this.Requested = true; this.TickCount = Delay; return true; } public bool OnCycle() { if (this.SetItems.Count == 0 || !Requested) return false; long Now = PlusEnvironment.Now(); if (_next < Now) { foreach (Item Item in this.SetItems.Values.ToList()) { if (Item == null) continue; if (!Instance.GetRoomItemHandler().GetFloor.Contains(Item)) { SetItems.TryRemove(Item.Id, out Item n); continue; } Item.Interactor.OnWiredTrigger(Item); } Requested = false; this._next = 5; this.TickCount = Delay; } return true; } } } [/CODE] [/SPOILER] [SPOILER="WiredBoxTypeUtility.cs"] [CODE=cpp]using System; using System.Linq; using System.Text; using System.Collections.Generic; namespace Plus.HabboHotel.Items.Wired { static class WiredBoxTypeUtility { public static WiredBoxType FromWiredId(int Id) { switch (Id) { default: return WiredBoxType.None; case 1: return WiredBoxType.TriggerUserSays; case 2: return WiredBoxType.TriggerStateChanges; case 3: return WiredBoxType.TriggerRepeat; case 4: return WiredBoxType.TriggerRoomEnter; case 8: return WiredBoxType.TriggerWalkOnFurni; case 9: return WiredBoxType.TriggerWalkOffFurni; case 5: return WiredBoxType.EffectShowMessage; case 6: return WiredBoxType.EffectTeleportToFurni; case 7: return WiredBoxType.EffectToggleFurniState; case 10: return WiredBoxType.EffectKickUser; case 11: return WiredBoxType.ConditionFurniHasUsers; case 12: return WiredBoxType.ConditionFurniHasFurni; case 13: return WiredBoxType.ConditionTriggererOnFurni; case 14: return WiredBoxType.EffectMatchPosition; case 21: return WiredBoxType.ConditionIsGroupMember; case 22: return WiredBoxType.ConditionIsNotGroupMember; case 23: return WiredBoxType.ConditionTriggererNotOnFurni; case 24: return WiredBoxType.ConditionFurniHasNoUsers; case 25: return WiredBoxType.ConditionIsWearingBadge; case 26: return WiredBoxType.ConditionIsWearingFX; case 27: return WiredBoxType.ConditionIsNotWearingBadge; case 28: return WiredBoxType.ConditionIsNotWearingFX; case 29: return WiredBoxType.ConditionMatchStateAndPosition; case 30: return WiredBoxType.ConditionUserCountInRoom; case 31: return WiredBoxType.ConditionUserCountDoesntInRoom; case 32: return WiredBoxType.EffectMoveAndRotate; case 33: return WiredBoxType.ConditionDontMatchStateAndPosition; case 34: return WiredBoxType.ConditionFurniTypeMatches; case 35: return WiredBoxType.ConditionFurniTypeDoesntMatch; case 36: return WiredBoxType.ConditionFurniHasNoFurni; case 37: return WiredBoxType.EffectMoveFurniToNearestUser; case 38: return WiredBoxType.EffectMoveFurniFromNearestUser; case 39: return WiredBoxType.EffectMuteTriggerer; case 40: return WiredBoxType.EffectGiveReward; case 41: return WiredBoxType.AddonRandomEffect; case 42: return WiredBoxType.TriggerGameStarts; case 43: return WiredBoxType.TriggerGameEnds; case 44: return WiredBoxType.TriggerUserFurniCollision; case 45: return WiredBoxType.EffectMoveFurniToNearestUser; case 46: return WiredBoxType.EffectExecuteWiredStacks; case 47: return WiredBoxType.EffectTeleportBotToFurniBox; case 48: return WiredBoxType.EffectBotChangesClothesBox; case 49: return WiredBoxType.EffectBotMovesToFurniBox; case 50: return WiredBoxType.EffectBotCommunicatesToAllBox; case 51: return WiredBoxType.EffectBotCommunicatesToUserBox; case 52: return WiredBoxType.EffectBotFollowsUserBox; case 53: return WiredBoxType.EffectBotGivesHanditemBox; case 54: return WiredBoxType.ConditionActorHasHandItemBox; case 55: return WiredBoxType.ConditionActorIsInTeamBox; case 56: return WiredBoxType.EffectAddActorToTeam; case 57: return WiredBoxType.EffectRemoveActorFromTeam; case 58: return WiredBoxType.TriggerUserSaysCommand; case 59: return WiredBoxType.EffectSetRollerSpeed; case 60: return WiredBoxType.EffectRegenerateMaps; case 61: return WiredBoxType.EffectGiveUserBadge; case 62: return WiredBoxType.EffectTimerReset; } } public static int GetWiredId(WiredBoxType Type) { switch (Type) { case WiredBoxType.TriggerUserSays: case WiredBoxType.TriggerUserSaysCommand: case WiredBoxType.ConditionMatchStateAndPosition: return 0; case WiredBoxType.TriggerWalkOnFurni: case WiredBoxType.TriggerWalkOffFurni: case WiredBoxType.ConditionFurniHasUsers: case WiredBoxType.ConditionFurniHasFurni: case WiredBoxType.ConditionTriggererOnFurni: return 1; case WiredBoxType.EffectMatchPosition: return 3; case WiredBoxType.EffectMoveAndRotate: case WiredBoxType.TriggerStateChanges: return 4; case WiredBoxType.ConditionUserCountInRoom: return 5; case WiredBoxType.ConditionActorIsInTeamBox: case WiredBoxType.TriggerRepeat: return 6; case WiredBoxType.TriggerRoomEnter: case WiredBoxType.EffectShowMessage: return 7; case WiredBoxType.TriggerGameStarts: case WiredBoxType.TriggerGameEnds: case WiredBoxType.EffectTeleportToFurni: case WiredBoxType.EffectToggleFurniState: case WiredBoxType.ConditionFurniTypeMatches: return 8; case WiredBoxType.EffectGiveUserBadge: case WiredBoxType.EffectRegenerateMaps: case WiredBoxType.EffectKickUser: case WiredBoxType.EffectSetRollerSpeed: return 7; case WiredBoxType.EffectAddActorToTeam: return 9; case WiredBoxType.EffectRemoveActorFromTeam: case WiredBoxType.ConditionIsGroupMember: return 10; case WiredBoxType.TriggerUserFurniCollision: case WiredBoxType.ConditionIsWearingBadge: case WiredBoxType.EffectMoveFurniToNearestUser: return 11; case WiredBoxType.ConditionIsWearingFX: case WiredBoxType.EffectMoveFurniFromNearestUser: return 12; case WiredBoxType.ConditionFurniHasNoUsers: return 14; case WiredBoxType.ConditionTriggererNotOnFurni: return 15; case WiredBoxType.ConditionUserCountDoesntInRoom: return 16; case WiredBoxType.EffectGiveReward: return 17; case WiredBoxType.EffectExecuteWiredStacks: case WiredBoxType.ConditionFurniHasNoFurni: return 18; case WiredBoxType.ConditionFurniTypeDoesntMatch: return 19; case WiredBoxType.EffectMuteTriggerer: return 20; case WiredBoxType.ConditionIsNotGroupMember: case WiredBoxType.EffectTeleportBotToFurniBox: return 21; case WiredBoxType.ConditionIsNotWearingBadge: case WiredBoxType.EffectBotMovesToFurniBox: return 22; case WiredBoxType.ConditionIsNotWearingFX: case WiredBoxType.EffectBotCommunicatesToAllBox: return 23; case WiredBoxType.EffectBotGivesHanditemBox: return 24; case WiredBoxType.EffectBotFollowsUserBox: case WiredBoxType.ConditionActorHasHandItemBox: return 25; case WiredBoxType.EffectBotChangesClothesBox: return 26; case WiredBoxType.EffectBotCommunicatesToUserBox: return 27; } return 0; } public static List<int> ContainsBlockedTrigger(IWiredItem Box, ICollection<IWiredItem> Triggers) { List<int> BlockedItems = new List<int>(); if (Box.Type != WiredBoxType.EffectShowMessage && Box.Type != WiredBoxType.EffectMuteTriggerer && Box.Type != WiredBoxType.EffectTeleportToFurni && Box.Type != WiredBoxType.EffectKickUser && Box.Type != WiredBoxType.ConditionTriggererOnFurni) return BlockedItems; foreach (IWiredItem Item in Triggers) { if (Item.Type == WiredBoxType.TriggerRepeat) { if (!BlockedItems.Contains(Item.Item.GetBaseItem().SpriteId)) BlockedItems.Add(Item.Item.GetBaseItem().SpriteId); else continue; } else continue; } return BlockedItems; } public static List<int> ContainsBlockedEffect(IWiredItem Box, ICollection<IWiredItem> Effects) { List<int> BlockedItems = new List<int>(); if (Box.Type != WiredBoxType.TriggerRepeat) return BlockedItems; bool HasMoveRotate = Effects.Where(x => x.Type == WiredBoxType.EffectMoveAndRotate).ToList().Count > 0; bool HasMoveNear = Effects.Where(x => x.Type == WiredBoxType.EffectMoveFurniToNearestUser).ToList().Count > 0; foreach (IWiredItem Item in Effects) { if (Item.Type == WiredBoxType.EffectKickUser || Item.Type == WiredBoxType.EffectMuteTriggerer || Item.Type == WiredBoxType.EffectShowMessage || Item.Type == WiredBoxType.EffectTeleportToFurni || Item.Type == WiredBoxType.EffectBotFollowsUserBox) { if (!BlockedItems.Contains(Item.Item.GetBaseItem().SpriteId)) BlockedItems.Add(Item.Item.GetBaseItem().SpriteId); else continue; } else if((Item.Type == WiredBoxType.EffectMoveFurniToNearestUser && HasMoveRotate) || (Item.Type == WiredBoxType.EffectMoveAndRotate && HasMoveNear)) { if (!BlockedItems.Contains(Item.Item.GetBaseItem().SpriteId)) BlockedItems.Add(Item.Item.GetBaseItem().SpriteId); else continue; } } return BlockedItems; } } } [/CODE] [/SPOILER] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[PlusEMU R2] Wired help?
Top