Aaaah, thank you so much, hixxy and Wims! I was trying to use either $gettok or $rand and hadn't wrapped my head around nesting them like that. So first you have to tell it to number the items in the list, then to pick one of those at random, then to /msg the item associated with the number drawn. That makes a lot of sense.

hixxy, on the last one you had:
Code
on *:text:!pick *:#:{
  tokenize 44 $2- 
  msg # $eval($ $+ $rand(1,$0),2)
}

Could you elaborate a bit more on the $eval section of that? It's randomizing from 1-(number of tokens based on tokenize), then evaluating $(chosen random number) twice and messaging it to the channel? Why twice? and why do you put the $ in front of the randomized number, does that refer it back to the bit of text assigned to that number?



So say I then wanted to expand on this and add some variable text for before the picked item. I typed up the following, and it seems to be working. Would there be a "better practice" way of writing it though? It helps me a lot to see some different ways to approach the same thing, so thank you for including that hixxy smile
Code
on *:text:!pick *:#:{
  var %tokens = $2-, %randomnumber = $rand(1,$numtok(%tokens,44)), %randomtoken = $gettok(%tokens,%randomnumber,44)
  var %randomintro $rand(1,4) 
  if (%randomintro == 1) { /timer 1 1 /msg # Definitely %randomtoken } 
  if (%randomintro == 2) { /timer 1 1 /msg # Those are terrible choices, but go with %randomtoken } 
  if (%randomintro == 3) { /timer 1 1 /msg # Yeah, sorry, I can't condone any of those. Try something else later. } 
  if (%randomintro == 4) { /timer 1 1 /msg # Ehhhh. I guess %randomtoken } 

}


Last edited by Nimueh; 23/11/19 12:44 AM.