|  | 
	
	
		| Adelante Beginner
 
 
 Joined: 01 Feb 2005
 Posts: 10
 
 
 | 
			
			  |  Posted: Tue Feb 01, 2005 1:06 am 
 Need help setting up a EXP average for Aardwolf mud.
 
 |  
				| Okey, so this is what i wanna do: If anyone play Aardwolf, or just wanna try it to help me
 figure out how to do this...
 there is a command 'lastkills' you can type.
 Shows the last mobs killed by you, and what EXP they gave you.
 I want a script that calculate total average EXP gained.
 And report it to various channels of choice.
 
 Thanks!
 |  | 
	
	  |  | 
	
		|  | 
	
		| Adelante Beginner
 
 
 Joined: 01 Feb 2005
 Posts: 10
 
 
 | 
			
			  |  Posted: Tue Feb 01, 2005 1:45 pm   Feedback. 
 |  
				| Ah, yes. Forgot to post my Character name on Aardwolf. Char name: Zephyr
 
 Feel free to send me a tell if you see me online.
 Would really appretiate some help with this.
 |  | 
	
	  |  | 
	
		|  | 
	
		| Ryuichi Beginner
 
 
 Joined: 26 Oct 2004
 Posts: 19
 
 
 | 
			
			  |  Posted: Tue Feb 01, 2005 9:08 pm 
 |  
				| Paste in the command and its output, and I'll see what I can do. 
 |  | 
	
	  |  | 
	
		|  | 
	
		| Adelante Beginner
 
 
 Joined: 01 Feb 2005
 Posts: 10
 
 
 | 
			
			  |  Posted: Wed Feb 02, 2005 12:08 am 
 |  
				| command: lastkills 
 output:
 
 
 
	  | Code: |  
	  | Kill history for Zephyr:
 
 Name                            Level  Exp  From
 ------------------------------  -----  ---  -------------------------
 The Cityguard                      16    0  Midgaard
 |  
 
 
 Hope that helps.
 |  | 
	
	  |  | 
	
		|  | 
	
		| nexela Wizard
 
  
 Joined: 15 Jan 2002
 Posts: 1644
 Location: USA
 
 | 
			
			  |  Posted: Wed Feb 02, 2005 3:41 am 
 |  
				| *Untested* Might need some adjusting Uses fixed width patterns. Also my math might be off *shrug its late* 
 #TRIGGER "killhist" {^Kill history for} {#VAR killhist ""}
 #COND {------------------------------} {} {within|param=5}
 #COND {&30 &5 (&3)} {#ADD killhist.count 1;#ADD killhist.xp %1} {looplines|param=30}
 #COND {^$} {say %eval(@killhist.xp/@killhist.cound)}
 |  | 
	
	  |  | 
	
		|  | 
	
		| Adelante Beginner
 
 
 Joined: 01 Feb 2005
 Posts: 10
 
 
 | 
			
			  |  Posted: Wed Feb 02, 2005 1:32 pm 
 |  
				| This isn't working. It returns an empty box with 
 
	  | Code: |  
	  | #CLASS {lastkill} #CLASS 0
 
 |  
 
 
 I am a newbie at this things tho. I might be doing something wrong while puting it in...
 |  | 
	
	  |  | 
	
		|  | 
	
		| Adelante Beginner
 
 
 Joined: 01 Feb 2005
 Posts: 10
 
 
 | 
			
			  |  Posted: Wed Feb 02, 2005 2:54 pm 
 |  
				| Not sure, but i think the problem lies with the loop. Think it's looking for exactly 30 lines. Can't i make it so that it starts from 1 as minimum, and up to say, 60 maximum?
 |  | 
	
	  |  | 
	
		|  | 
	
		| Thinjon100 Apprentice
 
 
 Joined: 12 Jul 2004
 Posts: 190
 Location: Canada
 
 | 
			
			  |  Posted: Wed Feb 02, 2005 3:35 pm 
 |  
				| I have created and tested this, though I'm sure it's not perfect... 
 
 
 
	  | Code: |  
	  | #CLASS {lastkills} #TRIGGER {&39(&3)} {#IF (%isnumber( %1)) {#ADD killhist.count 1;#ADD killhist.xp %1}}
 #TRIGGER {^$} {#say %eval( @killhist.xp/(%eval( @killhist.count)-1));#T- lastkills}
 #CLASS 0
 
 #TRIGGER "killhist" {^Kill history for} {}
 #COND {------------------------------} {#T+ lastkills;#CLASS lastkills;#VAR killhist "";#ADDKEY killhist count 0;#ADDKEY killhist xp 0;#CLASS 0} {within|param=5}
 |  |  | 
	
	  |  | 
	
		|  | 
	
		| DeathDealer Adept
 
  
 Joined: 20 Jul 2004
 Posts: 268
 
 
 | 
			
			  |  Posted: Wed Feb 02, 2005 7:06 pm   **SOLVED** 
 |  
				| After reading this, I thought to myself, "Self, how badly can you screw this up?"  Strangely, I didn't. At least not that I can see. I tried it on Aard and it works great. Copy this into the command line. 
 #alias lk {lastkill;#T+ Lastkill}
 #class LastKill
 #var killhist.count 0
 #var killhist.xp 0
 #trigger {(%*)(%d)(%d)(%*)} {#ADD killhist.count 1;#ADD killhist.xp %3}
 #TRIGGER {^(%d)/(%d)H (%d)/(%d)M (%d)/(%d)V (%d)x (%d)Q} {gtell %eval(@killhist.xp/@killhist.count);#var killhist.count 0;#var killhist.xp 0;#T- LastKill}
 #class 0
 #T- LastKill
 
 Only thing that needs to be changed is the ^(%d)/(%d)H (%d)/(%d)M (%d)/(%d)V (%d)x (%d)Q to part of your prompt.
 Oh, the only reason I have the #T- LastKill at the end is cause I couldn't figure out how to have that class turned off at the beginning.
 
 Syntax Colourizer
 |  | 
	
	  |  | 
	
		|  | 
	
		|  | 
	
		|  |