Help - Search - Members - Calendar
Full Version: Score Replace
Achaea's Forums > Off-Topic > Tech Support
Jonathin
So, I like the Aetolia config option for the score replacement. I wanted it here.

I'm not sure if this will work with anyone elses, but here's the code in case you want it.

#CLASS {Scoresort}
#ALIAS sc {~sc;#class scoretrig 1;#va scoreclanlist {}}
#ALIAS showscore {#SHOW {%ansi( hi, blue)+-%ansi( white) @title %ansi( hi, blue)%repeat( "-", %eval( 75-%len( @title)))+};#show {%ansi( hi, blue)| %ansi( gray)Race:~ ~ ~ @race%repeat( " ", %eval( 19-%len( @race)))%ansi( hi, blue)|%ansi( gray) Health:~ ~ ~ @scorehealth/@maxscorehealth%repeat( " ", %eval( 6-%len( @maxscorehealth)))%ansi( hi, blue)|%ansi( gray) Endurance: @scoreendurance/@maxscoreendurance%repeat( " ", %eval( 8-%len( @maxscoreendurance)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) Sex: ~ ~ ~ @sex%repeat( " ", %eval( 19-%len( @sex)))%ansi( hi, blue)|%ansi( gray) Mana:~ ~ ~ ~ ~ @scoremana/@maxscoremana%repeat( " ", %eval( 6-%len( @maxscoremana)))%ansi( hi, blue)|%ansi( gray) Willpower:~ @scorewillpower/@maxscorewillpower%repeat( " ", %eval( 8-%len( @maxscorewillpower)))%ansi( hi, blue)|};#show {%ansi( hi, blue)+-%ansi( white) LEVEL %ansi( hi, blue)-------------------------------%ansi( hi, blue)|%ansi( white) NEXT LEVEL %ansi( hi, blue)--------------------------+};#show {%ansi( hi, blue)|%ansi( gray) @scorelevelname %repeat( " ", %eval( 11-%len( @scorelevelname)))(@scorelevel)%repeat( " ", %eval( 24-%len( @scorelevel)))%ansi( hi, blue)|%ansi( gray) @scorelevelprogress~% to %eval( @scorenextlevel)%repeat( " ", %eval( 30-%len( @scorelevel)))%ansi( hi, blue)|};#show {%ansi( hi, blue)+-%ansi( white) RANKINGS %ansi( hi, blue)----------------------------+- %ansi( white)ATTRIBUTES%ansi( hi, blue) -------------------------+};#show {%ansi( hi, blue)|%ansi( gray) Experience: @scorexprank %repeat( " ", %eval( 25-%len( @scorexprank)))%ansi( hi, blue)|%ansi( gray) Strength:~ ~ ~ ~ ~ @scorestrength%repeat( " ", %eval( 6-%len( @scorestrength)))Dexterity:~ ~ ~ ~ @scoredexterity%repeat( " ", %eval( 3-%len( @scoredexterity)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) Exploration: @scoreexplorerrank%repeat( " ", %eval( 25-%len( @scoreexplorerrank)))%ansi( hi, blue)|%ansi( gray) Constitution: @scoreconstitution%repeat( " ", %eval( 6-%len( @scoreconstitution)))Dexterity:~ ~ ~ ~ @scoredexterity%repeat( " ", %eval( 3-%len( @scoreconstitution)))%ansi( hi, blue)|};#show {%ansi( hi, blue)+-%ansi( white) ORGANIZATIONS%ansi( hi, blue) -----------------------+-%ansi( white) RANK%ansi( hi, blue) -------------------------------+};#show {%ansi( hi, blue)|%ansi( gray) City:~ ~ @scorecity%repeat( " ", %eval( 31-%len( @scorecity)))%ansi( hi, blue)|%ansi( gray) @scorecityrankname ~(CR @scorecityrank~)%repeat( " ", %eval( 25-%len( @scorecityrank)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) House: @scorehousename%repeat( " ", %eval( 31-%len( @scorehousename)))%ansi( hi, blue)|%ansi( gray) @scorehousrankname%repeat( " ", %eval( 16-%len( @scorehousrankname)))(HR @scorehouserank~)%repeat( " ", %eval( 16-%len( @scorehouserank)))%ansi( hi, blue)|};#show {%ansi( hi, blue)+-%ansi( white) GENERAL INFORMATION %ansi( hi, blue)-----------------+--------------------------------------+};#show {%ansi( hi, blue)|%ansi( gray) You are @scoreage years old.%repeat( " ", %eval( 58-%len( @scoreage)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) You were born on the @scorebirthday of @scorebirthmonth, @scorebirthyear AF.%repeat( " ", %eval( 46-(%len( @scorebirthday)+%len( @scorebirthmonth)+%len( @scorebirthyear))))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) @scoreproteges%repeat( " ", %eval( 77-%len( @scoreproteges)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) @scoreinfamy%repeat( " ", %eval( 77-%len( @scoreinfamy)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) You are @scorealignment%repeat( " ", %eval( 69-%len( @scorealignment)))%ansi( hi, blue)|};#show {%ansi( hi, blue)+-%ansi( white) CLANS %ansi( hi, blue)----------------------------------------------------------------------+};#forall @scoreclanlist {#show {%ansi( hi, blue)|%ansi( gray) %i%repeat( " ", %eval( 77-%len( %i)))%ansi( hi, blue)|}};#show {%ansi( hi, blue)+------------------------------------------------------------------------------+}}
#VAR Title {Echis Carinatus, Mosr Gothfraidh, Fledgling Guardian}
#VAR sex {male}
#VAR race {Horkval}
#VAR title {}
#VAR scorehealth {4024}
#VAR maxscorehealth {4024}
#VAR scoreendurance {19020}
#VAR maxscoreendurance {19020}
#VAR scoremana {2249}
#VAR maxscoremana {2921}
#VAR scorewillpower {12180}
#VAR maxscorewillpower {12180}
#VAR scorelevel {76}
#VAR scorelevelname {Archmortal}
#VAR scorelevelprogress {53}
#VAR scorenextlevel {77}
#VAR scorexprank {927th}
#VAR scorestrength {14}
#VAR scoredexterity {13}
#VAR scoreconstitution {15}
#VAR scoreintelligence {9}
#VAR scorecityrankname {Equite}
#VAR scorecityrank {2}
#VAR scoreinfamy {You are not known for acts of infamy.}
#VAR scoreclass {Serpent}
#VAR scorecity {Ashtan}
#VAR scorehouserank {8}
#VAR scorehousrankname {Precept of Fire}
#VAR scorehousename {Warlocks of the Rising Phoenix}
#VAR scoreexplorerrank {Desert Roamer}
#VAR scoreclanlist {Jagers van Verloren|The Warlock Training Grounds|House Gothfraidh|The Phoenix Aerie|House Dread|Seekers of the Ace of Spades|Bacon-Wrapped|The Rant Garden}
#VAR scorealignment {Angelic}
#VAR scoreage {55}
#VAR scorebirthday {13th}
#VAR scorebirthmonth {Sarapin}
#VAR scorebirthyear {462}
#VAR scoreproteges {You are a mentor and able to take on proteges}
#CLASS 0
#CLASS {Scoresort|scoretrig}
#REGEX {^(.*) \((male|female) (\a+)\)$} {#gag;#va title {%1};#va sex {%2};#va race {%3};showscore}
#COND {^You are level (\d+) \((.+?)\) and (\d+)\% of the way to the next level\.$} {#gag;#va scorelevel %1;#va scorelevelname %2;#va scorelevelprogress %3;#mat scorenextlevel (@scorelevel+1)} {regex}
#COND {^Health\: (\d+)\/(\d+)(\s+)Mana\: (\d+)\/(\d+)$} {#gag;#va scorehealth %1;#va maxscorehealth %2;#va scoremana %4;#va maxscoremana %5} {regex}
#COND {^Endurance\: (\d+)\/(\d+)(\s+)Willpower\: (\d+)\/(\d+)$} {#gag;#va scoreendurance %1;#va maxscoreendurance %2;#va scorewillpower %4;#va maxscorewillpower %5} {regex}
#COND {^Strength\: (\d+)(\s+)Dexterity\: (\d+)(\s+)Constitution\: (\d+)(\s+)Intelligence\: (\d+)$} {#gag;#va scorestrength %1;#va scoredexterity %3;#va scoreconstitution %5;#va scoreintelligence %7} {regex}
#COND {^You are ranked (\w+) in Achaea\.$} {#gag;#va scorexprank %1} {regex}
#COND {^You are not known for acts of infamy\.$} {#gag;#va scoreinfamy {You are not known for acts of infamy.}} {regex}
#COND {^You stand tall as a proud citizen of (\a+)\.$} {#gag;#va scorecity %1} {regex}
#COND {^You are at the rank of \'(\a+)\' \((\d+)\) in your city.} {#gag;#va scorecityrankname %1;#va scorecityrank %2} {regex}
#COND {^You are a full member in the (\a+) class\.$} {#gag;#va scoreclass {%1}} {regex}
#COND {^You are (.+?) \((\d+)\) in the (.+?)\.$} {#gag;#va scorehouserank {%2};#va scorehousrankname {%1};#va scorehousename {%3}} {regex}
#COND {^You are a (.+?) in the Fellowship of Explorers\.$} {#gag;#va scoreexplorerrank {%1}} {regex}
#REGEX {^You are a member of the clan called \'(.+?)\.\'} {#gag;#addi scoreclanlist {%1}}
#REGEX {^You are clan head of the clan called \'(.+?)\.\'$} {#gag;#addi scoreclanlist {%1}}
#REGEX {^You are (\a+)\.$} {#gag;#va scorealignment {%1}}
#COND {^You are able to take on proteges\.$} {#gag;#va scoreproteges {You are a mentor and able to take on proteges}} {regex}
#COND {^You are (\d+) years old\, having been born on the (\w+) of (\a+)\, (\d+) years after the fall of the Seleucarian Empire\.$} {#gag;#va scoreage %1;#va scorebirthday %2;#va scorebirthmonth %3;#va scorebirthyear %4;#class scoretrig 0} {regex}
#CLASS 0




