Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Dice Roller Hack [BBCode] Details »»
Dice Roller Hack [BBCode]
Version: 1.00, by Eikinskjaldi Eikinskjaldi is offline
Developer Last Online: Jul 2023 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 04-24-2006 Last Update: 05-29-2006 Installs: 51
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

Dice Roller Hack [BBCode]
RPG Dice is currently a updated version
Another updated version

Note: Updated package includes only the correct XML.

This hack is a port of: Dice Roll for vB3 and permissions was given to port by the following statement.

Quote:
Info for hackers:
You may modify, improve, upgrade, redistribute this hack, include it
in another hack or yours or translate it provided you do it free of
charge and you distribute it in www.vbulletin.org at least, there is no
need to pm me asking for permission.
This hack rolls a Graphic based dice roll in your post and features multiple dice rolls per post. The images are fully editable by those who know how and I must agree that I very much think they need an overhaul, so go for it.

The basic bbcode format is:
[dice=X]Y[/dice]

X - The number of dice to roll, This cannot be larger then 5 currently, this may change later with demand.
Y - The number of sides on the dice.

so [dice=1]6[/dice] Roll's 1, 6 sided dice.

The only limit that I have noticed so far is that dice will not apear correctly when rolled from the create thread editor. I am unsure as to why this is still and am working on this issue. However aside from this it is working as need be. This hack is mainly useful to Game websites that require dice rollers for gambling or roleplaying games. It can add an element of fun to a forum and is adapatable to most dice require situations.

If enough demand is displayed I will work on removing the 5 roll limit or making it larger. The current maximum sides one can roll is 30.

If you enjoy this hack or have it installed, then please click the install button so that you can remain informed when updates occur.

As the original author said, You do not need to ask permission to update or do anything to this hack and can redistribute it if you feel you have made a great contribution to it.

If someone does make new dice images and wishes to have them as part of the package then either post here or PM me and I will get them in there with full rights going to the sender for the images.

Updates:
  • 04/29/06
    • Added new dice images which where provided by Rukbat.

This hack was requested from: https://vborg.vbsupport.ru/showthread.php?t=97775

-Eikinskjaldi-

Original Screenshots:
https://vborg.vbsupport.ru/attachmen...3&d=1078098688
https://vborg.vbsupport.ru/attachmen...4&d=1078098702

Show Your Support

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

Comments
  #22  
Old 04-27-2006, 03:26 AM
Eikinskjaldi's Avatar
Eikinskjaldi Eikinskjaldi is offline
 
Join Date: Feb 2006
Location: Hell, never looked better
Posts: 572
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well we can go up to as many as you want, but it will mean changing the dbase field to hold more data because its currently med.
Reply With Quote
  #23  
Old 04-27-2006, 12:30 PM
Ziki's Avatar
Ziki Ziki is offline
 
Join Date: Nov 2005
Posts: 2,704
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are missing the .thread table
Reply With Quote
  #24  
Old 04-27-2006, 08:52 PM
username12 username12 is offline
 
Join Date: Jan 2006
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One of my members mentioned 20. Whether that's a good idea or not from a coding standpoint I don't know. Also, Rukbat, would you be willing to post your dice up to a higher number?
Reply With Quote
  #25  
Old 04-27-2006, 09:19 PM
Rukbat Rukbat is offline
 
Join Date: Feb 2006
Location: Mississippi Gulf Coast
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sure
what color? pentagonal or 'square'? and up to what number?
Reply With Quote
  #26  
Old 04-27-2006, 09:30 PM
Rukbat Rukbat is offline
 
Join Date: Feb 2006
Location: Mississippi Gulf Coast
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this might be a better way to compare
Reply With Quote
  #27  
Old 04-28-2006, 04:58 AM
Eikinskjaldi's Avatar
Eikinskjaldi Eikinskjaldi is offline
 
Join Date: Feb 2006
Location: Hell, never looked better
Posts: 572
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Those pentagonal ones are pretty kick arse. If you decide to make a public release i'll add them to the package with credits to you, because if you ask me the ones it comes with are yuck...
Reply With Quote
  #28  
Old 04-28-2006, 03:43 PM
Rukbat Rukbat is offline
 
Join Date: Feb 2006
Location: Mississippi Gulf Coast
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've made 2 sets (a white set & a blue set) of the pentagonal dice (in gif format) both sets up to 30; as well as a 'blank' white and a 'blank' blue in both gif and png formats so if anyone wants/needs higher face values they can make them (or they can pm me and I will when I have time). I used Tolkein font for the numbers in black.

Both sets are in the attached 'dice.zip' file (at least I hope I zipped it and attached it correctly... I don't do much zipping.. mainly unzipping...heh)
Reply With Quote
  #29  
Old 04-28-2006, 05:07 PM
Rukbat Rukbat is offline
 
Join Date: Feb 2006
Location: Mississippi Gulf Coast
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'll work on higher numbers for both those sets later today, and also make a few more colors. will zip and attach when done. guess I'll go up to 100?
maybe put a txt file with the original hack download that they only have to upload the dice set they want to use as well as only uploading the individual gifs for the number of 'faces' they will be using.

a thought...
to increase the max number of die rolled from 5 to say 9 would the 'mediumtext' attribute still be okay? would the below be coding to change?
FROM
Code:
preg_match_all("/\[dice=([1-5])\]([0-9]?[0-9]?[0-9])\[\/dice\]/",$post['message'],$diceresult);
TO
Code:
preg_match_all("/\[dice=([1-9])\]([0-9]?[0-9]?[0-9])\[\/dice\]/",$post['message'],$diceresult);
without having to change anything else?
*note above from my moded xml file so '100' will display
Reply With Quote
  #30  
Old 04-28-2006, 06:50 PM
Ziki's Avatar
Ziki Ziki is offline
 
Join Date: Nov 2005
Posts: 2,704
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this work for someone?Doesn't for me
Reply With Quote
  #31  
Old 04-28-2006, 07:11 PM
Eikinskjaldi's Avatar
Eikinskjaldi Eikinskjaldi is offline
 
Join Date: Feb 2006
Location: Hell, never looked better
Posts: 572
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You may need to ensure the database fields are all there and that all the plugins and bnoth templates where added. I have uninstalled and reinstalled it a few times on my test board with no issues. Rukbat made some good suggestions on the previous page.

I'll go add the extra zip into the other and make note of it, anything specific you want to go with your username in the readme file? If not i'll just use your vb.org username.

As for making it accept more chars, yes, that should work, I havn't looked into it in detail, It shouldn't be very hard since the code is quite strait forward.
Reply With Quote
Reply

Thread Tools

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 09:34 PM.


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.05121 seconds
  • Memory Usage 2,304KB
  • Queries Executed 25 (?)
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_code
  • (1)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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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