Thread: NPC hitting problem.

Results 1 to 3 of 3
  1. #1 NPC hitting problem. 
    Registered Member

    Join Date
    Oct 2009
    Posts
    203
    Thanks given
    1
    Thanks received
    1
    Rep Power
    90
    hey guys i need help changing the amount an npc hits. Here is my code in npchandler:

    Code:
    else if(npcs[NPCID].npcType == 4 && misc.random(3)==1) {
                                                  
    npcs[NPCID].animNumber = 1843;
    hitDiff = 35;  
    plr.playerLevel[5] -= 3;
    plr.sendQuest("" + plr.playerLevel[5] + "", 4012);
                                        } else if(npcs[NPCID].npcType == 4 && !plr.ProtMelee) {
                                                  
    npcs[NPCID].animNumber = 1843;
    hitDiff = 35;  
    plr.playerLevel[5] -= 3;
    plr.sendQuest("" + plr.playerLevel[5] + "", 4012);
                                        }
    I want to make it so that it can hit up to 35 with or without melee pray. At the moment it hits 35, but its all the time that it hits 35.
    Reply With Quote  
     

  2. #2  
    Registered Member
    G0nzo's Avatar
    Join Date
    Feb 2009
    Posts
    4,960
    Thanks given
    514
    Thanks received
    546
    Rep Power
    1735
    try
    Code:
    hitDiff = misc_random(35);
    Computer Science Graduate, Java Expert
    Need help with something? PM me
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Oct 2009
    Posts
    203
    Thanks given
    1
    Thanks received
    1
    Rep Power
    90
    Quote Originally Posted by G0nzo View Post
    try
    Code:
    hitDiff = misc_random(35);
    yeh, thanks bro, just tryed messin round with it yesterday and i thought of this. It works, so thats for the post
    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

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