Thread: Force Chat isnt working

Page 5 of 5 FirstFirst ... 345
Results 41 to 50 of 50
  1. #41  
    Member Force Chat isnt working Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    The error was regarding the animation right?

    or was it because it is set to -1? (I assume it's this)

    Attached imageAttached image
    Reply With Quote  
     

  2. #42  
    Registered Member
    Join Date
    Feb 2012
    Posts
    285
    Thanks given
    46
    Thanks received
    11
    Rep Power
    29
    Quote Originally Posted by Luke132 View Post
    The error was regarding the animation right?

    or was it because it is set to -1? (I assume it's this)


    nope this: NPCHandler.npcs[player.npcClickIndex].turnNpc(player.absX, player.absY);

    error:
    Code:
    Jul 11, 2014 6:08:32 PM org.rs2server.event.TaskScheduler run
    SEVERE: Exception during task execution.
    java.lang.NullPointerException
    	at org.rs2server.entity.players.skills.thieving.Pickpocket$1.stop(Pickpocket.java:112)
    	at org.rs2server.event.CycleEventContainer.stop(CycleEventContainer.java:73)
    	at org.rs2server.entity.players.skills.thieving.Pickpocket$1.execute(Pickpocket.java:101)
    	at org.rs2server.event.CycleEventContainer.execute(CycleEventContainer.java:65)
    	at org.rs2server.event.CycleEventHandler.process(CycleEventHandler.java:76)
    	at org.rs2server.Server$1.execute(Server.java:212)
    	at org.rs2server.event.Task.tick(Task.java:118)
    	at org.rs2server.event.TaskScheduler.run(TaskScheduler.java:103)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    	at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    VOUCHES
    Spoiler for Vouches:

    bought a pin off him for 8m
    Quote Originally Posted by zexxo17 View Post
    trusted thanks
    bought pin of him 22m
    Quote Originally Posted by freedomex View Post
    sold 3 month pin to him for 22m , went smooth i went first hes trusted thanks
    Reply With Quote  
     

  3. #43  
    Member Force Chat isnt working Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    debug it to make sure npcClickIndex isn't being reset between clicking and doing the animation (which i imagine it is tbh)

    Attached imageAttached image
    Reply With Quote  
     

  4. #44  
    Registered Member
    Join Date
    Feb 2012
    Posts
    285
    Thanks given
    46
    Thanks received
    11
    Rep Power
    29
    Quote Originally Posted by Luke132 View Post
    debug it to make sure npcClickIndex isn't being reset between clicking and doing the animation (which i imagine it is tbh)
    yea somehow, i need to make the npcClickIndex something? its returning: Click index: 0
    VOUCHES
    Spoiler for Vouches:

    bought a pin off him for 8m
    Quote Originally Posted by zexxo17 View Post
    trusted thanks
    bought pin of him 22m
    Quote Originally Posted by freedomex View Post
    sold 3 month pin to him for 22m , went smooth i went first hes trusted thanks
    Reply With Quote  
     

  5. #45  
    Member Force Chat isnt working Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    Quote Originally Posted by The evil ways View Post
    yea somehow, i need to make the npcClickIndex something? its returning: Click index: 0
    Just make a new variable in your player class called npcToThieve and set it at the same time (c.npcToThieve = npcClickIndex

    then use npcToThieve instead of npcClickIndex in your thieving code, that'll definitely work

    not the best way to do it but i don't care, and you don't care as long as it works, everyone's happy.

    Attached imageAttached image
    Reply With Quote  
     

  6. #46  
    Registered Member
    Join Date
    Feb 2012
    Posts
    285
    Thanks given
    46
    Thanks received
    11
    Rep Power
    29
    Quote Originally Posted by Luke132 View Post
    Just make a new variable in your player class called npcToThieve and set it at the same time (c.npcToThieve = npcClickIndex

    then use npcToThieve instead of npcClickIndex in your thieving code, that'll definitely work

    not the best way to do it but i don't care, and you don't care as long as it works, everyone's happy.
    still getting an error at the same line returning 0

    edit: should i add this: at the top of thr method, npcId = npcclickindex ?
    VOUCHES
    Spoiler for Vouches:

    bought a pin off him for 8m
    Quote Originally Posted by zexxo17 View Post
    trusted thanks
    bought pin of him 22m
    Quote Originally Posted by freedomex View Post
    sold 3 month pin to him for 22m , went smooth i went first hes trusted thanks
    Reply With Quote  
     

  7. #47  
    Member Force Chat isnt working Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    for(final int i = 0; i < NPCS.length; i++) {

    what's that loop for at the top?

    Attached imageAttached image
    Reply With Quote  
     

  8. #48  
    Registered Member
    Join Date
    Feb 2012
    Posts
    285
    Thanks given
    46
    Thanks received
    11
    Rep Power
    29
    Quote Originally Posted by Luke132 View Post
    for(final int i = 0; i < NPCS.length; i++) {

    wowowowow why are u doing it for every npc in the server each click?
    im not: private final int[][] NPCS ={
    {1, 1, 8, 9, 10, 1}, {2, 1, 8, 9, 10, 1}, {3, 1, 8, 9, 10, 1}, {4, 1, 8, 9, 10, 1},
    {5, 1, 8, 9, 10, 1}, {6, 1, 8, 9, 10, 1},
    };
    VOUCHES
    Spoiler for Vouches:

    bought a pin off him for 8m
    Quote Originally Posted by zexxo17 View Post
    trusted thanks
    bought pin of him 22m
    Quote Originally Posted by freedomex View Post
    sold 3 month pin to him for 22m , went smooth i went first hes trusted thanks
    Reply With Quote  
     

  9. #49  
    Member Force Chat isnt working Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    Quote Originally Posted by The evil ways View Post

    edit: should i add this: at the top of thr method, npcId = npcclickindex ?
    when i said this "Just make a new variable in your player class called npcToThieve and set it at the same time (c.npcToThieve = npcClickIndex)", i meant do it when you first click the NPC, like this :-

    Code:
    case SECOND_CLICK:
    			c.npcClickIndex = c.inStream.readUnsignedWordBigEndianA();
    			c.npcType = NPCHandler.npcs[c.npcClickIndex].npcType;
    c.npcToThieve = c.npcClickIndex;
    Did you do that?

    And i don't understand what that loop above is for

    Attached imageAttached image
    Reply With Quote  
     

  10. #50  
    Registered Member
    Join Date
    Feb 2012
    Posts
    285
    Thanks given
    46
    Thanks received
    11
    Rep Power
    29
    Quote Originally Posted by Luke132 View Post
    when i said this "Just make a new variable in your player class called npcToThieve and set it at the same time (c.npcToThieve = npcClickIndex)", i meant do it when you first click the NPC, like this :-

    Code:
    case SECOND_CLICK:
    			c.npcClickIndex = c.inStream.readUnsignedWordBigEndianA();
    			c.npcType = NPCHandler.npcs[c.npcClickIndex].npcType;
    c.npcToThieve = c.npcClickIndex;
    Did you do that?

    And i don't understand what that loop above is for
    omg it works now, god, thanks a lot again, and the loops is this:

    /**
    * Npc id, level required, Xp to add, Stop failing, stun duration, damage
    */
    private final int[][] NPCS ={
    {1, 1, 8, 9, 10, 1}, {2, 1, 8, 9, 10, 1}, {3, 1, 8, 9, 10, 1}, {4, 1, 8, 9, 10, 1},
    {5, 1, 8, 9, 10, 1}, {6, 1, 8, 9, 10, 1},
    };

    i know its not the best
    VOUCHES
    Spoiler for Vouches:

    bought a pin off him for 8m
    Quote Originally Posted by zexxo17 View Post
    trusted thanks
    bought pin of him 22m
    Quote Originally Posted by freedomex View Post
    sold 3 month pin to him for 22m , went smooth i went first hes trusted thanks
    Reply With Quote  
     

Page 5 of 5 FirstFirst ... 345

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. My JFrame isnt working with the server...
    By Anthony-| in forum Help
    Replies: 3
    Last Post: 03-30-2009, 02:30 PM
  2. ip ban isnt working
    By Runebay™ in forum Help
    Replies: 3
    Last Post: 03-07-2009, 04:34 PM
  3. Replies: 2
    Last Post: 11-01-2008, 04:09 AM
  4. rs2e v.2 uses forced chat??
    By ritz929 in forum RS 503+ Client & Server
    Replies: 5
    Last Post: 08-06-2008, 03:41 PM
  5. My GUI's for a chat im working on
    By killerjoe in forum Showcase
    Replies: 6
    Last Post: 01-31-2008, 12:38 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
  •