Page Index Toggle Pages: [1] 2 3 ... 7 Send TopicPrint
Very Hot Topic (More than 25 Replies) Dice 1.1 for SP 1.1 - 1.3.1 (Read 25244 times)
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Dice 1.1 for SP 1.1 - 1.3.1
May 20th, 2003 at 1:44am
Print Post  
Dice 1.1 for SP 1.1 - 1.3.1

Download: Dice 1.1
Live test: Dice

The Dice mod adds a new "Add Dice" link at the bottom of each thread in the "Administrator Functions" giving Administrator and Moderators the option to add a die/dice roller-system to the thread.
Two new user-options - "Goto Dice" and "Add Roll" (or one of two) - are added to the thread.

www.cd-profil.dk/yabb/dice_add1.gif

In "Goto Dice" mode members of groups with permission can roll dice and have their result shown in a Score-table.

www.cd-profil.dk/yabb/dice_goto.gif

In "Add Roll" mode members of groups with permission can roll dice and have the result shown as a special "Roll post" in the thread.

www.cd-profil.dk/yabb/dice_roll1.gif

Admin/Moderator setup:

www.cd-profil.dk/yabb/dice_setup.gif

-Member Group(s): (both modes)
Select the membergroup(s) allowed access to roll dice. Use "Ctrl" or "Shift" key for multiple selection.

-Post dependant Group(s): (both modes)
Select the Post dependant Group(s) allowed access to roll dice.  Use "Ctrl" or "Shift" key for multiple selection.

-View in thread: (both modes)
Select the Dice mode(s) for members to choose in the thread.

-Dice: (only "Goto Dice" mode)
Select the number of dice (1-10)

-Sides: (only "Goto Dice" mode)
Set the number of sides on dice (1-999)

-Rolls: (only "Goto Dice" mode)
Set the number of rounds (1-99)

-Enable 'hold die': (only "Goto Dice" mode)
Enable/disable 'hold die'. If enabled, users have the option to "hold" each die. Ex. You have 5 dice, 6 sides, 3 rolls, after each roll user can check a box under any die to "hold" that die. The result will be shown as one score.
If diabled the user will roll 3 seperate rounds and the result will be shown as 3 scores.

-Sort by: (only "Goto Dice" mode)
Select the way the Score-table should be sorted.

-Lock Dice:  (only "Goto Dice" mode)
Check this box to lock Dice - members can see the Score-table but they can't Roll.
« Last Edit: May 20th, 2003 at 2:52am by Carsten »  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
Diazepam
Guest


Re: Dice 1.1 for SP 1.1 - 1.3.1
Reply #1 - May 20th, 2003 at 6:34am
Print Post  
this mod for........what?

I have no idea what is the useful.

  
Back to top
 
IP Logged
 
dOCdaS
God Member
*****
Offline



Posts: 1568
Location: Germany
Joined: May 27th, 2001
Gender: Male
Re: Dice 1.1 for SP 1.1 - 1.3.1
Reply #2 - May 20th, 2003 at 7:56am
Print Post  
Quote:
this mod for........what?

I have no idea what is the useful.



FUN!
  
Back to top
WWWICQ  
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: Dice 1.1 for SP 1.1 - 1.3.1
Reply #3 - May 20th, 2003 at 1:26pm
Print Post  
oui exactement!!  Grin

Well - i have to admin that i had no idea too what it would be usefull for when i started on this mod - it was on request from some nice RPG people - and i had a lot of FUN coding it  Grin
  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
Monsen
Junior Member
**
Offline



Posts: 67
Location: Bergen
Joined: May 5th, 2003
Gender: Male
Re: Dice 1.1 for SP 1.1 - 1.3.1
Reply #4 - May 20th, 2003 at 2:35pm
Print Post  
Quote:
this mod for........what?

I have no idea what is the useful.



All I can say.. If you ever needs to roll some kind of dice, be it a normal 6-sider or maybe ten 30-siders or anything else, this mod rules.
Seen from a Role Players point of view, this mod is one of the most useful mods I have on my forum.
  
Back to top
ICQ  
IP Logged
 
Outlaw
Full Member
***
Offline


I love YaBB 1G - SP1.2!

Posts: 191
Location: Essex County
Joined: Apr 9th, 2003
Gender: Male
Re: Dice 1.1 for SP 1.1 - 1.3.1
Reply #5 - May 25th, 2003 at 4:55pm
Print Post  
This mod rocks...er, rolls...lol

I got addicted playing on your site, and would love to include it on my site, but is there a mod version compatible with global moderator and other mods?

Thanks Carsten, another great mod from a true mod god.
  
Back to top
 
IP Logged
 
louisle
God Member
*****
Offline


With a little bit of love
everything goes better

Posts: 1124
Location: Muenchen
Joined: Apr 9th, 2003
Gender: Male
Re: Dice 1.1 for SP 1.1 - 1.3.1
Reply #6 - May 31st, 2003 at 9:57am
Print Post  
Quote:
Thanks Carsten, another great mod from a true mod god.


how true  Wink.

based on this mod, you can write a casino , a rpg-game and it makes decisions easier to do Grin.

greetings
louisle
  

I LIKE SAUSAGE FINGERS:2thumbsup::2thumbsup::2thumbsup::2thumbsup::2thumbsup:
Back to top
IP Logged
 
Outlaw
Full Member
***
Offline


I love YaBB 1G - SP1.2!

Posts: 191
Location: Essex County
Joined: Apr 9th, 2003
Gender: Male
Re: Dice 1.1 for SP 1.1 - 1.3.1
Reply #7 - Jun 3rd, 2003 at 1:11am
Print Post  
Carsten:

I finally got around to this one...lol

I am having a hard time correctly placing just two steps in display.pl, without disturbing my other mods.

Can you please advise?

here are the two steps I need to complete, and my Display.pl is attached.

Code
Select All
<edit file>
Sources/Display.pl
</edit file>

<search for>
            $postinfo
~;
require "$sourcedir/ExtendedProfiles.pl";
$yymain .= ext_viewinposts($musername) . qq~
            </font></td>
</search for>

<add after>
                ~;
                }
                else {
                $yymain .= qq~
                    <td class="$css" bgcolor="$windowbg" valign="top" width="20%" rowspan="2"><font size="1">
                    $usernamelink<br>
                    $memberinfo<br><br>
                        <img src="$imagesdir/tern5.gif" alt="" height="31" width="31" border="0"><br><br>
                        ~;
                if($musername eq "Guest") {
                        $yymain .= qq~
                    <BR><a href="mailto:$memail">$img{'email_sm'}</a><br>
                ~;
                }
                elsif ($userprofile[19] ne "checked" || $settings[7] eq "Administrator" || $allow_hide_email ne 1) {
                        $yymain .= qq~
                    <a href="mailto:$memail">$img{'email_sm'}</a>$sendm<br>
                ~;
                } else {
                        $yymain .= qq~
                        $sendm<br>
                ~;
                }
                $yymain .= qq~
                    </font></td>
                ~;
                }
                $yymain .= qq~
</add after>


 

Code
Select All
<search for>
$yymain .= qq~
                <a t">$img{'replyquote'}</a>$menusep<a href="$cgi;action=modify;message=$counter;thread=$viewnum">$img{'modify'}</a>
~;
        if(exists $moderators{$username} || $settings[7] eq 'Administrator' || $username eq $musername) {
                $yymain .= qq~  $menusep<a href="$cgi;action=modify2;thread=$viewnum;id=$counter;d=1" onclick="return confirm('$txt{'739'}')">$img{'delete'}</a>~;
        }
</search for>

<replace>
if($micon eq 'dice') {
        if(exists $moderators{$username} || $settings[7] eq 'Administrator') {
            $yymain .= qq~<a href="$cgi;action=modify2;thread=$viewnum;id=$counter;d=1" onclick="return confirm('$txt{'739'}')">$img{'delete'}</a>~;
        }
}
else {
$yymain .= qq~
                <a t">$img{'replyquote'}</a>$menusep<a href="$cgi;action=modify;message=$counter;thread=$viewnum">$img{'modify'}</a>
~;
        if(exists $moderators{$username} || $settings[7] eq 'Administrator' || $username eq $musername) {
                $yymain .= qq~  $menusep<a href="$cgi;action=modify2;thread=$viewnum;id=$counter;d=1" onclick="return confirm('$txt{'739'}')">$img{'delete'}</a>~;
        }
}
</replace> 




  

Outlaw_Display.txt ( 68 KB | Downloads )
Back to top
 
IP Logged
 
Michael Griffin
God Member
*****
Offline


Black Panther's are cool!!!

Posts: 1337
Location: Crossville
Joined: Mar 30th, 2003
Gender: Male
Re: Dice 1.1 for SP 1.1 - 1.3.1
Reply #8 - Jun 3rd, 2003 at 1:43am
Print Post  
I have the same 2 errors in my display plus an error on step 18...

I think the User Mood mod and some other "mods" has taken up the code for step 7 but I dont know about the other 2 errors Sad Any suggestions ??? Thank you

Panther Undecided
  

Michael T Griffin
Back to top
YIM  
IP Logged
 
Outlaw
Full Member
***
Offline


I love YaBB 1G - SP1.2!

Posts: 191
Location: Essex County
Joined: Apr 9th, 2003
Gender: Male
Re: Dice 1.1 for SP 1.1 - 1.3.1
Reply #9 - Jun 3rd, 2003 at 3:21pm
Print Post  
bump
  
Back to top
 
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: Dice 1.1 for SP 1.1 - 1.3.1
Reply #10 - Jun 4th, 2003 at 1:38am
Print Post  
@Outlaw - attached txt file fix for the two steps. Errors due to Mood mod and Report to Moderator mod. No guaranties  Wink

@Panther - depending on the mods installed the "Outlaw fix" might work for you. As for step 18 - it's just adding an
Code
Select All
|| $icon eq "dice" 

to one of the "unless" statements in the Security.pl subroutine "CheckIcon".
  

outlaw_dice_fix.txt ( 3 KB | Downloads )

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
Michael Griffin
God Member
*****
Offline


Black Panther's are cool!!!

Posts: 1337
Location: Crossville
Joined: Mar 30th, 2003
Gender: Male
Re: Dice 1.1 for SP 1.1 - 1.3.1
Reply #11 - Jun 4th, 2003 at 3:15am
Print Post  
Carsten, I dont have any "unless" statements in my Security.pl... I have this code tho...

