#remove element from list

1 messages · Page 1 of 1 (latest)

quick dew
#
    permission: op
    trigger:
        if {Difficulties::*} contains argument 2:
            set {_name} to argument 1
            replace all "-" in {_name} with " "

            set {%argument 1%::1} to {_name}
            set {%argument 1%} to {_name}
            set {%argument 1%::2} to player's location
            set {%argument 1%::3} to argument 2

            add 1 to {CoursesCounter::%argument 2%} #total number of courses
            set {_r} to {CoursesCounter::%argument 2%} / 37 #36 = number of slots per page
            set {_page} to ceil({_r})
            
            set {%argument 1%::4} to {_page}
            
            add {%argument 1%::1} to {%argument 2%::%{_page}%::*}
            add {%argument 1%::1} to {AllCourseNames::%argument 2%::*}```
patent birch
#

a

quick dew
#

wait

#

i cant send the other part

patent birch
#

too long?

patent birch
quick dew
patent birch
#

I don't recommend doing something like this; instead use two lists

if {_d} is "VeryEasy":
set {_stars} to "&e★&7☆☆☆☆☆☆"
set {_color} to "&a"
else if {_d} is "Easy":
set {_stars} to "&e★★&7☆☆☆☆☆"
set {_color} to "&2"
else if {_d} is "Moderate":
set {_stars} to "&e★★★&7☆☆☆☆"
set {_color} to "&e"
else if {_d} is "Hard":
set {_stars} to "&e★★★★&7☆☆☆"
set {_color} to "&6"
else if {_d} is "Challenging":
set {_stars} to "&e★★★★★&7☆☆"
set {_color} to "&c"
else if {_d} is "Expert":
set {_stars} to "&e★★★★★★&7☆"
set {_color} to "&5"
else if {_d} is "Nightmare":
set {_stars} to "&e★★★★★★★"
set {_color} to "&8"
quick dew
# patent birch I don't see where are you removing here?

here command /removecourse <text> <text>: permission: op trigger: if {Difficulties::*} contains argument 1: if {AllCourseNames::%argument 1%::*} contains argument 2: set {_t} to argument 2 replace all " " in {_t} with "-" wait 1 tick set {_page} to {%{_t}%::4} remove {%{_t}%::1} from {%argument 1%::%{_page}%::*} remove {%{_t}%::1} from {AllCourseNames::%argument 1%::*} delete {%{_t}%::1} delete {%{_t}%::2} delete {%{_t}%::3} delete {%{_t}%::*} remove 1 from {CoursesCounter::%argument 1%} send "&7Removed course &e%argument 2%"

i tried to remove everything but didnt accidentaly found what to remove lol

patent birch
#

1 sec brb

patent birch
#

why is it %{_courseName::1}%

#

set slot {_slot} of {_i} to paper named "&e%{_courseName::1}% &7- %{_color}%%{%{_VarName}%::3}%"

quick dew
#

that is stored in the list

patent birch
#

Seems like I can't solve this issue, sorry..