|
ondrovic Beginner
Joined: 22 Feb 2002 Posts: 25 Location: USA
|
Posted: Fri Mar 08, 2002 7:25 pm
converting this script |
was wondering if anyone could help me convert this script to zmud
/alias {whox %0} {/enablegroup who;/clearlist WHO;/var NameWordCnt 0;/empty whoxAFK;/empty whoxKiller;/empty whoxThief;/empty whoxAttacker;/empty whoxName;/empty whoxClass;/empty whoxLevel;/empty whoxType;who $0} {whox}
/action {^%0.} {/if {"@Word($0,2)"!="player" || "@Word($0,2)"!="players"} {/if {@IsNumber(@Word($0,1))==1} {/var whoxLevel @Word($0,1);/var whoxClass @Word($0,2);/var NameWordCnt 3;/if {@StrStr($0,[AFK])!=-1} {/var whoxAFK {[AFK]};/var NameWordCnt {@Math(1+$NameWordCnt)}};/if {@StrStr($0,(KILLER))!=-1} {/var whoxKiller {(K)};/var NameWordCnt {@Math(1+$NameWordCnt)}};/if {@StrStr($0,(THIEF))!=-1} {/var whoxThief {(T)};/var NameWordCnt {@Math(1+$NameWordCnt)}};/if {@StrStr($0,(ATTACKER))!=-1} {/var whoxAttacker {(A)};/var NameWordCnt {@Math(1+$NameWordCnt)}};/var whoxName @Left(@Word($0,$NameWordCnt),12)} {/if {@IsEmpty($whoxType)==1 || "@StripAnsi($whoxType)"!="[IMM]"} {/var whoxLevel 50;/var whoxClass @Word($0,1);/var NameWordCnt 2;/if {@StrStr($0,[AFK])!=-1} {/var whoxAFK {[AFK]};/var NameWordCnt {@Math(1+$NameWordCnt)}};/if {@StrStr($0,(KILLER))!=-1} {/var whoxKiller {(K)};/var NameWordCnt {@Math(1+$NameWordCnt)}};/if {@StrStr($0,(THIEF))!=-1} {/var whoxThief {(T)};/var NameWordCnt {@Math(1+$NameWordCnt)}};/if {@StrStr($0,(ATTACKER))!=-1} {/var whoxAttacker {(A)};/var NameWordCnt {@Math(1+$NameWordCnt)}};/var whoxName @Left(@Word($0,$NameWordCnt),12)} {/if {"@StripAnsi($whoxType)"=="[IMM]"} {/var NameWordCnt 1;/while {@TextColor(@Word($0,$NameWordCnt))!=10} {/var whoxLevel 50+;/var whoxClass @Word($0,$NameWordCnt);/var NameWordCnt @Math(1+$NameWordCnt)};/if {@StrStr($0,[AFK])!=-1} {/var whoxAFK {[AFK]};/var NameWordCnt {@Math(1+$NameWordCnt)}};/if {@StrStr($0,(KILLER))!=-1} {/var whoxKiller {(K)};/var NameWordCnt {@Math(1+$NameWordCnt)}};/if {@StrStr($0,(THIEF))!=-1} {/var whoxThief {(T)};/var NameWordCnt {@Math(1+$NameWordCnt)}};/if {@StrStr($0,(ATTACKER))!=-1} {/var whoxAttacker {(A)};/var NameWordCnt {@Math(1+$NameWordCnt)}};/var whoxName @Left(@Word($0,$NameWordCnt),12)}}};/itemadd WHO {@PadLeft($whoxLevel, ,@Math(3-@Len($whoxLevel))) @PadRight(@AnsiBold()@ForeBlue()$whoxClass, ,@Math(15-@Len($whoxClass))) @PadRight(@ForeGreen()$whoxName, ,@Math(15-@Len($whoxName))) @PadRight(@ForeWhite()$whoxAFK@ForeRed()$whoxAttacker@ForeYellow()$whoxKiller@ForeMagenta()$whoxThief, ,@Math(15-@Len($whoxAFK$whoxKiller$whoxThief$whoxAttacker))) @ForeBlue()$whoxType};/var NameWordCnt 0;/empty whoxAFK;/empty whoxKiller;/empty whoxThief;/empty whoxAttacker;/empty whoxName;/empty whoxClass;/empty whoxLevel} {/showme WASNTvalid}} {who}
/action {-----------------------------------[ IMMORTALS ]------------------------------} {/var whoxType {@AnsiBold()@ForeCyan()[IMM]}} {who}
/action {-------------------------------[ DEADLY CHARACTERS ]--------------------------} {/var whoxType {@AnsiBold()@ForeRed()[DEADLY]}} {who}
/action {^%0 players.} {/if {@WordCount($0)==1} {/disablegroup who;whoxshow}} {who}
/action {^%0 player.} {/if {@WordCount($0)==1} {/disablegroup who;whoxshow}} {who}
/alias {whoxshow} {/if {@GetCount(WHO)<=0} {/showme {@AnsiBold()@ForeRed()The WHO list is Empty! -- aborted}} {/showme {@AnsiBold()@ForeCyan()Level @ForeBlue()Class @ForeGreen()Name @ForeWhite()Flags @ForeRed()Deadlies@AnsiReset()/@AnsiBold()@ForeCyan()IMMs@Chr(10)@AnsiReset()@PadRight(@AnsiBold()@ForeWhite()-,-,78)@AnsiReset()};/loop {@GetCount(WHO),1} {/showme {@AnsiBold()@ForeCyan()@GetItem(WHO,$LoopCount)}}}} {whoxSpewIt}
/var {NameWordCnt} {0}
/empty {whoxAFK}
/empty {whoxKiller}
/empty {whoxThief}
/empty {whoxAttacker}
/empty {whoxName}
/empty {whoxClass}
/empty {whoxLevel}
/empty {whoxType}
/listadd {WHO} {who}
/gag {^%0.} {who}
/gag {-------------------------------[ DEADLY CHARACTERS ]--------------------------} {who}
/gag {-----------------------------------[ IMMORTALS ]------------------------------} {who}
CHRIS ONDROVIC |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Fri Mar 08, 2002 7:55 pm |
Chris, this can be done much faster if you cut and past your who list.
This script is convolute and can be tightened/cleaned up.
TonDiening
Beta Upgrading to 6.26 |
|
|
|
ondrovic Beginner
Joined: 22 Feb 2002 Posts: 25 Location: USA
|
Posted: Fri Mar 08, 2002 8:19 pm |
TL(Total Levels) LV(Level) CC(Current Class) S(Sex)
TL Lv CC S PKs Clan Name Status......
------------------------------------------------------------------------------
[124 31 HER M] [ 138] [ 78] Korius [Invisible]
[124 31 HER F] [ 287] [ ] Shanythra [AFK][MedLink]
[124 31 HER F] [ 136] [ 75] Valissio [Catacombs]
[124 31 HER M] [ 156] [ 84] Daggas [Invisible] [AFK]
[124 31 HER M] [ 262] [ 1] Heliux [Invisible]
[124 31 HER M] [ 1928] [ 54] Lynn [Invisible] [AFK][MedLink]
[124 31 HER F] [ 161] [ 23] Charlin
[124 31 HER M] [ 1767] [ 64] Isigow [In Formation]
[124 31 HER M] [ ] [ 8] Trrapsin [Invisible] [Catacombs]
[124 31 HER F] [ 99] [ 48] Auroria [Invisible] [MedLink][In Formation]
[124 31 HER M] [ 1940] [ 52] Rabilieus [Invisible] [At Home][AFK]
[124 31 HER M] [ 189] [ 29] Drikmor
[124 31 HER M] [ 1068] [ 78] Andrayes [Invisible]
[124 31 HER M] [ 47] [ 9] Lehao
[124 31 HER M] [ 1726] [ 32] Praid [MedLink]
[124 31 HER M] [ 20] [ 5] Kyldor
[124 31 HER M] [ 1084] [ 49] Talieus [Invisible]
[124 31 AVT M] [ 483] [ 67] Jabari [AFK]
[124 31 THI M] [ 7326] [ 25] Hazelrah [At Home][AFK]
CHRIS ONDROVIC |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Fri Mar 08, 2002 8:22 pm |
Appears something from Vryce's box which I haven't visited in ages
Peek at it for spacing:
TL(Total Levels) LV(Level) CC(Current Class) S(Sex)
TL Lv CC S PKs Clan Name Status......
------------------------------------------------------------------------------
[124 31 HER M] [ 138] [ 78] Korius [Invisible]
[124 31 HER F] [ 287] [ ] Shanythra [AFK][MedLink]
[124 31 HER F] [ 136] [ 75] Valissio [Catacombs]
[124 31 HER M] [ 156] [ 84] Daggas [Invisible] [AFK]
[124 31 HER M] [ 262] [ 1] Heliux [Invisible]
[124 31 HER M] [ 1928] [ 54] Lynn [Invisible] [AFK][MedLink]
[124 31 HER F] [ 161] [ 23] Charlin
[124 31 HER M] [ 1767] [ 64] Isigow [In Formation]
[124 31 HER M] [ ] [ 8] Trrapsin [Invisible] [Catacombs]
[124 31 HER F] [ 99] [ 48] Auroria [Invisible] [MedLink][In Formation]
[124 31 HER M] [ 1940] [ 52] Rabilieus [Invisible] [At Home][AFK]
[124 31 HER M] [ 189] [ 29] Drikmor
[124 31 HER M] [ 1068] [ 78] Andrayes [Invisible]
[124 31 HER M] [ 47] [ 9] Lehao
[124 31 HER M] [ 1726] [ 32] Praid [MedLink]
[124 31 HER M] [ 20] [ 5] Kyldor
[124 31 HER M] [ 1084] [ 49] Talieus [Invisible]
[124 31 AVT M] [ 483] [ 67] Jabari [AFK]
[124 31 THI M] [ 7326] [ 25] Hazelrah [At Home][AFK]
TonDiening
Beta Upgrading to 6.26 |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Fri Mar 08, 2002 9:13 pm |
Need a trigger to indicate that the wholist is done; ie 34534 players are here.
Need to know what information you want to pull out of the who list; ie which clan
members are on, etc.
General concept is:
Main capture line is tricky as sometimes you get [ %d] and other times [ ], so I'll off
the cuff grab them both and extract them.
#TRIGGER {^~[(%d) (%d) (%w) ({F|M})~] ~[(%*)~] (%w)(%*)} }
#VAR PersonTL %1
#VAR PersonLV %2
#VAR PersonCC %3
#VAR PersonS %4
#NOOP %5 should be like " #] [ #" or " ] [ " or " #] [" or " ] [ #"
#VAR PersonPKs %number(%copy(%5,1,%pos("] ",%5)-1))
#VAR PersonClan %number(%copy(%5,%pos("[",%5)+1,%len(%5))
#VAR PersonName %6
#VAR PersonStatus %7
#IF (%pos("[Invisible]",@PersonStatus) > 0) {
#ADDITEM People_Invis %concat("Level: ",@PersonLV," ",@PersonName," and other important things here")}
#IF (@PersonClan == 48) {
#ADDITEM People_Clan48 %concat("Level: ",@PersonLV," ",@PersonName," and other important things here")}
#NOOP add other if's and lists for later viewing if desired.
}
#ALIAS who_i {#FORALL @People_Invis {#SH %i}}
#ALIAS who_48 {#FORALL @People_Clan48 {#SH %i}}
TonDiening
Beta Upgrading to 6.26 |
|
|
|
ondrovic Beginner
Joined: 22 Feb 2002 Posts: 25 Location: USA
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|