It's working are very simple, it gathers the data and then displays it at command with a nice graph accompanying it (and we all love graphs).
Here's the simple version for herbs:
Code: Select all
;
; commands and triggers for herbing
;
; variables
/set herbs 0
/set attanar 0
/set chicory 0
/set suranie 0
; aliases
/alias find /alias hh search here for %{*} %; hh
/alias hstat /hstat
/alias hh search here for herbs
; triggers
/def -F -t'*You find*!' herb_found = /set herbs=$[herbs+1] %;\
open pouch %;\
put herbs in pouch %;\
close pouch %;\
hh
/def -F -t'*You find*little blue berry*!' attanar_found = /set attanar=$[attanar+1] %;\
/echo -aCgreen * Attanar *
/def -F -t'*You find*sharp short leaf*!' chicory_found = /set chicory=$[chicory+1] %;\
/echo -aCgreen * Chicory *
/def -F -t'*You find*small red berry*!' suranie_found = /set suranie=$[suranie+1] %;\
/echo -aCgreen * Suranie *
; statistics
/def draw_graph = /if (variable_ratio=0) \
/set graph .............................. %;\
/elseif ((variable_ratio>0)&(variable_ratio<4)) \
/set graph #............................. %;\
/elseif ((variable_ratio>3)&(variable_ratio<7)) \
/set graph ##............................ %;\
/elseif ((variable_ratio>6)&(variable_ratio<11)) \
/set graph ###........................... %;\
/elseif ((variable_ratio>10)&(variable_ratio<14)) \
/set graph ####.......................... %;\
/elseif ((variable_ratio>13)&(variable_ratio<17)) \
/set graph #####......................... %;\
/elseif ((variable_ratio>16)&(variable_ratio<21)) \
/set graph ######........................ %;\
/elseif ((variable_ratio>20)&(variable_ratio<24)) \
/set graph #######....................... %;\
/elseif ((variable_ratio>23)&(variable_ratio<27)) \
/set graph ########...................... %;\
/elseif ((variable_ratio>26)&(variable_ratio<31)) \
/set graph #########..................... %;\
/elseif ((variable_ratio>30)&(variable_ratio<34)) \
/set graph ##########.................... %;\
/elseif ((variable_ratio>33)&(variable_ratio<37)) \
/set graph ###########................... %;\
/elseif ((variable_ratio>36)&(variable_ratio<41)) \
/set graph ############.................. %;\
/elseif ((variable_ratio>40)&(variable_ratio<44)) \
/set graph #############................. %;\
/elseif ((variable_ratio>43)&(variable_ratio<47)) \
/set graph ##############................ %;\
/elseif ((variable_ratio>46)&(variable_ratio<51)) \
/set graph ###############............... %;\
/elseif ((variable_ratio>50)&(variable_ratio<54)) \
/set graph ################.............. %;\
/elseif ((variable_ratio>53)&(variable_ratio<57)) \
/set graph #################............. %;\
/elseif ((variable_ratio>56)&(variable_ratio<61)) \
/set graph ##################............ %;\
/elseif ((variable_ratio>60)&(variable_ratio<64)) \
/set graph ###################........... %;\
/elseif ((variable_ratio>63)&(variable_ratio<67)) \
/set graph ####################.......... %;\
/elseif ((variable_ratio>66)&(variable_ratio<71)) \
/set graph #####################......... %;\
/elseif ((variable_ratio>70)&(variable_ratio<74)) \
/set graph ######################........ %;\
/elseif ((variable_ratio>73)&(variable_ratio<77)) \
/set graph #######################....... %;\
/elseif ((variable_ratio>76)&(variable_ratio<81)) \
/set graph ########################...... %;\
/elseif ((variable_ratio>80)&(variable_ratio<84)) \
/set graph #########################..... %;\
/elseif ((variable_ratio>83)&(variable_ratio<87)) \
/set graph ##########################.... %;\
/elseif ((variable_ratio>86)&(variable_ratio<91)) \
/set graph ###########################... %;\
/elseif ((variable_ratio>90)&(variable_ratio<94)) \
/set graph ############################.. %;\
/elseif ((variable_ratio>93)&(variable_ratio<97)) \
/set graph #############################. %;\
/elseif ((variable_ratio>96)&(variable_ratio<101)) \
/set graph ############################## %;\
/else \
/echo -aBCred *** ERROR: value out of range *** %;\
/endif
/def hstat = \
/echo -aCgreen @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ %;\
/echo -aCgreen @@@@ ---------------------------------------------- @@@@ %;\
/echo -aCgreen @@@@ | H E R B I N G S T A T I S T I C S | @@@@ %;\
/echo -aCgreen @@@@ ---------------------------------------------- @@@@ %;\
/echo -aCgreen @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ %;\
/echo -aCgreen @ %;\
/echo -aCgreen @ Total herbs found : %herbs %;\
/echo -aCgreen @ %;\
/echo -aCgreen @ ---------------------------------------------------- @ %;\
/echo -aCgreen @ %;\
/if (attanar>0) \
/set variable_ratio=$[100-(((herbs-attanar)*100)/herbs)] %;\
/else \
/set variable_ratio=0 %;\
/endif %;\
/draw_graph %;\
/echo -aCgreen @ Attanar %graph : %attanar %;\
/if (chicory>0) \
/set variable_ratio=$[100-(((herbs-chicory)*100)/herbs)] %;\
/else \
/set variable_ratio=0 %;\
/endif %;\
/draw_graph %;\
/echo -aCgreen @ Chicory %graph : %chicory %;\
/if (suranie>0) \
/set variable_ratio $[100-(((herbs-suranie)*100)/herbs)] %;\
/else \
/set variable_ratio=0 %;\
/endif %;\
/draw_graph %;\
/echo -aCgreen @ Suranie %graph : %suranie %;\
/echo -aCgreen @ %;\
/echo -aCgreen @ ---------------------------------------------------- @ %;\
/eval /echo -aCgreen [+] Statistics taken : $[ftime("%a %b %d %X %Y", time())] [+]
Code: Select all
> hstat
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@ ---------------------------------------------- @@@@
@@@@ | H E R B I N G S T A T I S T I C S | @@@@
@@@@ ---------------------------------------------- @@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
@ Total herbs found : 45
@
@ ---------------------------------------------------- @
@
@ Attanar ####.......................... : 5
@ Chicory #################............. : 25
@ Suranie ###########................... : 15
@
@ ---------------------------------------------------- @
[+] Statistics taken : Mon May 17 05:13:32 PM 2010 [+]
It can also be changed to count other things, special attacks, hits and misses in combat, leftovers gathered or whatever else you would like to count and can set a trigger for.
I hope some of you might find it interesting. Please enjoy.