#nop Pk-trigger systems for Arctic.mud.org #nop Usable on tintin++1.5 (tested on 1.64) #nop lav@iki.fi #nop #nop Defined general aliases #nop dost, dobashed #alias {nil} {#nop} #alias dosound1 nil #alias dosound2 #bell #alias dosound3 nil #nop #nop #nop beta-system (obsolete) #nop #alias targa {#alias 00 {#act %%1 {0;000}};#alias 000 {#unact %%1};#alias 0 {dokill %%1}} #alias targb {#alias 99 {#act %%1 {9;999}};#alias 999 {#unact %%1};#alias 9 {dokill %%1}} #alias targc {#alias 88 {#act %%1 {8;888}};#alias 888 {#unact %%1};#alias 8 {dokill %%1}} #alias targd {#alias 77 {#act %%1 {7;777}};#alias 777 {#unact %%1};#alias 7 {dokill %%1}} #nop #nop ----------- #nop iota-system #nop ----------- #nop #var versionpkill 6 #var hunt 0 #var war 1 #var steal 0 #alias offwar {#if {$war} #var war 0} #alias onwar {#if !$war #var war 1} #alias offhunt {#if {$hunt} #var hunt 0} #alias onhunt {#if !$hunt {#var hunt 1;onwar}} #alias {ebash} {#var e %0;bash %0} #alias eba ebash #alias dokill {#if $hunt {offhunt;onwar;bash %1;#alias + bash %1;#tabadd %1}} #alias dokillfight {#if $hunt {onwar;#alias + bash %1}} #alias dosettarg {#act {^%%1 arrives from} dokill %1;#act {^%%1 flies in} dokill %1;#act {%%1%0 here.} dokill %1;#act { carrying %%1.} dokill %1;#action {^%%1%0 here, fighting} dokillfight %%1} #alias rempk1 {#unact *arrives from*;#unact *flies in*;#unact * here.*;#unact *carrying*} #alias pk1 {onhunt;dosettarg %1 dummy} #alias unpk1 {#unact *%1*} #alias pkreport {#act *carrying*.;#alias bash;#var hunt;#var steal;#var war} #nop #nop -- Steal-system #var versionsteal 9 #nop #alias doarrived docase %1 #alias doarrived nil #alias dostole nil #alias dofailedsteal onwar #nop #var steal 0 #act {^%1 %2 flies in} {nil %2} {6} #act {^%1 %2 arrives from} {nil} {6} #act {^%1 flies in} {doarrived %1} {7} #act {^%1 arrives from} {doarrived %1} {7} #act {^A %0flies in} {nil} {5} #act {^A %0arrives from} {nil} {5} #act {^The %0flies in} {nil} {5} #act {^The %0arrives from} {nil} {5} #alias onsteal #var steal 1 #alias offsteal #var steal 0 #alias son onsteal #alias soff offsteal #alias dosteal {#if $steal {#var steal 0;steal %1 %2;#alias + bash %2;#tabadd %2}} #alias docase {#if $steal {#var steal 0;case %1;#alias + ebash %1;#alias 0 {steal %1 %%1}}} #alias dosetsteal {#act {^%%2 arrives from} dosteal %1 %2;#act {^%%2 flies in} dosteal %1 %2;#act {%%2%0 here.} dosteal %1 %2;#act {carrying %%2.} dosteal %1 %2} #alias ps1 {#var steal 1;dosetsteal %1 %2 dummy dummy} #alias unps1 {#unact *%1*} #alias psreport pkreport #alias ps ps1 #alias pss psreport #alias unps {unps1 %1 dummy} #act {^Got it.} dostole #act {^Bingo} dostole #act {^You've been caught} dofailedsteal #act {notices you!} dofailedsteal #nop #nop #nop --- Prevent scan from triggering systems -- #var versionscan 5 #var hunt 0 #var duel 0 #var steal 0 #var washunt 0 #var wasduel 0 #var wassteal 0 #alias scan {#if {$hunt||$duel||$steal} {#mess var;offstealif;offhuntif;offduelif;setexits scanover};sCaN} #alias scanover {onhuntif;onduelif;onstealif;#mess var} #alias doexits2 nil #alias doexits {doexits2;#alias doexits2 nil;#unact {^%1H %2V %3C %4>}} #alias setexits {#act {^%1H %2V %3C %4>} {doexits};#alias doexits2 %0} #alias offhuntif {#if {$hunt} {#var washunt 1;offpk}} #alias onhuntif {#if {$washunt} {onpk;#var washunt 0}} #alias offduelif {#if {$duel} {#var wasduel 1;offpd}} #alias onduelif {#if {$wasduel} {onpd;#var wasduel 0}} #alias offstealif {#if {$steal} {#var wassteal 1;offsteal}} #alias onstealif {#if {$wassteal} {onsteal;#var wassteal 0}} #nop #nop exit-aliases above shared with Heal-trigger system #nop #nop -- Prevent corpses from triggering the system #nop #act {corpse of %1 lying here.} {nil} {2} #nop #nop ---Protect from fake-triggers-- #var versionprot 4 #nop #act {^\*%1 } {doemote %1} {2} #act {^%1 tells you } {dotold %1} {2} #act {^%1 shouts } {doshouted %1} {2} #alias dotold nil #alias doshouted nil #alias doemote nil #nop #nop ---PK-Usage--- #var versionusage 2 #nop #nop #alias onpk {onhunt} #alias offpk {offhunt;offsteal} #alias pon onpk #alias poff offpk #alias rempk rempk1 #alias pk pk1 #alias unpk {unpk1 %1 dummy} #alias pks pkreport #alias bbl #alias bash cbli #alias bfs #alias bash cfs #alias bhm #alias bash chm #alias bab #alias bash cab #alias bde #alias bash cde #alias bfe #alias bash cfe #alias bki #alias bash kill #alias blo #alias bash look #alias bok #alias bash oca kill #alias bre #alias bash recite recall me #alias bobhm #alias bash {oca kill %0;chm %0} #alias bobab #alias bash {oca kill %0;cab %0} #alias bob #alias bash {oca bash %0} #alias bobhm #alias bash {oca bash %0;chm %0} #alias bobab #alias bash {oca bash %0;cab %0} #alias bok {#alias bash oca kill} #alias bokbl {#alias bash {oca kill %0;cbli %}} #alias bokdm {#alias bash {oca kill %0;cdm %0}} #alias bokfl {#alias bash {oca kill %0;cfl %0}} #alias bokfs {#alias bash {oca kill %0;cfs %0}} #alias bokhp {#alias bash {oca kill %0;chp %0}} #alias bokha {#alias bash {oca kill %0;cha %0}} #alias bokki {#alias bash {oca kill %0;kill %0}} #alias boklo {#alias bash {look %0} #nop #nop -- Random actions #var versionrand 3 #nop #alias dolook {#alias + bash %1;look %1} #act {^%1 appears in a puff of smoke.} {dolook %1} #act {^%1 appears in the middle of the room.} {dolook %1} #act {^Some smoke blows into the room and slowly forms into %1.} {dolook %1} #act {^A shimmering portal opens in front of you, and %1 steps from it.} {dolook %1} #nop #nop --Summon reactions #var versionsummon 2 #action {'%1 has summoned you!} {nil} {2} #action {^'%1 has summoned you!} {nil} {2} #action {^%1 has summoned you!} {dosummoned} {5} #alias {dosummoned} {nil} #nop #nop -- We're down -- #var versiondown 8 #var resting 0 #var isfly 0 #var canfly 1 #alias setresting {#if !$resting {#var resting 1}} #alias setcanfly {#if !$canfly {#var canfly 1}} #alias setisfly {#if !$isfly {#var isfly 1}} #alias unsetresting {#if $resting {#var resting 0}} #alias unsetcanfly {#if $canfly {#var canfly 0}} #alias unsetisfly {#if $isfly {#var isfly 0}} #alias setstanding unsetresting #alias dobashed {setresting;dost;dosound2} #alias dost dost1 #alias {st} {stand;#if ($canfly&&!$isfly&&!$fight) fly} #alias {dost1} {#if {$hunt == 0 && $war == 0} st} #action {^Come on! I'm relaxing!} {setresting;dost} #action {^You are sent SPRAWLING as } {dobashed} {5} #action {^You are sent sprawling as } {dobashed} {5} #action {^You are thrown to the ground by the force of the earthquake} {setresting;dost} #action {^You can't do this sitting!} {setresting;dost} #action {^You rest your tired bones but stay aloft.} {setresting;setisfly} #action {^You rest your tired bones.} {setresting;unsetisfly} #action {^You sit down and rest your tired bones.} {setresting;unsetisfly} #action {^You should probably stand up!} {setresting;dost} #action {^You sit down.} {setresting} #action {^You stand up.} {unsetresting} #action {^You take a seat in mid-air.} {setresting;setisfly} #action {^You jump up and flap your arms wildly, achieving nothing!} {unsetcanfly;unsetisfly} #action {^You sink gently to the ground.} {unsetcanfly;unsetisfly} #action {^You lift your arms skyward and begin to float.} {setcanfly} #action {^You end your flight, returning to the ground.} {setcanfly;FlY} #action {^You feel much heavier.} {unsetisfly;dotick} #nop #nop -- Fighting -- #nop versionfighting 13 #nop #var fight 0 #var afk 0 #var statustext - #var status 0 #act {^%1H %2V %3X %4C%537mExits:} {dopromptnorm} {7} #act {^%1H %2V %3X %4C%537m>} {dopromptnorm} {7} #act {^%1H %2V %3X %4C [Me:} {dopromptfight} {7} #alias dopromptnorm {offfight;#if $status #showme --$statustext--} #alias dopromptfight {onfight;dofight;#if $status {#showme --$statustext--;dobell}} #alias onfight {#if !$fight {#var fight 1;dofightbegin;dosound2}} #alias offfight {#if {$fight} {#var fight 0;dofightend}} #alias dofightbegin dofightbegin1 #alias dofightend dofightend1 #alias dofightend1 {#showme -->ENDED} #alias dofightbegin1 {#showme -->BEGUN} #alias {dofight} dofight1 #alias dofight1 {#if $afk #bell} #alias dotold {#if $afk dobell} #nop -- AFK-logic -- #nop req: fighting 10+ #var versionafk 8 #var statustext AFK #var status 0 #var afk 0 #alias setstatus {#var status 1;#var statustext %0} #alias unsetstatus {#if $status {#var status 0}} #alias onafk {#if !$afk {#var afk 1;setstatus AFK}} #alias offafk {#if $afk {#var afk 0;unsetstatus}} #alias afk onafk #alias afkon onafk #alias afkoff offafk #alias dotold {#if $afk dobell} #alias {panon} {#alias dofightbegin {qrec;st;#3 flee;qrec};setstatus PANIC1;#var afk 1} #alias {panon2} {#alias dofight dofight2;setstatus PANIC2;#var afk 1} #alias {panon3} {#alias dofightbegin dofight3;setstatus PANIC3;#var afk 1} #alias {panoff} {#alias dofightbegin dofightbegin1;#alias dofight dofight1;unsetstatus;offafk} #alias {panoff2} {panoff} #alias {panoff3} {panoff} #alias {dofight2} {poof2} #alias {dofight3} {poof2;grec;st;#3 flee;qrec;#alias dofightbegin nil} #nop #nop -- Deaths and such -- #var versiondeath 2 #nop #action {R.I.P} {dorip} #action {^You lost %1 experience} {doloot} #action {^You receive } {doloot} #action {^You raise a} {score} #alias setloot {#action {^%%1 is dead!} {get %%2 %%1} {4}} #alias loots {#act {*is dead*}} #nop #nop -- Weapons #var versionweapons 3 #variable {wepA} {nil} #variable {wepB} {nil} #variable {nonlight} {$wepB} #alias {bashoff} {rem $shield;ugrab $wepB} #alias {bashon} {store $wepB;wear shield} #alias {env} {envenom $wepA;envenom $wepB} #alias {uwield} {store $wepA;get %1 $bag;wield %1} #act {^You start using the %1 as a secondary weapon.} setoff #act {^You start using the %1.} setprim %1 #alias setprim setprim1 #alias setoff setoff1 #alias setprim1 {#var wepA %1} #alias setoff1 {#var wepB %1} #alias setprim2 nil #alias setoff2 nil #action {disarms your weapon.} {get $wepA;#if (!$war) wield $wepA} {5} #nop -- Bags #var versionbags 1 #nop bag -primary container, chest -secondary, discardable, bagf -food #nop #nop #nop -- grouping #var versiongroup 2 #var ongroup 0 #var splitday 0 #alias unsetgrouped {#if $ongroup #var ongroup 0} #alias setgrouped {#if !$ongroup #var ongroup 1} #alias offgroup unsetgrouped #alias ongroup setgrouped #action {^You are not a member of a group.} unsetgrouped #action { is now a member of your group.} setgrouped #action {^But you belong to no group.} unsetgrouped #action {^You are now a member of} setgrouped #action {^There were %1 coins.} {#if $ongroup dosplit %1} #alias {dosplit} {nil} #alais {dosplit1} {split %1} #alias {dosplit2} {deal %1;split \$sum} #alias {deal} {#math sum {9 * %1 / 10}} #alias {splitcount} {#math splitday {$splitday + $1}} #nop #nop #nop -- miscellaneous #alias dobell {#bell} #alias doeat {#if !$fight doeat1;#if $fight {#alias dofightend doeatfight}} #alias dodrink {#if !$fight dodrink1;#if $fight {#alias dofightend doeatfight}} #alias doeatfight {score;#alias dofightend dofightend1}