The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Dice Roller Hack [BBCode] Details »» | ||||||||||||||||||||||||||
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:
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:
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
|
Comments |
#92
|
||||
|
||||
....and another variation that requires less work from you but a little more from the users:
Code:
<script type="text/javascript"> function dropDownDice(obj,obj2){ var diceToRoll = document.getElementById(obj).value; var faces = document.getElementById(obj2).value; document.getElementById('{$editorid}_textarea').value += '[dice='+diceToRoll+']'+faces+'[/dice]'; } </script> <td><select id="{$editorid}_dicetoroll"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> </select></td> <td><span style="color:black;"><b>D</b><span></td> <td><select id="{$editorid}_dicefaces"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> </select></td> <td><input type="button" onClick="dropDownDice('{$editorid}_dicetoroll','{$editorid}_dicefaces');" value="Add Dice" /></td> |
#93
|
|||
|
|||
so these only work with quick reply or the non advanced wysiwyg editor? or it won't even work on quick reply if the other is enabled?
|
#94
|
||||
|
||||
RPG DICE IS READY !
That's good, i've finished my job Sorry for the delay, i had a busy day. So what's new : -sql problem is fixed -dice in first thread are working -new user interface integrated in Quickreply and in Editor tool bar And the best for the end : Everything is automatically installed with the xml product file To see the result, have a look at the pictures. P.S : I'd like to know if i can translate and distribute this hack to vbulletin-fr for french users. EDIT : files removed for a new release. |
#95
|
|||
|
|||
wow, all of the menus look great! I'll be studying them and figuring out which one to add to my site. So glad we were able to figure something out for this...will really make it easier for the game players.
Quote:
Is this a good time to re-ask one last question I have? I mentioned it before in another post. But I would like to install this hack more than once, to use to play different games that have different images...numbered dice, playing cards, rolling alphabet letters. If I took the xml file and changed every instance of "dice" to "dice2" and then imported it would I get a second installation of the game that uses [dice2] as the bbcode? Would that work? Or can someone rewrite the code using "cards" and "alpha" instead? Thanks for any help. |
#96
|
||||
|
||||
Yes, in theory if you changed all that it would make a new bbcode, but of identical function. you'd need to add new templates as well if you wanted to change output and modify the code for cards to some extent.
You can translate this into any langauge you'd like, but it isnt done yet. I like the drop down below but I prefer my own method as its smaller, to each his own. When i attempted the use of it in a WYSIWIG it did not apear in the editor because you have to write special code from what i recall to handle the WYSIWIG. That is something a little more complex then this simple JS. It should in theory show up but unparsed. I may look into this later. In a few hours when i have this other work done i am going to tackle the code and rip it to pieces for my own uses which does sort of render the buttons as useless to some extent but I will see what I can do. |
#97
|
||||
|
||||
Just to say that i've also got the wysiwyg problem.
|
#98
|
|||
|
|||
speaking of modifying the code for cards....I guess what I'd need is something that assures that the same card isn't drawn twice (suppose you draw 5 cards...two of them can't be the ace of hearts...unlike dice, where you CAN roll the same number twice). I don't suppose anyone here would know how to make that modification? :hopeful:
Oh, oh, oh....just had another idea. What would be ideal for cards is if the same card couldn't be drawn more than once in EACH THREAD. That way if you're playing a card game, taking turns drawing from the deck, you don't get cards repeating themselves, no matter who is doing the drawing. If each thread was a new game, then limiting it to one draw of each card PER THREAD would be the way to go. I would absolutely love this....any possibility? |
#99
|
||||
|
||||
To avoid the wysiwyg problem, just tell for the moment your members to click "A/A" in the top right corner of the editor to make dice buttons work.
To see RPG Dice in action go there : www.lesatirique.info/forum/showthread.php?t=2421 |
#100
|
|||
|
|||
Thanks for the work around cclaerhout, or should I say Merci?
One more question, on your interface can you 'mix' the different dice in one roll? i.e. 1d5 1d10 1d20 (1 for # of dice,d for dice, 5/10/20 for # of faces) did that make sense? |
#101
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|