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
[FluxEmu] How to fix items owner
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="Kashi" data-source="post: 461940" data-attributes="member: 47548"><p>[CODE=cpp] #region :sleepingbag</p><p> case "sleepingbag":</p><p> {</p><p> if (Session == null)</p><p> return true;</p><p></p><p> if (!Session.GetRoleplay().MultiCoolDown.ContainsKey("bag_cooldown"))</p><p> {</p><p> Session.GetRoleplay().MultiCoolDown.Add("bag_cooldown", 0);</p><p> }</p><p> if (Session.GetRoleplay().MultiCoolDown["bag_cooldown"] > 0)</p><p> {</p><p> Session.SendWhisper("Cooldown [" + Session.GetRoleplay().MultiCoolDown["bag_cooldown"] + "/20]");</p><p> return true;</p><p> }</p><p></p><p> UserItem BagInv = Session.GetHabbo().GetInventoryComponent().GetBag();</p><p></p><p> if (BagInv != null)</p><p> {</p><p> RoomUser Me = Session.GetHabbo().GetRoomUser();</p><p></p><p> if (Me == null)</p><p> return true;</p><p></p><p> if (Session.GetRoleplay().Bag == null)</p><p> {</p><p> if (Me.IsWalking)</p><p> {</p><p> Session.SendWhisper("slow down cowboy");</p><p> Me.IsWalking = false;</p><p> Me.ClearMovement();</p><p> }</p><p></p><p> Session.GetRoleplay().Bag = RoleplayManager.PlaceItemToRoomReturn(BagInv.BaseItemId, Me.X, Me.Y, Me.Z, 0, false, Session.GetHabbo().CurrentRoomId, false);</p><p> Me.AddStatus("lay", TextHandling.GetString(Session.GetRoleplay().Bag.GetBaseItem().Height));</p><p> Me.Z = Session.GetRoleplay().Bag.Z;</p><p> Me.RotBody = Session.GetRoleplay().Bag.Rot;</p><p></p><p> Me.CanWalk = false;</p><p></p><p> Session.SendWhisper("You will gain a random amount of energy every 20 seconds whilst in your sleeping bag!");</p><p></p><p> TimerCallback TCB = new TimerCallback(Session.GetRoleplay().BagTimerDone);</p><p></p><p> Session.GetRoleplay().BagTimer = new Timer(TCB, null, 20000, Timeout.Infinite);</p><p> Session.Shout("*Pulls out their sleeping bag*");</p><p></p><p> }</p><p> else</p><p> {</p><p> RoleplayManager.PickRock(Session.GetRoleplay().Bag, Session.GetRoleplay().Bag.RoomId);</p><p> Me.RemoveStatus("lay");</p><p> Session.GetRoleplay().Bag = null;</p><p> Session.Shout("*Puts back their sleeping bag*");</p><p> Session.GetRoleplay().MultiCoolDown["bag_cooldown"] = 20;</p><p> Session.GetRoleplay().CheckingMultiCooldown = true;</p><p></p><p> Me.CanWalk = true;</p><p> }</p><p></p><p> Me.UpdateNeeded = true;</p><p></p><p> }</p><p></p><p> return true;</p><p> }</p><p> #endregion[/CODE]</p><p></p><p>Here's the region for :sleepingbag in ChatCommandHandler.cs</p></blockquote><p></p>
[QUOTE="Kashi, post: 461940, member: 47548"] [CODE=cpp] #region :sleepingbag case "sleepingbag": { if (Session == null) return true; if (!Session.GetRoleplay().MultiCoolDown.ContainsKey("bag_cooldown")) { Session.GetRoleplay().MultiCoolDown.Add("bag_cooldown", 0); } if (Session.GetRoleplay().MultiCoolDown["bag_cooldown"] > 0) { Session.SendWhisper("Cooldown [" + Session.GetRoleplay().MultiCoolDown["bag_cooldown"] + "/20]"); return true; } UserItem BagInv = Session.GetHabbo().GetInventoryComponent().GetBag(); if (BagInv != null) { RoomUser Me = Session.GetHabbo().GetRoomUser(); if (Me == null) return true; if (Session.GetRoleplay().Bag == null) { if (Me.IsWalking) { Session.SendWhisper("slow down cowboy"); Me.IsWalking = false; Me.ClearMovement(); } Session.GetRoleplay().Bag = RoleplayManager.PlaceItemToRoomReturn(BagInv.BaseItemId, Me.X, Me.Y, Me.Z, 0, false, Session.GetHabbo().CurrentRoomId, false); Me.AddStatus("lay", TextHandling.GetString(Session.GetRoleplay().Bag.GetBaseItem().Height)); Me.Z = Session.GetRoleplay().Bag.Z; Me.RotBody = Session.GetRoleplay().Bag.Rot; Me.CanWalk = false; Session.SendWhisper("You will gain a random amount of energy every 20 seconds whilst in your sleeping bag!"); TimerCallback TCB = new TimerCallback(Session.GetRoleplay().BagTimerDone); Session.GetRoleplay().BagTimer = new Timer(TCB, null, 20000, Timeout.Infinite); Session.Shout("*Pulls out their sleeping bag*"); } else { RoleplayManager.PickRock(Session.GetRoleplay().Bag, Session.GetRoleplay().Bag.RoomId); Me.RemoveStatus("lay"); Session.GetRoleplay().Bag = null; Session.Shout("*Puts back their sleeping bag*"); Session.GetRoleplay().MultiCoolDown["bag_cooldown"] = 20; Session.GetRoleplay().CheckingMultiCooldown = true; Me.CanWalk = true; } Me.UpdateNeeded = true; } return true; } #endregion[/CODE] Here's the region for :sleepingbag in ChatCommandHandler.cs [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[FluxEmu] How to fix items owner
Top