command /warplist [<number=0>]: # the '=0' part stands for if the argument isn't given, it will be set to 0
trigger:
set {_s} to arg-1 # I had to save the argument in a variable because else there would be a strange bug
set {_w::*} to {warp list::*} # just setting a shorter name for the list variable here
set {_i} to {_s} * 10 # this variable is the starting point for the list: the first argument times 10
message "&2%{_s} * 10 + 1% - %{_s} * 10 + 10%" # messaging the range for which items from the list will be shown
loop 10 times: # looping 10 times, since you wanted 10 items per 'page'
add 1 to {_i} # add 1 to the variable 'i', which I set to the starting point before
if {_w::%{_i}%} is not set: # checking if the item from the loop which we are currently at is set
message "%{_i}%: &cnot set" # if it's not set, message our current number (i) and 'not set' in light red
else:
message "%{_i}%: %{_w::%{_i}%}%" # if it is set, message our current number (i) and the value from the list ({[list-name]::[list-index]}, so in this case: {_w::%{_i}%}, _w is the list variable and {_i} the index)