vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Dice Hack (https://vborg.vbsupport.ru/showthread.php?t=44558)

[D]Vincent 10-13-2002 12:21 AM

Dice Hack
 
Can anyone create a dice hack that let's a user roll dice when they post. And then it randomly generates a number from the dice sides and number of dice rolled? Basically like the dice on AIM Chatrooms. This would make my RPG I'm making for my forums much easier.

[D]Vincent 10-14-2002 02:43 PM

Bump :P

Graphics 10-14-2002 02:47 PM

It's a cool idea. But I couldn't code it for you... :(

Walab 11-06-2003 02:02 PM

Bump. Not as hard as it seems, only a matter of generating random numbers.

assassingod 11-06-2003 02:07 PM

Quote:

Originally Posted by Walab
Bump. Not as hard as it seems, only a matter of generating random numbers.

This post is over a year old, best not to bump old threads but make new ones instead!

Sylvus 11-06-2003 05:39 PM

Well I did a search for all Dice Rollers and Random Rollers and every single topic has 0 replies.

You know how it is when someone mentions RPG around here so making a new Random Dice post will no doubt end up like all the rest. At least this one has posts in it.

Anyhow, you can do this to generate random numbers.

For d4

Code:

$d4=rand(1,4);
For d6

Code:

$d6=rand(1,6);
Create your own vb codes for each dice. Ie ([d4]), ([d6]) and whenever that vb code is used in a thread, have it use the specific random code.

That's the easy part. The difficult part, which I have not figured out yet, is to remove the EDIT function from anyone who uses a random dice roller, or else they can just go back and edit the number to what they want, which defeats the whole purpose of doing this.

Syl...

Lesane 11-06-2003 05:50 PM

Use sessions for that


All times are GMT. The time now is 03:08 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02042 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete