News:

Forum changes: Editing of posts has been turned off until further notice.

Main Menu

Polaris IRC

Started by Dan Svensson, December 02, 2005, 06:44:04 PM

Previous topic - Next topic

Dan Svensson

I was considering playing Polaris over IRC sometime. Anyways I made a little script to roll the dice for the two kinds of dice rolls needed in the game.
Just copy paste it into the remote section of the scripts editor. The script is written for mIRC and probably wont work in any other IRC clients.
If you cant get it to work i'll answer any questions you got to the extent of my knowledge.

There are three commands:
!xp <Targetnumber which is either your current Zeal or Weariness>      example: !xp 4
  This will simulate a dice roll to see if you get a refresh or an advance. The outcome will look like this. "The result is 2(4 ). Refresh".
  The first number is the actual die roll and the second number in parenthesis is the targetnumber entered.

!roll <Targetnumber which is either your current Ice or Light>       example: !roll 3
  This will simulate a dice roll to see if the protagonist or mistaken prevails when determining the outcome of an It Shall Not Come To Pass statement.
  The outcome will look like this. "The result is 2(3 ). Sir Aldebaran prevails". 
  The first number is the actual die roll and the second number in parenthesis is the targetnumber entered.

!help     example: !help
  Provides a little refresher on the two commands available.

Feel free to change or use it as you see fit.
THE ACTUAL SCRIPT

on *:TEXT:*:*: {
  ;**************!xp command. Rolls for experience to determine advance or refresh.
  if ($1 == !xp) {
    if (($2 !isnum) || (($2 > 4) || ($2 < 1))) {
      notice $nick 10*** Incorrect syntax (!xp <insertnumber between 1-4>) ***
      halt
    }
    set %d $rand(1,6)
    if (%d <= $2) {
      msg $chan 4*** The result is %d $+ ( $+ $2 $+ ). Advance ***
    }
    else {
      msg $chan 4*** The result is %d $+ ( $+ $2 $+ ). Refresh ***
    }
  }

  ;*************!roll command. Rolls to determine if a players statement of IT SHALL NOT COME TO PASS succeds or not.
  if ($1 == !roll) {
    if (($2 !isnum) || (($2 > 5) || ($2 < 1))) {
      notice $nick 10*** Incorrect syntax (!roll <insertnumber between 1-5>) ***
      halt
    }
    set %d $rand(1,6)
    if ( %d <= $2) {
      msg $chan 4*** The result is %d $+ ( $+ $2 $+ ). Sir $nick prevails ***
    }
    else {
      msg $chan 4*** The result is %d $+ ( $+ $2 $+ ). Mistaken prevails ***
    }
  }

  ;************!help command. Shows the available commands.
  if ($1 == !help) {
    notice $nick 4*** Available commands are :
    notice $nick 4 !xp [Zeal or Weariness (which is a value between 1-4)]
    notice $nick 4 !roll [Ice or Light (which is a value between 1-5)]
    notice $nick 4 ***
  }
}
Indulging in everything is like indulging in nothing.

Victor Gijsbers

A minor point: the target number of a normal roll need not be Ice or Light. If Zeal > 0 and the Mistake is at a disadvantage, it is Ice/Light + Zeal. If Weariness > 0 and the Heart is at a disadvantage, it is Ice/Light - Weariness.

So your script works fine, but you have to change the documentation a bit.

Ben Lehman

Cool!

yrs--
--Ben

P.S. Victor is right.

Dan Svensson

Ah thats true i'll write up the change tomorrow.... right now i'mabitdrunk. Never clean, drink, listen to slayer and write scripts at the same time...doooh.
If we get around to playing on IRC i'll be sure to post the log.
Indulging in everything is like indulging in nothing.

Dan Svensson

No editing of posts =/

Oh well here are the changes

!roll <Targetnumber which is either your current Ice or Light + Zeal(if Heart has the advantage) or - Weariness(if Mistaken has advantage)>       example: !roll 3
  This will simulate a dice roll to see if the protagonist or mistaken prevails when determining the outcome of an It Shall Not Come To Pass statement.
  The outcome will look like this. "The result is 2(3 ). Sir Aldebaran prevails".
  The first number is the actual die roll and the second number in parenthesis is the targetnumber entered.

Also change the fourth line in the help command to this
notice $nick 4 !roll [Ice or Light + Zeal(if the Heart has the advantage) or - Weariness(if the Mistaken has the advantage) (which is a value between 1-5)]

Also add this line at the end for great justice. ;)
on *:TEXT:*:*: {
  msg $chan *** ALL YOUR BASE ARE BELONG TO US ***
}
Indulging in everything is like indulging in nothing.