Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:TEXT:!roll*:#: {
- var %rolled $bonesroll(%dice)
- msg $chan this roll scored: %rolled points!
- }
- on *:TEXT:!take*:#: {
- set %dice 5
- }
- alias bonesroll {
- var %dice1 0
- var %dice2 0
- var %dice3 0
- var %dice4 0
- var %dice5 0
- if ($1 > 0) {
- var %dice1 $rand(1,6)
- msg $chan you rolled a: %dice1
- }
- if ($1 > 1) {
- var %dice2 $rand(1,6)
- msg $chan you rolled a %dice2
- }
- if ($1 > 2) {
- var %dice3 $rand(1,6)
- msg $chan you rolled a %dice3
- }
- if ($1 > 3) {
- var %dice4 $rand(1,6)
- msg $chan you rolled a %dice4
- }
- if ($1 > 4) {
- var %dice5 $rand(1,6)
- msg $chan you rolled a %dice5
- }
- var %ones 0
- var %twos 0
- var %threes 0
- var %fours 0
- var %fives 0
- var %sixes 0
- while ($ones+$twos+$threes+$fours+$fives+$sixes < $1) {
- var %check 1
- if (%dice1 = %check||%dice2 = %check||%dice3 = %check||%dice4 = %check||%dice5 = %check) {
- inc %ones
- }
- var %check 2
- if (%dice1 = %check||%dice2 = %check||%dice3 = %check||%dice4 = %check||%dice5 = %check) {
- inc %twos
- }
- var %check 3
- if (%dice1 = %check||%dice2 = %check||%dice3 = %check||%dice4 = %check||%dice5 = %check) {
- inc %threes
- }
- var %check 4
- if (%dice1 = %check||%dice2 = %check||%dice3 = %check||%dice4 = %check||%dice5 = %check) {
- inc %fours
- }
- var %check 5
- if (%dice1 = %check||%dice2 = %check||%dice3 = %check||%dice4 = %check||%dice5 = %check) {
- inc %fives
- }
- var %check 6
- if (%dice1 = %check||%dice2 = %check||%dice3 = %check||%dice4 = %check||%dice5 = %check) {
- inc %sixes
- }
- }
- var %scored 0
- if (%ones == 5||%twos == 5||%threes == 5||%fours == 5||%fives == 5||%sixes == 5) {
- inc %scored 10000
- dec %dice 5
- }
- else {
- if (%ones == 4) {
- inc %scored 1500
- dec %dice 4
- }
- else {
- if (%ones == 3) {
- inc %scored 1000
- dec %dice 3
- }
- else {
- if (%ones == 2) {
- inc %scored 200
- dec %dice 2
- }
- else {
- if (%ones == 1) {
- inc %scored 100
- dec %dice 1
- }
- }
- }
- }
- if (%fives == 4) {
- inc %scored 1000
- dec %dice 4
- }
- else {
- if (%fives == 3) {
- inc %scored 500
- dec %dice 3
- }
- else {
- if (%fives == 2) {
- inc %scored 100
- dec %dice 2
- }
- else {
- if (%fives == 1) {
- inc %scored 50
- dec %dice 1
- }
- }
- }
- }
- if (%twos == 4) {
- inc %scored 700
- dec %dice 4
- }
- else {
- if (%twos == 3) {
- inc %scored 200
- dec %dice 3
- }
- }
- if (%threes == 4) {
- inc %scored 800
- dec %dice 4
- }
- else {
- if (%threes == 3) {
- inc %scored 300
- dec %dice 3
- }
- }
- if (%fours == 4) {
- inc %scored 900
- dec %dice 4
- }
- else {
- if (%fours == 3) {
- inc %scored 400
- dec %dice 3
- }
- }
- if (%sixes == 4) {
- inc %scored 1100
- dec %dice 4
- }
- else {
- if (%sixes == 3) {
- inc %scored 600
- dec %dice 3
- }
- }
- }
- return %scored
- }
Add Comment
Please, Sign In to add comment