Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function kGame_stats_getLore(gameName: text, lore: text, p: player) :: string:
- #broadcast "&aA: &r%{_lore}%"
- #Wystąpienia '*top:'
- #Wystąpienia '{var}'
- loop length of {_lore} times:
- if subtext of {_lore} between index loop-number and loop-number is "{":
- add "%loop-number%" to {_indexStarts::*}
- if subtext of {_lore} between index loop-number and loop-number is "}":
- add "%loop-number%" to {_indexStops::*}
- broadcast "%{_indexStarts::*}%"
- broadcast "%{_indexStops::*}%"
- if size of {_indexStarts::*} is size of {_indexStops::*}:
- loop size of {_indexStarts::*} times:
- set {_iF} to {_indexStarts::%loop-number%}
- set {_iL} to {_indexStops::%loop-number%}
- set {_sub} to subtext of "%{_lore}%" between index {_iF} and {_iL}
- broadcast "&a%{_sub}% %{_if}% %{_iL}%"
- #broadcast "%{_lore}%"
- #set {_vars::%loop-number%} to subtext of {_lore} between index {_indexStarts::%loop-number%} and {_indexStops::%loop-number%}
- #broadcast "%{_vars::*}%"
- set {_ret} to ""
- if {_lore} contains "*top" and "}*":
- set {_firstIndex} to first index of "*top" in {_lore}
- set {_lastIndex} to last index of "*top" in {_lore}
- if {_firstIndex} is {_lastIndex}:
- set {_top} to subtext of {_lore} between index {_firstIndex} and index index of "}*" in {_lore}+1
- replace all "*" and "top:" and "{" and "}" with "" in {_top}
- replace all "*top:{%{_top}%}*" in {_lore} with kGame_stats_getTop({_gameName}, {_top})
- return {_lore}
- return "Są dwie topki"
- #Idę zapalić
- return {_ret}
Advertisement
Add Comment
Please, Sign In to add comment