Armageddon General Discussion Board

General => Code Discussion => Topic started by: Morrolan on September 04, 2012, 05:33:32 PM

Title: Random draw
Post by: Morrolan on September 04, 2012, 05:33:32 PM
I would like to see a way to either draw a random item from a bag/pouch/etc. or to randomize the order of the bag (so that getting the first thing in the bag would be random).

Getting a random item would be cool for such things as drawing lots (who gets the black stone in the bag of white stones?), and randomizing the contents of a bag (if all the items were different) could have the same effect.

This could be applied in any number of situations, such as developing new ways of telling fortunes, selecting who gets a prize, and so forth.  At first I was thinking that such a script could be added to specific items, but the more I thought about it, the more I thought that this could apply to any container, and doesn't give any major exploitable advantage.  (of course, you have to trust the person doing the draw).
Title: Re: Random draw
Post by: Maso on September 04, 2012, 06:21:33 PM


> get random bag (after rummaging inside for a minute)
After rummaging inside the bag for a minute, the tall, brown haired man randomly gets a white vellum ticket from a gem-encrusted, blue silk bag.

WE HAVE A WINNER!



I like it. :)
Title: Re: Random draw
Post by: musashi on September 04, 2012, 07:01:56 PM
This would be really cool.
Title: Re: Random draw
Post by: Maso on September 04, 2012, 07:06:38 PM
Wife swapping, anybody?  ???
Title: Re: Random draw
Post by: Spoon on September 05, 2012, 05:23:35 AM
Yeah. Wife swapping and bingo.
Title: Re: Random draw
Post by: Kol on September 05, 2012, 10:41:39 AM
+1

This would be awesome.
Title: Re: Random draw
Post by: Maso on September 05, 2012, 12:36:21 PM


Tugging a cube out of his velvety black bag, the tall, brown-haired man shouts in sirihish, "Twoooo fat ladies! Yup, we have a picture of two fat ladies folks!"

Title: Re: Random draw
Post by: SmashedTregil on September 05, 2012, 12:43:16 PM
How did random draw turn into ... wife swapping? Ohhh my innocent little mind.
Title: Re: Random draw
Post by: Morrolan on September 05, 2012, 02:06:53 PM
Quote from: SmashedTregil on September 05, 2012, 12:43:16 PM
How did random draw turn into ... wife swapping? Ohhh my innocent little mind.

Yeah, where did Zalanthan people get "wives"? Mates, I can see...but they get swapped already.
Title: Re: Random draw
Post by: Maso on September 05, 2012, 08:06:01 PM
Pedantic, the lot of you!

Mate-swapping. Whatever.

I was not being serious.

And for the innocent one, wife-swapping was done at the end of parties, by all the guys throwing their keys into a hat, and the women would pick them out, whoever's keys they got - they went home with. I do not know this from personal experience.
Title: Re: Random draw
Post by: lordcooper on September 05, 2012, 10:08:05 PM
What if they got their own partner's keys?

There's probably an app for it these days anyway.
Title: Re: Random draw
Post by: FantasyWriter on September 05, 2012, 10:12:39 PM
Quote from: lordcooper on September 05, 2012, 10:08:05 PM
What if they got their own partner's keys?

>reroll keys
Title: Re: Random draw
Post by: IntuitiveApathy on September 18, 2012, 02:58:44 AM
Quote from: FantasyWriter on September 05, 2012, 10:12:39 PM
Quote from: lordcooper on September 05, 2012, 10:08:05 PM
What if they got their own partner's keys?

>reroll keys

>reroll self
Title: Re: Random draw
Post by: Barsook on September 18, 2012, 05:17:47 PM
I dig this idea.
Title: Re: Random draw
Post by: drunkendwarf on September 18, 2012, 10:44:52 PM
Cool idea. But could also be accomplished with any decent mud client.
Title: Re: Random draw
Post by: musashi on September 18, 2012, 11:09:51 PM
Yes but ideally we'd like for the randomness to come from within the game rather than trust the person on the other end isn't just manually typing in what they want.

In the short term coins and dice work well for random selection of people, ect.
Title: Re: Random draw
Post by: drunkendwarf on September 19, 2012, 12:20:33 PM
Quote from: musashi on September 18, 2012, 11:09:51 PM
Yes but ideally we'd like for the randomness to come from within the game rather than trust the person on the other end isn't just manually typing in what they want.

In the short term coins and dice work well for random selection of people, ect.

There's going to be some level of trust no matter what, as you have no guarantee they're not simply emoting and then getting whatever they want out of the container anyway, without using any hard coded random fetch command.
I was just suggesting a quick work around for the OP so that they could at least be doing this themselves without having to wait for it to be hard coded.
Title: Re: Random draw
Post by: Maso on September 19, 2012, 12:39:16 PM
I suppose if you put everything into identical bags...and then put them into a container (e.g. a bigger bag).

They they could...get bag large...or get 23.bag large...without knowing what's inside.
Title: Re: Random draw
Post by: Morrolan on September 20, 2012, 11:44:27 AM
Quote from: Maso on September 19, 2012, 12:39:16 PM
They they could...get bag large...or get 23.bag large...without knowing what's inside.


"A New Car...ru!"

>A tall, well-groomed carru charges the blond, chiseled game show contestant.


The tall, muscular man says, watching TV,
        "Well, must have been the sudden death round."
Title: Re: Random draw
Post by: Elisar on November 13, 2012, 01:45:32 PM
Well, there are sites like http://rolz.org/ that let people join a roll channel and all see each others rolls. You could ooc a channel name and tell everyone to join it to roll. Make sure everyone uses the right values for the # of items to roll from. Maybe not ideal, but it's a solution until they add /roll <low> <high> and /roll #d# to the mud. You type in a display name every time you use it, so it doesn't give away any identifying information.
Title: Re: Random draw
Post by: hyzhenhok on November 14, 2012, 08:23:03 AM
Yeah, that's not a good idea.

There are dice in game if your characters have reason to be rolling for things. For random drawing, there's nothing stopping the person from doing the drawing from using virtual dice themselves to determine what they grab. Which is good enough for me; if you emote that you are randomly drawing something (and do not hemote actually doesn't draw randomly but makes a delibrate choice) I'll trust that you did it randomly.
Title: Re: Random draw
Post by: Intrepid237 on December 08, 2012, 06:15:41 AM
get 1. bag

This will pull the first thing out of a bag.

get . bag

I think will pull a random item from a bag
Title: Re: Random draw
Post by: Elisar on December 08, 2012, 10:32:07 AM
"get . bag" does exactly the same as "get 1. bag" ie gets the first item from bag

Quote from: Intrepid237 on December 08, 2012, 06:15:41 AM
get 1. bag

This will pull the first thing out of a bag.

get . bag

I think will pull a random item from a bag