gluxon / phpwolf

The popular Werewolf game (variant of Mafia) powered by a PHP IRC bot
GNU General Public License v3.0
12 stars 7 forks source link

Forcing players to be certain roles #40

Closed Snuupy closed 11 years ago

Snuupy commented 11 years ago

[23:36:48] !execute $this->wolf = array("Snuupy"); [23:36:49] nao [23:36:52] >: ( [23:36:55] !fleave Snuupy [23:36:55] --- phpwolf sets modes [##phpwolf -v Snuupy] [23:36:55] Snuupy died of an unknown disease. S/He was a wolf. [23:36:56] Game over! All the wolves are dead! The villagers chop them up, BBQ them, and have a hearty meal. [23:36:56] Game lasted 01:11. 00:55 was day. 00:16 was night. [23:36:56] The wolf was ishanyx. The seer was TwilightSparkle. [23:36:56] --- phpwolf sets modes [##phpwolf -m] [23:36:56] --- phpwolf sets modes [##phpwolf -vvv Mithadon ishanyx TwilightSparkle] [23:36:58] lol [23:36:59] wait [23:36:59] <Twilight`Sparkle> LOL

there were supposed to be 2 wolves, did you not add a player to the wolves? :P

gluxon commented 11 years ago

It depends on whether or not you are running the command during or before a game. That !execute command overwrites the entire wolf array. If you want to add a wolf, the following should work.

!execute array_push($this->wolf, "Snuupy");

Closing as invalid