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
[Request] Help With Command.[RP] [Request]
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="Al-Santoro" data-source="post: 40564" data-attributes="member: 2264"><p>Well, I'm making an armor command, where users will be able to wear an armor, but I need to make sure that this command is working fully. Plus, not only that, but I'll need it to make it so that they can't wear another armor until the next hour has passed by. Here's the command so far:</p><p></p><p>[CODE]#region ArmorSystem </p><p>case "wear armor": // Coded by James. [Al-Santoro].</p><p> {</p><p> int armor;</p><p> using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())</p><p> {</p><p> armor = dbClient.getInt("SELECT armor FROM users WHERE name = '" + _Username + "'");</p><p> if (armor == 1)</p><p> {</p><p></p><p></p><p> using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())</p><p> {</p><p>dbClient.runQuery("UPDATE users SET health = health + '20' WHERE name = '" + _Username + "'");</p><p>dbClient.runQuery("UPDATE users SET armor = armor - '1' WHERE name = '" + _Username + "'");</p><p> {</p><p> sendData("BK" + "You've gained + 20HP. You'll be able to put on a new set after 15 minutes.");</p><p> }</p><p> else</p><p> {</p><p> Room.sendSaying(roomUser, "*Puts on their armor and gained some defensive protection.");</p><p> ThreadSleep(1000);</p><p> _Mission = "[Protected] This Monster is wearing an armor.";</p><p> refreshAppearance(false, true, true);</p><p> break;</p><p> }</p><p> }</p><p> #endregion [/CODE]</p><p></p><p>Thanks.</p><p></p><p>- James ,</p></blockquote><p></p>
[QUOTE="Al-Santoro, post: 40564, member: 2264"] Well, I'm making an armor command, where users will be able to wear an armor, but I need to make sure that this command is working fully. Plus, not only that, but I'll need it to make it so that they can't wear another armor until the next hour has passed by. Here's the command so far: [CODE]#region ArmorSystem case "wear armor": // Coded by James. [Al-Santoro]. { int armor; using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) { armor = dbClient.getInt("SELECT armor FROM users WHERE name = '" + _Username + "'"); if (armor == 1) { using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) { dbClient.runQuery("UPDATE users SET health = health + '20' WHERE name = '" + _Username + "'"); dbClient.runQuery("UPDATE users SET armor = armor - '1' WHERE name = '" + _Username + "'"); { sendData("BK" + "You've gained + 20HP. You'll be able to put on a new set after 15 minutes."); } else { Room.sendSaying(roomUser, "*Puts on their armor and gained some defensive protection."); ThreadSleep(1000); _Mission = "[Protected] This Monster is wearing an armor."; refreshAppearance(false, true, true); break; } } #endregion [/CODE] Thanks. - James , [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[Request] Help With Command.[RP] [Request]
Top