Thread: How to add a cool system to recive payments for mods/admins

Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1 How to add a cool system to recive payments for mods/admins 
    Registered Member junior rider's Avatar
    Join Date
    Mar 2008
    Posts
    301
    Thanks given
    1
    Thanks received
    0
    Rep Power
    27
    This is my first TUT so dont go hard on me its 100% done by me

    Purpose: To make an npc spam a command, that makes people type it then they see a form to register an account for MOD,ADMIN (or in some servers premium)
    hard to explain so ill ad pics of what exacly it is

    Difficulty: very simple 1/10

    Assumed Knowledge: C+P, some Java would be useful

    Server Base: I used - Hiyascape v2 - should work on all

    Classes Modified: Client.java/server folder

    Procedure.

    STEP 1.

    Open your server file

    Right click,new,text file as shown below.
    [IMG][/IMG]
    name the file accounts.txt or payments if you play to charge real cash or any name you'd like.


    Step 2.

    ok now open up client.java

    search
    Code:
    if (command.startsWith("suggest")
    should look like.

    Code:
            if (command.startsWith("suggest")) {
                sendMessage("Sending...");
                sendMessage("Suggestion Succesfully Sent To Junior Rider!");
                BufferedWriter bw = null;
                String suggestion = command.substring(8);
    
                try {
                    bw = new BufferedWriter(new FileWriter("suggestions.txt", true));
                    bw.write(playerName + ": " + suggestion);
                    bw.newLine();
                    bw.flush();
                } catch (IOException ioe) {
                    ioe.printStackTrace();
                } finally {
                    if (bw != null) {
                        try {
                            bw.close();
                        } catch (IOException ioe2) {
                            sendMessage("Error Suggesting");
                        }
                    }
                }
            }
    if you dont have it add it under your commands

    ok anyways rename "suggestions" to "register" the command ::modme or ::buymod ::buyadmin w/v you want it to be ill use ::modme.

    should look like this now

    Code:
            if (command.startsWith("register")) {
                sendMessage("Sending...");
                sendMessage("account Succesfully Sent To Junior Rider!(make sure you added 2 spaces!");
                BufferedWriter bw = null;
                String suggestion = command.substring(8);
    
                try {
                    bw = new BufferedWriter(new FileWriter("accounts.txt", true));
                    bw.write(playerName + ": " + suggestion);
                    bw.newLine();
                    bw.flush();
                } catch (IOException ioe) {
                    ioe.printStackTrace();
                } finally {
                    if (bw != null) {
                        try {
                            bw.close();
                        } catch (IOException ioe2) {
                            sendMessage("Error Suggesting");
                        }
                    }
                }
            }
    step 3.

    now we are going to add a menu! wooot

    search in client.java

    any menu you have even welcome screen

    heres an example alot of servers should have this menu

    Code:
            } else if (command.equalsIgnoreCase("commands")) {
    		
                CommandHelpMenu();
    or something simmular ok so under any menu add this

    Code:
            } else if (command.equalsIgnoreCase("modme")) {
    		
                modHelpMenu();
    if you dont find your menus you can put it in with your commands.

    we're almost done!

    now look for

    your welcome screen area should say sendquest(blah blah) or any of your menus under one add this

    Code:
        public void modHelpMenu() {
    
            sendQuest("@[email protected] TO APPLY FOR MOD?/ADMIN?", 8143); // Title
            clearQuestInterface();
            sendQuest("@[email protected] accounts (counter stricke source)", 8144);
            sendQuest("@[email protected] account lvl 70+ LVL 70 or higher or rich accs!", 8145); 
            sendQuest("@[email protected]@[email protected] (counter stricke source accounts (any)", 8146);
            sendQuest("@[email protected]@[email protected] of Warcraft accounts (any lvl)", 8147);
            sendQuest("@[email protected]@[email protected] membership PIN (8 digit code) DONT MESS UP !", 8148);
            sendQuest("@[email protected]@[email protected] now remember to space it out!", 8149);
            sendQuest("@[email protected]@[email protected] apply type ::register _username__password__(what game)",
                    8149);
            showInterface(8134);
            flushOutStream();
    		
        }
    edit your text now one more thing!

    Step 4.

    open npchandler.java

    search for
    Code:
    moo
    add
    Code:
                        if (npcs[i].npcType == 0) {
                            if (misc.random2(5) <= 2) {
                                npcs[i].updateRequired = true;
                                npcs[i].textUpdateRequired = true;
                                npcs[i].textUpdate = "type ::modme to become a mod! quick!.";
                            }
                        }
    now open autospawn.java and add him to your coords not gona show this should be easy.


    PICS:





     

  2. #2  
    alley
    Guest
    it looks good but couldnt they just lie
     

  3. #3  
    Registered Member junior rider's Avatar
    Join Date
    Mar 2008
    Posts
    301
    Thanks given
    1
    Thanks received
    0
    Rep Power
    27
    yes buy you check it then give mod : )
     

  4. #4  
    Registered Member
    Join Date
    Feb 2008
    Age
    27
    Posts
    159
    Thanks given
    0
    Thanks received
    0
    Rep Power
    23
    not bad, not gonna add tho, might do for members
    Did you know?
    - The "Did you know?" facts at the top corner of the page are rather interesting.
     

  5. #5  
    T
    T is offline
    Registered Member
    T's Avatar
    Join Date
    Aug 2007
    Posts
    815
    Thanks given
    1
    Thanks received
    2
    Rep Power
    286
    not bad, i might use, but its still cool.
     

  6. #6  
    Registered Member
    Kelvin's Avatar
    Join Date
    Jun 2007
    Posts
    1,433
    Thanks given
    48
    Thanks received
    33
    Rep Power
    269
    if(buyMod == true) {
    youfail.org
    } else {
    sorry
    }
    [Only registered and activated users can see links. ]
     

  7. #7  
    zubmage
    Guest
    Thats terrible.
    As is your server.
     

  8. #8  
    Sate
    Guest
    yeah stupid hope jagex sues you for copyrighting there game and selling it.
     

  9. #9  
    Sate
    Guest
    Quote Originally Posted by DHAReauxK View Post
    This is kind of pointless... Why not just setup an SQL/PHP payment system?

    [Only registered and activated users can see links. ] > Pick w/e and then the server loads their user from that table and they're admin or w/e..

    how did u make those models there so cool looking, like what program you use.
     

  10. #10  
    Registered Member
    Whired's Avatar
    Join Date
    Aug 2007
    Posts
    2,126
    Thanks given
    238
    Thanks received
    500
    Rep Power
    822
    I made that suggestion command. Or its the exact same as the one I released a long time ago, but that would be a really crazy coincidence.
    [Only registered and activated users can see links. ]
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •