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!
Locked
User avatar
Solidjeuh
BBCoder IV
BBCoder IV
Posts: 257
Joined: 16 Oct 2011, 02:15
BBCodes: 7
Favourite MOD: Top stats
Location: Aalst / Belgium
Contact:

Mchat Rock-paper-scissors addon

Post by Solidjeuh »

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
Download, unzip and upload the graphics to your images folder
(10.83 KiB) Downloaded 166 times
Last edited by Solidjeuh on 30 Jul 2013, 17: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: 765
Joined: 25 Jul 2011, 13:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!
Contact:

Mchat Rock-paper-scissors addon

Post by martin123456 »

Might want to pass some credit steves way too lol.
User avatar
Blackwolf
BBCoder IV
BBCoder IV
Posts: 272
Joined: 04 Dec 2010, 12:36
BBCodes: 101
Favourite BBCode: Dropcap
Favourite MOD: mchat
Location: Melbourne Australia

Mchat Rock-paper-scissors addon

Post by Blackwolf »

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

Thanks for sharing 8-)
rock.png
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, 02:15
BBCodes: 7
Favourite MOD: Top stats
Location: Aalst / Belgium
Contact:

Mchat Rock-paper-scissors addon

Post by Solidjeuh »

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, 14:14
BBCodes: 10
Favourite MOD: Top Staticts
Location: Italy
Contact:

Mchat Rock-paper-scissors addon

Post by Tigerman75 »

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, 12:36
BBCodes: 101
Favourite BBCode: Dropcap
Favourite MOD: mchat
Location: Melbourne Australia

Mchat Rock-paper-scissors addon

Post by Blackwolf »

How to hide when logged out? :?
rock.png
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, 02:15
BBCodes: 7
Favourite MOD: Top stats
Location: Aalst / Belgium
Contact:

Mchat Rock-paper-scissors addon

Post by Solidjeuh »

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, 12:36
BBCodes: 101
Favourite BBCode: Dropcap
Favourite MOD: mchat
Location: Melbourne Australia

Mchat Rock-paper-scissors addon

Post by Blackwolf »

: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.”
Locked