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
RP Arrow 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="Conza" data-source="post: 181336" data-attributes="member: 8453"><p>Where do i add this code to? Im in the virtualrooms.cs in the emu but i dont know where to past this code?</p><p> </p><p>Code:</p><p><span style="color: #333333"><span style="font-size: 12px"> } using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> {</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> dbClient.runQuery("UPDATE users SET x = '" + nextX + "', y = '" + nextY + "' WHERE name = '" + roomUser.User._Username + "'");</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"></span></span></p><p><span style="color: #333333"><span style="font-size: 12px"></span></span></p><p><span style="color: #333333"><span style="font-size: 12px"></span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> int action = dbClient.getInt("SELECT id FROM action_spots WHERE rid = '" + roomUser.User._roomID + "' AND x = '" + nextX + "' AND y = '" + nextY + "'");</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"></span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> if (action == null)</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> {</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> break;</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> }</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> else</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"></span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> if (action > 0)</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> {</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> string action2;</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> action2 = dbClient.getString("SELECT actiontwo FROM action_spots WHERE rid = '" + roomUser.User._roomID + "' AND x = '" + nextX + "' AND y = '" + nextY + "'");</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> int actiontwox;</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> actiontwox = dbClient.getInt("SELECT x FROM action_spots WHERE id = '" + action2 + "'");</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> int actiontwoy;</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> actiontwoy = dbClient.getInt("SELECT y FROM action_spots WHERE id = '" + action2 + "'");</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> int actiontworoomid;</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> actiontworoomid = dbClient.getInt("SELECT rid FROM action_spots WHERE id = '" + action2 + "'");</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> if (actiontworoomid == roomUser.User._roomID)</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> {</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> roomUser.X = actiontwox;</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> roomUser.Y = actiontwoy;</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> roomUser.User.refreshAppearance(false, false, true);</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> dbClient.runQuery("UPDATE users SET x = '" + actiontwox + "', y = '" + actiontwoy + "', avoid = '1' WHERE name = '" + roomUser.User._Username + "'");</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> }</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> else</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> {</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> dbClient.runQuery("UPDATE users SET x = '" + actiontwox + "', y = '" + actiontwoy + "', avoid = '0' WHERE name = '" + roomUser.User._Username + "'");</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> roomUser.User.sendData("D^" + "H" + Encoding.encodeVL64(actiontworoomid));</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"></span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> }</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"></span></span></p><p><span style="color: #333333"><span style="font-size: 12px"></span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> }</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> else</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> {</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"></span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> }</span></span></p><p><span style="color: #333333"><span style="font-size: 12px"> }</span></span></p></blockquote><p></p>
[QUOTE="Conza, post: 181336, member: 8453"] Where do i add this code to? Im in the virtualrooms.cs in the emu but i dont know where to past this code? Code: [COLOR=#333333][SIZE=12px] } using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) { dbClient.runQuery("UPDATE users SET x = '" + nextX + "', y = '" + nextY + "' WHERE name = '" + roomUser.User._Username + "'"); int action = dbClient.getInt("SELECT id FROM action_spots WHERE rid = '" + roomUser.User._roomID + "' AND x = '" + nextX + "' AND y = '" + nextY + "'"); if (action == null) { break; } else if (action > 0) { string action2; action2 = dbClient.getString("SELECT actiontwo FROM action_spots WHERE rid = '" + roomUser.User._roomID + "' AND x = '" + nextX + "' AND y = '" + nextY + "'"); int actiontwox; actiontwox = dbClient.getInt("SELECT x FROM action_spots WHERE id = '" + action2 + "'"); int actiontwoy; actiontwoy = dbClient.getInt("SELECT y FROM action_spots WHERE id = '" + action2 + "'"); int actiontworoomid; actiontworoomid = dbClient.getInt("SELECT rid FROM action_spots WHERE id = '" + action2 + "'"); if (actiontworoomid == roomUser.User._roomID) { roomUser.X = actiontwox; roomUser.Y = actiontwoy; roomUser.User.refreshAppearance(false, false, true); dbClient.runQuery("UPDATE users SET x = '" + actiontwox + "', y = '" + actiontwoy + "', avoid = '1' WHERE name = '" + roomUser.User._Username + "'"); } else { dbClient.runQuery("UPDATE users SET x = '" + actiontwox + "', y = '" + actiontwoy + "', avoid = '0' WHERE name = '" + roomUser.User._Username + "'"); roomUser.User.sendData("D^" + "H" + Encoding.encodeVL64(actiontworoomid)); } } else { } }[/SIZE][/COLOR] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
RP Arrow Help
Top