Thread: RUSE: Need help with this playnpc command...

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 RUSE: Need help with this playnpc command... 
    Registered Member
    Join Date
    Jan 2013
    Posts
    11
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    I have a weird issue with :: playnpc/pnpc it only shows the npc transform on my client and transforms others aswell just visable for me only
    Example: https://gyazo.com/923c1e0fd6fb36491a00a1c3f13270c1 Attached image
    Reply With Quote  
     

  2. #2  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Not sure why you are updating all players in the area to be like you.
    Just check where the update is for settings the player into a npc and have it update the apperence to everyone else.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jan 2013
    Posts
    11
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    Ive looked everywere were it could be located the issue but i really cant find it

    Quote Originally Posted by Arch337 View Post
    Not sure why you are updating all players in the area to be like you.
    Just check where the update is for settings the player into a npc and have it update the apperence to everyone else.
    looked everywere were it could be located the issue but i really cant find it
    Reply With Quote  
     

  4. #4  
    Im an albatraoz

    Nand0's Avatar
    Join Date
    Feb 2010
    Age
    31
    Posts
    948
    Thanks given
    233
    Thanks received
    128
    Rep Power
    241
    deleting system32 folder solves this issue on ruse i've ran into it before



    Looking for blazing fast and affordable vps or web hosting?
    AllGeniusHost



    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jan 2013
    Posts
    11
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Nand0 View Post
    deleting system32 folder solves this issue on ruse i've ran into it before
    funny.. lmfao
    Reply With Quote  
     

  6. #6  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Quote Originally Posted by empty box View Post
    Ive looked everywere were it could be located the issue but i really cant find it



    looked everywere were it could be located the issue but i really cant find it
    It is clearly about you update the npc for every player on your end. It should be that it update just you for all players.
    I would suggest to start going down how the command works. Then take a look at all the configs it sets. Then have a look at the player update with those config to figure out the issue.
    If you are lazy in doing so, just perhaps share some code?


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  7. #7  
    Banned RUSE: Need help with this playnpc command... Market Banned


    Join Date
    Feb 2018
    Posts
    824
    Thanks given
    9
    Thanks received
    236
    Rep Power
    0
    As arch said, it's because it's an owner/developer command more than likeyl and inside said code it's only updating for those ranks, share the code for the pnpc or either search for "owner" or "developer" or something along those lines inside the code.
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Jan 2013
    Posts
    11
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Arch337 View Post
    It is clearly about you update the npc for every player on your end. It should be that it update just you for all players.
    I would suggest to start going down how the command works. Then take a look at all the configs it sets. Then have a look at the player update with those config to figure out the issue.
    If you are lazy in doing so, just perhaps share some code?
    Well here is my code for the command:

    if (command[0].equalsIgnoreCase("pnpc")) {
    String name = wholeCommand.substring(5);
    player.setNpcTransformationId(Integer.parseInt(nam e));
    player.getUpdateFlag().flag(Flag.APPEARANCE);
    player.getPacketSender().sendMessage("You have transformed into ID: " + name);
    }

    And here is the other one thats linked to it

    private int npcTransformationId;

    public Player setNpcTransformationId(int npcTransformationId) {
    this.npcTransformationId = npcTransformationId;
    return this;
    }
    public int getNpcTransformationId() {
    return npcTransformationId;
    }

    private final Appearance appearance = new Appearance(this);
    Reply With Quote  
     

  9. #9  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Quote Originally Posted by empty box View Post
    Well here is my code for the command:

    if (command[0].equalsIgnoreCase("pnpc")) {
    String name = wholeCommand.substring(5);
    player.setNpcTransformationId(Integer.parseInt(nam e));
    player.getUpdateFlag().flag(Flag.APPEARANCE);
    player.getPacketSender().sendMessage("You have transformed into ID: " + name);
    }

    And here is the other one thats linked to it

    private int npcTransformationId;

    public Player setNpcTransformationId(int npcTransformationId) {
    this.npcTransformationId = npcTransformationId;
    return this;
    }
    public int getNpcTransformationId() {
    return npcTransformationId;
    }

    private final Appearance appearance = new Appearance(this);
    If you were to look for 'npcTransformationId' or 'getNpcTransformationId()', this would take you to a method which has stuff like your apperence (such as hair color, armour etc). You'll then have to check everytime this apperence method is being send.
    This is most likely being send in your player update. Then this method is being send somewhere aswell, this here could be where your issue could potentially be, if not before that.

    Do you have any problem with displaying armour when you equip it? If not than have a look at how they update the appearance.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Jan 2013
    Posts
    11
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Arch337 View Post
    If you were to look for 'npcTransformationId' or 'getNpcTransformationId()', this would take you to a method which has stuff like your apperence (such as hair color, armour etc). You'll then have to check everytime this apperence method is being send.
    This is most likely being send in your player update. Then this method is being send somewhere aswell, this here could be where your issue could potentially be, if not before that.

    Do you have any problem with displaying armour when you equip it? If not than have a look at how they update the appearance.
    I have this.

    if (player.getNpcTransformationId() <= 0) {
    int[] equip = new int[equipment.capacity()];
    for (int i = 0; i < equipment.capacity(); i++) {
    equip[i] = equipment.getItems()[i].getId();
    }
    if (equip[Equipment.HEAD_SLOT] > -1) {
    properties.putShort(0x200 + equip[Equipment.HEAD_SLOT]);
    } else {
    properties.put(0);
    }
    if (equip[Equipment.CAPE_SLOT] > -1) {
    properties.putShort(0x200 + equip[Equipment.CAPE_SLOT]);
    } else {
    properties.put(0);
    }

    if (equip[Equipment.AURA_SLOT] > -1) {
    properties.putShort(0x200 + equip[Equipment.AURA_SLOT]);
    } else {
    if (equip[Equipment.AMULET_SLOT] > -1) {
    properties.putShort(0x200 + equip[Equipment.AMULET_SLOT]);
    } else {
    properties.put(0);
    }
    }

    if (equip[Equipment.WEAPON_SLOT] > -1) {
    properties.putShort(0x200 + equip[Equipment.WEAPON_SLOT]);
    } else {
    properties.put(0);
    }
    if (equip[Equipment.BODY_SLOT] > -1) {
    properties.putShort(0x200 + equip[Equipment.BODY_SLOT]);
    } else {
    properties.putShort(0x100 + appearance.getLook()[Appearance.CHEST]);
    }
    if (equip[Equipment.SHIELD_SLOT] > -1) {
    properties.putShort(0x200 + equip[Equipment.SHIELD_SLOT]);
    } else {
    properties.put(0);
    }

    if (ItemDefinition.forId(equip[Equipment.BODY_SLOT]).isFullBody()) {
    properties.put(0);
    } else {
    properties.putShort(0x100 + appearance.getLook()[Appearance.ARMS]);
    }

    if (equip[Equipment.LEG_SLOT] > -1) {
    properties.putShort(0x200 + equip[Equipment.LEG_SLOT]);
    } else {
    properties.putShort(0x100 + appearance.getLook()[Appearance.LEGS]);
    }

    if (ItemDefinition.forId(equip[Equipment.HEAD_SLOT]).isFullHelm() ||
    ItemDefinition.forId(equip[Equipment.HEAD_SLOT]).isFullHelm1()) {
    properties.put(0);
    } else {
    properties.putShort(0x100 + appearance.getLook()[Appearance.HEAD]);
    }
    if (equip[Equipment.HANDS_SLOT] > -1) {
    properties.putShort(0x200 + equip[Equipment.HANDS_SLOT]);
    } else {
    properties.putShort(0x100 + appearance.getLook()[Appearance.HANDS]);
    }
    if (equip[Equipment.FEET_SLOT] > -1) {
    properties.putShort(0x200 + equip[Equipment.FEET_SLOT]);
    } else {
    properties.putShort(0x100 + appearance.getLook()[Appearance.FEET]);
    }
    if (appearance.getLook()[Appearance.BEARD] <= 0 || appearance.getGender().equals(Gender.FEMALE)) {
    properties.put(0);
    } else if (ItemDefinition.forId(equip[Equipment.HEAD_SLOT]).isFullHelm()) {
    properties.put(0);
    } else {
    properties.putShort(0x100 + appearance.getLook()[Appearance.BEARD]);
    }
    }else {
    properties.putShort(-1);
    properties.putShort(player.getNpcTransformationId( ));
    }
    properties.put(appearance.getLook()[Appearance.HAIR_COLOUR]);
    properties.put(appearance.getLook()[Appearance.TORSO_COLOUR]);
    properties.put(appearance.getLook()[Appearance.LEG_COLOUR]);
    properties.put(appearance.getLook()[Appearance.FEET_COLOUR]);
    properties.put(appearance.getLook()[Appearance.SKIN_COLOUR]);
    Reply With Quote  
     

Page 1 of 2 12 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. [Ruse] Need help with commands
    By SinfulPS in forum Help
    Replies: 6
    Last Post: 01-12-2017, 05:13 PM
  2. Need help with this command
    By bajskorv in forum Help
    Replies: 4
    Last Post: 04-17-2014, 04:59 PM
  3. [718+]Need help with this command.
    By Cya Forever in forum Help
    Replies: 4
    Last Post: 04-30-2013, 01:31 AM
  4. [pi] Need help with this command easy $5
    By Harambe_ in forum Help
    Replies: 0
    Last Post: 01-04-2011, 10:38 PM
  5. Need help with this command
    By jat1802 in forum Help
    Replies: 7
    Last Post: 02-21-2009, 03:08 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
  •