Thread: Npcs giving points problem.

Results 1 to 2 of 2
  1. #1 Npcs giving points problem. 
    Registered Member sirgodric87's Avatar
    Join Date
    Jan 2010
    Posts
    47
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Ok so i followed this:

    (How to make a npc give you points when you kill them)
    Step 3: Open up NPCHandler.java (src>server>model>npcs)

    Search for:
    Code:
    public void dropItems(int i) {
    Under one of the "if (npcs[i].npcType == ####) {" statements, add this:

    Code:
    if (npcs[i].npcType == NPCID) {
    c.randomPoints += 1;
    }
    Save, Close, and Compile!

    The only thing i changed was "randomPoints" to "dungTokens" which has no effect on it.

    So when you kill the NPC it is suppose to give you 10 "dungTokens". Well you have to relog for the changes to show. Not bad right ? Welll... When you relog again it erases the "dungTokens". I need help...



    Also i need to make it when the NPC dies it gives you lets say 1000 xp in the skill "24".

    Heres my codes for npchandler.java added under "public void dropItems(int i) {"

    Code:
    			if (npcs[i].npcType == 1279) {
    				c.dungTokens += 10;
    			}
    Help, REP++
    --
    Josh
    Chief Operations Officer
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. #2  
    ~! Legit ~!

    Join Date
    Nov 2010
    Posts
    1,973
    Thanks given
    183
    Thanks received
    211
    Rep Power
    237
    Playersave.java
    add this
    Code:
    } else if (token.equals(dungTokens)) {
    						p.DonatorPoints = Integer.parseInt(token2);
    Code:
    	characterfile.write("dungTokens = ", 0, 12);
    			characterfile.write(Integer.toString(p.dungTokens), 0, Integer.toString(p.dungTokens).length());
    			characterfile.newLine();
    [Only registered and activated users can see links. ]
    Spoiler for My Vouches:
    Quote Originally Posted by mattsforeal View Post
    I paid $5 went first, he fixed my problem and it worked. 100% legit would do it again.
    Quote Originally Posted by Mythic View Post
    Vouch for him, very smooth and fast trade, purchased his last 4m. Have fun with your new membership
    Quote Originally Posted by Harlan View Post
    Vouch, trustworthy guy.
    Quote Originally Posted by iPhisher™ View Post
    Vouch for Super-Man, he is a very legit and trustable guy.
    Reply With Quote  
     


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. Replies: 4
    Last Post: 12-27-2011, 04:39 AM
  2. Replies: 6
    Last Post: 12-19-2011, 06:29 AM
  3. [pi] making npcs give points on kill
    By ItsGoml in forum Help
    Replies: 5
    Last Post: 07-06-2011, 10:21 PM
  4. Giving points
    By lukas265 in forum Help
    Replies: 4
    Last Post: 03-12-2009, 03:24 PM
  5. [B]Attack Style Giving Exp On NPCS[/B]
    By R V C A in forum Tutorials
    Replies: 7
    Last Post: 10-02-2008, 08:39 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •