Thread: Force Chat isnt working

Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 50
  1. #31  
    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 right click packet will send the variable of which NPC it is, you use that id instead (look how attack NPC works).

    Show me the packet code for when you click the thieve button and i'll sort it

    Attached imageAttached image
    Reply With Quote  
     

  2. #32  
    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 right click packet will send the variable of which NPC it is, you use that id instead (look how attack NPC works).

    Show me the packet code for when you click the thieve button and i'll sort it
    do you mean this?
    Code:
    case SECOND_CLICK:
    			c.npcClickIndex = c.inStream.readUnsignedWordBigEndianA();
    			c.npcType = NPCHandler.npcs[c.npcClickIndex].npcType;
    			if (c.goodDistance(NPCHandler.npcs[c.npcClickIndex].getX(),
    					NPCHandler.npcs[c.npcClickIndex].getY(), c.getX(),
    					c.getY(), 2)) {
    				c.turnPlayerTo(NPCHandler.npcs[c.npcClickIndex].getX(),
    						NPCHandler.npcs[c.npcClickIndex].getY());
    				NPCHandler.npcs[c.npcClickIndex].facePlayer(c.playerId);
    				c.getActions().secondClickNpc(c.npcType);
    			} else {
    				c.clickNpcType = 2;
    				CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() {
    					@Override
    					public void execute(CycleEventContainer container) {
    						if ((c.clickNpcType == 2)
    								&& NPCHandler.npcs[c.npcClickIndex] != null) {
    							if (c.goodDistance(c.getX(), c.getY(),
    									NPCHandler.npcs[c.npcClickIndex].getX(),
    									NPCHandler.npcs[c.npcClickIndex].getY(), 1)) {
    								c.turnPlayerTo(
    										NPCHandler.npcs[c.npcClickIndex].getX(),
    										NPCHandler.npcs[c.npcClickIndex].getY());
    								NPCHandler.npcs[c.npcClickIndex]
    										.facePlayer(c.playerId);
    								c.getActions().secondClickNpc(c.npcType);
    								container.stop();
    							}
    						}
    						if (c.clickNpcType < 2 || c.clickNpcType > 2)
    							container.stop();
    					}
    
    					@Override
    					public void stop() {
    						c.clickNpcType = 0;
    					}
    				}, 1);
    			}
    			break;
    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. #33  
    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
    c.npcClickIndex

    that's the "npcId" you're looking for

    Attached imageAttached image
    Reply With Quote  
     

  4. #34  
    Registered Member
    Join Date
    Feb 2012
    Posts
    285
    Thanks given
    46
    Thanks received
    11
    Rep Power
    29
    Quote Originally Posted by Luke132 View Post
    c.npcClickIndex

    that's the "npcId" you're looking for
    so change this: c.getActions().secondClickNpc(c.npcType);
    to this: c.getActions().secondClickNpc(c.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  
     

  5. #35  
    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
    yeah i don't see any reason why that wouldn't work after looking at the code you've showed me

    Attached imageAttached image
    Reply With Quote  
     

  6. #36  
    Registered Member
    Join Date
    Feb 2012
    Posts
    285
    Thanks given
    46
    Thanks received
    11
    Rep Power
    29
    Quote Originally Posted by Luke132 View Post
    yeah i don't see any reason why that wouldn't work after looking at the code you've showed me
    Thanks a lot, i know my rep cant affect yours but please, have it thanks a lot man
    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. #37  
    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
    wait, if you edit that

    "so change this: c.getActions().secondClickNpc(c.npcType);
    to this: c.getActions().secondClickNpc(c.npcClickIndex);"

    it will affect your other skills that already work properly! just put c.npcClickIndex into your thieving code where you've put npcId

    Attached imageAttached image
    Reply With Quote  
     

  8. #38  
    Registered Member
    Join Date
    Feb 2012
    Posts
    285
    Thanks given
    46
    Thanks received
    11
    Rep Power
    29
    Quote Originally Posted by Luke132 View Post
    wait, if you edit that

    "so change this: c.getActions().secondClickNpc(c.npcType);
    to this: c.getActions().secondClickNpc(c.npcClickIndex);"

    it will affect your other skills that already work properly! just put c.npcClickIndex into your thieving code where you've put npcId
    so replace npcId with click index?
    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. #39  
    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
    yes, if it still doesn't work just quote me and i'll get a notification and come back to this thread (i already know what the problem will be)

    Attached imageAttached image
    Reply With Quote  
     

  10. #40  
    Registered Member
    Join Date
    Feb 2012
    Posts
    285
    Thanks given
    46
    Thanks received
    11
    Rep Power
    29
    Quote Originally Posted by Luke132 View Post
    yes, if it still doesn't work just quote me and i'll get a notification and come back to this thread (i already know what the problem will be)
    yea i changed this:
    Code:
    					NPCHandler.npcs[npcId].turnNpc(player.absX, player.absY);
    					NPCHandler.npcs[npcId].forceChat(MESSAGES[ran.nextInt(MESSAGES.length)]);
    					NPCHandler.startAnimation(NPCAnimations.getAttackEmote(npcId), npcId);
    to this:
    Code:
    					NPCHandler.npcs[player.npcClickIndex].turnNpc(player.absX, player.absY);
    					NPCHandler.npcs[player.npcClickIndex].forceChat(MESSAGES[ran.nextInt(MESSAGES.length)]);
    					NPCHandler.startAnimation(NPCAnimations.getAttackEmote(player.npcClickIndex), player.npcClickIndex);
    and got an error
    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 4 of 5 FirstFirst ... 2345 LastLast

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
  •