#python from pyLib import sounds sound = sounds.Sounds() #gts #action {^*%+{Orc|Troll|Man|Woman|Elf|Half-Elf|Dwarf|Hobbit|Bear|Numenorean|N\xFAmen\xF3rean}*%*{standing|sitting|resting|sleeping|fighting|riding|nocks a missile|begins some strange|arrived|leaves}%+{((north|south|east|west|up|down|above|below|hiding place).*)?}$} { #if {("%2" == "Numenorean") || ("%2" == "N\xFAmen\xF3rean") || ("%2" == "Woman")} {#var {tmpPlayer} {Man}}; #else {#var {tmpPlayer} {%2}}; #if {"%4" == "nocks a missile"} {#var {tmpAction} {shooting}}; #elseif {"%4" == "begins some strange"} { #var {tmpAction} {casting}; #line gag; #showme {*%1%2* is casting!} }; #else {#var {tmpAction} {%4}}; #var {tmpLocation} {%8}; #if {("$tmpAction" == "leaves") && ("$tmpLocation" == "hiding place")} { #nop Maybe we do something with this later }; #else { #nop {Ugly hack! We need this because TinTin isn't clearing %8.}; #if {"$tmpLocation" == "hiding place"} { #var {tmpLocation} {} }; playsound ${tmpPlayer}${tmpAction}${tmpLocation}\.wav }; #unvar {tmpPlayer}; #unvar {tmpAction}; #unvar {tmpLocation} } #action {^You begin to feel {hungry|thirsty}.$} { playsound %1.wav } #action {^You gain a level!$} { playsound tada.wav } #action {^You {feel a hidden presence|smell blood}.$} { playsound hidden.wav } #alias {playsound} {#python sound.play("%0", "${volume}")} #alias {stopsound} {#python sound.stop("%0")} #alias {mutesound} {#python sound.mute()} #alias {vol} { #if {"%1" == "up"} { #if {$volume < 81} { #math {volume} {$volume + 20}; #echo {Increasing volume.} }; #else { #var {volume} {100}; #echo {Maximum volume!} } }; #elseif {"%1" == "down"} { #if {$volume > 21} { #math {volume} {$volume - 20}; #echo {Decreasing volume.} }; #else { #var {volume} {1}; #echo {Minimum volume!} } }; #else {#showme Syntax: vol [up|down]} } #var {volume} {100}