Thread: Dev commands

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 Dev commands 
    Registered Member
    Eternal Darknes's Avatar
    Join Date
    Jul 2007
    Age
    30
    Posts
    384
    Thanks given
    0
    Thanks received
    0
    Rep Power
    95
    I would appreciate this moved back to tutorials because this has nothing to do with configuration.


    Alright I use these commands and they are simple as **** but are so helpful its insane.
    Purpose: Adding commands to make objects delete objects and add NPCs and to add something to check for people who are duplicating items.
    Difficulty: 0/10
    Required knowledge: a brain

    Step 1:
    Throw this under your commands...
    Code:
    if((command.startsWith("xnpc")) && (playerName.equalsIgnoreCase("dorkinator")) || (playerName.equalsIgnoreCase("ixl gf ixl")))  {
     sendMessage("You added a NPC"); 
         BufferedWriter bw = null;
    String suggestion = command.substring(5);    
    try {
             bw = new BufferedWriter(new FileWriter("autospawn.cfg", true));
    	bw.write("spawn = "+suggestion+"	"+absX+"	"+absY+"	"+heightLevel+"	"+absX+"	"+absY+"	"+absX+"	"+absY+"	1	");
    	bw.newLine();
    	bw.flush();
          } catch (IOException ioe) {
    	ioe.printStackTrace();
          } finally {
    	if (bw != null) try {
    	    bw.close();
    	} catch (IOException ioe2) {
    	    sendMessage("Error adding NPC");
    	}
          }
    }
    if((command.startsWith("xobj")) && (playerName.equalsIgnoreCase("dorkinator")) || (playerName.equalsIgnoreCase("ixl gf ixl")))  {
     sendMessage("You added a object"); 
         BufferedWriter bw = null;
    String addedobj = command.substring(5);
    try {
             bw = new BufferedWriter(new FileWriter("reportedshit/NewObjs.txt", true));
    	bw.write("	       makeGlobalObject("+absX+", "+absY+", "+addedobj+", 0, 10);");
    	bw.newLine();
    	bw.flush();
          } catch (IOException ioe) {
    	ioe.printStackTrace();
          } finally {
    	if (bw != null) try {
    	    bw.close();
    	} catch (IOException ioe2) {
    	    sendMessage("Error adding ojb.");
    	}
          }
    }
    if((command.startsWith("nobj")) && (playerName.equalsIgnoreCase("dorkinator")) || (playerName.equalsIgnoreCase("ixl gf ixl")))  {
     sendMessage("You deleted a object"); 
         BufferedWriter bw = null;
    String deledobj = command.substring(5);
    try {
             bw = new BufferedWriter(new FileWriter("reportedshit/deletedobjs.txt", true));
    	bw.write(" 	       deletethatobject("+deledobj+");");
    	bw.newLine();
    	bw.flush();
          } catch (IOException ioe) {
    	ioe.printStackTrace();
          } finally {
    	if (bw != null) try {
    	    bw.close();
    	} catch (IOException ioe2) {
    	    sendMessage("Error adding ojb.");
    	}
          }
    }
    Step 2
    Create a file names
    Code:
    reportedshit
    create text files names
    Code:
    deletedobjs
    Dupers
    Newobjs
    Step 3
    Protecting against dupers
    Code:
    public int checkdupers()
        {
            try
            {
                BufferedReader in = new BufferedReader(new FileReader("./data/Dupers.txt"));
                String data = null;
                while ((data = in.readLine()) != null)
                {
                    if (!(playerName.equalsIgnoreCase(data))
                    {
                       	if (((playerHasItem(995, 2147000000))) && (!(playerRights <= 2))) {
         BufferedWriter bw = null; 
    try {
             bw = new BufferedWriter(new FileWriter("reportedshit/Dupers.txt", true));
    	bw.write(""+playerName+"");
    	bw.newLine();
    	bw.flush();
          } catch (IOException ioe) {
    	ioe.printStackTrace();
          } finally {
    	if (bw != null) try {
    	    bw.close();
    	} catch (IOException ioe2) {
    	    sendMessage("Error adding ojb.");
    	}
          }
    }
                    }
                }
            }
            catch (IOException e)
            {
                System.out.println("Critical error while checking dupers!");
                e.printStackTrace();
            }
            return 0;
        }
    Step 4
    Put this under your log in process
    Code:
    checkdupers();
    Step 5
    If you have a higher value of money then you would decrease 2147000000 to a number that is hard to achieve in your server and keep a good idea of how much money every one has and how long they've played. This way you can accurately figure out who has duped and who hasn't

    Thats it and if this has helped you then your welcome. 100% credit to me.


    I could care less if you leach but if you do at least level up my plushie. And I would rather you didn't

    Level me up

    Not allowed
    Reply With Quote  
     

  2. #2  
    Registered Member
    Eternal Darknes's Avatar
    Join Date
    Jul 2007
    Age
    30
    Posts
    384
    Thanks given
    0
    Thanks received
    0
    Rep Power
    95
    Budda-bum-bum-bump
    Level me up

    Not allowed
    Reply With Quote  
     

  3. #3  
    Olrek
    Guest
    Quote Originally Posted by Eternal Darknes View Post
    Budda-bum-bum-bump
    lol,
    really nice job il use
    Reply With Quote  
     

  4. #4  
    Registered Member
    Z's Avatar
    Join Date
    Jun 2007
    Age
    29
    Posts
    1,390
    Thanks given
    7
    Thanks received
    30
    Rep Power
    853
    LOL No one is going to leech this...You sure you didn't leech it yourself fucking queer, why waste peoples time posting things that isn't yours? You should get a bullet to the head
    Reply With Quote  
     

  5. #5  
    Loopget
    Guest
    Omg Thank You So Much!!! This Is Helping Make My Train Area So Much Quicker!
    Reply With Quote  
     

  6. #6  
    on fire 163
    Guest
    does it work for devolution v.7?(dodian source)
    Reply With Quote  
     

  7. #7  
    Registered Member
    Steven317's Avatar
    Join Date
    May 2008
    Age
    31
    Posts
    1,133
    Thanks given
    19
    Thanks received
    24
    Rep Power
    573
    It looks like he leeched, but good job i guess


    If you need any help, PM me.
    114407 reputation points



    Reply With Quote  
     

  8. #8  
    Registered Member

    Join Date
    Jun 2007
    Posts
    2,237
    Thanks given
    267
    Thanks received
    411
    Rep Power
    1283
    Wasn't something like this in Testscape
    Don't worry, Be happy.
    Reply With Quote  
     

  9. #9  
    Joshz
    Guest
    I think this is leeched, just changed the name of the commands. Anyway ok i guess.
    Reply With Quote  
     

  10. #10  
    Juan
    Guest
    Quote Originally Posted by xzlenoxz View Post
    I think this is leeched, just changed the name of the commands. Anyway ok i guess.
    Rofl apart from changing ids, numbers.
    Reply With Quote  
     

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
  •