Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
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!
Solidjeuh
BBCoder IV
Posts: 257 Joined: 16 Oct 2011, 02:15
BBCodes: 7
Favourite MOD: Top stats
Location: Aalst / Belgium
Contact:
Post
by Solidjeuh » 30 Jul 2013, 06:03
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> <img src="' . $phpbb_root_path . 'images/sschaar.png" width="42" height="41" alt="1" />';
break;
case $ssp == '2':
$ssp = '<strong>You chose rock</strong> <img src="' . $phpbb_root_path . 'images/ssteen.png" width="42" height="41" alt="1" />';
break;
case $ssp == '3':
$ssp = '<strong>You chose paper</strong> <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 168 times
Last edited by
Solidjeuh on 30 Jul 2013, 17:09, edited 1 time in total.
martin123456
BBCoder VI
Posts: 765 Joined: 25 Jul 2011, 13:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!
Contact:
Post
by martin123456 » 30 Jul 2013, 13:32
Might want to pass some credit steves way too lol.
Blackwolf
BBCoder IV
Posts: 272 Joined: 04 Dec 2010, 12:36
BBCodes: 101
Favourite BBCode: Dropcap
Favourite MOD: mchat
Location: Melbourne Australia
Post
by Blackwolf » 30 Jul 2013, 14:04
Yes...a few people helped in the original dice mod
Thanks for sharing
Solidjeuh
BBCoder IV
Posts: 257 Joined: 16 Oct 2011, 02:15
BBCodes: 7
Favourite MOD: Top stats
Location: Aalst / Belgium
Contact:
Post
by Solidjeuh » 30 Jul 2013, 17:10
Blackwolf wrote: Yes...a few people helped in the original dice mod
Thanks for sharing
martin123456 wrote: Might want to pass some credit steves way too lol.
Done!
Tigerman75
BBCoder III
Posts: 109 Joined: 31 Oct 2011, 14:14
BBCodes: 10
Favourite MOD: Top Staticts
Location: Italy
Contact:
Post
by Tigerman75 » 30 Jul 2013, 22:40
Fantastic.
Thanks for sharing.
Blackwolf
BBCoder IV
Posts: 272 Joined: 04 Dec 2010, 12:36
BBCodes: 101
Favourite BBCode: Dropcap
Favourite MOD: mchat
Location: Melbourne Australia
Post
by Blackwolf » 30 Jul 2013, 22:54
How to hide when logged out?
Solidjeuh
BBCoder IV
Posts: 257 Joined: 16 Oct 2011, 02:15
BBCodes: 7
Favourite MOD: Top stats
Location: Aalst / Belgium
Contact:
Post
by Solidjeuh » 30 Jul 2013, 22: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 -->
Blackwolf
BBCoder IV
Posts: 272 Joined: 04 Dec 2010, 12:36
BBCodes: 101
Favourite BBCode: Dropcap
Favourite MOD: mchat
Location: Melbourne Australia
Post
by Blackwolf » 30 Jul 2013, 23:27
Cheers big ears!