This is what it looks like:

This is a link to a site that I posted it to

Edit: Took out the codebox for ease of reaching the edit button.

Edit2: Also, many of the triggers that would be required to make it work with everyone are missing.

Edit3: It's almost 4am. I'm done with this for now. Gnight forums.
Saadya
Sometimes we can have good things too! Thanks!
Jonathin
I could put in order stuff if someone posts what you see from being in an order in your score here.
Also, I don't know what the best and worst alignment messages are (abbadon and seraphic). Post those too?



Also, is there a way to have a multiline trigger set a variable if the triggerline is NOT present, and then have it skip that particular line?


Thanks, and I'll make the number of variables disappear by adding a database for this a bit later. Just want to get the kinks worked out.
Lana
You have a soul as black as Abbadon.
You have a soul that is truly Seraphic.
Gorlasintan
You are of the Oligarch of Oppression in the Divine Order of Shaitan, God of Oppression.

'Of the Oligarch of Oppression' is the rank, 'Shaitan, God of Oppression' is the order, so the regex looks like

^You are (.+) in the Divine Order of (.+)\.$

Also, Order Ranks are not necessarily organized by number like City and House rank are.

Being a City leader and/or aide also gives its own line in score. Examples:

You are Viceroy on the ruling council of Mhaldor.

You are an aide to the Ambassador, the Minister of War, the Minister of Security, and the Minister of Cultural Affairs.



Sena
QUOTE (Jonathin @ Aug 24 2009, 09:59 AM) *
Also, is there a way to have a multiline trigger set a variable if the triggerline is NOT present, and then have it skip that particular line?


Thanks, and I'll make the number of variables disappear by adding a database for this a bit later. Just want to get the kinks worked out.

I just woke up, so it's not the best time for me to be thinking about scripting, but I think the best way would be to assume that the line isn't there until you do see it. At the beginning, set the variable to false, and set it to true when the line appears. If it never appears, it will be false.

Edit: Actually, I just realised you might be talking about how to have a multi-state trigger skip a line and move on to the next state if it isn't there. I'm not sure about that one, I'll see if I can find a good way to do it when I'm more awake.

Edit again: I think the best way would be to not use a multi-state trigger at all. Instead, you could have each state be a separate trigger, in a class that's only enabled when you check score.

If you really want to make a multi-state trigger for this, it would be possible to make a fairly complex trigger, with each state matching any line, and then see what the line is in the script using %regex. Then, you'd just need one state repeated several times, and you'd just need to have enough states to cover the maximum length of score. I'd go with multiple triggers though.
Jonathin
QUOTE (Gorlasintan @ Aug 24 2009, 11:26 AM) *
You are of the Oligarch of Oppression in the Divine Order of Shaitan, God of Oppression.

'Of the Oligarch of Oppression' is the rank, 'Shaitan, God of Oppression' is the order, so the regex looks like

^You are (.+) in the Divine Order of (.+)\.$

Also, Order Ranks are not necessarily organized by number like City and House rank are.

Being a City leader and/or aide also gives its own line in score. Examples:

You are Viceroy on the ruling council of Mhaldor.

You are an aide to the Ambassador, the Minister of War, the Minister of Security, and the Minister of Cultural Affairs.


Okie dokie, thanks. I'll put those in there.


Also: I think I'll make the trigger a bunch of single-state triggers because the class turns off when it's not being used, so it wouldn't take up processing speed, and then do what Sena suggested. Though Sena, if you can find anything, it would help with other scripts.
Sena
I can think of a few workarounds, using reparse or #STATE, or what I suggested before, but they're all unnecessarily complex and possibly a lot slower compared to just using multiple triggers.
Jonathin
Multiple triggers it is! smile.gif

I've also noticed that it won't display correctly for people who have like 10k+ or -1k health/mana and whatnot. I'll make it static to the / instead of the @scorehealth or whatever.
Jonathin
Okay for the aides thing.


I'd like to add it to a string list

You are an aide to the Ambassador, the Minister of War, the Minister of Security, and the Minister of Cultural Affairs.

But I'm not sure how to get it to separate them, or to work with fewer or only one.
Lana
For matching them, try a regex like:

You are an aide to ([a-zA-Z ]+)+.

Not sure how many values are captured though, but try to parse through %1-%9. Never had to do it myself.
Jonathin
Well, If I could remember how, I could probably do it by the commas, but I can't remember how.
Lana
Yeah, missed the commas for some reason... Try this one instead.

You are an aide to ([a-zA-Z ]+[,]?)+.
Sena
Hmm.
CODE
^You are an aide to (?:(?:and )?the ([\w ]+)(?:, )?)+\.$
That matches it, but it only captures the last one in the list. Doing it the boring way would probably be best.
CODE
#REGEX {^You are an aide to (.+)\.$} {#VARIABLE AideTo {%replace( %replace( "%1", ", ", "|"), "and ", "")}}


QUOTE (Lana @ Aug 24 2009, 07:58 PM) *
Yeah, missed the commas for some reason... Try this one instead.

You are an aide to ([a-zA-Z ]+[,]?)+.

^You are an aide to ([\w ,]+)\.$ is all it would take. Also, doing it that way has the same problem I mentioned. With "You are an aide to the Ambassador, the Minister of War, the Minister of Security, and the Minister of Cultural Affairs.", that method would capture "and the Minister of Cultural Affairs" as %1, and ignore the rest.
Veldrin
#regex {^You are an aide to (.*)\.} {#var aideship {%1};#var aideship {%replace( @aideship, ", ", "|")};#var aideship {%replace( @aideship, " and", "")}}
should make it into a string list of each line having the Minister of blah
Sena
QUOTE (Veldrin @ Aug 24 2009, 08:06 PM) *
#regex {^You are an aide to (.*)\.} {#var aideship {%1};#var aideship {%replace( @aideship, ", ", "|")};#var aideship {%replace( @aideship, " and", "")}}
should make it into a string list of each line having the Minister of blah

Why set the variable three times? Instead of the first time, just use %1. Instead of taking the commas and "and" out separately, you could just use nested %replace. The script I gave above does the same things yours does, but simplified.
Jonathin
You are Viceroy on the ruling council of Mhaldor.

Is that the line setup are for all cities?
Saadya
Could you make something like that for looking at other people? It would be much simpler, even if only to separate clothes from all the other mess.
Jonathin
config clothesline on (or whatever the syntax is)

However, I can do something like it if that's not enough.
Gorlasintan
QUOTE (Jonathin @ Aug 27 2009, 10:50 AM) *
You are Viceroy on the ruling council of Mhaldor.

Is that the line setup are for all cities?

I believe so.
Jonathin
I lol'd at myself.

QUOTE
Is that the line setup are for all cities?
Jonathin
Why won't:

^You are (a|the|an|) (\a+) on the ruling council of (\a+)\.$

work, but:

^You are (\a+) on the ruling council of (\a+)\.$

does?
Sena
QUOTE (Jonathin @ Aug 27 2009, 09:29 PM) *
Why won't:

^You are (a|the|an|) (\a+) on the ruling council of (\a+)\.$

work, but:

^You are (\a+) on the ruling council of (\a+)\.$

does?

Because the first expects two spaces, even if there's no a|the|an. Try (a |the |an |)(\a+) instead.
Jonathin
Oh dumb mistake. Thanks.
Trevize
QUOTE (Jonathin @ Aug 27 2009, 09:29 PM) *
Why won't:

^You are (a|the|an|) (\a+) on the ruling council of (\a+)\.$

work, but:

^You are (\a+) on the ruling council of (\a+)\.$

does?

I'd prefer (an? |the )?
Jonathin
I don't understand.