Code
Select All
sub CheckIcon
{
$icon =~ s/[^A-Za-z|\/]//g;
$icon_found=0;
if ($icon eq "xx" || $icon eq "thumbup" || $icon eq "thumbdown" || $icon eq "exclamation" || $icon eq "question" || $icon eq "lamp" || $icon eq "smiley" || $icon eq "angry" || $icon eq "cheesy" || $icon eq "laugh" || $icon eq "sad" || $icon eq "wink") 



I dont know what caused the code to change but if I added all that code to the CheckIcon:

change this code that this is searching for:

Code
Select All
                  unless($icon eq "cheesy" || $icon eq "laugh" || $icon eq "sad" || $icon eq "wink") { 



to this:

Code
Select All
sub CheckIcon
{
$icon =~ s/[^A-Za-z|\/]//g;
$icon_found=0;
if ($icon eq "xx" || $icon eq "thumbup" || $icon eq "thumbdown" || $icon eq "exclamation" || $icon eq "question" || $icon eq "lamp" || $icon eq "smiley" || $icon eq "angry" || $icon eq "cheesy" || $icon eq "laugh" || $icon eq "sad" || $icon eq "wink") 



And this code thats to be replaced by:

Code
Select All
                  unless($icon eq "cheesy" || $icon eq "laugh" || $icon eq "sad" || $icon eq "wink" || $icon eq "dice") { 



with this:

Code
Select All
sub CheckIcon
{
$icon =~ s/[^A-Za-z|\/]//g;
$icon_found=0;
if ($icon eq "xx" || $icon eq "thumbup" || $icon eq "thumbdown" || $icon eq "exclamation" || $icon eq "question" || $icon eq "lamp" || $icon eq "smiley" || $icon eq "angry" || $icon eq "cheesy" || $icon eq "laugh" || $icon eq "sad" || $icon eq "wink" || $icon eq "dice") { 



O' yeah, Carsten... I dont have extented profiles installed, so I guess it isnt the same problem that outlaw had but almost... lol Undecided I'm hooking my display up here now...

Well, that step 9 error, some mod has taken the code over... I have this:

Code
Select All
$yymain .= qq~
                <a t">$img{'replyquote'}</a>$menusep<a href="$cgi;action=modify;message=$counter;thread=$viewnum">$img{'modify'}</a>
~;
      if(exists $moderators{$username} || $settings[7] eq 'Administrator' || $username eq $musername) {
            $yymain .= qq~  $menusep<a href="$cgi;action=modify2;thread=$viewnum;id=$counter;d=1" onclick="return confirm('$txt{'739'}')">$img{'delete'}</a>~; 



instead of what its posed to search for:

Code
Select All
$yymain .= qq~
                <a t">$img{'replyquote'}</a>$menusep<a href="$cgi;action=modify;message=$counter;thread=$viewnum">$img{'modify'}</a>
~;
      if(exists $moderators{$username} || $settings[7] eq 'Administrator' || $username eq $musername) {
            $yymain .= qq~  $menusep<a href="$cgi;action=modify2;thread=$viewnum;id=$counter;d=1" onclick="return confirm('$txt{'739'}')">$img{'delete'}</a>~;
            if((exists $moderators{$username} && $mdmod eq 1) || ($settings[7] eq 'Administrator' && $mdadmin eq 1) || ($settings[7] eq 'Global Moderator' && $mdglobal eq 1)) {
            $yymain .= qq~ <input type="checkbox" name="del$counter" value="$counter">~;
            } 



See that extra if statment, (the last one) and $yymain .= qq~ ???

Thank you Wink

Panther
  

Display1234.txt ( 47 KB | Downloads )

Michael T Griffin
Back to top
YIM  
IP Logged
 
Outlaw
Full Member
***
Offline


I love YaBB 1G - SP1.2!

Posts: 191
Location: Essex County
Joined: Apr 9th, 2003
Gender: Male
Re: Dice 1.1 for SP 1.1 - 1.3.1
Reply #12 - Jun 4th, 2003 at 3:48am
Print Post  
Carsten,

OK, everything installed perfectly, except for one problem... DICE IS NOWHERE TO BE FOUND ON MY BOARD !!!

Cry What do I do???
  
Back to top
 
IP Logged
 
Michael Griffin
God Member
*****
Offline


Black Panther's are cool!!!

Posts: 1337
Location: Crossville
Joined: Mar 30th, 2003
Gender: Male
Re: Dice 1.1 for SP 1.1 - 1.3.1
Reply #13 - Jun 4th, 2003 at 3:58am
Print Post  
Shocked, that could be a problem... probley for me to when Carsten, tells me what to do with my 3 lill problems Undecided

Panther
  

Michael T Griffin
Back to top
YIM  
IP Logged
 
Outlaw
Full Member
***
Offline


I love YaBB 1G - SP1.2!

Posts: 191
Location: Essex County
Joined: Apr 9th, 2003
Gender: Male
Re: Dice 1.1 for SP 1.1 - 1.3.1
Reply #14 - Jun 4th, 2003 at 4:02am
Print Post  
see, others questioned the usefullness of this mod, but I actually find it one of the best mods out there.

It is something that I NEED to have, or I will continue to use Carstens bandwidth playing with his...lol

I am sure he will help us get it up and running, because he is a swell guy  Wink
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 3 ... 7
Send TopicPrint