Thread: Strange glitch help please..

Results 1 to 3 of 3
  1. #1 Strange glitch help please.. 
    Registered Member
    Join Date
    Jul 2009
    Posts
    73
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Ok i added a slayer task systeem,

    but now i got this strange bug which i cant seem to fix
    , no matter what monster i kill, i get a slayer task kill and 1 slayer point

    how do i fix it so it only gives a slayer kill + point when i kill a specific
    unit with the spicific task for it

    My kill code:
    Code:
    if (npcs[i].npcType == 101 || npcs[i].npcType == 102 && temp.taskID == 101 || temp.taskID == 102) {
    temp.addSkillXP(150 * server.SERVER_EXPERIENCE, 18);
    temp.taskAmount -= 1;
    if (temp.playerEquipment[temp.playerFeet] == 7159) {
    temp.slaypoints += 2;
    } else {
    temp.slaypoints += 1;
    }
    temp.CAM().sendMessage("You got "+temp.slaypoints+" slayer points");
    //temp.CAM().sendMessage("You have "+temp.taskAmount+" kills left");
    if (temp.taskAmount == 0 || temp.taskAmount == 1) {
    temp.taskID = -1;
    temp.taskAmount = -1;
    temp.CAM().sendMessage("You have completed your task. Talk to Vannaka to get a new one.");
    }
    }
    temp.taskID = Monster you need to kill
    npcs[i].npcType = What monster dies

    So basicly this says: If monster 101 or 102 dies and you got taskid 101 or 102
    do etc...

    but it dous this: if monster 101 or 102 dies do etc...

    somehow it skipps the taskID part, and idk what wrong with it.

    Source used: Devo 2.7
    This code is in: NPChandler.java
    Under: process()

    Thanks for helping allrrdyy...
    ~Frozen
    Reply With Quote  
     

  2. #2  
    Registered Member
    Apower's Avatar
    Join Date
    Sep 2008
    Age
    30
    Posts
    824
    Thanks given
    7
    Thanks received
    15
    Rep Power
    94
    nvm was thinking wrong
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jul 2009
    Posts
    73
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by Apower View Post
    temp.taskID = -1;
    shouldn't be there? it makes task reset
    It dous that when you got 0 kills left, so thats supposed to be there
    and thats not the problem.

    Thanks tough.
    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
  •