Thread: [Ruse] Compilation of bug fixes

Page 7 of 7 FirstFirst ... 567
Results 61 to 66 of 66
  1. #61  
    Super Donator

    Join Date
    Jul 2016
    Posts
    61
    Thanks given
    7
    Thanks received
    8
    Rep Power
    49
    The NPC auto retaliate thing doesn't work... I added it and they still seem to be disabled when you run back
    Reply With Quote  
     

  2. #62  
    Registered Member
    Join Date
    Dec 2013
    Posts
    79
    Thanks given
    85
    Thanks received
    2
    Rep Power
    11
    Please fix npc auto retaliate

    Reply With Quote  
     

  3. #63  
    Jake from State Farm

    FKN Jake's Avatar
    Join Date
    Nov 2013
    Posts
    675
    Thanks given
    45
    Thanks received
    58
    Rep Power
    153
    Confirmed they all work, thanks.
    Reply With Quote  
     

  4. #64  
    Registered Member
    Join Date
    Nov 2015
    Posts
    64
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Does anyone have Swiffys skype name? i need to look into a new combat tick system.

    Quote Originally Posted by Dragon Tonna View Post
    Easy fix but here..

    Iron Man icons in PM. (you can change the ints 99 and 100 to whatever. I decided on 99 and 100 because if i want to add more actual ranks I won't have to skip two ints.)
    EDIT: I guess 12 and 13 are already used elsewhere. Would make more sense to use those then.

    Replace the method and the case. You can just add what I've changed. Rip it out yourself if you don't want to replace

    Server Side
    Code:
    public void message(Player friend, byte[] message, int size) {
            if (friend == null || message == null) {
                this.player.getPacketSender().sendMessage("This player is currently offline.");
                return;
            }
            if (friend.getRelations().status.equals(PrivateChatStatus.FRIENDS_ONLY) && !friend.getRelations().friendList.contains(player.getLongUsername()) || friend.getRelations().status.equals(PrivateChatStatus.OFF)) {
                this.player.getPacketSender().sendMessage("This player is currently offline.");
                return;
            }
            if (status == PrivateChatStatus.OFF) {
                setStatus(PrivateChatStatus.FRIENDS_ONLY, true);
            }
            int rights = player.getRights().ordinal();
            if (player.getGameMode() == GameMode.IRONMAN && rights == 0) {
                rights = 99;
            } else if (player.getGameMode() == GameMode.HARDCORE_IRONMAN && rights == 0) {
                rights = 98;
            }
            friend.getPacketSender().sendPrivateMessage(player.getLongUsername(), rights, message, size);
        }
    Client Side
    Code:
    case 196:
                        long l5 = inStream.readQWord();
                        inStream.readDWord();
                        int playerRights = inStream.readUnsignedByte();
                        boolean flag5 = false;
                        if (playerRights <= 1) {
                            for (int l29 = 0; l29 < ignoreCount; l29++) {
                                if (ignoreListAsLongs[l29] != l5) {
                                    continue;
                                }
                                flag5 = true;
    
                            }
                        }
                        if (!flag5) {
                            try {
                                String pMessage = TextInput.decodeToString(pktSize - 13,
                                        inStream);
                                int ironMan = 0;
                                if (playerRights == 99 || playerRights == 100){
                                    ironMan = playerRights - 98;
                                    playerRights = 0;
                                }
                                if (playerRights > 0 || ironMan > 0) {
                                    pushMessage(
                                            pMessage,
                                            7,
                                            getPrefix(playerRights, ironMan)
                                            + TextClass.fixName(TextClass
                                                    .nameForLong(l5)));
                                } else {
                                    pushMessage(pMessage, 3, TextClass.fixName(TextClass
                                            .nameForLong(l5)));
                                }
                                
                            } catch (Exception exception1) {
                                System.out.println("cde1");
                            }
                        }
                        opCode = -1;
                        return true;
    EDIT:

    Forgot, you will need to replace the this declaration (really only one parameter)

    Code:
    public PacketSender sendPrivateMessage(long name, int rights, byte[] message, int size) {
    This stops iron men frmo being able to pm, the other player cannot see their messages and they cant recieve messages

    Quote Originally Posted by Swiffy View Post
    I was actually thinking in the exact same fashion lol, I actually had written something similar for updating the task when the player switched equipment etc. Cool
    Are you able to help me out with a similar code?

    Obviously what I thInk is going wrong is it doesn't know 98 and 99 are that rank so when it's awry to pm it won't show the pm for any iron man or ultimate ironman

    Quote Originally Posted by tonic View Post
    Please fix npc auto retaliate
    does work I added the code in, also in most of the code you have to change the parameters and importa
    Reply With Quote  
     

  5. #65  
    Registered Member
    Join Date
    Jan 2017
    Posts
    33
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Need some help .... so i was playing on the server fine before i fixed bugs and then i fixed bugs and now when i try to go to log on it tells me i need to update the client i use ... HELP!
    Reply With Quote  
     

  6. #66  
    Registered Member
    Join Date
    Jul 2019
    Posts
    1
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    to fix the npc aggression change

    case AWAY:
    npc.getCombatBuilder().reset(true);
    PathFinder.findPath(npc, npc.getDefaultPosition().getX(), npc.getDefaultPosition().getY(), true, 1, 1);
    break;

    to

    case AWAY:
    npc.getCombatBuilder().isAttacking();
    PathFinder.findPath(npc, npc.getDefaultPosition().getX(), npc.getDefaultPosition().getY(), true, 1, 1);
    npc.findNewTarget();
    if (npc.getCombatBuilder().isBeingAttacked())
    updateCoordinator();
    break;

    and add these to the top of class.

    import com.ruseps.world.entity.impl.npc.NpcAggression;
    import com.ruseps.world.content.combat.CombatFactory;
    Reply With Quote  
     

Page 7 of 7 FirstFirst ... 567

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. NPC's face you in combat!
    By Pkitten in forum Tutorials
    Replies: 73
    Last Post: 11-28-2008, 05:36 PM
  2. summoning orb in HD fullscreen [508]
    By mige5 in forum Help
    Replies: 1
    Last Post: 11-25-2008, 09:14 PM
  3. summoning orb in fullscreen [508]
    By mige5 in forum Configuration
    Replies: 9
    Last Post: 11-03-2008, 05:20 PM
  4. Aids in the server.
    By helloder in forum Tutorials
    Replies: 40
    Last Post: 08-03-2008, 08:03 AM
  5. Replies: 19
    Last Post: 01-24-2008, 11:15 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
  •