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 Releases
:bail <user> | V26 RP Command
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="Magicalz" data-source="post: 201990" data-attributes="member: 5211"><p>Hey guys. First code I've coded from scratch, however it is not fully completed as it poofs the user twice. (likely as it has the vars and appearance being refreshed)</p><p></p><p>Anyway, one user who is in the jail room can use :bail <user> to bail that user for 750c. You can remove the roomID & change the amount of credits if you want to. Might not fully work, but first release and that.</p><p> </p><p>[CODE] #region :bail</p><p> case "bail":</p><p> {</p><p> string jailed;</p><p> using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())</p><p> {</p><p> jailed = dbClient.getString("SELECT arrested FROM users WHERE name = '" + _Username + "'");</p><p> int myCredits = dbClient.getInt("SELECT credits FROM users WHERE name = '" + _Username + "'");</p><p> virtualUser User = userManager.getUser(args[1]);</p><p> {</p><p> if (_roomID == 7)</p><p> {</p><p> if (_Jailed == 1)</p><p> {</p><p> sendData("BK" + "Sorry, but you are in jail. You cannot bail anyone if you are in jail..");</p><p> }</p><p> else</p><p> if (myCredits < 750)</p><p> {</p><p> sendData("BK" + "Sorry, but you need 750 credits to bail this user.");</p><p> }</p><p> else</p><p> {</p><p> dbClient.runQuery("UPDATE users SET credits = credits + '-750' WHERE name = '" + _Username + "'");</p><p> User._JailTime = 0;</p><p> User._Punch = 0;</p><p> User._HitBot = null;</p><p> User._Figure = User._Uni;</p><p> User._Mission = ("Bailed");</p><p> refreshAppearance(true, true, true);</p><p> User.refreshAppearance(true, true, true);</p><p> User.refreshValueables(true, true);</p><p> refreshValueables(true, true);</p><p> User.sendData("BK" + "You just got bailed out of jail by " + _Username + "");</p><p> Room.sendShout(roomUser, "*Bails " + User._Username + " from jail for 750 credits!*");</p><p> }</p><p> }</p><p> }</p><p> }</p><p> }</p><p> break;</p><p> #endregion[/CODE]</p><p> </p><p>(FOR THE NOOBS: Go into your Emu folder -> Source -> Virtual -> Users ->VirtualUser.cs and then paste this under any command in the file. You can always search for stun at the top, then at the end of the #endregion, press an enter and then paste it in)</p><p></p><p>If it don't work, contact me. Was used especially for Xoa EMU V4 but others should work too.</p><p></p><p>Thanks alot! <img src="/styles/default/xenforo/smilies/emojione/smile.png" class="smilie" loading="lazy" alt=":)" title="Smile :)" data-shortname=":)" /> [Like if you used it, or liked it or whatnot xD]</p></blockquote><p></p>
[QUOTE="Magicalz, post: 201990, member: 5211"] Hey guys. First code I've coded from scratch, however it is not fully completed as it poofs the user twice. (likely as it has the vars and appearance being refreshed) Anyway, one user who is in the jail room can use :bail <user> to bail that user for 750c. You can remove the roomID & change the amount of credits if you want to. Might not fully work, but first release and that. [CODE] #region :bail case "bail": { string jailed; using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) { jailed = dbClient.getString("SELECT arrested FROM users WHERE name = '" + _Username + "'"); int myCredits = dbClient.getInt("SELECT credits FROM users WHERE name = '" + _Username + "'"); virtualUser User = userManager.getUser(args[1]); { if (_roomID == 7) { if (_Jailed == 1) { sendData("BK" + "Sorry, but you are in jail. You cannot bail anyone if you are in jail.."); } else if (myCredits < 750) { sendData("BK" + "Sorry, but you need 750 credits to bail this user."); } else { dbClient.runQuery("UPDATE users SET credits = credits + '-750' WHERE name = '" + _Username + "'"); User._JailTime = 0; User._Punch = 0; User._HitBot = null; User._Figure = User._Uni; User._Mission = ("Bailed"); refreshAppearance(true, true, true); User.refreshAppearance(true, true, true); User.refreshValueables(true, true); refreshValueables(true, true); User.sendData("BK" + "You just got bailed out of jail by " + _Username + ""); Room.sendShout(roomUser, "*Bails " + User._Username + " from jail for 750 credits!*"); } } } } } break; #endregion[/CODE] (FOR THE NOOBS: Go into your Emu folder -> Source -> Virtual -> Users ->VirtualUser.cs and then paste this under any command in the file. You can always search for stun at the top, then at the end of the #endregion, press an enter and then paste it in) If it don't work, contact me. Was used especially for Xoa EMU V4 but others should work too. Thanks alot! :) [Like if you used it, or liked it or whatnot xD] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
:bail <user> | V26 RP Command
Top