Does the ? make it "may or may not match"?
Trevize
QUOTE (Jonathin @ Aug 28 2009, 12:19 AM) *
I don't understand.

Does the ? make it "may or may not match"?

Yes. + * and ? are the three shorthand quantifiers. + means one or more of the previous, * means zero or more, ? means zero or one. If you want to get more complex, you can use {x} or {x,y} for a full quantifier. {2} means exactly two times. {1,5} means one to five times. {2,} means two or more times. And remember, these all apply to the character (or group/character set) immediately prior to them.
Jonathin

smile.gif
Jonathin


#CLASS {Scoresort}
#ALIAS sc {~sc;#class scoretrig 1;#va title {};#va sex {};#va race {};#va scorehealth {};#va scoremaxhealth {};#va scoreendurance {};#va maxscoreendurance {};#va scoremana {};#va scoreaideship {You are not an aide to anyone.};#va maxscoremana {};#va scorewillpower {};#va maxscorewillpower {};#va scorelevel {};#va scorelevelname {};#va scorelevelprogress {};#va scorenextlevel {};#va scorexprank {};#va scorestrength {};#va scoredexterity {};#va scoreconstitution {};#va scoreintelligence {};#va scorecity {You are not a member of a city.};#va scorecityrank {};#va scorecityrankname {};#va scorehousename {You are not in a House.};#va scorehouserank {};#va scorehousrankname {};#va scoreclanlist {You are in no clans.};#va scoreorder {You are not in a Divine Order.};#va scoreorderrank {};#va scoreinfamy {};#va scoreclass {};#va scorecity {};#va scoreclanlist {};#va scorealignment {};#va scoreage {};#va scorebirthmonth {};#va scorebirthyear {};#va scoreproteges {};#va scorecityminister {}}
#ALIAS showscore {#show {%ansi( hi, blue)+-%ansi( white) @title %ansi( hi, blue)%repeat( "-", %eval( 75-%len( @title)))+};#show {%ansi( hi, blue)| %ansi( gray)Race:~ ~ ~ @race%repeat( " ", %eval( 19-%len( @race)))%ansi( hi, blue)|%ansi( gray) Health:%repeat( " ", %eval( 6-%len( @scorehealth))) @scorehealth/@maxscorehealth%repeat( " ", %eval( 6-%len( @maxscorehealth)))%ansi( hi, blue)|%ansi( gray) Endurance:%repeat( " ", %eval( 6-%len( @scoreendurance)))@scoreendurance/@maxscoreendurance%repeat( " ", %eval( 8-%len( @maxscoreendurance)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) Sex:~ ~ ~ ~ @sex%repeat( " ", %eval( 19-%len( @sex)))%ansi( hi, blue)|%ansi( gray) Mana:%repeat( " ", %eval( 9-%len( @scoremana)))@scoremana/@maxscoremana%repeat( " ", %eval( 6-%len( @maxscoremana)))%ansi( hi, blue)|%ansi( gray) Willpower:~ @scorewillpower/@maxscorewillpower%repeat( " ", %eval( 8-%len( @maxscorewillpower)))%ansi( hi, blue)|};#show {%ansi( hi, blue)+-%ansi( white) LEVEL %ansi( hi, blue)-------------------------------%ansi( hi, blue)+-%ansi( white) NEXT LEVEL %ansi( hi, blue)-------------------------+};#show {%ansi( hi, blue)|%ansi( gray) @scorelevelname %repeat( " ", %eval( 11-%len( @scorelevelname)))(@scorelevel)%repeat( " ", %eval( 24-%len( @scorelevel)))%ansi( hi, blue)|%ansi( gray) @scorelevelprogress~% to %eval( @scorenextlevel)%repeat( " ", %eval( 30-%len( @scorelevel)))%ansi( hi, blue)|};#show {%ansi( hi, blue)+-%ansi( white) RANKINGS %ansi( hi, blue)----------------------------+- %ansi( white)ATTRIBUTES%ansi( hi, blue) -------------------------+};#show {%ansi( hi, blue)|%ansi( gray) Experience: @scorexprank %repeat( " ", %eval( 25-%len( @scorexprank)))%ansi( hi, blue)|%ansi( gray) Strength:~ ~ ~ ~ ~ @scorestrength%repeat( " ", %eval( 6-%len( @scorestrength)))Dexterity:~ ~ ~ ~ @scoredexterity%repeat( " ", %eval( 3-%len( @scoredexterity)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) Exploration: @scoreexplorerrank%repeat( " ", %eval( 25-%len( @scoreexplorerrank)))%ansi( hi, blue)|%ansi( gray) Constitution: @scoreconstitution%repeat( " ", %eval( 6-%len( @scoreconstitution)))Intelligence:~ @scoreintelligence%repeat( " ", %eval( 3-%len( @scoreintelligence)))%ansi( hi, blue)|};#show {%ansi( hi, blue)+-%ansi( white) ORGANIZATIONS%ansi( hi, blue) -----------------------+-%ansi( white) RANK%ansi( hi, blue) -------------------------------+};#show {%ansi( hi, blue)|%ansi( gray) City:~ ~ @scorecity%repeat( " ", %eval( 31-%len( @scorecity)))%ansi( hi, blue)|%ansi( gray) @scorecityrankname%repeat( " ", %eval( 30-%len( @scorecityrankname))) @scorecityrank%repeat( " ", %eval( 6-%len( @scorecityrank)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) House: @scorehousename%repeat( " ", %eval( 31-%len( @scorehousename)))%ansi( hi, blue)|%ansi( gray) @scorehousrankname%repeat( " ", %eval( 31-%len( @scorehousrankname)))@scorehouserank%repeat( " ", %eval( 6-%len( @scorehouserank)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) Order: @scoreorder%repeat( " ", %eval( 31-%len( @scoreorder)))%ansi( hi, blue)|%ansi( gray) @scoreorderrank%repeat( " ", %eval( 37-%len( @scoreorderrank)))%ansi( hi, blue)|};#if (@scorecity!="You are not a member of a city.") {#show %ansi( hi, blue)+- %ansi( white)CITY GENERAL INFO%ansi( hi, blue)%repeat( "-", 19)+%repeat( "-", 38)+};#if (@scorecity!="You are not a member of a city." AND @scorecityminister) {#show {%ansi( hi, blue)|%ansi( gray) @scorecityminister%repeat( " ", %eval( 50-%len( @scorecityminister)))}};#if (@scorecity!="You are not a member of a city.") {#forall @scoreaideship {#show {%ansi( hi, blue)|%ansi( gray) %i%repeat( " ", %eval( 77-%len( %i)))%ansi( hi, blue)|}}};#show {%ansi( hi, blue)+-%ansi( white) GENERAL INFORMATION %ansi( hi, blue)--------------------------------------------------------+};#show {%ansi( hi, blue)|%ansi( gray) You are @scoreage years old.%repeat( " ", %eval( 58-%len( @scoreage)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) You were born on the @scorebirthday of @scorebirthmonth, @scorebirthyear AF.%repeat( " ", %eval( 46-(%len( @scorebirthday)+%len( @scorebirthmonth)+%len( @scorebirthyear))))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) @scoreproteges%repeat( " ", %eval( 77-%len( @scoreproteges)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) @scoreinfamy%repeat( " ", %eval( 77-%len( @scoreinfamy)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) You are @scorealignment%repeat( " ", %eval( 69-%len( @scorealignment)))%ansi( hi, blue)|};#show {%ansi( hi, blue)+-%ansi( white) CLANS %ansi( hi, blue)----------------------------------------------------------------------+};#forall @scoreclanlist {#show {%ansi( hi, blue)|%ansi( gray) %i%repeat( " ", %eval( 77-%len( %i)))%ansi( hi, blue)|}};#show {%ansi( hi, blue)+------------------------------------------------------------------------------+}}
#VAR Title {}
#VAR sex {}
#VAR race {}
#VAR scorehealth {}
#VAR maxscorehealth {4024}
#VAR scoreendurance {}
#VAR maxscoreendurance {}
#VAR scoremana {}
#VAR scoreaideship {You are not an aide to anyone.}
#VAR maxscoremana {}
#VAR scorewillpower {}
#VAR maxscorewillpower {}
#VAR scorelevel {}
#VAR scorelevelname {}
#VAR scorelevelprogress {}
#VAR scorenextlevel {}
#VAR scorexprank {}
#VAR scorestrength {}
#VAR scoredexterity {}
#VAR scoreconstitution {}
#VAR scoreintelligence {}
#VAR scorecityrankname {}
#VAR scorecityrank {}
#VAR scoreinfamy {}
#VAR scoreclass {}
#VAR scorecity {}
#VAR scorehouserank {}
#VAR scorehousrankname {}
#VAR scorehousename {You are not in a House.}
#VAR scoreexplorerrank {Desert Roamer}
#VAR scoreclanlist {}
#VAR scorealignment {}
#VAR scoreage {}
#VAR scorebirthday {13th}
#VAR scorebirthmonth {}
#VAR scorebirthyear {}
#VAR scoreproteges {}
#VAR scoreorderrank {}
#VAR scoreorder {You are not in a Divine Order.}
#VAR scorecityminister {}
#CLASS 0
#CLASS {Scoresort|scoretrig}
#REGEX {^(.*) \((male|female) (\a+)\)$} {#gag;#va title {%1};#va sex {%proper( %2)};#va race {%proper( %3)};showscore}
#REGEX {^You are an aide to (.+)\.$} {#VARIABLE scoreAideship { %replace( %replace( "%1", ", ", "|"), "and ", "")}}
#REGEX {^You are level (\d+) \((.+?)\) and (\d+)\% of the way to the next level\.$} {#gag;#va scorelevel %1;#va scorelevelname %2;#va scorelevelprogress %3;#mat scorenextlevel (@scorelevel+1)}
#REGEX {^Health\: (\d+)\/(\d+)(\s+)Mana\: (\d+)\/(\d+)$} {#gag;#va scorehealth %1;#va maxscorehealth %2;#va scoremana %4;#va maxscoremana %5}
#REGEX {^Endurance\: (\d+)\/(\d+)(\s+)Willpower\: (\d+)\/(\d+)$} {#gag;#va scoreendurance %1;#va maxscoreendurance %2;#va scorewillpower %4;#va maxscorewillpower %5}
#REGEX {^Strength\: (\d+)(\s+)Dexterity\: (\d+)(\s+)Constitution\: (\d+)(\s+)Intelligence\: (\d+)$} {#gag;#va scorestrength %1;#va scoredexterity %3;#va scoreconstitution %5;#va scoreintelligence %7}
#REGEX {^You are not known for acts of infamy\.$} {#gag;#va scoreinfamy {You are not known for acts of infamy.}}
#REGEX {^You stand tall as a proud citizen of (\a+)\.$} {#gag;#va scorecity %1}
#REGEX {^You are at the rank of \'(\a+)\' \((\d+)\) in your city\.$} {#gag;#va scorecityrankname %1;#va scorecityrank {(CR%2)}}
#REGEX {^You are a full member in the (\a+) class\.$} {#gag;#va scoreclass {%1}}
#REGEX {^You are (.+?) \((\d+)\) in the (.+?)\.$} {#gag;#va scorehouserank {(HR%2)};#va scorehousrankname {%1};#va scorehousename {%3}}
#REGEX {^You are a (.+?) in the Fellowship of Explorers\.$} {#gag;#va scoreexplorerrank {%1}}
#REGEX {^You are a member of the clan called \'(.+?)\.\'} {#gag;#addi scoreclanlist {%1}}
#REGEX {^You are clan head of the clan called \'(.+?)\.\'$} {#gag;#addi scoreclanlist {%1%repeat( "-", %eval( 50-%len( %1)))Head Of Clan}}
#REGEX {^You are ((\w+)|well\-intentioned)\.$} {#gag;#va scorealignment {%1}}
#REGEX {^You are able to take on proteges\.$} {#gag;#va scoreproteges {You are a mentor and able to take on proteges.}}
#REGEX {^You are (\d+) years old\, having been born on the (\w+) of (\a+)\, (\d+) years after the fall of the Seleucarian Empire\.$} {#gag;#va scoreage %1;#va scorebirthday %2;#va scorebirthmonth %3;#va scorebirthyear %4;#class scoretrig 0}
#REGEX {^(You have a soul as black as Abbadon\.|You have a soul that is truly Seraphic\.)$} {#va scorealignment {%1}}
#REGEX {^You are (.+) in the Divine Order of (.+)\.$} {#va scoreorder %2;#va scoreorderrank %1}
#REGEX {^You are ranked (\w+) in Achaea\.$} {#gag;#va scorexprank %1}
#REGEX {^You are the Minister of (.+?)\.$} {#va scorecityminister {%1}}
#REGEX {^You are (?:a |the |an |)(\a+) on the ruling council of (\a+)\.$} {#say %1 %2}
#CLASS 0

The General City Info spelling error has been fixed.


At some point, I'll be making this all one big database, so there won't be like 21834623 variables. I just have to get around to doing it though.

Also, I use Screenwitdh 0.

Not guaranteed to work with 80.
Sena
"You are in no clans", followed by a list of clans you're in?
Jonathin
Whoops, didn't really think about that.
Veldrin
QUOTE (Sena @ Aug 25 2009, 02:08 AM) *
QUOTE (Veldrin @ Aug 24 2009, 08:06 PM) *
#regex {^You are an aide to (.*)\.} {#var aideship {%1};#var aideship {%replace( @aideship, ", ", "|")};#var aideship {%replace( @aideship, " and", "")}}
should make it into a string list of each line having the Minister of blah

Why set the variable three times? Instead of the first time, just use %1. Instead of taking the commas and "and" out separately, you could just use nested %replace. The script I gave above does the same things yours does, but simplified.

I find setting it three times to be the 'simple' process (one step at a time) and its more likely to get beginners to understand what's going on tongue.gif I wouldn't call yours simplified but more compressed
Veldrin
I changed it into a single database instead of that ton of variables and added some gag variables for clan slot / friend addon and added Church to it, interesting idea this thing by the way biggrin.gif

CODE
#CLASS {Scoresort}
#ALIAS sco {
  ~score
  #class scoretrig 1
  #var scoresort ""
  }
#ALIAS showscore {
  #show {%ansi( hi, blue)+-%ansi( white) @scoresort.title %ansi( hi, blue)%repeat( "-", %eval( 75-%len( @scoresort.title)))+}
  #show {%ansi( hi, blue)| %ansi( gray)Race:~ ~ ~ @scoresort.race%repeat( " ", %eval( 19-%len( @scoresort.race)))%ansi( hi, blue)|%ansi( gray) Health:%repeat( " ", %eval( 6-%len( @scoresort.health))) @scoresort.health/@scoresort.maxhealth%repeat( " ", %eval( 6-%len( @scoresort.maxhealth)))%ansi( hi, blue)|%ansi( gray) Endurance:%repeat( " ", %eval( 6-%len( @scoresort.endurance)))@scoresort.endurance/@scoresort.maxendurance%repeat( " ", %eval( 8-%len( @scoresort.maxendurance)))%ansi( hi, blue)|}
  #show {%ansi( hi, blue)|%ansi( gray) Sex:~ ~ ~ ~ @scoresort.sex%repeat( " ", %eval( 19-%len( @scoresort.sex)))%ansi( hi, blue)|%ansi( gray) Mana:%repeat( " ", %eval( 9-%len( @scoresort.mana)))@scoresort.mana/@scoresort.maxmana%repeat( " ", %eval( 6-%len( @scoresort.maxmana)))%ansi( hi, blue)|%ansi( gray) Willpower:~ @scoresort.willpower/@scoresort.maxwillpower%repeat( " ", %eval( 8-%len( @scoresort.maxwillpower)))%ansi( hi, blue)|}
  #show {%ansi( hi, blue)+-%ansi( white) LEVEL %ansi( hi, blue)-------------------------------%ansi( hi, blue)+-%ansi( white) NEXT LEVEL %ansi( hi, blue)-------------------------+}
  #show {%ansi( hi, blue)|%ansi( gray) @scoresort.levelname %repeat( " ", %eval( 11-%len( @scoresort.levelname)))(@scoresort.level)%repeat( " ", %eval( 7-%len( @scoresort.level)))%ansi( hi, blue)|%ansi( gray) @scoresort.levelprogress~% to %eval( @scoresort.nextlevel)%repeat( " ", %eval( 28-%len( @scoresort.level)))%ansi( hi, blue)|}
  #show {%ansi( hi, blue)+-%ansi( white) RANKINGS %ansi( hi, blue)----------------------------+- %ansi( white)ATTRIBUTES%ansi( hi, blue) -------------------------+}
  #show {%ansi( hi, blue)|%ansi( gray) Experience: @scoresort.xprank %repeat( " ", %eval( 25-%len( @scoresort.xprank)))%ansi( hi, blue)|%ansi( gray) Strength:~ ~ ~ ~ ~ @scoresort.strength%repeat( " ", %eval( 6-%len( @scoresort.strength)))Dexterity:~ ~ ~ ~ @scoresort.dexterity%repeat( " ", %eval( 3-%len( @scoresort.dexterity)))%ansi( hi, blue)|}
  #show {%ansi( hi, blue)|%ansi( gray) Exploration: @scoresort.explorerrank%repeat( " ", %eval( 25-%len( @scoresort.explorerrank)))%ansi( hi, blue)|%ansi( gray) Constitution: @scoresort.constitution%repeat( " ", %eval( 6-%len( @scoresort.constitution)))Intelligence:~ @scoresort.intelligence%repeat( " ", %eval( 3-%len( @scoresort.intelligence)))%ansi( hi, blue)|}
  #show {%ansi( hi, blue)+-%ansi( white) ORGANIZATIONS%ansi( hi, blue) -----------------------+-%ansi( white) RANK%ansi( hi, blue) -------------------------------+}
  #show {%ansi( hi, blue)|%ansi( gray) City:~ ~ @scoresort.city%repeat( " ", %eval( 31-%len( @scoresort.city)))%ansi( hi, blue)|%ansi( gray) @scoresort.cityrankname%repeat( " ", %eval( 30-%len( @scoresort.cityrankname))) @scoresort.cityrank%repeat( " ", %eval( 6-%len( @scoresort.cityrank)))%ansi( hi, blue)|}
  #show {%ansi( hi, blue)|%ansi( gray) House: @scoresort.housename%repeat( " ", %eval( 31-%len( @scoresort.housename)))%ansi( hi, blue)|%ansi( gray) @scoresort.housrankname%repeat( " ", %eval( 31-%len( @scoresort.housrankname)))@scoresort.houserank%repeat( " ", %eval( 6-%len( @scoresort.houserank)))%ansi( hi, blue)|}
  #show {%ansi( hi, blue)|%ansi( gray) Order: @scoresort.order%repeat( " ", %eval( 31-%len( @scoresort.order)))%ansi( hi, blue)|%ansi( gray) @scoresort.orderrank%repeat( " ", %eval( 37-%len( @scoresort.orderrank)))%ansi( hi, blue)|}
  #if (@scoresort.church) {#show {%ansi( hi, blue)|%ansi( gray) Church:@scoresort.church%repeat( " ", %eval( 31-%len( @scoresort.church)))%ansi( hi, blue)|%ansi( gray) %repeat( " ", %eval( 37-%len( )))%ansi( hi, blue)|}}
  #if (@scoresort.city!="You are not a member of a city.") {#show %ansi( hi, blue)+- %ansi( white)CITY GENERAL INFO%ansi( hi, blue)%repeat( "-", 19)+%repeat( "-", 38)+}
  #if (@scoresort.city!="You are not a member of a city." AND @scoresort.cityminister) {#show {%ansi( hi, blue)|%ansi( gray) @scoresort.cityminister%repeat( " ", %eval( 50-%len( @scoresort.cityminister)))}}
  #if (@scoresort.city!="You are not a member of a city.") {
    #show {%ansi( hi, blue)|%ansi( gray) You are an aide to:%repeat( " ", %eval( 77-%len( You are an aide to:)))%ansi( hi, blue)|}
    #forall @scoresort.aideship {#show {%ansi( hi, blue)|%ansi( gray) %i%repeat( " ", %eval( 77-%len( %i)))%ansi( hi, blue)|}}
    }
  #show {%ansi( hi, blue)+-%ansi( white) GENERAL INFORMATION %ansi( hi, blue)--------------------------------------------------------+}
  #show {%ansi( hi, blue)|%ansi( gray) You are @scoresort.age years old.%repeat( " ", %eval( 58-%len( @scoresort.age)))%ansi( hi, blue)|}
  #show {%ansi( hi, blue)|%ansi( gray) You were born on the @scoresort.birthday of @scoresort.birthmonth, @scoresort.birthyear AF.%repeat( " ", %eval( 46-(%len( @scoresort.birthday)+%len( @scoresort.birthmonth)+%len( @scoresort.birthyear))))%ansi( hi, blue)|}
  #show {%ansi( hi, blue)|%ansi( gray) @scoresort.proteges%repeat( " ", %eval( 77-%len( @scoresort.proteges)))%ansi( hi, blue)|}
  #show {%ansi( hi, blue)|%ansi( gray) @scoresort.infamy%repeat( " ", %eval( 77-%len( @scoresort.infamy)))%ansi( hi, blue)|}
  #show {%ansi( hi, blue)|%ansi( gray) You are @scoresort.alignment%repeat( " ", %eval( 69-%len( @scoresort.alignment)))%ansi( hi, blue)|}
  #show {%ansi( hi, blue)+-%ansi( white) CLANS %ansi( hi, blue)----------------------------------------------------------------------+}
  #if (%numitems( @scoresort.clanlist)>0) {#forall @scoresort.clanlist {#show {%ansi( hi, blue)|%ansi( gray) %i%repeat( " ", %eval( 77-%len( %i)))%ansi( hi, blue)|}}} {#show {%ansi( hi, blue)|%ansi( gray) You have no clans.%ansi( hi, blue)%repeat( " ", %eval( 77-%len( You have no clans.)))%ansi( hi, blue)|}}
  #show {%ansi( hi, blue)+------------------------------------------------------------------------------+}
  }
#VAR scoresort {}
#CLASS 0
#CLASS {Scoresort|scoretrig}
#REGEX {^(.*) \((male|female) (\a+)\)$} {
  #gag
  #addkey scoresort title {%1}
  #addkey scoresort sex {%proper( %2)}
  #addkey scoresort race {%proper( %3)}
  showscore
  }
#REGEX {^You are in possession of \d+ clan slot permits\.} {#gag}
#REGEX {^You are an aide to (.+)\.$} {
  #addkey scoresort Aideship { %replace( %replace( "%1", ", ", "|"), "and ", "")}
  #gag
  }
#REGEX {^You are level (\d+) \((.+?)\) and (.+?)\% of the way to the next level\.$} {
  #gag
  #addkey scoresort level {%1}
  #addkey scoresort levelname {%2}
  #addkey scoresort levelprogress {%3}
  #addkey scoresort nextlevel {%eval( @scoresort.level+1)}
  }
#REGEX {^Health\: (\d+)\/(\d+)(\s+)Mana\: (\d+)\/(\d+)$} {
  #gag
  #addkey scoresort health %1
  #addkey scoresort maxhealth %2
  #addkey scoresort mana %4
  #addkey scoresort maxmana %5
  }
#REGEX {^Endurance\: (\d+)\/(\d+)(\s+)Willpower\: (\d+)\/(\d+)$} {
  #gag
  #addkey scoresort endurance %1
  #addkey scoresort maxendurance %2
  #addkey scoresort willpower %4
  #addkey scoresort maxwillpower %5
  }
#REGEX {^Strength\: (\d+)\s+Dexterity\: (\d+)\s+Constitution\: (\d+)\s+Intelligence\: (\d+)$} {
  #gag
  #addkey scoresort strength %1
  #addkey scoresort dexterity %2
  #addkey scoresort constitution %3
  #addkey scoresort intelligence %4
  }
#REGEX {^You are not known for acts of infamy\.$} {
  #gag
  #addkey scoresort infamy {You are not known for acts of infamy.}
  }
#REGEX {^You stand tall as a proud citizen of (\a+)\.$} {
  #gag
  #addkey scoresort city %1
  }
#REGEX {^You are at the rank of \'(\a+)\' \((\d+)\) in your city\.$} {
  #gag
  #addkey scoresort cityrankname %1
  #addkey scoresort cityrank {(CR%2)}
  }
#REGEX {^You are a full member in the (\a+) class\.$} {
  #gag
  #addkey scoresort class {%1}
  }
#REGEX {^You are (.+?) \((\d+)\) in the (.+?)\.$} {
  #gag
  #addkey scoresort houserank {(HR%2)}
  #addkey scoresort housrankname {%1}
  #addkey scoresort housename {%3}
  }
#REGEX {^You are a (.+?) in the Fellowship of Explorers\.$} {
  #gag
  #addkey scoresort explorerrank {%1}
  }
#REGEX {^You are a member of the clan called \'(.+?)\.\'} {
  #gag
  #addi scoresort.clanlist {%1}
  }
#REGEX {^You are clan head of the clan called \'(.+?)\.\'$} {
  #gag
  #addi scoresort.clanlist {%1%repeat( "-", %eval( 50-%len( %1)))Head Of Clan}
  }
#REGEX {^You are ((\w+)|well\-intentioned)\.$} {
  #gag
  #addkey scoresort alignment {%1}
  }
#REGEX {^You are able to take on proteges\.$} {
  #gag
  #addkey scoresort proteges {You are a mentor and able to take on proteges.}
  }
#REGEX {^You are (\d+) years old\, having been born on the (\w+) of (\a+)\, (\d+) years after the fall of the Seleucarian Empire\.$} {
  #gag
  #addkey scoresort age %1
  #addkey scoresort birthday %2
  #addkey scoresort birthmonth %3
  #addkey scoresort birthyear %4
  #class scoretrig 0
  }
#REGEX {^(You have a soul as black as Abbadon\.|You have a soul that is truly Seraphic\.)$} {
  #addkey scoresort alignment {%1}
  #gag
  }
#REGEX {^You are (.+) in the Divine Order of (.+)\.$} {
  #addkey scoresort order {%2}
  #addkey scoresort orderrank {%1}
  #gag
  }
#REGEX {^You are ranked (\w+) in Achaea\.$} {
  #gag
  #addkey scoresort xprank %1
  }
