Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Roll Dice Hack (Great for RPG boards) Details »»
Roll Dice Hack (Great for RPG boards)
Version: 1.00, by Madacc Madacc is offline
Developer Last Online: Jan 2011 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 02-16-2004 Last Update: Never Installs: 5
Is in Beta Stage  
No support by the author.

Here's a hack I made in a few days. Basically, this hack allows you to roll dice in a thread. This will be a great addition to many RPG and D&D style boards, but will also work great for really any board that wants a fun dice rolling system. It is very secure, and this was tested by many of our members. As far as I know, there is no way to cheat this system or rig your roll.

NOTE: Boards that allow HTML in threads will be vunerable to cheaters. This system displays a unique HTML style border that cannot be created in threads when HTML is not allowed. If it is allowed, people could copy the exact look of the post and it would be impossible to tell the difference between a real roll and a rigged roll.

This is my first hack so go easy on me.

This hack should only take about 10 minutes to install. It's pretty quick.

To roll the dice, use the following syntax as your post: /roll <low number> <high number>

Here's an example dice roll:

/roll 200 500

Make sure to include nothing else in your post or you'll get an error. I hope you enjoy this hack!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 02-17-2004, 08:05 PM
Hoffi's Avatar
Hoffi Hoffi is offline
 
Join Date: Nov 2001
Location: Germany
Posts: 342
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Madacc,

basicly i am looking for such a Hack. The Problem I see is, that the Dice is not stored in the Database outside the Post-Text so that it can be edited and always shown the same number after rolling once the dice.
Reply With Quote
  #3  
Old 02-17-2004, 08:12 PM
Madacc Madacc is offline
 
Join Date: Jul 2002
Location: Kansas City, MO
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hoffi,

The way the system works is simple. It stores the number as part of the post after the first roll and disallows editting of your post that contains a rolled dice. I did this to make the system a little easier to work with, therefore not needing to manipulate the database. I assure you the system works exactly how you think it should. You'll see once you install it.
Reply With Quote
  #4  
Old 02-17-2004, 10:40 PM
AutomatikStudio's Avatar
AutomatikStudio AutomatikStudio is offline
 
Join Date: Dec 2003
Posts: 229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Snap...just noticed this is for vB2 and not vB3. Oh well...
Reply With Quote
  #5  
Old 02-18-2004, 01:55 AM
Gio Takahashi's Avatar
Gio Takahashi Gio Takahashi is offline
 
Join Date: Jul 2003
Location: Cape Coral
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow o_O So it did. I was so hoping its for vB3.

...Make it for vb3!
Reply With Quote
  #6  
Old 02-18-2004, 02:52 AM
Madacc Madacc is offline
 
Join Date: Jul 2002
Location: Kansas City, MO
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gio Takahashi
Wow o_O So it did. I was so hoping its for vB3.

...Make it for vb3!
I'll see what I can do
Reply With Quote
  #7  
Old 02-18-2004, 12:39 PM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What is the point?>
Reply With Quote
  #8  
Old 02-18-2004, 07:41 PM
Hoffi's Avatar
Hoffi Hoffi is offline
 
Join Date: Nov 2001
Location: Germany
Posts: 342
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, but i see its for vB2. Too bad.
The Thing that you disallow editing after Rolling a Dice is a way, but I find this way not perfect. But thats only my opinion.
Reply With Quote
  #9  
Old 02-19-2004, 03:17 PM
Sylvus Sylvus is offline
 
Join Date: Apr 2003
Location: Toronto
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So if someone wanted to roll an 18, they could simply do a

/roll 18 18

and always get the number they wanted. Or if you required them to roll a six-sided dice, the highest roll wins, anyone could do

/roll 6 6

This is not great for any RPG board.

The proper way to do this is to hard code each roll based on the combination of dice provided for RPG games.

1d4
1d6
1d8
1d10
1d12
1d20
1d100

This stops anyone from generating a high number based on the selection of <low number> <high number> and always getting the result they want.

Example #1:

Player using <low number> <high number>

"Please roll a d20, you require an 18, 19 or 20 to make the jump across the river!"

/roll 18 20

Rolls a 19!

WOW! He made it!

Example #2 (hard coded 1d#):

"Please roll a d20, you require an 18, 19 or 20 to make the jump across the river!"

/roll d20

Rolls a 4.

See my point?

I'd like your permission to modify the code you've provided and make it a real dice roller based on the d4, d6, d8, d10, d12, d20, d100 dice given in true RPG games, not a <low number> <high number> system that can easilly be exploited.

Syl...
Reply With Quote
  #10  
Old 02-19-2004, 04:46 PM
Madacc Madacc is offline
 
Join Date: Jul 2002
Location: Kansas City, MO
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sylvus
So if someone wanted to roll an 18, they could simply do a

/roll 18 18

and always get the number they wanted. Or if you required them to roll a six-sided dice, the highest roll wins, anyone could do

/roll 6 6

This is not great for any RPG board.

The proper way to do this is to hard code each roll based on the combination of dice provided for RPG games.

1d4
1d6
1d8
1d10
1d12
1d20
1d100

This stops anyone from generating a high number based on the selection of <low number> <high number> and always getting the result they want.

Example #1:

Player using <low number> <high number>

"Please roll a d20, you require an 18, 19 or 20 to make the jump across the river!"

/roll 18 20

Rolls a 19!

WOW! He made it!

Example #2 (hard coded 1d#):

"Please roll a d20, you require an 18, 19 or 20 to make the jump across the river!"

/roll d20

Rolls a 4.

See my point?

I'd like your permission to modify the code you've provided and make it a real dice roller based on the d4, d6, d8, d10, d12, d20, d100 dice given in true RPG games, not a <low number> <high number> system that can easilly be exploited.

Syl...
But you see, if the rules stated to roll a d20, and they typed /roll 18 20 the message would state:

-------------------------------------------------------------
** A Magic Die is rolled by Person
** It could have been any number from 18 to 20 and it turned up a 18
-------------------------------------------------------------

And as you can see, he didn't roll correctly. Everyone can see that he rolled 18-20 which is not correct. So, if you state the ground rules, d20 = /roll 1 20 then you can easily catch bad rolls.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:20 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05099 seconds
  • Memory Usage 2,299KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete