Chat and Siege Problems!

Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Valued Member jasonguns is offline
    MemberRank
    Jul 2014 Join Date
    139Posts

    Chat and Siege Problems!

    So hi!

    Here i'm again asking for a little help i'm kinda stuck in 2 problems.

    1° I've implemented in my 3.9 files the Commander and Governor chat the chat type /command
    It works now the only problem is that the message from commanders and governors only can be seen by players at 95 meters from the player who sent the message. It should go to the faction in the same map as the player are using the chat.

    Here it's my code: https://imgur.com/a/PE62ULo

    I think the problem is in "ObjectFilter<Player>"

    I just want to fix this and i dont know how to.

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------

    The 2° problem is that siege are kickin players when starts (it's okay) the problem is that the players have been kicked at 30 meters from the fortress when it should be like 250meters or 300.

    This happens in Inggison/Gelkmaros/Reshanta fortress.

    If somebody can help me i would appreciate it.

    Thank you in advance for take your time and read my post.

    Drink water!
    Last edited by jasonguns; 07-08-19 at 02:30 AM.


  2. #2
    Apprentice unge is offline
    MemberRank
    May 2017 Join Date
    16Posts

    Re: Chat and Siege Problems!

    The first issue is that the chat command you made is broadcasting for current player's Knownlist, max 95 declared in VisibleObject.

    Try this code instead.
    Code:
    private void broadcastFromCommander(final Player _actor) {    
    if (_actor.getRace() == Race.ELYOS) {            
    World.getInstance().doOnAllPlayers(new Visitor<Player>() {                
    @Override               
    public void visit(final Player _actore) {               
    if (_actore.getRace() == Race.ELYOS || _actore.isGM()) {  
    if (_actore.getWorldId() == _actor.getWorldId() && _actore.getRace() == _actor.getRace()) { 
    Player _sendere =  (Player) _actor;  
    PacketSendUtility.broadcastPacket(_actore, new SM_MESSAGE(_sendere, message, type), true);            
    }      
    }                    
    }            
    });        
    }    
    if (_actor.getRace() == Race.ASMODIANS) {            
    World.getInstance().doOnAllPlayers(new Visitor<Player>() {                
    @Override                
    public void visit(final Player _actora) {                
    if (_actora.getRace() == Race.ASMODIANS || _actora.isGM()) {           
    if (_actora.getWorldId() == _actor.getWorldId() && _actora.getRace() == _actor.getRace()) {      
    Player _sendera = (Player) _actor;
    PacketSendUtility.broadcastPacket(_actora, new SM_MESSAGE(_sendera, message, type), true);        
    }            
    }                
    }            
    });        
    }    
    }
    For the second problem, check SiegeService.
    Last edited by unge; 09-08-19 at 05:32 PM.

  3. #3
    Valued Member jasonguns is offline
    MemberRank
    Jul 2014 Join Date
    139Posts

    Re: Chat and Siege Problems!

    Okay i just have this problem: https://imgur.com/HSgu2YJ

    I think the problem that i'm having have something to do with the "actore" "actora" at SM_MESSAGE

    About the siege i know is simple and is just a number but i cant find it.
    Last edited by jasonguns; 09-08-19 at 03:54 AM.

  4. #4
    Apprentice unge is offline
    MemberRank
    May 2017 Join Date
    16Posts

    Re: Chat and Siege Problems!

    I edited the code. Copy paste it and compile now.

  5. #5
    Valued Member jasonguns is offline
    MemberRank
    Jul 2014 Join Date
    139Posts

    Re: Chat and Siege Problems!

    It works now!

    But it got 2 problems.

    1°: The message is sent to all maps when is just supposed to be sent just to the map where the person are sending the message.

    2°: When the message show up is always with the same player like...

    Shows the self name not the name from the person that has sent the message like in the print screen below:

    https://imgur.com/g8hWNAI

    https://imgur.com/OJUxqMT

  6. #6
    Apprentice unge is offline
    MemberRank
    May 2017 Join Date
    16Posts

    Re: Chat and Siege Problems!

    I edited the code. I think that's what you want.

  7. #7
    Valued Member jasonguns is offline
    MemberRank
    Jul 2014 Join Date
    139Posts

    Re: Chat and Siege Problems!

    Sorry but now i'm having this: https://imgur.com/M6HkTDH

    You make and change the code so easily it's amazing.

  8. #8
    Apprentice unge is offline
    MemberRank
    May 2017 Join Date
    16Posts

    Re: Chat and Siege Problems!

    I type from the phone then some lines get messed up. Check if it compiles now.

  9. #9
    Valued Member jasonguns is offline
    MemberRank
    Jul 2014 Join Date
    139Posts

    Re: Chat and Siege Problems!

    Got this: https://imgur.com/9mb1Tz9

    From your phone? '-' i'm a garbage.

  10. #10
    Apprentice unge is offline
    MemberRank
    May 2017 Join Date
    16Posts

    Re: Chat and Siege Problems!

    I edited it for you.

  11. #11
    Valued Member jasonguns is offline
    MemberRank
    Jul 2014 Join Date
    139Posts

    Re: Chat and Siege Problems!

    It works a 100%.

    Thank you very much for helping me!

    - - - Updated - - -

    I have two more adjustments that i want to do in my server.

    If you could help me i can donate for you.

    First is my siege problem.
    I already check the siegeservice but couldnt find the number where i can change to make it work properly.
    The problem is that siege are kickin players when starts (it's okay) the problem is that the players have been kicked at 30 meters from the fortress when it should be like 250meters or 300.

    This happens in Inggison/Gelkmaros/Reshanta fortress.

    The second is this custom:

    I want to set up in my files the PREMIUM/VIP tags like in this picture. https://imgur.com/a/kZWzr
    I want to put the crowns in the 2 sides of the character's name.
    What and how should i do it?
    This is my full code in SM_PLAYER_INFO including the ADMIN tags.

    https://imgur.com/a/IQl5DDd

    If you can help i appreciate that!

    I already thank you for your time and effort to help me fix my commander governor chat!

    God bless you!

  12. #12
    Apprentice unge is offline
    MemberRank
    May 2017 Join Date
    16Posts

    Re: Chat and Siege Problems!

    Go to your membership configs, should be configs/main/membership.properties and just edit the tag you want with "\uE0BD %s \uE0BD".

    For Siege, where are the kicked players being sent to? Bind location or?

  13. #13
    Valued Member jasonguns is offline
    MemberRank
    Jul 2014 Join Date
    139Posts

    Re: Chat and Siege Problems!

    Bind location

    - - - Updated - - -

    This is how it looks now: https://imgur.com/25h5yvC

    I wish it was (Sign) Asmodian Army Commander Decker (Sign)

    I think i have to change my src code.

  14. #14
    Apprentice unge is offline
    MemberRank
    May 2017 Join Date
    16Posts

    Re: Chat and Siege Problems!

    You can't do that because Abyss Ranks aren't retrieved by Strings but by Integers.

  15. #15
    Valued Member jasonguns is offline
    MemberRank
    Jul 2014 Join Date
    139Posts

    Re: Chat and Siege Problems!

    I see that in alot of private servers. One guy once told me to look for the code like this green balls when you select yourselft with F1

    Like in this printscreen: https://imgur.com/TruD2gC

    XD

    Thx again for trying to help me.



Page 1 of 2 12 LastLast

Advertisement