;---------------------------------- ; ; THIS IS ONLY EXAMPLE FILE. IT WILL NOT WORK!!! ; IT IS ONLY A PART OF MY SCRIPTS. ; I WANT ONLY SHOWS YOU POWER OF READER.DLL :) ; ; treningi wersja 2.2 16-2-2002 ; Kuling, wspolpraca Tabularix ; od wersji 2.1 uzywamy RegExp ; ;---------------------------------- ; ; trenuj ; LAPANIE CEN TRENINGOW WLACZONE ; Oto umiejetnosci, w jakich moge cie szkolic: ; Umiejetnosc: Koszt sesji treningowej: ; ------------------------------------------------------- ; wspinaczka 4 zlote, 1 srebrna i 3 miedziane monety ; opieka nad zwierzetami 2 srebrne i 6 miedzianych monet ; maczugi 1 miedziana moneta ; ocena przeciwnika 9 srebrnych monet ; walka bez broni 4 srebrne i 6 miedzianych monet ; plywanie 5 zlotych, 8 srebrnych i 9 miedzianych monet ; > LAPANIE CEN TRENINGOW WYLACZONE ; ;-------------------------------------------------------------------------------------------------- ; Regexp.dll ;-------------------------------------------------------------------------------------------------- /loadlib R ;-------------------------------------------------------------------------------------------------- ; wczytanie tablicy z treningami ;-------------------------------------------------------------------------------------------------- /read lokalne\treningi.txt ;-------------------------------------------------------------------------------------------------- ; ten aliasik pakuje do zmiennej liczbe miedziakow wyciagnieta z lancucha typu 4 zlote, 1 srebrna i 3 miedziane monety ;-------------------------------------------------------------------------------------------------- /alias {RExtractMoney %0} {_ /var VMoney {0};_ /calldll R Set {([0-9]+) zlot};_ /calldll R Match {$0};_ /if {$Rmatch} {/math VMoney {$VMoney+@Math($P1*240)}};_ /calldll R Set {([0-9]+) srebrn};_ /calldll R Match {$0};_ /if {$Rmatch} {/math VMoney {$VMoney+@Math($P1*12)}};_ /calldll R Set {([0-9]+) miedzian};_ /calldll R Match {$0};_ /if {$Rmatch} {/math VMoney {$VMoney+@Math($P1)}};_ } ;-------------------------------------------------------------------------------------------------- ; Kiedys trzeba wystartowac lapanie treningow ;-------------------------------------------------------------------------------------------------- /action {Oto umiejetnosci, w jakich moge} {RtreningiCeny1} ;-------------------------------------------------------------------------------------------------- ; ten aliasik dziala tak, tworzy actiony typu ; /action {ocena przeciwnika %0} {RExtractMoney $0;#trening ocena przeciwnika $VMoney} {Gtmp} ;-------------------------------------------------------------------------------------------------- /alias {RtreningiCeny1} _ {_ /showme {@AnsiBold()@ForeGreen()LAPANIE CEN TRENINGOW WLACZONE@AnsiReset()};_ /loop {1,$VUmiejet} _ {_ /var tmp {/action {@GetArray(TTreningi,$LoopCount,1) %0} {RExtractMoney \$0;#trening @GetArray(TTreningi,$LoopCount,1) \$VMoney} {Gtmp}};_ @LTrim()$tmp_ };_ RtreningiCeny0_ }_ ;-------------------------------------------------------------------------------------------------- ; ten aliasik po 15 sekundach nagrywa treningi, kasuje triggery powstale w wyniki RtreningiCeny1 ;-------------------------------------------------------------------------------------------------- /alias {RtreningiCeny0} _ {_ /event {EtreningiCeny0} _ {15} _ {_ /killgroup {Gtmp};_ /writegroup {lokalne\treningi.txt} {GTreningiCeny};_ /showme {@AnsiBold()@ForeRed()LAPANIE CEN TRENINGOW WYLACZONE@AnsiReset()};_ /unevent {EtreningiCeny0}_ }_ } ;-------------------------------------------------------------------------------------------------- ; wyswietla ceny treningow ;-------------------------------------------------------------------------------------------------- /alias {#treningi} _ {_ /showme {@AnsiBold()@ForeGreen()Umiejetnosc Cena Dni temu@AnsiReset()};_ /showme {@AnsiBold()@ForeYellow()======================================@AnsiReset()};_ /loop {1,$VUmiejet} _ {_ /if {@Math($LoopCount%2)==0} _ {/showme {@AnsiBold()@ForeWhite()@PadRight(@GetArray(TTreningi,$LoopCount,1), ,@Math(23-@Len(@GetArray(TTreningi,$LoopCount,1))))@PadLeft(@GetArray(TTreningi,$LoopCount,2), ,@Math(4-@Len(@GetArray(TTreningi,$LoopCount,2)))) @Math((@Time()-@GetArray(TTreningi,$LoopCount,3))/86400)@AnsiReset()}} _ {/showme {@AnsiReset()@PadRight(@GetArray(TTreningi,$LoopCount,1),.,@Math(23-@Len(@GetArray(TTreningi,$LoopCount,1))))@PadLeft(@GetArray(TTreningi,$LoopCount,2), ,@Math(4-@Len(@GetArray(TTreningi,$LoopCount,2)))) @Math((@Time()-@GetArray(TTreningi,$LoopCount,3))/86400) @AnsiReset()}} _ }_ } _ {GTreningi} ;-------------------------------------------------------------------------------------------------- ; wywolanie #trening opieka nad zwierzetami 1252 ;-------------------------------------------------------------------------------------------------- /alias {#trening %0} _ {_ /loop {1,$VUmiejet} _ {_ /if {"@Left($0,@Len(@GetArray(TTreningi,$LoopCount,1)))"=="@GetArray(TTreningi,$LoopCount,1)" && @Word($0,@WordCount($0))>0} _ {/assign {TTreningi} {$LoopCount,2} {@Word($0,@WordCount($0))};/assign {TTreningi} {$LoopCount,3} {@Time()};/showme {@AnsiBold()@ForeGreen()Nowa cena treningu @GetArray(TTreningi,$LoopCount,1) @Word($0,@WordCount($0)) miedziakow.@AnsiReset()}}_ }_ } _ {GTreningi}