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
Wired problems
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="Reikenz" data-source="post: 445811" data-attributes="member: 80340"><p>Hello, i have a problem with a condition wired MoreThanTimer</p><p></p><p><img src="https://vignette.wikia.nocookie.net/habbo/images/d/d4/Wired20.PNG/revision/latest?cb=20111224185249&path-prefix=en" alt="" class="fr-fic fr-dii fr-draggable " style="" />[ATTACH=full]8252[/ATTACH]</p><p></p><p><strong>WIRED Condition: More Than x Secs Elapsed Since Timer Reset</strong> </p><p></p><p>My problem is that the delay does not reset each time so once I reset the time in the apartment the wired activates unlimited</p><p></p><p>[CODE=csharp]using Plus.Communication.Packets.Incoming;</p><p>using Plus.HabboHotel.Rooms;</p><p>using System;</p><p>using System.Collections.Concurrent;</p><p></p><p>namespace Plus.HabboHotel.Items.Wired.Boxes.Conditions</p><p>{</p><p> internal class MoreThanTimerBox : IWiredItem, IWiredCycle</p><p> {</p><p> public Room Instance { get; set; }</p><p> public Item Item { get; set; }</p><p> public WiredBoxType Type => WiredBoxType.ConditionMoreThanTimer;</p><p> public ConcurrentDictionary<int, Item> SetItems { get; set; }</p><p> public string StringData { get; set; }</p><p> public bool BoolData { get; set; }</p><p> public int Delay { get => _delay; set { _delay = value; TickCount = value; } }</p><p> public string ItemsData { get; set; }</p><p> public int TickCount { get; set; }</p><p></p><p> private int _delay = 0;</p><p></p><p> public MoreThanTimerBox(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> int Unknown = Packet.PopInt();</p><p> int Delay = Packet.PopInt();</p><p></p><p> this.Delay = Delay;</p><p> }</p><p></p><p></p><p> public bool Execute(params object[] Params)</p><p> {</p><p> if (Instance == null || Instance.lastTimerReset == null)</p><p> {</p><p> return false;</p><p> }</p><p></p><p> TimeSpan sinceTimerReset = DateTime.Now - Instance.lastTimerReset;</p><p> return sinceTimerReset.TotalSeconds >= Delay;</p><p> }</p><p></p><p> public bool OnCycle()</p><p> {</p><p> return false;</p><p> }</p><p> }</p><p>}</p><p>[/CODE]</p><p></p><p>My wired code</p><p></p><p>Anyone can help me please ?</p></blockquote><p></p>
[QUOTE="Reikenz, post: 445811, member: 80340"] Hello, i have a problem with a condition wired MoreThanTimer [IMG]https://vignette.wikia.nocookie.net/habbo/images/d/d4/Wired20.PNG/revision/latest?cb=20111224185249&path-prefix=en[/IMG][ATTACH=full]8252[/ATTACH] [B]WIRED Condition: More Than x Secs Elapsed Since Timer Reset[/B] My problem is that the delay does not reset each time so once I reset the time in the apartment the wired activates unlimited [CODE=csharp]using Plus.Communication.Packets.Incoming; using Plus.HabboHotel.Rooms; using System; using System.Collections.Concurrent; namespace Plus.HabboHotel.Items.Wired.Boxes.Conditions { internal class MoreThanTimerBox : IWiredItem, IWiredCycle { public Room Instance { get; set; } public Item Item { get; set; } public WiredBoxType Type => WiredBoxType.ConditionMoreThanTimer; public ConcurrentDictionary<int, Item> SetItems { get; set; } public string StringData { get; set; } public bool BoolData { get; set; } public int Delay { get => _delay; set { _delay = value; TickCount = value; } } public string ItemsData { get; set; } public int TickCount { get; set; } private int _delay = 0; public MoreThanTimerBox(Room Instance, Item Item) { this.Instance = Instance; this.Item = Item; this.SetItems = new ConcurrentDictionary<int, Item>(); } public void HandleSave(ClientPacket Packet) { int Unknown = Packet.PopInt(); int Delay = Packet.PopInt(); this.Delay = Delay; } public bool Execute(params object[] Params) { if (Instance == null || Instance.lastTimerReset == null) { return false; } TimeSpan sinceTimerReset = DateTime.Now - Instance.lastTimerReset; return sinceTimerReset.TotalSeconds >= Delay; } public bool OnCycle() { return false; } } } [/CODE] My wired code Anyone can help me please ? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Wired problems
Top