entomb / dragonchan

A prototype script to transform any /b/ thread into a dragon slaying match.
24 stars 17 forks source link

OP customization #34

Closed ghost closed 11 years ago

ghost commented 11 years ago

The OP of the thread should be able to: In the OP post, the OP should be able to specify these things -Determine boss name bossname@xxxxxx -Determine its element element@earth,fire,electric,ice,water

-Have a toggle whether the OP wants to play as the boss, or as a fighter example: (say beboss=true) in the OP post. -If OP is boss, he should be able to quote people and if he get's a higher than 89, he kills the person he quotes. (only works for 3 people max at a time)

Please put these in!

tselaty commented 11 years ago

I've actually have a command system built in locally which defines several of those things. I say some weird elements on fire dragons that had an ice element and was thinking of that.

entomb commented 11 years ago

I've implementend a command parser, but only one command. The rest of the commands can be added on top of this.

check if you like the parser or if you rather use the one you created.

all posts go throught the parse function, placing the commands and values in a key=>value store

$post->commands = array(
    'nickname@' => "entomb",
    'element@' => "fire",
);

the @ is keept there so we can add other types of commands with # or :

there's a helper function to check for a command call:


if($element = self::checkForCommand('element@',$post){
//$element = 'fire;
//apply 'fire' element bonus
}else{
//$element = false;
}