User:Tink: Difference between revisions
From LiberationMUSH Wiki
(Created page with "Eochaid's randomizer code with a few tweaks and help file: <pre> &cmd.random.player me=$+rand:th The name drawn from the hat is: %xh[name(extract(shuffle(setdiff(lcon(where(%#...") |
No edit summary |
||
Line 2: | Line 2: | ||
<pre> | <pre> | ||
&cmd.random.player me=$+rand:th The name drawn from the hat is: %xh[name(extract(shuffle(setdiff(lcon(where(%#)/connect), u(var.names.ignored))),1,1))]%xn | &cmd.random.player me=$+rand:th The name drawn from the hat is: %xh[name(extract(shuffle(setdiff(lcon(where(%#)/connect), u(var.names.ignored))),1,1))]%xn | ||
&cmd.random.ignore me=$+rand/ | &cmd.random.ignore me=$+rand/exclude *:@dolist/inline/delimit %; %0={&var.names.ignored me=[setunion(u(var.names.ignored),num(trim(##)))]} | ||
&cmd.random.clear me=$+rand/clear:&var.names.ignored me= | &cmd.random.clear me=$+rand/clear:&var.names.ignored me= | ||
&cmd.random.remove me=$+rand/ | &cmd.random.remove me=$+rand/include *:@dolist/inline/delimit %; %0={&var.name.ignored me=[setdiff(u(var.names.ignored),num(trim(##)))]} | ||
&cmd.random.help me=$+rand/help:think +rand - Gives a randomized name from the people in the room.%R%R+rand/ | &cmd.random.help me=$+rand/help:think +rand - Gives a randomized name from the people in the room.%R%R+rand/exclude - Removes a specific person from those in the room.%R%R+rand/include - Re-adds someone to the list to randomize.%R%R+rand/clear - Clears all stored, removed names. | ||
</pre> | </pre> |
Revision as of 15:10, 29 January 2022
Eochaid's randomizer code with a few tweaks and help file:
&cmd.random.player me=$+rand:th The name drawn from the hat is: %xh[name(extract(shuffle(setdiff(lcon(where(%#)/connect), u(var.names.ignored))),1,1))]%xn &cmd.random.ignore me=$+rand/exclude *:@dolist/inline/delimit %; %0={&var.names.ignored me=[setunion(u(var.names.ignored),num(trim(##)))]} &cmd.random.clear me=$+rand/clear:&var.names.ignored me= &cmd.random.remove me=$+rand/include *:@dolist/inline/delimit %; %0={&var.name.ignored me=[setdiff(u(var.names.ignored),num(trim(##)))]} &cmd.random.help me=$+rand/help:think +rand - Gives a randomized name from the people in the room.%R%R+rand/exclude - Removes a specific person from those in the room.%R%R+rand/include - Re-adds someone to the list to randomize.%R%R+rand/clear - Clears all stored, removed names.