All pastes #2072045 Raw Edit

Someone

public php v1 · immutable
#2072045 ·published 2011-05-30 10:11 UTC
rendered paste body
	public function roll($line, $args){		$getmodifier = explode('+', $args['arg1']);		$modifier = $getmodifier[1];		$getdies = explode('#', $modifier[0]);		$dies = $getdies[1]		$dieroll = explode('d',$dies);		if($line['to'] == 'Edorium'){			$sendTo = $line['fromNick'];		}else{			$sendTo = $line['to'];			}				while($dieroll[0] > 0){			$roll = mt_rand(1, $dieroll[1])			$result[$dieroll[0]] = $roll . ' + ' . $modifier . ': ' . $roll+$modifier;			$dieroll[0]--;			}						foreach($result as $value){			$dicerollings = $value . '   ' . $dicerollings;						}		$this->ircClass->privMsg($sendTo, $dicerollings);		}