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!

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

Addon TwitterSK 1.0.3

Control Twitter with Skript!

  1. Nashoba

    Addon Developer

    Joined:
    Jan 27, 2017
    Messages:
    41
    Likes Received:
    40
    Nashoba submitted a new resource:

    TwitterSK - Control Twitter with Skript!

    Read more about this resource...
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    Wasn't this already in WolvSk?
     
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    Can you healp me?
    How to organize tweets in the menu, example:
    Line-1
    Line-2
    Line-3
    this is the code
    Code (Skript):
    1. command /news:
    2.     trigger:
    3.         if player is op:
    4.             open chest with 5 rows named "&9Twitter" to player
    5.             wait a tick
    6.             set {tweets::*} to home timeline
    7.             set {_i} to 0
    8.             loop {tweets.save::*}:
    9.                 format slot {_i} of player with book named "&c%loop-index% - &e%twitterer of loop-value%" with lore "&9%text of loop-value%" to be unstealable
    10.                 add 1 to {_i}
    Result
    [​IMG]


    in twitter:
    Code (Skript):
    1. O Player: FilipeNock foi Banido do Servidor
    2. Motivo: TestandoAPITwitter
    3. Horario: 30/01/17 00:48
     
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    @FilipeNock can you show me an image of the tweet? And please create another thread for talk about this.
     
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    @Snow-Pyon
    Code to send tweet
    Code (Skript):
    1. on command "/ban":
    2.     set {_args::*} to arguments split at " "
    3.     if size of {_args::*} = 3:
    4.         tweet "Player: %{_args::1}% has banned%newline%Reason: %{_args::2}%%newline%Date: %now%"
    5.  
    [​IMG]
    [​IMG]

    Code to open menu:
    Code (Skript):
    1. command /news:
    2.     trigger:
    3.         if player is op:
    4.             open chest with 5 rows named "&9Twitter" to player
    5.             wait a tick
    6.             set {tweets::*} to home timeline
    7.             set {_i} to 0
    8.             loop {tweets::*}:
    9.                 format slot {_i} of player with book named "&c%loop-index% - &e%twitterer of loop-value%" with lore "&9%text of loop-value%" to be unstealable
    10.                 add 1 to {_i}

    Why should I create a topic for this? I'm in the discussion of the addon, and I'm talking about it
     
  6. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    @FilipeNock you're actually requesting help with something about the addon, if the problem is something big (which doesn't seems to be the case, but you'll know this for the future), it'll just make the thread longer with no reason, that's why you should create a new thread for it.

    Now, regarding your issue, it seems that the strange character that says "lf" in it is the one which split the message, if you could get that char and then do something like:
    Code (Skript):
    1.  
    2. loop {tweets::*}:
    3.     set {_currentTweet::*} to text of loop-value split by "that character"
    4.     format gui slot (loop-index parsed as int - 1) of player with book named "%loop-index% - &e%twitterer of loop-value%" with lore "&9%join {_currentTweet::*} by ""||""%" to nothing
    5.  
    P.S: as you can see, in my code I used the "format gui slot" instead of the "format slot", it's because the format slot is so buggy and not recommended (even more in loops because some items disappear without waiting a few ticks) and that's why I used the "format gui slot" which is the new and better "format slot", it's from TuSKe, you should use it because it fixed the bugs that the format slot had and it's a lot more customizable, I recommend it. Here is the link of the resource here and the beta releases if you want see it:
    https://forums.skunity.com/resources/tuske-custom-enchantments-gui-manager-and-more.16/
    https://github.com/Tuke-Nuke/TuSKe/releases/tag/1.7-beta.3
     
    • Friendly Friendly x 1
  7. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    I did it, but I see that your method is easier thanks
    Code (Skript):
    1. command /news:
    2.     trigger:
    3.         if player is op:
    4.             open chest with 5 rows named "&9Twitter" to player
    5.             wait a tick
    6.             set {tweets::*} to home timeline
    7.             set {_i} to 0
    8.             loop {tweets::*}:
    9.                 set {_test} to text of loop-value
    10.                 replace all "%newline%" with "||&9" in {_test}
    11.                 format slot {_i} of player with book named "&c%loop-index% - &e%twitterer of loop-value%" with lore "&9%{_test}%" to be unstealable
    12.                 add 1 to {_i}
    13.  
     
    • Like Like x 1
  8. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    How would I use it to dm a user a preset message?
     
  9. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    It's not possible yet. Maybe I will add this in a future update.
     
  10. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    Oh ok, please consider adding this. It would be a big help to me!
     
  11. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    Nashoba updated TwitterSK with a new update entry:

    TwitterSK 1.0.2

    Read the rest of this update entry...
    --- Double Post Merged, Mar 10, 2017, Original Post Date: Mar 10, 2017 ---
    Now you can send a direct message. Example:
    Code (Text):
    1. send dm "Hey" to user with screen name "screen name of the twitter account"
     
  12. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    Thank you so much!
     
  13. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    How do I link TwitterSK to a specific Twitter account?
     
  14. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    Please read the overview, it's explained there.
     
Loading...