[script] n0=;7¹ø° ¹Ù´Ù Roll-and-Keep ´ÙÀ̽º n1=;Á¦ÀÛÀÚ ·ÎÅ°(http://www.lokasenna.pe.kr/rpg/) n2= n3=on *:text:*k*:#: { n4= n5= set %kpos $pos($1,k) n6= n7= if (%kpos > 1) { n8= set %roll $left($1, $calc(%kpos - 1)) n9= } n10= if (%kpos < $len($1)) { n11= set %keep $right($1, $calc($len($1) - %kpos)) n12= } n13= n14= if ($count(%roll,r) != 0) { n15= set %roll $remove(%roll,r) n16= } n17= if ($count(%roll,!) != 0) { n18= set %roll $remove(%roll,!) n19= } n20= if ($count(%roll,-) != 0) { n21= set %roll $remove(%roll,-) n22= } n23= if ($count(%roll,_) != 0) { n24= set %roll $remove(%roll,_) n25= } n26= if ($count(%roll,+) != 0) { n27= set %roll $remove(%roll,+) n28= } n29= n30= if ($count(%keep,!) != 0) { n31= set %keep $remove(%keep,!) n32= } n33= if ($count(%keep,-) != 0) { n34= set %keep $remove(%keep,-) n35= } n36= if ($count(%keep,_) != 0) { n37= set %keep $remove(%keep,_) n38= } n39= if ($count(%keep,+) != 0) { n40= set %keep $remove(%keep,+) n41= } n42= n43= if ($count($1,!) != 0) { n44= set %noexplode noexplode n45= } n46= n47= if (%roll == $null) && (%keep != $null) { n48= set %roll %keep n49= } n50= elseif (%roll != $null) && (%keep == $null) { n51= set %keep %roll n52= } n53= n54= if (%keep > %roll) { n55= set %keep %roll n56= } n57= n58= set %num 1 n59= n60= if (%keep isnum) && (%roll isnum) { n61= n62= var %mod = $2- n63= n64= if ($calc($(%mod,2)) isnum) { n65= set %modifier $calc($(%mod,2)) n66= } n67= else { n68= unset %modifier n69= unset %mod n70= } n71= n72= if ($count($1,_) > 0) { n73= set %cheats $count($1,_) n74= set %cheats $calc(%cheats * -10) n75= } n76= if ($count($1,+) > 0) { n77= set %cheats $calc($count($1,+) * 10) n78= } n79= if ($count($1,_) > 0) && ($count($1,+) > 0) { n80= set %cheats $calc(($count($1,+) - $count($1,_)) * 10) n81= } n82= n83= ;debugging n84= ;msg $chan %cheats n85= n86= if (%cheats != $null) { n87= if (%cheats > 0) { n88= set %totalroll $calc(%roll + %cheats) n89= } n90= else { n91= set %totalroll $calc(%roll - %cheats) n92= } n93= } n94= else { n95= set %totalroll %roll n96= } n97= n98= while (%num <= %totalroll) { n99= n100= set %temp $rand(1,10) n101= n102= set $+(%,temp.text.,%num) %temp n103= set $+(%,temp.,%num) %temp n104= n105= if ((%temp == 10) && (%noexplode == $null)) { n106= while (%temp = 10) { n107= set %temp $rand(1,10) n108= n109= set $+(%,temp.text.,%num) $($+(%,temp.text.,%num),2) $+ + $+ %temp n110= set $+(%,temp.,%num) $calc($($+(%,temp.,%num),2) + %temp) n111= } n112= } n113= n114= if (%num == 1) { n115= set %dicetext $($+(%,temp.text.,%num),2) n116= set %dicetextnum $($+(%,temp.,%num),2) n117= } n118= n119= else { n120= set %dicetext %dicetext $+ , $+ $($+(%,temp.text.,%num),2) n121= set %dicetextnum %dicetextnum $+ , $+ $($+(%,temp.,%num),2) n122= } n123= n124= inc %num n125= } n126= ;WHILE LOOP ³¡ n127= n128= if (%cheats != $null) && (%cheats != 0) { n129= if (%cheats > 0) { n130= set %dicetextnum $sorttok(%dicetextnum,44,nr) n131= set %dicetext $sorttok(%dicetextnum,44,nr) n132= } n133= elseif (%cheats < 0) { n134= set %dicetextnum $sorttok(%dicetextnum,44,n) n135= set %dicetext $sorttok(%dicetextnum,44,n) n136= n137= } n138= set %dicetextnumlen $numtok(%dicetextnum,44) n139= n140= while (%dicetextnumlen > %roll) { n141= set %dicetext $deltok(%dicetext,%dicetextnumlen,44) n142= set %dicetextnum $deltok(%dicetextnum,%dicetextnumlen,44) n143= set %dicetextnumlen $numtok(%dicetextnum,44) n144= } n145= n146= } n147= set %sorted $sorttok(%dicetextnum,44,nr) n148= n149= set %num 1 n150= n151= while (%num <= %roll) { n152= n153= set $+(%,temp.,%num) $gettok(%sorted,%num,44) n154= n155= inc %num n156= } n157= n158= set %num 1 n159= n160= while (%num <= %keep) { n161= n162= if (%num == 1) { n163= n164= set %dicetext.new $($+(%,temp.,%num),2) n165= set %total.new $($+(%,temp.,%num),2) n166= n167= } n168= n169= else { n170= n171= set %dicetext.new %dicetext.new $+ + $+ $($+(%,temp.,%num),2) n172= set %total.new $calc(%total.new + $($+(%,temp.,%num),2)) n173= } n174= n175= inc %num n176= } n177= n178= if (%modifier != $null) { n179= set %total.new $calc($($+(%total.new,%mod),2)) n180= } n181= n182= if ($($+(%,dicecolor.,$nick),2) != $null) { n183= set %color $($+(%,dicecolor.,$nick),2) n184= } n185= else { n186= var %colors = 2,3,4,5,6,7,10,12,13 n187= var %num = $rand(1,$numtok(%colors,44)) n188= set %color $gettok(%colors,%num,44) n189= } n190= n191= n192= set %dice.message 14±¼¸²Àº %roll $+ d10( $+ %dicetext $+ ) %mod $+ , ±×Áß ³ôÀº °Í %keep $+ °³¸¦ °í¸¥ ÃÑÇÕÀº %keep $+ d10( $+ %dicetext.new $+ ) %mod $+ = $+ %color %total.new 14ÀÔ´Ï´Ù. n193= n194= if ($count($1,-) == 0) { n195= msg $chan  $+ %color $+ $nick $+ 14´ÔÀÇ %dice.message n196= } n197= else { n198= msg $nick %dice.message n199= } n200= n201= unset %dice.message n202= unset %temp.* n203= unset %noexplode n204= unset %color n205= unset %dicetext* n206= unset %total.new n207= unset %modifier n208= unset %roll n209= unset %keep n210= unset %sorted n211= unset %num n212= unset %cheats n213= n214= } n215= ;%roll, %keep ¼ýÀÚÀÎÁö È®Àγ¡ n216=} n217= n218=on *:text:*ŵ*:#: { n219= n220= set %kpos $pos($1,ŵ) n221= n222= if (%kpos != 1) { n223= set %roll $left($1, $calc(%kpos - 1)) n224= } n225= n226= if (%kpos != $len($1)) { n227= set %keep $right($1, $calc($les($1) - %kpos - 1)) n228= } n229= n230= if ($count(%roll,!) != 0) { n231= set %roll $remove(%roll,!) n232= } n233= if ($count(%roll,-) != 0) { n234= set %roll $remove(%roll,-) n235= } n236= if ($count(%roll,_) != 0) { n237= set %roll $remove(%roll,_) n238= } n239= if ($count(%roll,+) != 0) { n240= set %roll $remove(%roll,+) n241= } n242= n243= if ($count(%keep,!) != 0) { n244= set %keep $remove(%keep,!) n245= } n246= if ($count(%keep,-) != 0) { n247= set %keep $remove(%keep,-) n248= } n249= if ($count(%keep,_) != 0) { n250= set %keep $remove(%keep,_) n251= } n252= if ($count(%keep,+) != 0) { n253= set %keep $remove(%keep,+) n254= } n255= n256= if ($count($1,!) != 0) { n257= set %noexplode noexplode n258= } n259= n260= if (%keep > %roll) { n261= set %keep %roll n262= } n263= n264= set %num 1 n265= n266= if (%roll == $null) && (%keep != $null) { n267= set %roll %keep n268= } n269= elseif (%roll != $null) && (%keep == $null) { n270= set %keep %roll n271= } n272= n273= if (%keep isnum) && (%roll isnum) { n274= n275= var %mod = $2- n276= n277= if ($calc($(%mod,2)) isnum) { n278= set %modifier $calc($(%mod,2)) n279= } n280= else { n281= unset %modifier n282= unset %mod n283= } n284= n285= if ($count($1,_) > 0) { n286= set %cheats $count($1,_) n287= set %cheats $calc(%cheats * -10) n288= } n289= if ($count($1,+) > 0) { n290= set %cheats $calc($count($1,+) * 10) n291= } n292= if ($count($1,_) > 0) && ($count($1,+) > 0) { n293= set %cheats $calc(($count($1,+) - $count($1,_)) * 10) n294= } n295= n296= ;debugging n297= ;msg $chan %cheats n298= n299= if (%cheats != $null) { n300= if (%cheats > 0) { n301= set %totalroll $calc(%roll + %cheats) n302= } n303= else { n304= set %totalroll $calc(%roll - %cheats) n305= } n306= } n307= else { n308= set %totalroll %roll n309= } n310= n311= while (%num <= %totalroll) { n312= n313= set %temp $rand(1,10) n314= n315= set $+(%,temp.text.,%num) %temp n316= set $+(%,temp.,%num) %temp n317= n318= if ((%temp == 10) && (%noexplode == $null)) { n319= while (%temp = 10) { n320= set %temp $rand(1,10) n321= n322= set $+(%,temp.text.,%num) $($+(%,temp.text.,%num),2) $+ + $+ %temp n323= set $+(%,temp.,%num) $calc($($+(%,temp.,%num),2) + %temp) n324= } n325= } n326= n327= if (%num == 1) { n328= set %dicetext $($+(%,temp.text.,%num),2) n329= set %dicetextnum $($+(%,temp.,%num),2) n330= } n331= n332= else { n333= set %dicetext %dicetext $+ , $+ $($+(%,temp.text.,%num),2) n334= set %dicetextnum %dicetextnum $+ , $+ $($+(%,temp.,%num),2) n335= } n336= n337= inc %num n338= } n339= ;WHILE LOOP ³¡ n340= n341= if (%cheats != $null) { n342= if (%cheats > 0) { n343= set %dicetextnum $sorttok(%dicetextnum,44,nr) n344= set %dicetext $sorttok(%dicetextnum,44,nr) n345= } n346= elseif (%cheats < 0) { n347= set %dicetextnum $sorttok(%dicetextnum,44,n) n348= set %dicetext $sorttok(%dicetextnum,44,n) n349= n350= } n351= set %dicetextnumlen $numtok(%dicetextnum,44) n352= n353= while (%dicetextnumlen > %roll) { n354= set %dicetext $deltok(%dicetext,%dicetextnumlen,44) n355= set %dicetextnum $deltok(%dicetextnum,%dicetextnumlen,44) n356= set %dicetextnumlen $numtok(%dicetextnum,44) n357= } n358= n359= } n360= n361= set %sorted $sorttok(%dicetextnum,44,nr) n362= n363= set %num 1 n364= n365= while (%num <= %roll) { n366= n367= set $+(%,temp.,%num) $gettok(%sorted,%num,44) n368= n369= inc %num n370= } n371= n372= set %num 1 n373= n374= while (%num <= %keep) { n375= n376= if (%num == 1) { n377= n378= set %dicetext.new $($+(%,temp.,%num),2) n379= set %total.new $($+(%,temp.,%num),2) n380= n381= } n382= n383= else { n384= n385= set %dicetext.new %dicetext.new $+ + $+ $($+(%,temp.,%num),2) n386= set %total.new $calc(%total.new + $($+(%,temp.,%num),2)) n387= } n388= n389= inc %num n390= } n391= n392= ;set %color 12 n393= n394= if (%modifier != $null) { n395= set %total.new $calc($($+(%total.new,%mod),2)) n396= } n397= n398= if ($($+(%,dicecolor.,$nick),2) != $null) { n399= set %color $($+(%,dicecolor.,$nick),2) n400= } n401= else { n402= var %colors = 2,3,4,5,6,7,10,12,13 n403= var %num = $rand(1,$numtok(%colors,44)) n404= set %color $gettok(%colors,%num,44) n405= } n406= n407= set %dice.message 14±¼¸²Àº %roll $+ d10( $+ %dicetext $+ ) %mod $+ , ±×Áß ³ôÀº °Í %keep $+ °³¸¦ °í¸¥ ÃÑÇÕÀº %keep $+ d10( $+ %dicetext.new $+ ) %mod $+ = $+ %color %total.new 14ÀÔ´Ï´Ù. n408= n409= if ($count($1,-) == 0) { n410= msg $chan  $+ %color $+ $nick $+ 14´ÔÀÇ %dice.message n411= } n412= else { n413= msg $nick %dice.message n414= } n415= unset %dice.message n416= unset %temp.* n417= unset %noexplode n418= unset %color n419= unset %dicetext* n420= unset %total.new n421= unset %modifier n422= unset %roll n423= unset %keep n424= unset %sorted n425= unset %num n426= unset %cheats n427= } n428= ;%roll, %keep ¼ýÀÚÀÎÁö È®Àγ¡ n429=} n430= n431= n432=;ÆäÀÌÁî ±â´É n433= n434=on *:text:ÆäÀÌÁî*:#: { n435= n436= if ($nick == $($+(%,gamemaster.,$chan),2)) { n437= n438= if ($($+(%,rolls.,$chan),2) == $null) { n439= if ($($+(%,round.,$chan),2) != $null) { n440= msg $chan 14Á¦ $($+(%,round.,$chan),2) $+ ¶ó¿îµå°¡ ³¡³µ½À´Ï´Ù. n441= } n442= else { n443= msg $chan 14¿ì¼±±Ç ±¼¸²ÀÌ ¾ø½À´Ï´Ù. n444= } n445= } n446= n447= else { n448= n449= if ($($+(%,round.,$chan),2) == $null) { n450= set $+(%,round.,$chan) 0 n451= } n452= n453= if ($($+(%,phase.,$chan),2) == $null) { n454= set $+(%,phase.,$chan) 0 n455= } n456= if ($count($1,~) != 0) { n457= set $+(%,phase.,$chan) 10 n458= } n459= n460= if ($($+(%,phase.,$chan),2) < 10) { n461= n462= if ($($+(%,phase.,$chan),2) == 0) { n463= inc $+(%,round.,$chan),2 n464= } n465= n466= inc $+(%,phase.,$chan) n467= n468= var %num = 1 n469= n470= set $+(%,total.actors.,$chan) 0 n471= n472= while (%num <= $($+(%,rolls.,$chan),2)) { n473= n474= var %number = 1 n475= n476= ;identify the characters that have an action in this phase n477= n478= while (%number <= $numtok( $($+(%,init.,%num,.,$chan), 2), 44) ) { n479= n480= set %temp $gettok($($+(%,init.,%num,.,$chan),2), %number, 44) n481= set $+(%,phase.,$($+(%,phase.,$chan),2),.,%num,.,$chan) 0 n482= n483= if (%temp == $($+(%,phase.,$chan),2)) { n484= n485= ;get the number of times a given actor acts this phase, n486= ;and the total number of actors this phase n487= n488= inc $+(%,phase.,$($+(%,phase.,$chan),2),.,%num,.,$chan) n489= n490= inc $+(%,total.actors.,$chan) n491= n492= ;get the %actors and %totals n493= n494= set $+(%,totals.,$($+(%,total.actors.,$chan),2),.,$chan) $($+(%,init.total.,%num,.,$chan),2) n495= n496= ;msg $chan $($+(%,totals.,$($+(%,total.actors.,$chan),2),.,$chan),2) n497= n498= set $+(%,actors.,$($+(%,total.actors.,$chan),2),.,$chan) $($+(%,char.,%num,.,$chan),2) $+ . $+ $($+(%,init.total.,%num,.,$chan),2) n499= n500= ;decrease the %totals.n.#channel by %phase (DON'T DO THIS AGAIN THIS PHASE) n501= n502= set $+(%,init.total.,%num,.,$chan) $calc($($+(%,init.total.,%num,.,$chan),2) - $($+(%,phase.,$chan),2)) n503= n504= } n505= ;end if there is a match n506= n507= inc %number n508= } n509= ;end nested while n510= n511= inc %num n512= } n513= ;end loop through initiative rolls n514= n515= ;start looping through actors this phase n516= n517= ;¶ó¿îµå Ç¥½Ã n518= if ($($+(%,phase.,$chan),2) == 1) { n519= msg $chan 14Á¦ $($+(%,round.,$chan),2) $+ ¶ó¿îµå ½ÃÀÛ n520= } n521= n522= if ($($+(%,total.actors.,$chan),2) > 0) && ($($+(%,total.actors.,$chan),2) != $null) { n523= n524= var %num = 1 n525= n526= while (%num <= $($+(%,total.actors.,$chan),2)) { n527= n528= if (%num == 1) { n529= set $+(%,totals.,$chan) $($+(%,totals.,%num,.,$chan), 2) n530= n531= } n532= else { n533= set $+(%,totals.,$chan) $($+(%,totals.,$chan),2) $+ , $+ $($+(%,totals.,%num,.,$chan), 2) n534= } n535= n536= inc %num n537= } n538= ;end loop through characters acting this phase n539= ;end put initiative totals in a string n540= n541= ;sort totals, from biggest to smallest n542= set $+(%,totals.,$chan) $sorttok($($+(%,totals.,$chan),2),44,nr) n543= n544= var %num = 1 n545= n546= while (%num <= $($+(%,total.actors.,$chan),2)) { n547= n548= ;get name.initiative sets n549= n550= set %person.nom $($+(%,actors.,%num,.,$chan),2) n551= n552= ;divide into name and number n553= n554= set %person $gettok(%person.nom,1,46) n555= ;msg $chan %person n556= set %nom $gettok(%person.nom,2,46) n557= ;msg $chan %nom n558= set %matches 0 n559= n560= var %number = 1 n561= n562= while (%number <= $($+(%,total.actors.,$chan),2)) { n563= n564= if (%matches == 0) { n565= n566= set %temp $gettok($($+(%,totals.,$chan),2),%number,44) n567= n568= if (%nom == %temp) { n569= set %thread %person $+ ( $+ %nom $+ ) n570= set $+(%,totals.,$chan) $puttok($($+(%,totals.,$chan),2),%thread,%number,44) n571= inc %matches n572= } n573= ;end if there is match n574= n575= } n576= ;end loop if there is no match n577= n578= inc %number n579= } n580= ;end loop through %totals n581= n582= inc %num n583= } n584= ;end loop through actors and set in order of initiative totals n585= n586= msg $chan 14ÆäÀÌÁî $($+(%,phase.,$chan),2) $+ . ÇൿÇÏ´Â »ç¶÷Àº $($+(%,totals.,$chan),2) $+ ÀÔ´Ï´Ù. n587= n588= } n589= ;end if there is anyone acting this phase n590= n591= n592= else { n593= n594= msg $chan 14ÆäÀÌÁî $($+(%,phase.,$chan),2) n595= n596= } n597= n598= } n599= ;ÆäÀÌÁî 10 ÀÌÇÏ È®ÀÎ ³¡ n600= n601= else { n602= unset $+(%,actors.,$chan) n603= unset $+(%,totals.$chan) n604= unset %matches n605= unset $+(%,total.actors.,$chan) n606= unset $+(%,rolls.,$chan) n607= unset $+(%,init.*.,$chan) n608= unset $+(%,phase.,$chan) n609= n610= msg $chan 14Á¦ $($+(%,round.,$chan),2) $+ ¶ó¿îµå°¡ ³¡³µ½À´Ï´Ù. n611= n612= } n613= } n614= ;¿ì¼±±Ç ±¼¸² ÀÖÀ½ È®ÀÎ n615= } n616= ;°ÔÀÓ¸¶½ºÅÍ È®ÀÎ ³¡ n617= n618=} n619=;ÆäÀÌÁî ±â´É ³¡ n620= n621= n622=;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; n623=/* n624=; GM ÁöÁ¤ - F11 n625= n626=alias setgm { n627= if ($dialog($setgamemaster) == $null) { n628= dialog -m setgamemaster setgamemaster n629= } n630=} n631= n632=alias f11 setgm n633= n634=dialog setgamemaster { n635= title "°ÔÀÓ¸¶½ºÅÍ ÁöÁ¤" n636= size 500 100 100 60 n637= option pixels n638= n639= text "GM ´Ð:", 1, 7 7 40 20 n640= edit %gamemaster, 2, 43 5 45 20, autohs %gamemaster n641= button "OK", 3, 7 30 80 20, ok n642=} n643=*/ n644=;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; n645= n646= n647=;¿ì¼±±Ç ±¼¸² n648= n649=on *:text:¿ì¼±±Ç*:#:{ n650= n651= var %count = $2 n652= n653= if (%count isnum) { n654= n655= if ($($+(%,rolls.,$chan),2) == $null) { n656= set $+(%,rolls.,$chan) 0 n657= set $+(%,phase.,$chan) 0 n658= } n659= n660= if ($nick == $($+(%,gamemaster.,$chan),2)) { n661= if ($3 != $null) { n662= set $+(%,actor.,$chan) $3- n663= ;GMÀÌ°í NPC À̸§ ÁöÁ¤ ÀÖ´Ù¸é Ç¥½ÃÇÒ À̸§Àº ÁöÁ¤ NPC¸íÀ¸·Î n664= } n665= else { n666= set $+(%,actor.,$chan) $nick n667= ;GMÀÌ°í NPC À̸§ ÁöÁ¤ ¾ø´Ù¸é Ç¥½ÃÇÒ À̸§Àº ´ÐÀ¸·Î n668= } n669= } n670= else { n671= set $+(%,actor.,$chan) $nick n672= ;Ç÷¹À̾î¶ó¸é Ç¥½ÃÇÒ À̸§Àº ´ÐÀ¸·Î n673= } n674= n675= var %number = 1 n676= set %overlap 0 n677= n678= while (%number <= $($+(%,rolls.,$chan),2)) { n679= if ($($+(%,actor.,$chan),2) == $($+(%,char.,%number,.,$chan),2)) { n680= inc %overlap n681= set %overlapping %number n682= } n683= inc %number n684= } n685= ;Áö±Ý±îÁöÀÇ ±¼¸²µéÀ» ·çÇÁÇØ °ãÄ¡´Â À̸§ ÀÖ³ª üũ n686= n687= ;°ãÄ¡Áö ¾Ê´Â´Ù¸é »õ·Î¿î ¹®Ç× ¸¸µé±â n688= n689= if (%overlap == 0) { n690= inc $+(%,rolls.,$chan) n691= n692= ;set $+(%,init.,$($+(%,rolls.,$chan),2),.,$chan) %temp n693= ;set $+(%,init.total.,$($+(%,rolls.,$chan),2),.,$chan) %temp n694= n695= set $+(%,char.,$($+(%,rolls.,$chan),2),.,$chan) $($+(%,actor.,$chan),2) n696= set $+(%,temp.rolls.,$chan) $($+(%,rolls.,$chan),2) n697= } n698= n699= ;°ãÄ£´Ù¸é ÀÌÀü °Í µ¤¾î¾²±â n700= else { n701= ;set $+(%,init.,%overlapping,.,$chan) %temp n702= ;set $+(%,init.total.,%overlapping,.,$chan) %temp n703= n704= set $+(%,char.,%overlapping,.,$chan) $($+(%,actor.,$chan),2) n705= set $+(%,temp.rolls.,$chan) %overlapping n706= } n707= n708= ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; n709= n710= var %num = 1 n711= n712= while (%num <= %count) { n713= n714= set %temp $rand(1,10) n715= n716= if (%num == 1) { n717= n718= set $+(%,init.,$($+(%,temp.rolls.,$chan),2),.,$chan) %temp n719= set $+(%,init.total.,$($+(%,temp.rolls.,$chan),2),.,$chan) %temp n720= } n721= ;end if %num 1 n722= n723= else { n724= set $+(%,init.,$($+(%,temp.rolls.,$chan),2),.,$chan) $($+(%,init.,$($+(%,temp.rolls.,$chan),2),.,$chan),2) $+ , $+ %temp n725= set $+(%,init.total.,$($+(%,temp.rolls.,$chan),2),.,$chan) $calc($($+(%,init.total.,$($+(%,temp.rolls.,$chan),2),.,$chan),2) + %temp) n726= } n727= ;end if %num not 1 n728= n729= inc %num n730= } n731= ;end while n732= n733= set $+(%,init.,$($+(%,temp.rolls.,$chan),2),.,$chan) $sorttok($($+(%,init.,$($+(%,temp.rolls.,$chan),2),.,$chan),2), 44, n) n734= n735= unset %temp n736= unset %actor n737= unset %overlapping n738= unset %overlap n739= n740= msg $chan 14 $+ $($+(%,char.,$($+(%,temp.rolls.,$chan),2),.,$chan),2) n741= msg $chan 14 $+ $($+(%,init.,$($+(%,temp.rolls.,$chan),2),.,$chan),2) ( $+ $($+(%,init.total.,$($+(%,temp.rolls.,$chan),2),.,$chan),2) $+ ) n742= n743= ;msg $chan $($+(%,char.,%temp.rolls),2) $+ ( $+ %temp.rolls $+ )ÀÇ Çൿ´Ü°è´Â $($+(%,init.,%temp.rolls),2) $+ , ¿ì¼±±Ç ÃÑÇÕÀº $($+(%,init.total.,%temp.rolls),2) $+ ÀÔ´Ï´Ù. n744= } n745= ;%count°¡ ¼ýÀÚÀÎÁö È®ÀÎ ³¡ n746=} n747=;¿ì¼±±Ç ±¼¸² ³¡ n748= n749= n750=;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; n751= n752= n753=on *:text:³¡:#: { n754= n755= if ($nick == $($+(%,gamemaster.,$chan),2)) { n756= n757= unset $+(%,phase.,$chan) n758= unset $+(%,round.,$chan) n759= unset $+(%,rolls.,$chan) n760= unset $+(%,char.,*,.,$chan) n761= unset $+(%,init.*,.,$chan) n762= unset $+(%,actors.,*,.,$chan) n763= unset %totals n764= unset $+(%,totals.,*,.,$chan) n765= n766= msg $chan 14ÀüÅõ°¡ ³¡³µ½À´Ï´Ù. n767= n768= } n769= ;°ÔÀÓ¸¶½ºÅÍ È®ÀÎ ³¡ n770= n771= else { n772= msg $nick 14°ÔÀÓ¸¶½ºÅÍ·Î ÁöÁ¤µÇ¾î ÀÖÁö ¾Ê½À´Ï´Ù. GM ÁöÁ¤À» ¿øÇÏ´Â ºÐÀº 2GM14À̶ó°í ÃÄÁÖ¼¼¿ä. n773= } n774= ;°ÔÀÓ¸¶½ºÅÍ ¾Æ´Ñ °æ¿ì ³¡ n775= n776=} n777=;³¡³»±â ±â´É ³¡ n778= n779=;±ØÁÖ»çÀ§ ±â´É ½ÃÀÛ n780= n781= n782=on *:text:*±Ø*ÁÖ»çÀ§*:#:{ n783= n784= if ($nick == $($+(%,gamemaster.,$chan),2)) { n785= n786= var %num = 1 n787= n788= while (%num <= $nick($chan,0)) { n789= n790= if ($nick($chan,%num) isin $1-) && ($nick($chan,%num) != ÁÖ»çÀ§) { n791= n792= set %receiver $nick($chan,%num) n793= goto givedramadice n794= n795= } n796= n797= inc %num n798= } n799= ;end while n800= n801= goto endfunction n802= n803= } n804= n805= ;end if GM n806= n807= else { n808= set %receiver $nick n809= goto givedramadice n810= } n811= ;end if player n812= n813= :givedramadice n814= n815= ;BEGIN STRIPTONUMBER n816= n817= set %whole.string $1- n818= set %total.letters $len(%whole.string) n819= n820= while (%whole.string != $null) { n821= n822= if ($left(%whole.string,1) isnum) { n823= n824= ;debug n825= ;msg $chan %whole.string n826= n827= if (%diff == $null) { n828= set %diff $left(%whole.string,1) n829= } n830= else { n831= set %diff %diff $+ $left(%whole.string,1) n832= } n833= n834= } n835= ;if number, build number n836= n837= set %whole.string $right(%whole.string, $calc(%total.letters - 1)) n838= set %total.letters $len(%whole.string) n839= n840= } n841= ;end while n842= n843= if (%diff isnum) && (- isin $1-) { n844= set %diff $calc(%diff * -1) n845= } n846= n847= ;END STRIPTONUMBER n848= n849= if ($($+(%,ddice.,%receiver),2) == $null) { n850= set $+(%,ddice.,%receiver) 0 n851= } n852= n853= if (%receiver != $null) { n854= n855= if (%diff isnum) { n856= n857= set $+(%,ddice.,%receiver) $calc($($+(%,ddice.,%receiver),2) + %diff) n858= } n859= ;end if %diff isnum n860= n861= msg $chan 14 $+ %receiver $+ ÀÇ ±ØÁÖ»çÀ§´Â $($+(%,ddice.,%receiver),2) $+ °³ÀÔ´Ï´Ù. n862= n863= } n864= ;end if %receiver not $null n865= n866= :endfunction n867= n868= unset %diff n869= unset %receiver n870=} n871=;±ØÁÖ»çÀ§ ±â´É ³¡ n872= n873= n874=;»óó ±â´É ½ÃÀÛ n875=on *:text:*»óó*:#:{ n876= n877= ;BEGIN STRIPTONUMBER n878= n879= set %whole.string $1- n880= set %total.letters $len(%whole.string) n881= n882= while (%whole.string != $null) { n883= n884= if ($left(%whole.string,1) isnum) { n885= n886= ;debug n887= ;msg $chan %whole.string n888= n889= if (%diff == $null) { n890= set %diff $left(%whole.string,1) n891= } n892= else { n893= set %diff %diff $+ $left(%whole.string,1) n894= } n895= n896= } n897= ;if number, build number n898= n899= set %whole.string $right(%whole.string, $calc(%total.letters - 1)) n900= set %total.letters $len(%whole.string) n901= n902= } n903= ;end while n904= n905= if (%diff isnum) && (- isin $1-) { n906= set %diff $calc(%diff * -1) n907= } n908= n909= ;END STRIPTONUMBER n910= n911= n912= if ($nick == $($+(%,gamemaster.,$chan),2)) { n913= n914= var %num = 1 n915= n916= while (%num <= $nick($chan,0)) { n917= n918= if ($nick($chan,%num) isin $1-) { n919= n920= set %receiver $nick($chan,%num) n921= goto givewounds n922= n923= } n924= n925= inc %num n926= } n927= ;end while n928= n929= n930= if ($($+(%,npc.number.,$chan),2) == $null) { n931= set $+(%,npc.number.,$chan) 0 n932= } n933= n934= ;try to get NPC name n935= n936= var %npc = $remove($1-,»óó) n937= var %npc = $remove(%npc,¿¡°Ô) n938= var %npc = $remove(%npc,%diff) n939= var %npc = $remove(%npc,-) n940= var %npc = $remove(%npc,+) n941= n942= var %temp = $($+(%,npc.number.,$chan),2) n943= n944= var %num = 1 n945= n946= while (%num <= %temp) { n947= n948= if (%npc == $($+(%,npc.,%num,.,$chan),2)) { n949= set %temp %num n950= goto breakloop n951= } n952= n953= inc %num n954= } n955= ;loop through n956= n957= ;no previous matching NPCs -> new NPC name n958= var %temp = $calc(%temp + 1) n959= set $+(%,npc.,%temp,.,$chan) %npc n960= set $+(%,npc.number.,$chan) %temp n961= n962= :breakloop n963= n964= if ($($+(%,npc.wounds.,%temp,.,$chan),2) == $null) { n965= set $+(%,npc.wounds.,%temp,.,$chan) 0 n966= } n967= n968= if (%diff isnum) { n969= set $+(%,npc.wounds.,%temp,.,$chan) $calc($($+(%,npc.wounds.,%temp,.,$chan),2) + %diff) n970= } n971= n972= msg $chan 14 $+ $($+(%,npc.,%temp,.,$chan),2) $+ ÀÇ »óó´Â $($+(%,npc.wounds.,%temp,.,$chan),2) $+ 14°³ÀÔ´Ï´Ù. n973= n974= goto endfunction n975= n976= ;then label them %wound.npc1 etc... n977= ;and also %name.npc1 etc n978= n979= } n980= n981= ;end if GM n982= n983= else { n984= set %receiver $nick n985= goto givewounds n986= } n987= ;end if player n988= n989= :givewounds n990= n991= if (%receiver != $null) { n992= n993= if ($($+(%,wounds.,%receiver),2) == $null) { n994= set $+(%,wounds.,%receiver) 0 n995= } n996= n997= if (%diff isnum) { n998= set $+(%,wounds.,%receiver) $calc($($+(%,wounds.,%receiver),2) + %diff) n999= } n1000= n1001= msg $chan 14 $+ %receiver $+ ÀÇ »óó´Â $($+(%,wounds.,%receiver),2) $+ 14°³ÀÔ´Ï´Ù. n1002= } n1003= n1004= :endfunction n1005= n1006= unset %diff n1007= unset %receiver n1008= n1009=} n1010=;»óó ±â´É ³¡ n1011= n1012= n1013=;±Ø ºÎ»ó ³Ö´Â ±â´É ½ÃÀÛ n1014=on *:text:*ºÎ»ó*:#:{ n1015= n1016= ;BEGIN STRIPTONUMBER n1017= n1018= set %whole.string $1- n1019= set %total.letters $len(%whole.string) n1020= n1021= while (%whole.string != $null) { n1022= n1023= if ($left(%whole.string,1) isnum) { n1024= n1025= ;debug n1026= ;msg $chan %whole.string n1027= n1028= if (%diff == $null) { n1029= set %diff $left(%whole.string,1) n1030= } n1031= else { n1032= set %diff %diff $+ $left(%whole.string,1) n1033= } n1034= n1035= } n1036= ;if number, build number n1037= n1038= set %whole.string $right(%whole.string, $calc(%total.letters - 1)) n1039= set %total.letters $len(%whole.string) n1040= n1041= } n1042= ;end while n1043= n1044= if (%diff isnum) && (- isin $1-) { n1045= set %diff $calc(%diff * -1) n1046= } n1047= n1048= ;END STRIPTONUMBER n1049= n1050= n1051= if ($nick == $($+(%,gamemaster.,$chan),2)) { n1052= n1053= var %num = 1 n1054= n1055= while (%num <= $nick($chan,0)) { n1056= n1057= if ($nick($chan,%num) isin $1-) { n1058= n1059= set %receiver $nick($chan,%num) n1060= goto givedwounds n1061= n1062= } n1063= n1064= inc %num n1065= } n1066= ;end while n1067= n1068= n1069= if ($($+(%,npc.number.,$chan),2) == $null) { n1070= set $+(%,npc.number.,$chan) 0 n1071= } n1072= n1073= ;try to get NPC name n1074= n1075= var %npc = $remove($1-,±ØÀû) n1076= var %npc = $remove(%npc,ºÎ»ó) n1077= var %npc = $remove(%npc,±Ø) n1078= var %npc = $remove(%npc,%diff) n1079= var %npc = $remove(%npc, -) n1080= var %npc = $remove(%npc, +) n1081= n1082= var %temp = $($+(%,npc.number.,$chan),2) n1083= n1084= n1085= var %num = 1 n1086= n1087= while (%num <= %temp) { n1088= n1089= if (%npc == $($+(%,npc.,%num,.,$chan),2)) { n1090= set %temp %num n1091= goto breakloop n1092= } n1093= n1094= inc %num n1095= } n1096= ;loop through NPC name list n1097= n1098= ;no previous matching NPC -> new NPC name n1099= var %temp = $calc(%temp + 1) n1100= set $+(%,npc.,%temp,.,$chan) %npc n1101= set $+(%,npc.number.,$chan) %temp n1102= n1103= :breakloop n1104= n1105= if ($($+(%,npc.dwounds.,%temp,.,$chan),2) == $null) { n1106= set $+(%,npc.dwounds.,%temp,.,$chan) 0 n1107= } n1108= n1109= if (%diff isnum) { n1110= n1111= if (%diff > 0) { n1112= set $+(%,npc.wounds.,%temp,.,$chan),2) 0 n1113= } n1114= n1115= set $+(%,npc.dwounds.,%temp,.,$chan) $calc($($+(%,npc.dwounds.,%temp,.,$chan),2) + %diff) n1116= } n1117= n1118= msg $chan 14 $+ $($+(%,npc.,%temp,.,$chan),2) $+ ÀÇ ±ØÀû ºÎ»óÀº $($+(%,npc.dwounds.,%temp,.,$chan),2) $+ 14°³ÀÔ´Ï´Ù. n1119= n1120= goto endfunction n1121= n1122= ;then label them %wound.npc1 etc... n1123= ;and also %name.npc1 etc n1124= n1125= } n1126= n1127= ;end if GM n1128= n1129= else { n1130= set %receiver $nick n1131= goto givedwounds n1132= } n1133= ;end if player n1134= n1135= :givedwounds n1136= n1137= if (%receiver != $null) { n1138= if ($($+(%,dwounds.,%receiver),2) == $null) { n1139= set $+(%,dwounds.,%receiver) 0 n1140= } n1141= n1142= if (%diff isnum) { n1143= set $+(%,wounds.,%receiver) $calc($($+(%,dwounds.,%receiver),2) + %diff) n1144= } n1145= n1146= msg $chan 14 $+ %receiver $+ ÀÇ ±ØÀû ºÎ»óÀº $($+(%,dwounds.,%receiver),2) $+ 14°³ÀÔ´Ï´Ù. n1147= } n1148= n1149= :endfunction n1150= n1151= unset %diff n1152= unset %receiver n1153= unset %npc n1154= n1155=} n1156=;ºÎ»ó ±â´É ³¡ n1157= n1158= n1159= n1160=on *:text:*´ë±âÇൿ:#:{ n1161= if (%rolls != $null) && (%phase != $null) { n1162= n1163= if ($nick == %gamemaster) { n1164= if ($1 == ´ë±âÇൿ) { n1165= set %actor $nick n1166= } n1167= else { n1168= set %actor $1 n1169= } n1170= } n1171= ;GM n1172= else { n1173= set %actor $nick n1174= } n1175= ;player n1176= n1177= set %num 1 n1178= n1179= while (%num <= $rolls) { n1180= n1181= if ($($+(%,char.,%num),2) == %actor) { n1182= set %hold %num n1183= } n1184= n1185= inc %num n1186= } n1187= ;end loop through rolls n1188= n1189= if ($($+(%,hold.count.,%hold),2) == $null) { n1190= set $+(%,hold.count.,%hold) 0 n1191= } n1192= n1193= inc $+(%,hold.count.,%hold) n1194= n1195= if ($($+(%,hold.phase.,%hold),2) == $null) { n1196= set $+(%,hold.phase.,%hold) %phase n1197= } n1198= else { n1199= set $+(%,hold.phase.,%hold) $($+(%,hold.phase.,%hold),2) $+ , $+ %phase n1200= } n1201= n1202= ;if ($($+(%,hold.total.,%hold),2) == $null) { n1203= ;set $+(%,hold.total.,%hold) $calc($($+(%,init.total.,%hold),2) + %phase) n1204= ;} n1205= ;else { n1206= ;set $+(%,hold.total.,%hold) $($+(%,hold.total.,%hold),2) $+ , $+ $calc($($+(%,init.total.,%hold),2) + %phase) n1207= ;} n1208= n1209= n1210= if (%hold != $null) { n1211= msg $chan 14 $+ %actor $+ ÀÇ ´ë±âÇൿÀÌ Ãß°¡µÇ¾ú½À´Ï´Ù. n1212= } n1213= ;end if matches a combatant n1214= n1215= unset %hold n1216= } n1217= ;ÀüÅõÁß ¿©ºÎ È®ÀÎ n1218= n1219=} n1220=;´ë±âÇൿ Ãß°¡ ±â´É ³¡ n1221= n1222=on *:text:*´ë±âÇൿ ¼Ò¸ð:#: { n1223= n1224= if ($nick == %gamemaster) { n1225= if ($1 == ´ë±âÇൿ) { n1226= set %actor $nick n1227= } n1228= else { n1229= set %actor $remove($1-,´ë±âÇൿ ¼Ò¸ð) n1230= } n1231= } n1232= ;GM n1233= else { n1234= set %actor $nick n1235= } n1236= ;player n1237= n1238= set %num 1 n1239= n1240= while (%num <= $rolls) { n1241= n1242= if ($($+(%,char.,%num),2) == %actor) { n1243= set %overlapping %num n1244= } n1245= inc %num n1246= } n1247= n1248= if (%overlapping != $null) { n1249= n1250= if ($numtok($($+(%,hold.phase.,%overlapping),2), 44) > 1) { n1251= if ($nick == %gamemaster) && ($4 == $null) { n1252= msg $chan 14´ë±âÇൿÀÌ µÎ°³ ÀÌ»ó ÀÖ½À´Ï´Ù. ( $+ $($+(%,hold.phase.,%overlapping),2) $+ ) n1253= } n1254= elseif ($nick == %gamemaster) && ($4 != $null) { n1255= n1256= n1257= } n1258= } n1259= ;end while n1260= n1261= n1262= } n1263= ;check overlap with combatants n1264= n1265=} n1266=;´ë±âÇൿ ¼Ò¸ð ³¡ n1267= n1268=;µµ¿ò¸» n1269=on *:text:!µµ¿ò¸»:#:{ n1270= msg $nick 7¹ø° ¹Ù´Ù ½ºÅ©¸³Æ®¸¦ ÀÌ¿ëÇØ Áּż­ °¨»çÇÕ´Ï´Ù. µµ¿ò¸»Àº ÀÌ°÷¿¡... http://lokasenna.egloos.com/1531258 n1271=} n1272= n1273=on *:text:´ÙÀ̽º:#: { n1274= msg $chan 147¹ø° ¹Ù´Ù ·Ñ¾Øŵ ´ÙÀ̽º (3ŵ2 +5, 4k) n1275=} n1276= n1277=;Á¦ÀÛÀÚ ·ÎÅ° (lokasenna.pe.kr/rpg/)