#REGEX {^You are the Minister of (.+?)\.$} {#addkey scoresort cityminister {%1}}
#REGEX {^You are (?:a |the |an |)(\a+) on the ruling council of (\a+)\.$} {#say %1 %2}
#REGEX {You are in possession of \d+ add\-on circle of friends\, adding five friends total to your limit\.} {#gag}
#REGEX {^You are a (.*) in the Church\.} {
  #gag
  #addkey scoresort church {%1}
  }
#CLASS 0
Jonathin
Thanks!

When you do @scoresort.age

Does it call to that particular part of the database if you have a period?
Kateb
Veldrin, do the changes you made on it make it work with screenwidth 80?

edit: imported it. Before it had a couple lines that it didn't catch, with Veldrin's changes it catches everything but the age. One other thing that I noticed(not that big of a problem), being at level 77, which is Paramortal, it doesn't want to push the blue | further away, lining up the % to next level, so it's off alignment. But like i said, it isn't that big of a problem.
Jonathin
I just fixed that. It wasn't spacing correctly at archmortal either.
And I'm glad that people actually like my idea. smile.gif

Super thanks to Sena, Veldrin and Gorly for the help.
Here it is with Veldrin's database, with the spacing fix.
CODE
#CLASS {Scoresort}
#ALIAS sco {~score;#class scoretrig 1;#var scoresort ""}
#ALIAS showscore {#show {%ansi( hi, blue)+-%ansi( white) @scoresort.title %ansi( hi, blue)%repeat( "-", %eval( 75-%len( @scoresort.title)))+};#show {%ansi( hi, blue)| %ansi( gray)Race:~ ~ ~ @scoresort.race%repeat( " ", %eval( 19-%len( @scoresort.race)))%ansi( hi, blue)|%ansi( gray) Health:%repeat( " ", %eval( 6-%len( @scoresort.health))) @scoresort.health/@scoresort.maxhealth%repeat( " ", %eval( 6-%len( @scoresort.maxhealth)))%ansi( hi, blue)|%ansi( gray) Endurance:%repeat( " ", %eval( 6-%len( @scoresort.endurance)))@scoresort.endurance/@scoresort.maxendurance%repeat( " ", %eval( 8-%len( @scoresort.maxendurance)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) Sex:~ ~ ~ ~ @scoresort.sex%repeat( " ", %eval( 19-%len( @scoresort.sex)))%ansi( hi, blue)|%ansi( gray) Mana:%repeat( " ", %eval( 9-%len( @scoresort.mana)))@scoresort.mana/@scoresort.maxmana%repeat( " ", %eval( 6-%len( @scoresort.maxmana)))%ansi( hi, blue)|%ansi( gray) Willpower:~ @scoresort.willpower/@scoresort.maxwillpower%repeat( " ", %eval( 8-%len( @scoresort.maxwillpower)))%ansi( hi, blue)|};#show {%ansi( hi, blue)+-%ansi( white) LEVEL %ansi( hi, blue)-------------------------------%ansi( hi, blue)+-%ansi( white) NEXT LEVEL %ansi( hi, blue)-------------------------+};#show {%ansi( hi, blue)|%ansi( gray) @scoresort.levelname %repeat( " ", %eval( 28-%len( @scoresort.levelname)))(@scoresort.level)%repeat( " ", %eval( 7-%len( @scoresort.level)))%ansi( hi, blue)|%ansi( gray) @scoresort.levelprogress~% to %eval( @scoresort.nextlevel)%repeat( " ", %eval( 30-%len( @scoresort.level)))%ansi( hi, blue)|};#show {%ansi( hi, blue)+-%ansi( white) RANKINGS %ansi( hi, blue)----------------------------+- %ansi( white)ATTRIBUTES%ansi( hi, blue) -------------------------+};#show {%ansi( hi, blue)|%ansi( gray) Experience: @scoresort.xprank %repeat( " ", %eval( 25-%len( @scoresort.xprank)))%ansi( hi, blue)|%ansi( gray) Strength:~ ~ ~ ~ ~ @scoresort.strength%repeat( " ", %eval( 6-%len( @scoresort.strength)))Dexterity:~ ~ ~ ~ @scoresort.dexterity%repeat( " ", %eval( 3-%len( @scoresort.dexterity)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) Exploration: @scoresort.explorerrank%repeat( " ", %eval( 25-%len( @scoresort.explorerrank)))%ansi( hi, blue)|%ansi( gray) Constitution: @scoresort.constitution%repeat( " ", %eval( 6-%len( @scoresort.constitution)))Intelligence:~ @scoresort.intelligence%repeat( " ", %eval( 3-%len( @scoresort.intelligence)))%ansi( hi, blue)|};#show {%ansi( hi, blue)+-%ansi( white) ORGANIZATIONS%ansi( hi, blue) -----------------------+-%ansi( white) RANK%ansi( hi, blue) -------------------------------+};#show {%ansi( hi, blue)|%ansi( gray) City:~ ~ @scoresort.city%repeat( " ", %eval( 31-%len( @scoresort.city)))%ansi( hi, blue)|%ansi( gray) @scoresort.cityrankname%repeat( " ", %eval( 30-%len( @scoresort.cityrankname))) @scoresort.cityrank%repeat( " ", %eval( 6-%len( @scoresort.cityrank)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) House: @scoresort.housename%repeat( " ", %eval( 31-%len( @scoresort.housename)))%ansi( hi, blue)|%ansi( gray) @scoresort.housrankname%repeat( " ", %eval( 31-%len( @scoresort.housrankname)))@scoresort.houserank%repeat( " ", %eval( 6-%len( @scoresort.houserank)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) Order: @scoresort.order%repeat( " ", %eval( 31-%len( @scoresort.order)))%ansi( hi, blue)|%ansi( gray) @scoresort.orderrank%repeat( " ", %eval( 37-%len( @scoresort.orderrank)))%ansi( hi, blue)|};#if (@scoresort.church) {#show {%ansi( hi, blue)|%ansi( gray) Church:@scoresort.church%repeat( " ", %eval( 31-%len( @scoresort.church)))%ansi( hi, blue)|%ansi( gray) %repeat( " ", %eval( 37-%len( )))%ansi( hi, blue)|}};#if (@scoresort.city!="You are not a member of a city.") {#show %ansi( hi, blue)+- %ansi( white)CITY GENERAL INFO %ansi( hi, blue)%repeat( "-", 19)+%repeat( "-", 38)+};#if (@scoresort.city!="You are not a member of a city." AND @scoresort.cityminister) {#show {%ansi( hi, blue)|%ansi( gray) @scoresort.cityminister%repeat( " ", %eval( 50-%len( @scoresort.cityminister)))}};#if (@scoresort.city!="You are not a member of a city.") {#show {%ansi( hi, blue)|%ansi( gray) You are an aide to:%repeat( " ", %eval( 77-%len( You are an aide to:)))%ansi( hi, blue)|};#forall @scoresort.aideship {#show {%ansi( hi, blue)|%ansi( gray) %i%repeat( " ", %eval( 77-%len( %i)))%ansi( hi, blue)|}}};#show {%ansi( hi, blue)+-%ansi( white) GENERAL INFORMATION %ansi( hi, blue)--------------------------------------------------------+};#show {%ansi( hi, blue)|%ansi( gray) You are @scoresort.age years old.%repeat( " ", %eval( 58-%len( @scoresort.age)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) You were born on the @scoresort.birthday of @scoresort.birthmonth, @scoresort.birthyear AF.%repeat( " ", %eval( 46-(%len( @scoresort.birthday)+%len( @scoresort.birthmonth)+%len( @scoresort.birthyear))))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) @scoresort.proteges%repeat( " ", %eval( 77-%len( @scoresort.proteges)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) @scoresort.infamy%repeat( " ", %eval( 77-%len( @scoresort.infamy)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) You are @scoresort.alignment%repeat( " ", %eval( 69-%len( @scoresort.alignment)))%ansi( hi, blue)|};#show {%ansi( hi, blue)+-%ansi( white) CLANS %ansi( hi, blue)----------------------------------------------------------------------+};#if (%numitems( @scoresort.clanlist)>0) {#forall @scoresort.clanlist {#show {%ansi( hi, blue)|%ansi( gray) %i%repeat( " ", %eval( 77-%len( %i)))%ansi( hi, blue)|}}} {#show {%ansi( hi, blue)|%ansi( gray) You have no clans.%ansi( hi, blue)%repeat( " ", %eval( 77-%len( You have no clans.)))%ansi( hi, blue)|}};#show {%ansi( hi, blue)+------------------------------------------------------------------------------+}}
#VAR scoresort {}
#CLASS 0
#CLASS {Scoresort|scoretrig}
#REGEX {^(.*) \((male|female) (\a+)\)$} {#gag;#addkey scoresort title {%1};#addkey scoresort sex {%proper( %2)};#addkey scoresort race {%proper( %3)};showscore}
#REGEX {^You are in possession of \d+ clan slot permits\.} {#gag}
#REGEX {^You are an aide to (.+)\.$} {#addkey scoresort Aideship { %replace( %replace( "%1", ", ", "|"), "and ", "")};#gag}
#REGEX {^You are level (\d+) \((.+?)\) and (.+?)\% of the way to the next level\.$} {#gag;#addkey scoresort level {%1};#addkey scoresort levelname {%2};#addkey scoresort levelprogress {%3};#addkey scoresort nextlevel {%eval( @scoresort.level+1)}}
#REGEX {^Health\: (\d+)\/(\d+)(\s+)Mana\: (\d+)\/(\d+)$} {#gag;#addkey scoresort health %1;#addkey scoresort maxhealth %2;#addkey scoresort mana %4;#addkey scoresort maxmana %5}
#REGEX {^Endurance\: (\d+)\/(\d+)(\s+)Willpower\: (\d+)\/(\d+)$} {#gag;#addkey scoresort endurance %1;#addkey scoresort maxendurance %2;#addkey scoresort willpower %4;#addkey scoresort maxwillpower %5}
#REGEX {^Strength\: (\d+)\s+Dexterity\: (\d+)\s+Constitution\: (\d+)\s+Intelligence\: (\d+)$} {#gag;#addkey scoresort strength %1;#addkey scoresort dexterity %2;#addkey scoresort constitution %3;#addkey scoresort intelligence %4}
#REGEX {^You are not known for acts of infamy\.$} {#gag;#addkey scoresort infamy {You are not known for acts of infamy.}}
#REGEX {^You stand tall as a proud citizen of (\a+)\.$} {#gag;#addkey scoresort city %1}
#REGEX {^You are at the rank of \'(\a+)\' \((\d+)\) in your city\.$} {#gag;#addkey scoresort cityrankname %1;#addkey scoresort cityrank {(CR%2)}}
#REGEX {^You are a full member in the (\a+) class\.$} {#gag;#addkey scoresort class {%1}}
#REGEX {^You are (.+?) \((\d+)\) in the (.+?)\.$} {#gag;#addkey scoresort houserank {(HR%2)};#addkey scoresort housrankname {%1};#addkey scoresort housename {%3}}
#REGEX {^You are a (.+?) in the Fellowship of Explorers\.$} {#gag;#addkey scoresort explorerrank {%1}}
#REGEX {^You are a member of the clan called \'(.+?)\.\'} {#gag;#addi scoresort.clanlist {%1}}
#REGEX {^You are clan head of the clan called \'(.+?)\.\'$} {#gag;#addi scoresort.clanlist {%1%repeat( "-", %eval( 50-%len( %1)))Head Of Clan}}
#REGEX {^You are ((\w+)|well\-intentioned)\.$} {#gag;#addkey scoresort alignment {%1}}
#REGEX {^You are able to take on proteges\.$} {#gag;#addkey scoresort proteges {You are a mentor and able to take on proteges.}}
#REGEX {^You are (\d+) years old\, having been born on the (\w+) of (\a+)\, (\d+) years after the fall of the Seleucarian Empire\.$} {#gag;#addkey scoresort age %1;#addkey scoresort birthday %2;#addkey scoresort birthmonth %3;#addkey scoresort birthyear %4;#class scoretrig 0}
#REGEX {^(You have a soul as black as Abbadon\.|You have a soul that is truly Seraphic\.)$} {#addkey scoresort alignment {%1};#gag}
#REGEX {^You are (.+) in the Divine Order of (.+)\.$} {#addkey scoresort order {%2};#addkey scoresort orderrank {%1};#gag}
#REGEX {^You are ranked (\w+) in Achaea\.$} {#gag;#addkey scoresort xprank %1}
#REGEX {^You are the Minister of (.+?)\.$} {#addkey scoresort cityminister {%1}}
#REGEX {^You are (?:a |the |an |)(\a+) on the ruling council of (\a+)\.$} {#say %1 %2}
#REGEX {You are in possession of \d+ add\-on circle of friends\, adding five friends total to your limit\.} {#gag}
#REGEX {^You are a (.*) in the Church\.} {#gag;#addkey scoresort church {%1}}
#CLASS 0
Veldrin
QUOTE (Jonathin @ Sep 1 2009, 03:26 AM) *
Thanks!

When you do @scoresort.age

Does it call to that particular part of the database if you have a period?

yeah @scoresort calls the database while .age calls the specific value of the age key
Jonathin
Neat! I didn't know that.
Jonathin
I think this should fix the screenwidth 80 problem. I tested it a few times on my own.


#CLASS {Scoresort}
#ALIAS sc {~score;#class scoretrig 1;#var scoresort ""}
#ALIAS showscore {#show {%ansi( hi, blue)+-%ansi( white) @scoresort.title %ansi( hi, blue)%repeat( "-", %eval( 75-%len( @scoresort.title)))+};#show {%ansi( hi, blue)| %ansi( gray)Race:~ ~ ~ @scoresort.race%repeat( " ", %eval( 19-%len( @scoresort.race)))%ansi( hi, blue)|%ansi( gray) Health:%repeat( " ", %eval( 6-%len( @scoresort.health))) @scoresort.health/@scoresort.maxhealth%repeat( " ", %eval( 6-%len( @scoresort.maxhealth)))%ansi( hi, blue)|%ansi( gray) Endurance:%repeat( " ", %eval( 6-%len( @scoresort.endurance)))@scoresort.endurance/@scoresort.maxendurance%repeat( " ", %eval( 8-%len( @scoresort.maxendurance)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) Sex:~ ~ ~ ~ @scoresort.sex%repeat( " ", %eval( 19-%len( @scoresort.sex)))%ansi( hi, blue)|%ansi( gray) Mana:%repeat( " ", %eval( 9-%len( @scoresort.mana)))@scoresort.mana/@scoresort.maxmana%repeat( " ", %eval( 6-%len( @scoresort.maxmana)))%ansi( hi, blue)|%ansi( gray) Willpower:~ @scoresort.willpower/@scoresort.maxwillpower%repeat( " ", %eval( 8-%len( @scoresort.maxwillpower)))%ansi( hi, blue)|};#show {%ansi( hi, blue)+-%ansi( white) LEVEL %ansi( hi, blue)-------------------------------%ansi( hi, blue)+-%ansi( white) NEXT LEVEL %ansi( hi, blue)-------------------------+};#show {%ansi( hi, blue)|%ansi( gray) @scoresort.levelname %repeat( " ", %eval( 32-%len( @scoresort.levelname)))(@scoresort.level)%repeat( " ", %eval( 3-%len( @scoresort.level)))%ansi( hi, blue)|%repeat( " ", %eval( 13-%len( @scoresort.level-" to "-@scoresort.nextlevel)))%ansi( gray) @scoresort.levelprogress~% to %eval( @scoresort.nextlevel)%repeat( " ", %eval( 37-%len( @scoresort.level-" to "-@scoresort.nextlevel)))%ansi( hi, blue)|};#show {%ansi( hi, blue)+-%ansi( white) RANKINGS %ansi( hi, blue)----------------------------+- %ansi( white)ATTRIBUTES%ansi( hi, blue) -------------------------+};#show {%ansi( hi, blue)|%ansi( gray) Experience: @scoresort.xprank %repeat( " ", %eval( 25-%len( @scoresort.xprank)))%ansi( hi, blue)|%ansi( gray) Strength:~ ~ ~ ~ ~ @scoresort.strength%repeat( " ", %eval( 6-%len( @scoresort.strength)))Dexterity:~ ~ ~ ~ @scoresort.dexterity%repeat( " ", %eval( 3-%len( @scoresort.dexterity)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) Exploration: @scoresort.explorerrank%repeat( " ", %eval( 25-%len( @scoresort.explorerrank)))%ansi( hi, blue)|%ansi( gray) Constitution: @scoresort.constitution%repeat( " ", %eval( 6-%len( @scoresort.constitution)))Intelligence:~ @scoresort.intelligence%repeat( " ", %eval( 3-%len( @scoresort.intelligence)))%ansi( hi, blue)|};#show {%ansi( hi, blue)+-%ansi( white) ORGANIZATIONS%ansi( hi, blue) -----------------------+-%ansi( white) RANK%ansi( hi, blue) -------------------------------+};#show {%ansi( hi, blue)|%ansi( gray) City:~ ~ @scoresort.city%repeat( " ", %eval( 31-%len( @scoresort.city)))%ansi( hi, blue)|%ansi( gray) @scoresort.cityrankname%repeat( " ", %eval( 30-%len( @scoresort.cityrankname))) @scoresort.cityrank%repeat( " ", %eval( 6-%len( @scoresort.cityrank)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) House: @scoresort.housename%repeat( " ", %eval( 31-%len( @scoresort.housename)))%ansi( hi, blue)|%ansi( gray) @scoresort.housrankname%repeat( " ", %eval( 31-%len( @scoresort.housrankname)))@scoresort.houserank%repeat( " ", %eval( 6-%len( @scoresort.houserank)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) Order: @scoresort.order%repeat( " ", %eval( 31-%len( @scoresort.order)))%ansi( hi, blue)|%ansi( gray) @scoresort.orderrank%repeat( " ", %eval( 37-%len( @scoresort.orderrank)))%ansi( hi, blue)|};#if (@scoresort.church) {#show {%ansi( hi, blue)|%ansi( gray) Church:@scoresort.church%repeat( " ", %eval( 31-%len( @scoresort.church)))%ansi( hi, blue)|%ansi( gray) %repeat( " ", %eval( 37-%len( )))%ansi( hi, blue)|}};#if (@scoresort.city!="You are not a member of a city.") {#show %ansi( hi, blue)+- %ansi( white)CITY GENERAL INFO %ansi( hi, blue)%repeat( "-", 19)+%repeat( "-", 38)+};#if (@scoresort.city!="You are not a member of a city." AND @scoresort.cityminister) {#show {%ansi( hi, blue)|%ansi( gray) @scoresort.cityminister%repeat( " ", %eval( 50-%len( @scoresort.cityminister)))}};#if (@scoresort.city!="You are not a member of a city.") {#show {%ansi( hi, blue)|%ansi( gray) You are an aide to:%repeat( " ", %eval( 77-%len( You are an aide to:)))%ansi( hi, blue)|};#forall @scoresort.aideship {#show {%ansi( hi, blue)|%ansi( gray) %i%repeat( " ", %eval( 77-%len( %i)))%ansi( hi, blue)|}}};#show {%ansi( hi, blue)+-%ansi( white) GENERAL INFORMATION %ansi( hi, blue)--------------------------------------------------------+};#show {%ansi( hi, blue)|%ansi( gray) You are @scoresort.age years old.%repeat( " ", %eval( 58-%len( @scoresort.age)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) You were born on the @scoresort.birthday of @scoresort.birthmonth, @scoresort.birthyear AF.%repeat( " ", %eval( 46-(%len( @scoresort.birthday)+%len( @scoresort.birthmonth)+%len( @scoresort.birthyear))))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) @scoresort.proteges%repeat( " ", %eval( 77-%len( @scoresort.proteges)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) @scoresort.infamy%repeat( " ", %eval( 77-%len( @scoresort.infamy)))%ansi( hi, blue)|};#show {%ansi( hi, blue)|%ansi( gray) You are @scoresort.alignment%repeat( " ", %eval( 69-%len( @scoresort.alignment)))%ansi( hi, blue)|};#show {%ansi( hi, blue)+-%ansi( white) CLANS %ansi( hi, blue)----------------------------------------------------------------------+};#if (%numitems( @scoresort.clanlist)>0) {#forall @scoresort.clanlist {#show {%ansi( hi, blue)|%ansi( gray) %i%repeat( " ", %eval( 77-%len( %i)))%ansi( hi, blue)|}}} {#show {%ansi( hi, blue)|%ansi( gray) You have no clans.%ansi( hi, blue)%repeat( " ", %eval( 77-%len( You have no clans.)))%ansi( hi, blue)|}};#show {%ansi( hi, blue)+------------------------------------------------------------------------------+}}
#VAR scoresort {}
#CLASS 0
#CLASS {Scoresort|scoretrig}
#REGEX {^(.*) \((male|female) (\a+)\)$} {#gag;#addkey scoresort title {%1};#addkey scoresort sex {%proper( %2)};#addkey scoresort race {%proper( %3)};showscore}
#REGEX {^You are in possession of \d+ clan slot permits\.} {#gag}
#REGEX {^You are an aide to (.+)\.$} {#addkey scoresort Aideship { %replace( %replace( "%1", ", ", "|"), "and ", "")};#gag}
#REGEX {^You are level (\d+) \((.+?)\) and (.+?)\% of the way to the next level\.$} {#gag;#addkey scoresort level {%1};#addkey scoresort levelname {%2};#addkey scoresort levelprogress {%3};#addkey scoresort nextlevel {%eval( @scoresort.level+1)}}
#REGEX {^Health\: (\d+)\/(\d+)(\s+)Mana\: (\d+)\/(\d+)$} {#gag;#addkey scoresort health %1;#addkey scoresort maxhealth %2;#addkey scoresort mana %4;#addkey scoresort maxmana %5}
#REGEX {^Endurance\: (\d+)\/(\d+)(\s+)Willpower\: (\d+)\/(\d+)$} {#gag;#addkey scoresort endurance %1;#addkey scoresort maxendurance %2;#addkey scoresort willpower %4;#addkey scoresort maxwillpower %5}
#REGEX {^Strength\: (\d+)\s+Dexterity\: (\d+)\s+Constitution\: (\d+)\s+Intelligence\: (\d+)$} {#gag;#addkey scoresort strength %1;#addkey scoresort dexterity %2;#addkey scoresort constitution %3;#addkey scoresort intelligence %4}
#REGEX {^You are not known for acts of infamy\.$} {#gag;#addkey scoresort infamy {You are not known for acts of infamy.}}
#REGEX {^You stand tall as a proud citizen of (\a+)\.$} {#gag;#addkey scoresort city %1}
#REGEX {^You are at the rank of \'(\a+)\' \((\d+)\) in your city\.$} {#gag;#addkey scoresort cityrankname %1;#addkey scoresort cityrank {(CR%2)}}
#REGEX {^You are a full member in the (\a+) class\.$} {#gag;#addkey scoresort class {%1}}
#REGEX {^You are (.+?) \((\d+)\) in the (.+?)\.$} {#gag;#addkey scoresort houserank {(HR%2)};#addkey scoresort housrankname {%1};#addkey scoresort housename {%3}}
#REGEX {^You are a (.+?) in the Fellowship of Explorers\.$} {#gag;#addkey scoresort explorerrank {%1}}
#REGEX {^You are a member of the clan called \'(.+?)\.\'} {#gag;#addi scoresort.clanlist {%1}}
#REGEX {^You are clan head of the clan called \'(.+?)\.\'$} {#gag;#addi scoresort.clanlist {%1%repeat( "-", %eval( 50-%len( %1)))Head Of Clan}}
#REGEX {^You are ((\w+)|well\-intentioned)\.$} {#gag;#addkey scoresort alignment {%1}}
#REGEX {^You are able to take on proteges\.$} {#gag;#addkey scoresort proteges {You are a mentor and able to take on proteges.}}
#REGEX {^You are (\d+) years old\, having been born on the (\w+) of (\a+)\, (\d+)} {#gag;#addkey scoresort age %1;#addkey scoresort birthday %2;#addkey scoresort birthmonth %3;#addkey scoresort birthyear %4;#class scoretrig 0}
#REGEX {^(You have a soul as black as Abbadon\.|You have a soul that is truly Seraphic\.)$} {#addkey scoresort alignment {%1};#gag}
#REGEX {^You are (.+) in the Divine Order of (.+)\.$} {#addkey scoresort order {%2};#addkey scoresort orderrank {%1};#gag}
#REGEX {^You are ranked (\w+) in Achaea\.$} {#gag;#addkey scoresort xprank %1}
#REGEX {^You are the Minister of (.+?)\.$} {#addkey scoresort cityminister {%1}}
#REGEX {^You are (?:a |the |an |)(\a+) on the ruling council of (\a+)\.$} {#say %1 %2}
#REGEX {You are in possession of \d+ add\-on circle of friends\, adding five friends total to your limit\.} {#gag}
#REGEX {^You are a (.*) in the Church\.} {#gag;#addkey scoresort church {%1}}
#CLASS 0


Am I the only one seeing a messed up codebox?
Wtf is going on?

Deleted codebox because it was screwy.
Jonathin
I just realized that a stat sorter would be harder than score because of the number of enemies you could have. I can do it for screenwidth 0, but anything other than that would be quite difficult.
Sena
^You are (essentially naked, with goose bumps nearly all the time|scantily clad and could catch a chill in cold weather|a bit under-dressed and feeling drafty), and you are (starving to death|weak from hunger|feeling a bit peckish|not hungry|reasonably full|utterly satiated)\.$

^You are (badly in need of sleep|feeling quite tired|feeling fairly tired|slightly tired|in no need of sleep|fully rested)\.$

I know I'm missing some clothing warmth lines, but I wore every piece of clothing I had or could borrow from friends and that was as high as I could get it. I was too lazy to go shopping for clothes just to match a line I'd likely never see.
Sena
QUOTE (Jonathin @ Sep 2 2009, 07:06 AM) *
Am I the only one seeing a messed up codebox?
Wtf is going on?

Deleted codebox because it was screwy.

Use code instead of codebox. Codebox is always the same size, no matter how much or how little is in it.
CODE
Code

CODE
Codebox

CODE
Codebox
Codebox
Codebox
Codebox
Codebox
Codebox
Codebox
Codebox
Codebox
Codebox
Codebox
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.