[COMMAND] :changename [INGAME][JNIKE]

Results 1 to 11 of 11
  1. #1
    Proficient Member JNike Rulez is offline
    MemberRank
    Sep 2010 Join Date
    GermanyLocation
    183Posts

    [COMMAND] :changename [INGAME][JNIKE]

    Hey guys, i've done just the code for uber to change ingame the name.

    "HOW DOES IT WORK?" Easy, just write :name youractualname yourwannabename
    Example: :name JNike ragezone
    In the emulator will get a writeline where it says [NAMECHANGE]: JNike changed his name to ragezone.

    If you type "JUST" :name it will freeze the emulator, im here to find a solution, it isnt so easy as i thought, hope someone could help me? :P

    Thanks anyways:

    Known bugs:
    • If you enter nothing, the emu will crash, idk why, i tryed if(Params[1] == null || Params[2] == null) { return false; } etc. nothing worked just d/ced :(
    • Not refreshing ingame.


    Anyways, code for ya:

    (PS IM WORKING ON!):
    Code:
    case "username":
                        case "newname":
                        case "name":
                            {
                                if (Session.GetHabbo().Rank >= 6)
                                {
                                    string old_name = Params[1];
                                    string new_name = Params[2];
                                        using (Uber.Storage.DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
                                        {
                                            dbClient.ExecuteQuery("UPDATE users SET username = '" + Params[2] + "' WHERE username = '" + Params[1] + "'");
                                        }
                                    Session.SendNotif("Your Username has been changed to " + Params[2]);
                                    Console.Write("[NAMECHANGE]: ");
                                    UberEnvironment.GetLogging().WriteLine(Params[1] + " has changed his name to" + Params[2]);
                                    
                                    return true;
                                }
                                Session.SendNotif("You doesnt have the rights to do this!");
                                return false;
                            }
    SCREENSHIT:


    Get ready for Project One X 5. with much cool Commands, i released just 2 or 3 commands of my emulator, im making much more for it and coding on it :)!

    - JNike!
    Last edited by JNike Rulez; 04-03-11 at 01:24 PM.


  2. #2
    Banned c0mma is offline
    BannedRank
    Jan 2011 Join Date
    ^RaGEZONE^Location
    696Posts

    Re: [COMMAND] :changename [INGAME][JNIKE]

    Thanks a lot for this!
    Sick release !!!!!!!!

    (1st post ;p)

  3. #3
    Proficient Member JNike Rulez is offline
    MemberRank
    Sep 2010 Join Date
    GermanyLocation
    183Posts

    Re: [COMMAND] :changename [INGAME][JNIKE]

    Quote Originally Posted by iPixelHotel View Post
    Sick release bro!
    Thanks ;).

    Remember, it also works for other peoples, if you wanna to rename a other name.

  4. #4
    Banned c0mma is offline
    BannedRank
    Jan 2011 Join Date
    ^RaGEZONE^Location
    696Posts

    Re: [COMMAND] :changename [INGAME][JNIKE]

    Also, I think it freezes the emulator because it can't find that username so it's overlapping until it can find that username? I don't know ;o

  5. #5
    Proficient Member JNike Rulez is offline
    MemberRank
    Sep 2010 Join Date
    GermanyLocation
    183Posts

    Re: [COMMAND] :changename [INGAME][JNIKE]

    Quote Originally Posted by iPixelHotel View Post
    Also, I think it freezes the emulator because it can't find that username so it's overlapping until it can find that username? I don't know ;o
    But i made:

    if(Params[1] == null || Params[2] == null)
    {
    return false;
    }
    else if(Params[1] == null && Params[2] == null)
    {
    return false;
    }
    else
    {
    // Do rename
    }

  6. #6
    Banned c0mma is offline
    BannedRank
    Jan 2011 Join Date
    ^RaGEZONE^Location
    696Posts

    Re: [COMMAND] :changename [INGAME][JNIKE]

    Hmmm, to me looks like it won't stop it from overlapping...

    ---------- Post added at 11:50 PM ---------- Previous post was at 11:48 PM ----------

    Brb, testing it out now...

    ---------- Post added at 11:59 PM ---------- Previous post was at 11:50 PM ----------

    I think I was right, it can't find the username, so it keeps hunting for that username (Blank Username) to change it. So my th thoughts are that it's overlapping and looking for the username.

    If I am wrong then, stf me ;p But that's all I can think of, atm...[COLOR="Silver"]
    Last edited by c0mma; 04-03-11 at 02:02 PM.

  7. #7
    Banned PEjump2 is offline
    BannedRank
    Jan 2010 Join Date
    The NetherlandsLocation
    2,838Posts

    Re: [COMMAND] :changename [INGAME][JNIKE]

    Nice sql injection method, Now we can change our username to one of the Administrators has! :D
    Last edited by PEjump2; 04-03-11 at 05:19 PM.

  8. #8
    C# | C++ Emerica is offline
    MemberRank
    Oct 2010 Join Date
    GermanyLocation
    437Posts

    Re: [COMMAND] :changename [INGAME][JNIKE]

    Thanks for this, but is it laggy ?

  9. #9
    Live Ocottish Sverlord Joopie is offline
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,773Posts

    Re: [COMMAND] :changename [INGAME][JNIKE]

    Yhee right, And the user wil loose all his rooms? and items in that room????

  10. #10
    Ultra Light Beam Makarov is offline
    MemberRank
    Apr 2010 Join Date
    GothamLocation
    3,622Posts

    Re: [COMMAND] :changename [INGAME][JNIKE]

    This is the worst command ever, bad coder.

    You didn't say if the user is taken or anything..

  11. #11
    Proficient Member JNike Rulez is offline
    MemberRank
    Sep 2010 Join Date
    GermanyLocation
    183Posts

    Re: [COMMAND] :changename [INGAME][JNIKE]

    Quote Originally Posted by Tr0ll.™ View Post
    This is the worst command ever, bad coder.

    You didn't say if the user is taken or anything..
    Hell yeah, its bugged, but it works, so go to fuck out!
    If your good in C#, FIX IT YOUR Self, and dont destroy this shit.

    Fag ~



Advertisement