1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Factions relation color?

Discussion in 'Skript' started by CrimZ0N, Oct 11, 2018.

Thread Status:
Not open for further replies.
  1. CrimZ0N

    CrimZ0N Member

    Joined:
    Jan 28, 2017
    Messages:
    56
    Likes Received:
    3
    Hey so long story short I'm using json to format my chat, via Skript ofc, and long story short, I uhmmm, I'm kind of stuck at the moment? Long story short, I got factions to display in chat using Conquer, however, I don't know how to make it show what the relation between the member and the faction/faction and faction is.

    Example, if I format the faction color to be white, it'll be white, if I format it black, it'll be black, if I don't format it at all it's just white, by default, and for other players/enemies it always appears to be white/black(as you make it/if you make it) which is really annoying, and on the discord, nobody really bothered so I guess that those who knew couldn't help or it's just impossible.

    I'll have to note that I have tried using PlaceholderAPI, it doesn't work for whatever reason. I also tried normal placeholders, it just doesn't work for me.

    My skript version is 2.2-dev37c from Bensku, latest version of Umbaska and Conquer, for PlaceholderAPI I am using 2.1.2 and finally, for factions I am using LegacyFactions by MarkehMe, version 1.4.7.
    Yes, I am aware that there is NO EXPANSION for LegacyFactions HOWEVER LegacyFactions has its own placeholders and it hooks into PlaceholderAPI so at first I thought it might, just might work, turns out it doesn't.

    Sooo, back to the main point.

    Can I make relation color as well as roles appear in chat or is that impossible with Skript? I am very well aware that Skript has its own limitations and all that, I was just wondering if this was possible.
     
  2. BrettPlayMC

    Supporter

    Joined:
    Jan 26, 2017
    Messages:
    715
    Likes Received:
    53
    You need to use the Skellett method to set a variable to the relation color then display it before the prefix in chat. A local variable should be fine.
     
  3. CrimZ0N

    CrimZ0N Member

    Joined:
    Jan 28, 2017
    Messages:
    56
    Likes Received:
    3
    Aaaaaand how do I do that?
     
  4. BrettPlayMC

    Supporter

    Joined:
    Jan 26, 2017
    Messages:
    715
    Likes Received:
    53
    Use Skellett or Erska (idk the name but it allows hooks with PAPI too) and the docs.
     
  5. CrimZ0N

    CrimZ0N Member

    Joined:
    Jan 28, 2017
    Messages:
    56
    Likes Received:
    3
    Ersatz, I have it, as mentioned above, and yet again, it doesn't work, I tried using PAPI, it didnt work for it because LegacyFactions has its own hooks, as well as FactionsUUID, and no way in hell am I gonna be using massivecore's factions.
     
  6. BrettPlayMC

    Supporter

    Joined:
    Jan 26, 2017
    Messages:
    715
    Likes Received:
    53
    Then set a local variable to the PAPI placeholder that is the relation color and display it in chat.
     
  7. CrimZ0N

    CrimZ0N Member

    Joined:
    Jan 28, 2017
    Messages:
    56
    Likes Received:
    3
    And yet again, how do I do that...
    --- Double Post Merged, Oct 12, 2018, Original Post Date: Oct 12, 2018 ---
    I can't create a hook to that because it doesn't use the factions expansion, it uses its own hooks, that then hook into PAPI, HOWEVER, Skript does not consider them valid hooks, it just gives me the <none> whenever I set it as a variable or try to display it as a hook...
     
  8. BrettPlayMC

    Supporter

    Joined:
    Jan 26, 2017
    Messages:
    715
    Likes Received:
    53
    Show me your code.
     
  9. CrimZ0N

    CrimZ0N Member

    Joined:
    Jan 28, 2017
    Messages:
    56
    Likes Received:
    3
    How did I format code again?

    Edit 1:
    https://hastebin.com/kaxecijoge.sql
    Nevermind, I'll just do it like this

    Edit 2:
    As mentioned above, I can't use PAPI it doesn't work, for w/e reason, and whenever I'm doing it with Conquer (what I am using atm) I cannot display relationship colours. I don't know how to do it using PAPI, I don't wanna switch to MassiveCore's factions, both Legacy and UUID factions use their own hooks, am I fucked or what?
    --- Double Post Merged, Oct 12, 2018, Original Post Date: Oct 12, 2018 ---
    upload_2018-10-12_18-4-15.png
    Okay so update, I got placeholders to work, somehow, however, now that that's done, this is how they show up in chat...
    --- Double Post Merged, Oct 12, 2018 ---
    Ditching it, thread solved, solution, well, none, I can't do it, don't have the patience to wait, so, ye, w/e
     
Thread Status:
Not open for further replies.

Share This Page

Loading...