Expand the /Roll function
Fully customizable web chat created using AJAX.
Brought to you by:
frug,
madblueimp
I installed this on my Forum, and I must say I am impressed! Very well done!
Is there a way to have the /Roll function expended a bit?
For instance, adding a modifier to a dice would go a long way to make this more RPG friendly...
I.e. /roll 1d20+4 would return (12+4)=16
The second ability which would cover much of the rest, would be the ability to 'list' multiple rolls in the same line:
i.e. /roll 1d20+4;1d8+2 would return (12+4)=16;(8+2)=10
That would really be awesome!
THANKS!!
RiTz21
I added this feature myself.
Instructions:
Just replace the insertParsedMessageRoll function in chat\lib\class\AJAXChat.php with the one below.
// $text .= $this->rollDice($sides);
}
$totalresult += $bonus;
$text .= ']';
if ($bonus != 0)
$text .= '+'.$bonus;
$text .= '='.$totalresult;
} else {
// if dice syntax is invalid, roll one d6:
$text = '/roll '.$this->getUserName().' 1d6 '.$this->rollDice(6);
}
}
$this->insertChatBotMessage(
$this->getChannel(),
$text
);
}
Well, i've never liked RPing with dice, but...
I will take up adding this feature into a future release. I have also had a request for a grand total result for all the rolls to be displayed.