Created
March 21, 2011 03:41
-
-
Save elvisgs/878979 to your computer and use it in GitHub Desktop.
VinuZ Exalted Dice Roller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;VinuZ Exalted Dice Roller 1.0.4 *********************************************************************************** | |
on *:load: { set %ord off | set %master $$?="Digite o nick do mestre" | echo Vinuz Exalted Dice Roller loaded. } | |
;on *:unload: { unset %init.* | unset %turn.* | unset %ord | unset %master } | |
;!roll <numero_de_dados> [dificuldade] | |
on *:text:!roll*:#Kgaio: { | |
var %nd $$2 | |
%nd = $calc(%nd + 0) | |
if (%nd >= 50) { halt } | |
var %cd $3 | |
%cd = $calc(%cd + 0) | |
var %sucess 0 | |
var %crit $false | |
var %i 1 | |
var %k | |
while (%i <= %nd) { | |
var %r. [ $+ [ %i ] ] $rand(1,10) | |
if (%r. [ $+ [ %i ] ] >= 7) && (%r. [ $+ [ %i ] ] <= 9) { inc %sucess } | |
else if (%r. [ $+ [ %i ] ] == 10) { %sucess = %sucess + 2 } | |
inc %i | |
} | |
%i = 1 | |
while (%i <= %nd) { | |
if (%r. [ $+ [ %i ] ] >= 7) { %crit = $false | break } | |
if (%r. [ $+ [ %i ] ] == 1) { %crit = $true } | |
inc %i | |
} | |
describe $chan 14 $+ $iif($nick !isin %master,$nick,Mestre) $+ 7, você rolou 12 $+ %nd D10 7 $& | |
$+ $iif($3,com dificuldade 12 $+ %cd) | |
%i = 1 | |
while (%i <= %nd) { | |
%k = %k $+ $chr(32) $+ %r. [ $+ [ %i ] ] | |
inc %i | |
} | |
describe $chan 7Resultados:12 $+ %k | |
if ($3) { | |
%sucess = %sucess - %cd | |
describe $chan $iif(%sucess > 0,7Passou no teste com 12 $+ %sucess 7sucessos,7Não passou no teste $& | |
$iif(%crit,(4falha crítica!7))) | |
} | |
else { | |
describe $chan $iif(%sucess > 0,7Obteve12 %sucess 7sucesso(s),7Não obteve sucessos $& | |
$+ $iif(%crit,$chr(32) $+ (4falha crítica!7),$null)) | |
} | |
} | |
;!dmg <numero_de_dados> | |
on *:text:!dmg*:#Kgaio: { | |
var %nd $$2 | |
%nd = $calc(%nd + 0) | |
if (%nd >= 80) { halt } | |
var %sucess 0 | |
var %k | |
var %i 1 | |
while (%i <= %nd) { | |
var %r. [ $+ [ %i ] ] $rand(1,10) | |
if (%r. [ $+ [ %i ] ] >= 7) { inc %sucess } | |
%k = %k $+ $chr(32) $+ %r. [ $+ [ %i ] ] | |
inc %i | |
} | |
describe $chan 14 $+ $iif($nick !isin %master,$nick,Mestre) $+ 7, você rolou12 %nd D10 | |
describe $chan 7Resultados:12 $+ %k | |
describe $chan 7 $+ $iif(%sucess > 0,Infligiu 12 $+ %sucess 7de dano,Não conseguiu infligir dano) | |
} | |
;!init <dex+wits+speed_da_arma> | |
on *:text:!init*:#Kgaio,?: { | |
var %attr $$2 | |
%attr = $calc(%attr + 0) | |
if (%attr >= 80) { halt } | |
var %d $rand(1,10) | |
$iif($nick isin %master,notice $nick,describe $chan) 14 $+ $iif($nick !isin %master,$nick,Mestre) $& | |
$+ 7, você tirou12 %d 7no dado. | |
var %total $calc(%attr + %d) | |
$iif($nick isin %master,notice $nick,describe $chan) 7Sua iniciativa é 12 $+ %total | |
set %init. [ $+ [ $nick ] ] = %total | |
set %ord on | |
} | |
on *:text:!turns:#Kgaio: { | |
var %i 1 | |
var %aux | |
var %nv $var(%init.*,0) | |
while (%i <= %nv) { | |
set %turn. [ $+ [ %i ] ] = $gettok($var(init.*,[ %i ]),2,46) | |
inc %i | |
} | |
%i = 1 | |
if (%ord == on) { | |
while (%i < %nv) { | |
var %j = %i + 1 | |
while (%j <= %nv) { | |
if ($remove($var(%init.*,[ %j ]).value,= $+ $chr(32)) > $remove($var(%init.*,[ %i ]).value,= $+ $chr(32))) { | |
echo -a %turn. [ $+ [ %i ] ] %turn. [ $+ [ %j ] ] | |
%aux = %turn. [ $+ [ %i ] ] | |
%turn. [ $+ [ %i ] ] = %turn. [ $+ [ %j ] ] | |
%turn. [ $+ [ %j ] ] = %aux | |
} | |
inc %j | |
} | |
inc %i | |
} | |
} | |
describe $chan 3 $+ $iif($var(%init.*,0) != 0,Ordem das jogadas:,Nenhum jogador rolou iniciativa!) | |
%i = 1 | |
while (%i <= %nv) { | |
describe $chan 12 $+ %i $+ $chr(186) - $+ $remove(%turn. [ $+ [ %i ] ],= $+ $chr(32)) $& | |
$+ 7 (iniciativa $var($chr(37) $+ init. $+ $remove(%turn. [ $+ [ %i ] ],= $+ $chr(32)),[ 1 ]).value $+ ) | |
inc %i | |
} | |
set %ord off | |
} | |
on *:text:!clear:#Kgaio: { | |
if ($nick !isin %master) { describe $chan 14 $+ $nick $+ 7, somente o Mestre pode usar !clear. | halt } | |
unset %init.* | unset %turn.* | |
} | |
on *:text:!ajuda:#Kgaio: { | |
msg $nick 3Comandos: | |
msg $nick 12!init <dex+wits+speed_da_arma>7: Calcula iniciativa do jogador. $& | |
Se for o mestre, digitar "/msg <nick_do_BOT> !init <dex+wits+speed_da_arma>" $& | |
para q o outros jogadores não vejam sua ação | |
msg $nick 12!roll <numero_de_dados> [dificuldade]7: Faz uma rolagem de dados. A dificuldade é opcional. | |
msg $nick 12!dmg <numero_de_dados>7: Calcula o dano do jogador. | |
msg $nick 12!turns7: Mostra a ordem das jogadas. Antes os jogadores devem rolar suas iniciativas. | |
msg $nick 12!clear7: Limpra todas as iniciativas. Somente o mestre pode usar. | |
msg $nick 4Obs.:7 Todos os parâmetros podem ser operações matemáticas sem espaço. $& | |
Exemplo: "!roll 5+5+3 1+2" ou simplesmente "!roll 13 3". | |
} | |
;********************************************************************************** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment