SIMPLE custom command

Results 1 to 22 of 22
  1. #1
    Member Hailey is offline
    MemberRank
    Jul 2010 Join Date
    CaliforniaLocation
    56Posts

    SIMPLE custom command

    So, I read Xavi's tutorial on how to create commands and i took up the opportunity to try one out.
    here's the code:
    Code:
    #region :drink
    case "alcohol":
    {
    Room.sendSaying(roomUser, "*Pours some vodka into a shotglass and drinks*");
    Room.sendSaying(roomUser, "*gets tipsy*");
    User.sendData("BK" + "Dont fall over!");
    resfreshAppearence(true,true,true);
    break;
    }
    #endregion
    there was an advanced code, i mixed it around. it came out like this:
    Code:
    #region :drink 
    case "alcohol":
    { 
    using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) 
    { 
    dbClient.runQuery("UPDATE users SET health = health - '35' WHERE name = '" + _Username + "'"); 
    dbClient.runQuery("UPDATE users SET credits = credits - '250' WHERE name = '" + _Username + "'"); 
    Room.sendSaying(roomUser, "*Pours some vodka into a shotglass and drinks*"); 
    _Mission = "[Intoxicated] tipsy!";
    Room.sendSaying(roomUser, "*Gets tipsy*"); 
    this.statusManager.containsStatus("lay"); 
    User.sendData("BK" + "Dont fall over!"); 
    refreshAppearence(true,true,true);
    }  
    break;
    } 
    #endregion
    If i did anything wrong, or you want to edit something post below.
    hailey

    credits:
    xavi - tutorial
    me - command

    Also, i was wondering if this command can be used on a v36 hotel, or only an RP hotel. any clarification on this would be awesome
    Last edited by Hailey; 06-09-10 at 06:34 AM.


  2. #2
    Not active anymore! Winter is offline
    MemberRank
    Aug 2009 Join Date
    AustraliaLocation
    461Posts

    Re: SIMPLE custom command

    how random, but good job :P
    (P.S - I dont think it should be in this section though :P)

  3. #3
    Account Upgraded | Title Enabled! No0b is offline
    MemberRank
    Jul 2010 Join Date
    Michigan, USLocation
    1,426Posts

    Re: SIMPLE custom command

    Wow random awesome though ily.

  4. #4
    Member Hailey is offline
    MemberRank
    Jul 2010 Join Date
    CaliforniaLocation
    56Posts

    Re: SIMPLE custom command

    @typhoid - thanks! thats greatly appreciated. and also thanks for that aha my bad xD

    @No0b - thankssss xD

  5. #5

    me ridez bykes

    Sean is offline

    LegendRank
    Jun 2007 Join Date
    JerseyLocation
    4,098Posts

    Re: SIMPLE custom command

    Nice command. Thanks

  6. #6
    Member Hailey is offline
    MemberRank
    Jul 2010 Join Date
    CaliforniaLocation
    56Posts

    Re: SIMPLE custom command

    no thank YOU xD

  7. #7

    me ridez bykes

    Sean is offline

    LegendRank
    Jun 2007 Join Date
    JerseyLocation
    4,098Posts

    Re: SIMPLE custom command

    Quote Originally Posted by Hailey View Post
    no thank YOU xD
    I thanked you, but I don't use no cms shit. I use v18, try making a command for that version XD

  8. #8
    Member Hailey is offline
    MemberRank
    Jul 2010 Join Date
    CaliforniaLocation
    56Posts

    Re: SIMPLE custom command

    Quote Originally Posted by sean111 View Post
    I thanked you, but I don't use no cms shit. I use v18, try making a command for that version XD
    I dont really know how. im new to making commands lol but ill see what i can figure out O_o

  9. #9
    Account Upgraded | Title Enabled! Raz0rDot is offline
    MemberRank
    Jun 2010 Join Date
    NorwayLocation
    489Posts

    Re: SIMPLE custom command

    Quote Originally Posted by sean111 View Post
    I thanked you, but I don't use no cms shit. I use v18, try making a command for that version XD
    to make commands for v18 you need to know how to edit/make a new server.. You can't just add it.. That means you/he have to learn VB6 or C# first

    Anyways, Good job! Does it work for uber btw?

  10. #10
    Member Hailey is offline
    MemberRank
    Jul 2010 Join Date
    CaliforniaLocation
    56Posts

    Re: SIMPLE custom command

    Quote Originally Posted by RedSeaD1 View Post
    to make commands for v18 you need to know how to edit/make a new server.. You can't just add it.. That means you/he have to learn VB6 or C# first

    Anyways, Good job! Does it work for uber btw?
    hmm thanks for letting me know. ill try to learn that soon but itll probably take a while xD

    and thanks so much! Im not sure, havent tested it yet. i just used to template-ish thing on xavi.'s thread but ill try to find out and let you know :)

  11. #11

    herp a derp

    vLife is offline

    Super ModRank
    Apr 2009 Join Date
    The BahamasLocation
    3,811Posts

    Re: SIMPLE custom command

    If you decide to do one for old school I would advise against it.
    Because the only server you will be able to edit that is open source are usa111 (Messy coding) & Debbo 3.5.

    And most people use different servers regardless.

  12. #12
    Member Hailey is offline
    MemberRank
    Jul 2010 Join Date
    CaliforniaLocation
    56Posts

    Re: SIMPLE custom command

    Quote Originally Posted by vLife View Post
    If you decide to do one for old school I would advise against it.
    Because the only server you will be able to edit that is open source are usa111 (Messy coding) & Debbo 3.5.

    And most people use different servers regardless.
    thanks for the advice. i dont think ill be making any for oldskools anyways, once i learn to edit the servers, c# and more php, ill be making them for v36 considering thats the version of my hotel.

  13. #13
    Alpha Member Zak© is offline
    MemberRank
    Oct 2007 Join Date
    2,693Posts

    Re: SIMPLE custom command

    But She Can release the VB6 Commands if you need help with an advanced command pm me this commands good for a person who just startedog

  14. #14
    Member Hailey is offline
    MemberRank
    Jul 2010 Join Date
    CaliforniaLocation
    56Posts

    Re: SIMPLE custom command

    Alright thanks. and i just did start! aha
    anywaysss i have noo clue what VB6 is ;s

  15. #15
    Proficient Member swimoTheBig is offline
    MemberRank
    Aug 2008 Join Date
    Essex, UKLocation
    194Posts

    Re: SIMPLE custom command

    Quote Originally Posted by Hailey View Post
    So, I read Xavi's tutorial on how to create commands and i took up the opportunity to try one out.
    here's the code:
    Code:
    #region :drink
    case "alcohol":
    {
    Room.sendSaying(roomUser, "*Pours some vodka into a shotglass and drinks*");
    Room.sendSaying(roomUser, "*gets tipsy*");
    User.sendData("BK" + "Dont fall over!");
    break;
    }
    #endregion
    there was an advanced code, i mixed it around. it came out like this:
    Code:
    #region :drink 
    case "alcohol":
    { 
    using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) 
    { 
    dbClient.runQuery("UPDATE users SET health = health - '35' WHERE name = '" + _Username + "'"); 
    dbClient.runQuery("UPDATE users SET credits = credits - '250' WHERE name = '" + _Username + "'"); 
    Room.sendSaying(roomUser, "*Pours some vodka into a shotglass and drinks*"); 
    _Mission = "[Intoxicated] tipsy!";
    Room.sendSaying(roomUser, "*Gets tipsy*"); 
    this.statusManager.containsStatus("lay"); 
    User.sendData("BK" + "Dont fall over!"); 
    }  
    break;
    } 
    #endregion
    If i did anything wrong, or you want to edit something post below.
    hailey

    credits:
    xavi - tutorial
    me - command

    Also, i was wondering if this command can be used on a v36 hotel, or only an RP hotel. any clarification on this would be awesome
    You did not refresh the mission variables sir.

  16. #16
    Member Hailey is offline
    MemberRank
    Jul 2010 Join Date
    CaliforniaLocation
    56Posts

    Re: SIMPLE custom command

    @swimothebig oh okay ill fix later. and im a girlllll.

  17. #17
    Apprentice EzzrA is offline
    MemberRank
    Aug 2010 Join Date
    9Posts

    angry Re: SIMPLE custom command

    Hi im still really new in making customs. My Question is:
    WHERE TO PUT THIS TEXTS???

  18. #18
    Alpha Member Zak© is offline
    MemberRank
    Oct 2007 Join Date
    2,693Posts

    Re: SIMPLE custom command

    Find Virtualuser.cs In the Source

    CTRL F Find Public Commands\put it there.

  19. #19
    Valued Member ReDoc is offline
    MemberRank
    Aug 2010 Join Date
    United StatesLocation
    134Posts

    wink Re: SIMPLE custom command

    Good Job. ;b

  20. #20
    Account Upgraded | Title Enabled! Xavi. is offline
    MemberRank
    Jul 2010 Join Date
    At Home.phpLocation
    708Posts

    Re: SIMPLE custom command

    :D Happy to see users are using my tutorial, and glad to see we have budding new coders :D and Nice Codes even though wrong section

    Thanks for crediting my tutorial, and good the luck in future coding

    Xavi.

  21. #21
    Member Hailey is offline
    MemberRank
    Jul 2010 Join Date
    CaliforniaLocation
    56Posts

    Re: SIMPLE custom command

    your tut was very useful so why not give it a shot x] yeah wrong section my bad aha and np on crediting.

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

    Re: SIMPLE custom command

    I feel obligated to say that i fixed most of Xavi's Cmd's

    And released more advanced edits ;[



Advertisement