Thread: [PI] Why if i spec npcs they doesn't freezes?

Results 1 to 7 of 7
  1. #1 [PI] Why if i spec npcs they doesn't freezes? 
    Banned
    Join Date
    May 2013
    Posts
    497
    Thanks given
    31
    Thanks received
    3
    Rep Power
    0
    On my server i made my Sgs freeze like this:



    If i spec Player with my sgs it works he will get freezing for 15-25 seconds, it's work fine.

    But if you spec Npc with my sgs, the barrage doesn't show and the NPC doesn't freeze, he can move, how to fix or add?

    I want the npc get freezes too.

    Here is my codes:

    Code:
    case 11698:
    				c.startAnimation(4303);
    				c.gfx0(1220);
    				c.specAccuracy = 1.25;
    				c.specEffect = 55;
    				c.hitDelay = getHitDelay(c.getItems().getItemName(c.playerEquipment[c.playerWeapon]).toLowerCase());
    			break;

    Code:
    case 55:
    if (o.freezeTimer <= 0) {
    o.freezeTimer = 40;
    o.gfx0(369);
    o.frozenBy = c.playerId;
    o.stopMovement();
    }
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    May 2013
    Posts
    497
    Thanks given
    31
    Thanks received
    3
    Rep Power
    0
    Bump
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Dec 2011
    Posts
    454
    Thanks given
    17
    Thanks received
    37
    Rep Power
    61
    You need something like this:
    Code:
    if (c.playerIndex > 0) { //check if spec on player
                   Client ci = (Client) PlayerHandler.players[c.playerIndex];
    	if (ci != null)
    		//Add spec for players
    	} else if (c.npcIndex > 0) { //check if spec on NPC
    		NPC ci = NPCHandler.npcs[c.npcIndex];
    	if (ci != null)
    		NPCHandler.npcs[i].freezeTimer = freezeDelay; //Add more stuff for spec on NPC's
    			}
    Reply With Quote  
     

  4. #4  
    Banned
    Join Date
    May 2013
    Posts
    497
    Thanks given
    31
    Thanks received
    3
    Rep Power
    0
    Quote Originally Posted by Gershon View Post
    You need something like this:
    Code:
    if (c.playerIndex > 0) { //check if spec on player
                   Client ci = (Client) PlayerHandler.players[c.playerIndex];
    	if (ci != null)
    		//Add spec for players
    	} else if (c.npcIndex > 0) { //check if spec on NPC
    		NPC ci = NPCHandler.npcs[c.npcIndex];
    	if (ci != null)
    		NPCHandler.npcs[i].freezeTimer = freezeDelay; //Add more stuff for spec on NPC's
    			}
    I need the fully currct code please,
    Reply With Quote  
     

  5. #5  
    Registered Member
    Karma_K's Avatar
    Join Date
    Nov 2012
    Posts
    4,283
    Thanks given
    152
    Thanks received
    610
    Rep Power
    108
    Quote Originally Posted by Alaa View Post
    I need the fully currct code please,
    Write it yourself.
    Reply With Quote  
     

  6. #6  
    Banned
    Join Date
    May 2013
    Posts
    497
    Thanks given
    31
    Thanks received
    3
    Rep Power
    0
    Quote Originally Posted by Karma_K View Post
    Write it yourself.
    I don't know, that's why i made this topic ?
    Reply With Quote  
     

  7. #7  
    need java lessons
    Eclipse's Avatar
    Join Date
    Aug 2012
    Posts
    4,436
    Thanks given
    686
    Thanks received
    898
    Rep Power
    490
    Quote Originally Posted by Alaa View Post
    I don't know, that's why i made this topic ?
    You're asking to be spoonfed, I hope nobody will do this for you honestly. If you can't make due with code that's given to you then you don't deserve it..

    Quote Originally Posted by jerryrocks317 View Post
    i am 14 and have my own laptop im on almost 24/7 currently creating rsps lol so please get off my thread lol
    Reply With Quote  
     

  8. Thankful user:



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: 1
    Last Post: 06-08-2013, 12:57 AM
  2. [PI] Noob to PI, why are all NPC's aggressive
    By Hustla Da Rabbit in forum Help
    Replies: 2
    Last Post: 06-29-2012, 06:25 AM
  3. [PI] Why do i get this error when killed NPC?
    By BryceTheCoder in forum Help
    Replies: 5
    Last Post: 11-05-2011, 09:23 AM
  4. [pi] why doesn't this work?
    By 7upiter in forum Help
    Replies: 2
    Last Post: 08-08-2011, 04:18 PM
  5. Replies: 7
    Last Post: 05-30-2011, 09:01 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •