I'll show you what I am doing exactly:
This is my chat now:
code_language.skript:
on chat:
add 1 to {message.counter}
set message to "§7>>%{message.counter}%&r %message%"
The message, in game, is displayed like this:
<playername> : >>1234 MESSAGE
Every message add 1 to the message counter, and the counter is showed at the message itself.
I want the others players to be able to quote players within the 200 last messages by using this:
code_language.skript:
on chat:
if message starts with ">>":
replace ">>" with "/quote "
command /quote <integer> <text>
trigger:
if arg 1 is integer:
make player say "%{Logs::%arg 1%}% %arg 2%"
on chat:
add message to {Logs::*}
set {_s} to size of {Logs::*}
if {_s} is more than or equal to 200:
delete {Logs::1}
loop {Logs::*}:
add loop-value to {Logs::*}
So, when a player says "
>>1234 what you said was stupid", the skript would replace the ">>" with "/quote ", and it would execute the "/quote 1234" command instead of the message.
The /quote command would then say again the message number 1234 and add the "
what you said was stupid" at the end.
If the message 1234 was "
Hillary will win", then by saying "
>>1234 what you said was stupid" in chat, the result would be the player quoting and repeating the "
Hillary will win" and adding the message said itself "
what you said was stupid"
The final result would be "<Player>:
Hillary will win what you said was stupid"
Gotta test it now.
[doublepost=1490412119,1490411643][/doublepost]I think this will work:
code_language.skript:
on chat:
if message starts with ">>":
replace ">>" with "/quote "
command /quote <integer> <text>
trigger:
if arg 1 is integer:
make player say "%{Logs::%arg 1%}% %arg 2%"
on chat:
add 1 to {message.counter}
set message to "§7>>%{message.counter}%&r %message%"
add message to {Logs::%{message.counter}%}
set {_s} to size of {Logs::*}
if {_s} is more than or equal to 200:
delete {Logs::%{message.counter} - 200%}