Funkcióteszt

More
14 years 8 months ago #834 by danka90
Replied by danka90 on topic Funkcióteszt
(4d6)

próbálgatom...

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #835 by Nyarlathotep
Replied by Nyarlathotep on topic Funkcióteszt
This hack is very similar to something I had done in phpMyChat and wanted to implement on my vBulletin boards to help the Play-by-Post gaming forums. However, I didn't really have a need for displaying cute dice images or limiting myself on the number of rolls or faces. Plus, the dice roller I'm using in my chat uses the standard AdX+B notation where

A = the number of dice to roll (1 if not present)
X = the number of faces on the dice
B = represents a modifier, usually a + or - but also a divides or multiply.

I also need it to do certain things like, only show the sum/result of the roll or show all the die results and the sum of the roll. I also wanted the ability to do open rolls, e.g. if you roll 6, six sided die, you keep rerolling any dice that come up a 6.

So, basically, I have concocted three different bbcodes in one product:

[roll][/roll]
- for rolling and showing only the results or sum
[rollv][/rollv] - for rolling and seeing the result of each dice as well as the sum
[rollo][/rollo] - for open rolls

Each of these takes and optional label for the roll, to be included in the tag after the '=' sign, e.g. [roll0] and so forth. It is, however, optional as the actual notation for the roll is displayed before the results in the final posting.

So, for example, you can enter rolls like the following:

[roll1] to get the sum of 4 six sided die.
[roll2] for a percentage roll (same as 1d100)
[roll3] to roll 4 six sided dice and only sum the "best" three results


I took the current XML file on this hack, made some big changes, adapted my Perl dice roller class to PHP and I've put together a product to allow dice rolling in this fashion. See the attachment.

If you want to see a better description and see some results you can view my forum thread about this enhancement . I don't want to hijack this thread either, so if I need to provide this product via a new thread, someone just let me know. It seemed related enough that I figured I'd add it here first.

There is an INSTALL file in the zip attachment which gives an explanation of the included files and how to install them. If anyone has any questions, just shoot me a PM or I'll check this thread for thoughts.

This is installed and working on vBulletin 3.5.4 on my forums.

Ha kell akkor fodítok majd, mert ez az eredeti Tuxz0r tollából/billenty?ib?l a vBulletin oldalról.

[roll4]

Csapat riadó!

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #1058 by Valen
Replied by Valen on topic Funkcióteszt
/rollv 3d6

[color=#800000:4p7dq1gy][font=Comic Sans MS:4p7dq1gy]Do ya?[/font:4p7dq1gy][/color:4p7dq1gy]

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #1059 by Valen
Replied by Valen on topic Funkcióteszt
[/rollv] 2d6

[color=#800000:4p7dq1gy][font=Comic Sans MS:4p7dq1gy]Do ya?[/font:4p7dq1gy][/color:4p7dq1gy]

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #1104 by Valen
Replied by Valen on topic Funkcióteszt
Asszem nem pontosan értem ez hogy a fenében is mükszik...

[color=#800000:4p7dq1gy][font=Comic Sans MS:4p7dq1gy]Do ya?[/font:4p7dq1gy][/color:4p7dq1gy]

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #1105 by danka90
Replied by danka90 on topic Funkcióteszt
[roll0]
azt hiszem, így

Please Log in or Create an account to join the conversation.

Time to create page: 0.180 seconds

Útvonal

Aktuális gondolatok

Ha saját szerepjátékot alkotnál, legyen az első kérdés az: Van-e valami olyan játék, amivel játszanál, de nem elérhető a piacon?

Bejelentkezés

Kereső

Cookie kezelés

This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.