Mchat Rock-paper-scissors addon

Mods, snippets and styles postet and supported by the users
Forum rules
As the forum title says this is for User Contributions
Post a support request in this forum and you will be banned!
User avatar
Solidjeuh
BBCoder IV
BBCoder IV
Posts: 257
Joined: 16 Oct 2011, 00:15
BBCodes: 7
Favourite MOD: Top stats
Location: Aalst / Belgium

Mchat Rock-paper-scissors addon

Post by Solidjeuh » 30 Jul 2013, 04:03

Image

Rock-paper-scissors game!
( I stole the code from the dice addon )
Credits to: Stoker , Steve©

Open mchat.php
Find:

Code: Select all

$sql_ary = array(
			'forum_id' 			=> 0,
Before add:

Code: Select all

$find_chars = array("/ssp");
            $ssp = mt_rand(1,3);
           
            switch ($ssp)
            {
                case $ssp == '1':
                    $ssp = '<strong>You chose scissors</strong> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="' . $phpbb_root_path . 'images/sschaar.png" width="42" height="41" alt="1" />';
                break;
				
                case $ssp == '2':
                    $ssp = '<strong>You chose rock</strong> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="' . $phpbb_root_path . 'images/ssteen.png" width="42" height="41" alt="1" />';
                break;	

                case $ssp == '3':
                    $ssp = '<strong>You chose paper</strong> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="' . $phpbb_root_path . 'images/spapier.png" width="42" height="41" alt="1" />';
                break;				
            }
          $message = str_replace($find_chars, $ssp, $message);	
Open: mchat_body.html
Find:

Code: Select all

<!-- IF MCHAT_READ_ARCHIVE_BUTTON -->
Before add:

Code: Select all

<input class="button2" type="button" value="Rock-paper-scissors" onclick="insert_text('/ssp');"></input>
ssp.zip
You do not have the required permissions to view the files attached to this post.
Last edited by Solidjeuh on 30 Jul 2013, 15:09, edited 1 time in total.
Wij promoten UW muziek in ons forum & delen alles via Sociale media!
Mail uw single + hoesje + info naar: info@muziekpromo.net of Solidjeuh@textradio.be
===============
Onze Website: https://www.muziekpromo.net


User avatar
martin123456
BBCoder VI
BBCoder VI
Posts: 764
Joined: 25 Jul 2011, 11:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!

Mchat Rock-paper-scissors addon

Post by martin123456 » 30 Jul 2013, 11:32

Might want to pass some credit steves way too lol.

User avatar
Blackwolf
BBCoder IV
BBCoder IV
Posts: 272
Joined: 04 Dec 2010, 10:36
BBCodes: 101
Favourite BBCode: Dropcap
Favourite MOD: mchat
Location: Melbourne Australia

Mchat Rock-paper-scissors addon

Post by Blackwolf » 30 Jul 2013, 12:04

Yes...a few people helped in the original dice mod ;)

Thanks for sharing 8-)
rock.png
You do not have the required permissions to view the files attached to this post.
Ultimate Edition, Ultimate Edition Oz, Oz Unity

“We are Anonymous. We are Legion. We do not forgive. We do not forget. Expect us.”

User avatar
Solidjeuh
BBCoder IV
BBCoder IV
Posts: 257
Joined: 16 Oct 2011, 00:15
BBCodes: 7
Favourite MOD: Top stats
Location: Aalst / Belgium

Mchat Rock-paper-scissors addon

Post by Solidjeuh » 30 Jul 2013, 15:10

Blackwolf wrote:Yes...a few people helped in the original dice mod ;)

Thanks for sharing 8-)
martin123456 wrote:Might want to pass some credit steves way too lol.

Done! 8-)
Wij promoten UW muziek in ons forum & delen alles via Sociale media!
Mail uw single + hoesje + info naar: info@muziekpromo.net of Solidjeuh@textradio.be
===============
Onze Website: https://www.muziekpromo.net

User avatar
Tigerman75
BBCoder III
BBCoder III
Posts: 109
Joined: 31 Oct 2011, 12:14
BBCodes: 10
Favourite MOD: Top Staticts
Location: Italy

Mchat Rock-paper-scissors addon

Post by Tigerman75 » 30 Jul 2013, 20:40

Fantastic. ;) :thumb:

Thanks for sharing. :idea:
To speak with you use the google translator
http://www.graphicforum.altervista.org/ and http://www.bbcodeitalia.com/forum/


User avatar
Blackwolf
BBCoder IV
BBCoder IV
Posts: 272
Joined: 04 Dec 2010, 10:36
BBCodes: 101
Favourite BBCode: Dropcap
Favourite MOD: mchat
Location: Melbourne Australia

Mchat Rock-paper-scissors addon

Post by Blackwolf » 30 Jul 2013, 20:54

How to hide when logged out? :?
rock.png
You do not have the required permissions to view the files attached to this post.
Ultimate Edition, Ultimate Edition Oz, Oz Unity

“We are Anonymous. We are Legion. We do not forgive. We do not forget. Expect us.”

User avatar
Solidjeuh
BBCoder IV
BBCoder IV
Posts: 257
Joined: 16 Oct 2011, 00:15
BBCodes: 7
Favourite MOD: Top stats
Location: Aalst / Belgium

Mchat Rock-paper-scissors addon

Post by Solidjeuh » 30 Jul 2013, 20:56

Replace with this

Code: Select all

<!-- IF S_USER_LOGGED_IN and not S_IS_BOT -->
<input class="button2" type="button" value="Rock-paper-scissors" onclick="insert_text('/ssp');"></input>
<!-- ENDIF -->
Wij promoten UW muziek in ons forum & delen alles via Sociale media!
Mail uw single + hoesje + info naar: info@muziekpromo.net of Solidjeuh@textradio.be
===============
Onze Website: https://www.muziekpromo.net

User avatar
Blackwolf
BBCoder IV
BBCoder IV
Posts: 272
Joined: 04 Dec 2010, 10:36
BBCodes: 101
Favourite BBCode: Dropcap
Favourite MOD: mchat
Location: Melbourne Australia

Mchat Rock-paper-scissors addon

Post by Blackwolf » 30 Jul 2013, 21:27

:thumb: Cheers big ears!
Ultimate Edition, Ultimate Edition Oz, Oz Unity

“We are Anonymous. We are Legion. We do not forgive. We do not forget. Expect us.”