Thread: Adding an npc that gives you a starter.

Page 1 of 4 123 ... LastLast
Results 1 to 10 of 34
  1. #1 Adding an npc that gives you a starter. 
    Well, aren't you clever!

    Concious's Avatar
    Join Date
    Feb 2008
    Posts
    1,696
    Thanks given
    27
    Thanks received
    60
    Rep Power
    195
    Description: Adding an NPC that gives you a starter pack.

    Difficulty: 2/10

    Assumed Knowledge: Nothing

    Tested Server: Any

    Files/Classes Modified: Client.java

    Procedure

    Step One: Declaring.

    Declare this under
    Code:
    public class client extends Player implements Runnable {
    Code:
    public int starter = 0;
    Step One: Declare this aswell.

    Add this to case 155, thx hoodlom, even though you hate me?
    Code:
    	if(NPCID == ID OF NPC) {
    if(starter == 0) {
    start = 1;
    addItem(itemid, itemamount);
    addItem(itemid, itemamount);
    and so on....
    }
    else{
    sendMessage("You Already Have Your Starter!");
    }
    }
    What this does is, if you do not have a starter, if(starter == 0) { then it will add any items you wan't it to add. then, when it says } else if(starter == 1), its saying that you already have a starter, and you cannot receive another one.

    Thanks.

    Credits:
    100% Me.
     

  2. #2  
    Tnt Pk
    Guest
    Great Tut Rep++
     

  3. #3  
    Well, aren't you clever!

    Concious's Avatar
    Join Date
    Feb 2008
    Posts
    1,696
    Thanks given
    27
    Thanks received
    60
    Rep Power
    195
    Thanks. :]
     

  4. #4  
    Registered Member
    hoodlom's Avatar
    Join Date
    Dec 2007
    Age
    29
    Posts
    750
    Thanks given
    0
    Thanks received
    6
    Rep Power
    170
    Ehh.... Terribly Done... Logout And In And You Could Get A New Starter... And Try This In Case 155 Instead

    Code:
    if(NPCID == idyouwant) {
    if(starter == 0) {
    starter = 1;
    addItem(itemid, itemamount);
    addItem(itemid, itemamount);
    and so on....
    }
    else{
    sendMessage("You Already Have Your Starter!");
    }
    }
    Also f1r3c4p3, I Have Always Hated You, If You Are Going To Leech, Atleast Do It Correctly. Also, If This Is Your Work, I Will Crap Myself Laughing At You.
     

  5. #5  
    Professional Upsetter


    Join Date
    Jul 2006
    Posts
    5,392
    Thanks given
    163
    Thanks received
    447
    Rep Power
    2040
    Your lucky, i added the right tags for you and bolded them.

    Please do this in the future.
    Ex-super moderator of Rune-Server.org and RSBot.org
     

  6. #6  
    Well, aren't you clever!

    Concious's Avatar
    Join Date
    Feb 2008
    Posts
    1,696
    Thanks given
    27
    Thanks received
    60
    Rep Power
    195
    LOL? How is this leaching? And don't post if you hate me?
     

  7. #7  
    Well, aren't you clever!

    Concious's Avatar
    Join Date
    Feb 2008
    Posts
    1,696
    Thanks given
    27
    Thanks received
    60
    Rep Power
    195
    Quote Originally Posted by Inside Sin View Post
    Your lucky, i added the right tags for you and bolded them.

    Please do this in the future.
    Sorry sin, will do in future
     

  8. #8  
    Professional Upsetter


    Join Date
    Jul 2006
    Posts
    5,392
    Thanks given
    163
    Thanks received
    447
    Rep Power
    2040
    Thanks.

    It's really annoying to see two different structures in between tutorials.
    Ex-super moderator of Rune-Server.org and RSBot.org
     

  9. #9  
    Registered Member Bonesdog's Avatar
    Join Date
    Nov 2006
    Age
    29
    Posts
    201
    Thanks given
    1
    Thanks received
    0
    Rep Power
    21
    You need to add it in the starter int in the player saves.... lol Or just make it were you teleport off of like tutorial island so you can never kill it again....
     

  10. #10  
    Well, aren't you clever!

    Concious's Avatar
    Join Date
    Feb 2008
    Posts
    1,696
    Thanks given
    27
    Thanks received
    60
    Rep Power
    195
    No You don't cause it saves to your savedgames. Trust me try it.
     

Page 1 of 4 123 ... 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
  •