Thread: ~.-NPC Slain Message-.~

Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1 ~.-NPC Slain Message-.~ 
    TeleNubby
    Guest
    ################################################## #########
    ### TUTORIAL ###
    ### SENDING A MESSAGE TO ALL PLAYERS WHEN NPC IS KILLED ###
    ### Example: "Slash Bash has been slain in battle by Dustin(Lvl 122)." ###
    ### MADE BY TELENUBBY ###
    ################################################## #########

    What this does: Makes it so when you kill a certain npc, it says for example: "Slash Bash has been slain by TeleNubby(Lvl 126)."
    Difficulty: 6/10
    Requiremtns: Common sense, and a will to learn.
    Anti-Leech: None... Yet.

    Open server.java and search for:
    Code:
    		playerHandler = new PlayerHandler();
    Under that add:
    Code:
    		npcKill = new NPCKillHandler();
    Still in server.java, search for:
    Code:
    	public static PlayerHandler playerHandler = null;
    Now under that add:
    Code:
    	public static NPCKillHandler npcKill = null;
    Save, and exit out of server.java. Now download THIS HANDLER, and add that to where all of your java files for your server are held.

    Open up client.java and under
    Code:
    public class client extends Player implements Runnable {
    Add:
    Code:
    public String npckName = "";
    Still in client.java, search for either your login welcome message (not screen!), or your "player has logged in" message and under it add:
    Code:
    server.npcKill.playerIdd = playerId;
    Save, and close out of client.java.

    Open NPCHandler.java and search for the first:
    Code:
    if(npcs[NPCID].npcType ==
    It should be under public void MonsterDropItem(int NPCID) or something similiar, and above the line we just searched, add:
    Code:
    server.npcKill.npcKilledd(NPCID);
    Now save, and close out of NPCHandler.java

    Compile, run your server, and ENJOY!

    Note: This only comes with one npc, therefore only npc 2060 works with this. You can add more NPC Names in the handler by using the layout I used when I did the example for NPC 2060.

    '~.-TeleNubby-.~'
     

  2. #2  
    my rep is h4x0r3d


    Join Date
    Dec 2006
    Posts
    1,760
    Thanks given
    10
    Thanks received
    8
    Rep Power
    207
    Nice job, like that. I might add =D rep+
    Quote Originally Posted by super_ View Post
    this is shit. you are shit. gtfo retard.
     

  3. #3  
    TeleNubby
    Guest
    Quote Originally Posted by Link View Post
    Nice job, like that. I might add =D rep+
    Lol quick reply, thanks

    On a side note, where do I view how much Rep I have?
     

  4. #4  
    my rep is h4x0r3d


    Join Date
    Dec 2006
    Posts
    1,760
    Thanks given
    10
    Thanks received
    8
    Rep Power
    207
    Go to userCp and when you go there says rep points.
    Quote Originally Posted by super_ View Post
    this is shit. you are shit. gtfo retard.
     

  5. #5 :) 
    TeleNubby
    Guest
    Alright thanks.

    This took me about 30 minutes to write up Did it for a guy in the Shoutbox
     

  6. #6  
    Purefire
    Guest
    Hmm.. I'm gonna add this to mine. Thanks, I've been looking for this rep+
     

  7. #7  
    skippy the llama
    Guest
    there's a much much simpler way
     

  8. #8  
    TeleNubby
    Guest
    Quote Originally Posted by skippy the llama View Post
    there's a much much simpler way
    I know. But I love handlers, and I hate lag. Plus, learning handlers is a good thing, and reducing any amount of lag is even better.
     

  9. #9  
    ernisx
    Guest
    Nice tut =].
     

  10. #10  
    Registered Member
    Z's Avatar
    Join Date
    Jun 2007
    Age
    29
    Posts
    1,390
    Thanks given
    7
    Thanks received
    30
    Rep Power
    853
    this is the complicated way to do it all you really need to do is add a line in npchandler....but this works too....good job?
     

Page 1 of 3 123 LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. Welcome message. PI
    By thim slug in forum Help
    Replies: 5
    Last Post: 12-13-2010, 09:41 AM
  2. PI (I think) Welcome message?
    By Barinade in forum Help
    Replies: 0
    Last Post: 12-11-2010, 10:48 PM
  3. [PI] Repeating message/Timed message
    By Vegas in forum Help
    Replies: 7
    Last Post: 10-17-2010, 12:01 PM
  4. Welcome message
    By VichiQue in forum Help
    Replies: 4
    Last Post: 11-11-2008, 10:10 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •