/if (!isvar('rc_last_percent')) /set rc_last_percent=0 %; /endif /if (!isvar('rc_last_rank')) /set rc_last_rank=0 %; /endif /if (!isvar('rc_aslain')) /set rc_aslain=0 %; /endif /if (!isvar('rc_alevels')) /set rc_alevels=0 %; /endif /if (!isvar('rc_slain')) /set rc_slain=0 %; /endif /if (!isvar('rc_levels')) /set rc_levels=0 %; /endif /def -F -mregexp -t'^You are level (\d+) \((.*)\) and ([\d.]+)% of the way to the next level.$' rc_level = \ /let tmp= %; \ /test tmp := {P3} - rc_last_percent %; \ /if (tmp >= 0) /test tmp := strcat("+", tmp) %; /endif %; \ /substitute -p You are level %{P1} (%{P2}) and %{P3}%% [%{tmp}%%] of the way to the next level. %; \ /test rc_last_percent := {P3} %; \ /def -F -mregexp -t'^You are ranked (\d+)(st|nd|rd|th) in Achaea.$' rc_rank = \ /let tmp= %; \ /test tmp := {P1} - rc_last_rank %; \ /if (tmp >= 0) /test tmp := strcat("+", tmp) %; /endif %; \ /substitute -p You are ranked %{P1}%{P2} [%{tmp}] in Achaea. %; \ /test rc_last_rank := {P1} %; \ /def -F -mregexp -t'^Adventurer Kills$' rc_advent = \ /set v_rc_type=advent %; \ /def -F -mregexp -t'^Denizen Kills$' rc_denizen = \ /set v_rc_type=denizen %; \ /repeat -3 1 /unset v_rc_type /def -F -mregexp -t'^Number Slain : (\d+)\s+Total Levels : (\d+)(.*)' rc_stats = \ /if (v_rc_type =~ "advent") \ /let tmp= %; \ /test tmp := {P2} - rc_alevels %; \ /if (tmp >= 0) /test tmp := strcat("+", tmp) %; /endif %; \ /let tmp2= %; \ /test tmp2 := {P1} - rc_aslain %; \ /if (tmp2 >= 0) /test tmp2 := strcat("+", tmp2) %; /endif %; \ /substitute -p Number Slain : %{P1} [%{tmp2}] Total Levels : %{P2} [%{tmp}] %{P3} %; \ /test rc_alevels := {P2} %; \ /test rc_aslain := {P1} %; \ /else \ /let tmp= %; \ /test tmp := {P2} - rc_levels %; \ /if (tmp >= 0) /test tmp := strcat("+", tmp) %; /endif %; \ /let tmp2= %; \ /test tmp2 := {P1} - rc_slain %; \ /if (tmp2 >= 0) /test tmp2 := strcat("+", tmp2) %; /endif %; \ /substitute -p Number Slain : %{P1} [%{tmp2}] Total Levels : %{P2} [%{tmp}] %{P3} %; \ /test rc_levels := {P2} %; \ /test rc_slain := {P1} %; \ /endif %; \