Advertisement
Anaristos

Untitled

Jan 17th, 2013
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 9.02 KB | None | 0 0
  1. <class name="ClanPointsCalc" id="1">
  2.   <alias name="luaDisplay" id="2">
  3.     <value><![CDATA[-- ANSI Display Codes
  4. --
  5. cb   = "&#27;[38;5;33m"
  6. cb2  = "&#27;[1;34m"
  7. cbb  = "&#27;[5m&#27;[38;5;47m"
  8. cbnr = "&#27;[38;5;47m"
  9. cbr  = "&#27;[5m&#27;[38;5;47m"
  10. cc   = "&#27;[1;36m"
  11. cc2  = "&#27;[0;36m"
  12. cd   = "&#27;[1;30m"
  13. cfb  = "&#27;[0;30m"
  14. cg   = "&#27;[38;5;47m"
  15. cg2  = "&#27;[1;32m"
  16. cgr  = "&#27;[1;90m"
  17. clw  = "&#27;[0;37m"
  18. cm   = "&#27;[1;35m"
  19. cr   = "&#27;[5;1;31m"
  20. cr2  = "&#27;[1;31m"
  21. csi  = "&#27;["
  22. cw   = "&#27;[1;97m"
  23. cy   = "&#27;[1;33m"
  24. cyb  = "&#27;[5;1;33m"
  25. eof  = "&#27;[2J"
  26. eol  = "&#27;[2K"
  27. esc  = "&#27;"
  28. oc   = "&#27;[38;5;214m"
  29. rc   = "&#27;[0m"]]></value>
  30.   <var name="ClanPoints" type="Record" id="5">
  31.     <value>TotalPoints=1795|WarPoints=14|WarKillPoints=36|GoalPoints=59|TierPoints=250|CPPoints=522|RoomPoints=147|QPPoints=400|GQPoints=101|PupPoints=70|GoldPoints=6|CurrentRank=Arbiter|RemortPoints=190</value>
  32.     <json>{"TotalPoints":1795,"WarPoints":14,"WarKillPoints":36,"GoalPoints":59,"TierPoints":250,"CPPoints":522,"RoomPoints":147,"QPPoints":400,"GQPoints":101,"PupPoints":70,"GoldPoints":6,"CurrentRank":"Arbiter","RemortPoints":190}</json>
  33.   </var>
  34.   <var name="RankMeCharacter" type="String" id="6">Anaristos</var>
  35.   <trigger name="MyRank18" priority="16010" regex="true" enabled="false" id="7">
  36.     <pattern>(?:\s+)?\d+\) (\w+)\s+\w+\s+(\d+)\s+(\d+)\s+\d+\s+\d+\s+(\d+)\s+(\d+)</pattern>
  37.     <value>#IF (%upper( %1)=%upper( @RankMeCharacter)) {
  38.   ClanPoints.RemortPoints = (%2 / 201) * 5
  39.   ClanPoints.TierPoints   = ((%2 - 1) / 1407) * 50
  40.   ClanPoints.QPPoints     = (%3 / 50000) * 40
  41.   ClanPoints.GQPoints     = %4
  42.   ClanPoints.CPPoints     = %5 / 5
  43.   #T- MyRank18
  44.   #T+ MyWarInfo
  45.   warinfo @RankMeCharacter
  46.   }</value>
  47.   </trigger>
  48.   <trigger name="GoalsDone" priority="16020" regex="true" enabled="false" id="8">
  49.     <pattern>\| Luck.{43}Goals done\s+:\s+\[\s+(\d+)\s+\]\s+\|</pattern>
  50.     <value>ClanPoints.GoalPoints = %1
  51. ;;
  52. #T- GoalsDone
  53. ;;
  54. #T+ Roster7
  55. ;;
  56. roster 7</value>
  57.   </trigger>
  58.   <trigger name="MyRank15" priority="16030" regex="true" enabled="false" id="9">
  59.     <pattern>(?:\s+)?\d+\) (\w+)\s+\w+\s+\d+\s+(\d+)\s+[0-9.]+</pattern>
  60.     <value>#IF (%upper( %1)=%upper( @RankMeCharacter)) {
  61.   ClanPoints.RoomPoints = %2 / 200
  62.   #T- MyRank15
  63.   #T+ MyRank16
  64.   myrank @RankMeCharacter 16
  65.   }</value>
  66.   </trigger>
  67.   <trigger name="MyRank16" priority="16040" regex="true" enabled="false" id="10">
  68.     <pattern>^\s*\d+\)\s*(\w+)\s*\w+\s*\d+\s*\d+\s*\d+\s*\d+\s*(\d+)\s*\d+$</pattern>
  69.     <value>#IF (%upper( %1)=%upper( @RankMeCharacter)) {
  70.   ClanPoints.PupPoints = (%2 / 1000) * 35
  71.   #T- MyRank16
  72.   #T+ Myrank18
  73.   myrank @RankMeCharacter 18
  74.   }</value>
  75.   </trigger>
  76.   <trigger name="MyWarInfo" priority="16050" regex="true" enabled="false" id="11">
  77.     <pattern>Total Wars(?:\s+)?:\s+\[(?:\s+)?\d+\]\s+Won: \[(?:\s+)?(\d+)\]\s+Lost:\s+\[(?:\s+)?\d+\]\s+Kills:\s+\[(?:\s+)?(\d+)\]</pattern>
  78.     <value>ClanPoints.WarPoints     = %1
  79. ClanPoints.WarKillPoints = %2
  80. ;;
  81. #T- MyWarInfo
  82. #T+ GoalsDone
  83. ;;
  84. score</value>
  85.   </trigger>
  86.   <trigger name="Roster7" priority="16060" regex="true" enabled="false" id="12">
  87.     <pattern>(?:\s+)?\d+\s+(\w+)\s+.{18}\s+\d+\s+([0-9,]+)\s+[0-9,]+\s+[0-9,]+</pattern>
  88.     <value>#IF (%upper( %1)=%upper( @RankMeCharacter)) {
  89.   ClanPoints.GoldPoints = %subchar( %2, ",") / 10000000
  90.   #WAIT 2000
  91.   #T- Roster7
  92.   showrank
  93.   }
  94. </value>
  95.   </trigger>
  96.   <alias name="getnewrankold" id="13">
  97.     <value><![CDATA[                            %if( %1<300, "Convert", %if( %1>299 AND %1<600, "Penitent", %if( %1>599 AND %1<800, "Vindicator", %if( %1>799 AND %1<1000, "Redeemer", %if( %1>999 AND %1<1400, "Arbiter", %if( %1>1399, "Awakener"))))))]]></value>
  98.   </alias>
  99.   <func name="getnewrank" id="14">
  100.     <value>#LOCAL $index
  101. ;;
  102. $ranks = Convert|Penient|Vindicator|Redeemer|Arbiter|Awakener
  103. $total = 300|600|800|1000|1400
  104. $index = 1
  105. ;;
  106. #FORALL $total {#IF (%1 &lt; %i) {#BREAK} {$index = $index + 1}}
  107. ;;
  108. #RETURN $ranks.$index</value>
  109.   </func>
  110.   <var name="Donations" id="16"> pts</var>
  111.   <var name="Explored" id="17"> pts</var>
  112.   <var name="Goals" id="18"> pts</var>
  113.   <var name="Gqs" id="19"> pts</var>
  114.   <var name="Pups" id="20"> pts</var>
  115.   <var name="Qpts" id="21"> pts</var>
  116.   <var name="Remorts" id="22">190 pts</var>
  117.   <var name="Tiers" id="23">250 pts</var>
  118.   <func name="getnewrankn" id="24"/>
  119.   <alias name="showrankn" id="25">
  120.     <value><![CDATA[ClanPoints.TotalPoints = 0
  121. ;;
  122. $keys = %dbkeys( @ClanPoints)
  123. ;;
  124. $keys = %delitem( "TotalPoints", $keys)
  125. $keys = %delitem( "Rank", $keys)
  126. $keys = %delitem( "CurrentRank", $keys)
  127. ;;
  128. #FORALL $keys {ClanPoints.TotalPoints = @ClanPoints.TotalPoints + @ClanPoints.%i}
  129. ;;
  130. $f1 = "&-9s"
  131. $f2 = "&4d"
  132. ;;
  133. #ECHO %cr
  134. ;;
  135. #ECHO <color yellow>Clan Rank Points for </color><color white>@RankMeCharacter</color><color white>:</color>
  136. ;;
  137. #ECHO %cr
  138. ;;
  139. #ECHO <color yeallow>%repeat( "-", 20)</color>
  140. ;;
  141. #ECHO <color yellow>%format( $f1, "Remorts   = ")</color><color white>%format( $f2, @ClanPoints.RemortPoints)</color><color yellow> pts</color>
  142. #ECHO <color yellow>%format( $f1, "Tiers     = ")</color><color white>%format( $f2, @ClanPoints.TierPoints)</color><color yellow> pts</color>
  143. #ECHO <color yellow>%format( $f1, "Pups      = ")</color><color white>%format( $f2, @ClanPoints.PupPoints)</color><color yellow> pts</color>
  144. #ECHO <color yellow>%format( $f1, "Qpts      = ")</color><color white>%format( $f2, @ClanPoints.QPPoints)</color><color yellow> pts</color>
  145. #ECHO <color yellow>%format( $f1, "Gqs       = ")</color><color white>%format( $f2, @ClanPoints.GQPoints)</color><color yellow> pts</color>
  146. #ECHO <color yellow>%format( $f1, "Cps       = ")</color><color white>%format( $f2, @ClanPoints.CPPoints)</color><color yellow> pts</color>
  147. #ECHO <color yellow>%format( $f1, "War Wins  = ")</color><color white>%format( $f2, @ClanPoints.WarPoints)</color><color yellow> pts</color>
  148. #ECHO <color yellow>%format( $f1, "War Kills = ")</color><color white>%format( $f2, @ClanPoints.WarKillPoints)</color><color yellow> pts</color>
  149. #ECHO <color yellow>%format( $f1, "Donations = ")</color><color white>%format( $f2, @ClanPoints.GoldPoints)</color><color yellow> pts</color>
  150. #ECHO <color yellow>%format( $f1, "Explored  = ")</color><color white>%format( $f2, @ClanPoints.RoomPoints)</color><color yellow> pts</color>
  151. #ECHO <color yellow>%format( $f1, "Goals     = ")</color><color white>%format( $f2, @ClanPoints.GoalPoints)</color><color yellow> pts</color>
  152. ;;
  153. #ECHO %cr
  154. ;;
  155. #ECHO <color yellow>Total points for </color><color white>%proper( @RankMeCharacter)</color><color yellow> = </color><color white>@ClanPoints.TotalPoints</color><color yellow> pts</color>
  156. ;;
  157. #ECHO %cr
  158. ;;
  159. #ECHO <color yellow>Current Rank: </color><color white>@ClanPoints.CurrentRank</color>
  160. ;;
  161. #ECHO %cr
  162. ;;
  163. #ECHO <color yellow>New Earned Rank: </color><color white>@getnewrank( @ClanPoints.TotalPoints)</color>
  164. ;;
  165. #ECHO %cr]]></value>
  166.   </alias>
  167.   <alias name="showrank" id="1285">
  168.     <value>ClanPoints.TotalPoints = 0
  169. ;;
  170. #LOOPDB @ClanPoints {#IF (%isnumber( %val) AND %key!= "TotalPoints") {ClanPoints.TotalPoints = @ClanPoints.TotalPoints + %val}}
  171. ;;
  172. $f1 = "&amp;-9s"
  173. $f2 = "&amp;4d"
  174. ;;
  175. winwrite (@cy + "Clan Rank Points for " + @cw + @RankMeCharacter + @cy + ":" + @rc)
  176. ;;
  177. winwritex (@cy + %repeat( "-", 20) + @rc)
  178. ;;
  179. winwritex (@cy + %format( $f1, "Remorts   = ") + @cw + %format( $f2, @ClanPoints.RemortPoints) + @cy + " pts" + @rc)
  180. ;;
  181. winwritex (@cy + %format( $f1, "Tiers     = ") + @cw + %format( $f2, @ClanPoints.TierPoints) + @cy + " pts" + @rc)
  182. ;;
  183. winwritex (@cy + %format( $f1, "Pups      = ") + @cw + %format( $f2, @ClanPoints.PupPoints) + @cy + " pts" + @rc)
  184. ;;
  185. winwritex (@cy + %format( $f1, "Qpts      = ") + @cw + %format( $f2, @ClanPoints.QPPoints) + @cy + " pts" + @rc)
  186. ;;
  187. winwritex (@cy + %format( $f1, "Gqs       = ") + @cw + %format( $f2, @ClanPoints.GQPoints) + @cy + " pts" + @rc)
  188. ;;
  189. winwritex (@cy + %format( $f1, "Cps       = ") + @cw + %format( $f2, @ClanPoints.CPPoints) + @cy + " pts" + @rc)
  190. ;;
  191. winwritex (@cy + %format( $f1, "War Wins  = ") + @cw + %format( $f2, @ClanPoints.WarPoints) + @cy + " pts" + @rc)
  192. ;;
  193. winwritex (@cy + %format( $f1, "War Kills = ") + @cw + %format( $f2, @ClanPoints.WarKillPoints) + @cy + " pts" + @rc)
  194. ;;
  195. winwritex (@cy + %format( $f1, "Donations = ") + @cw + %format( $f2, @ClanPoints.GoldPoints) + @cy + " pts" + @rc)
  196. ;;
  197. winwritex (@cy + %format( $f1, "Explored  = ") + @cw + %format( $f2, @ClanPoints.RoomPoints) + @cy + " pts" + @rc)
  198. ;;
  199. winwritex (@cy + %format( $f1, "Goals     = ") + @cw + %format( $f2, @ClanPoints.GoalPoints) + @cy + " pts" + @rc)
  200. ;;
  201. winwrite (@cy + "Total points for " + @cw + %proper( @RankMeCharacter) + @cy " = " + @cw + @ClanPoints.TotalPoints + @cy + " pts" + @rc)
  202. ;;
  203. winwritex (@cy + "Current Rank: " + @cw + @ClanPoints.CurrentRank + @rc)
  204. ;;
  205. winwrite (@cy + "New Earned Rank: " + @cw + @getnewrank( @ClanPoints.TotalPoints) + @rc)</value>
  206.   </alias>
  207.   <alias name="rankme" id="2446">
  208.     <value>#T+ "Myrank15"
  209. ;;
  210. myrank @RankMeCharacter 15</value>
  211.   </alias>
  212. </class>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement