  | 
	
	
	
		Corleidum Novice
 
  Joined: 30 Apr 2003 Posts: 43 Location: Sweden
  | 
		
		  
			
			   Posted: Wed Mar 31, 2004 6:50 pm   
  You killed %1. - trigger double.   | 
			 
			
				Hmm. Ok. i could use some help here because this is annoying me ;)
 
 
I have a trigger:
 
You attack %1.
 
#VA enemy %1
 
 
And You killed %1
 
 
#IF ("orcish horde" = %1) {
 
  get gold from corpse
 
  get bow from corpse
 
  get vest from corpse into pack
 
  get vest from corpse into cloak
 
  get all arrow from corpse into pack
 
  } {#ABORT}
 
#IF (@enemy = %1) {
 
  get gold from corpse
 
  get all from corpse into pack
 
  get all from corpse into cloak
 
  get all from corpse into baldric 2
 
  get all from corpse into baldric
 
  get all from corpse
 
  } {#ABORT}
 
 
Ok, the problem is i it's double sending the trigger. It is not working. Where is the fault? | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		Danlo Magician
  
  Joined: 28 Nov 2003 Posts: 313 Location: Australia
  | 
		
		  
			
			   Posted: Wed Mar 31, 2004 7:33 pm      | 
			 
			
				For a start, @enemy is always going to equal %1, Since you set #var enemy %1 anyway. I assume that when it goes off twice, %1 equals "Orcish Horde". Thus making both #IF statements true.
  | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		LightBulb MASTER
 
  Joined: 28 Nov 2000 Posts: 4817 Location: USA
  | 
		
		  
			
			   Posted: Wed Mar 31, 2004 7:59 pm      | 
			 
			
				So, you don't want to loot anything you kill unless it is 'orcish horde' or the last thing you attacked? Okay, this will do it.
 
 
#TR {You attack (*)} {#VAR enemy {%1}}
 
#TR {You killed ({@enemy|orcish horde})} {
 
get gold from corpse
 
#IF ("%1" = "orcish horde") {
 
get bow from corpse
 
get vest from corpse into pack
 
get vest from corpse into cloak
 
get all arrow from corpse into pack
 
} {
 
get all from corpse into pack
 
get all from corpse into cloak
 
get all from corpse into baldric 2
 
get all from corpse into baldric
 
get all from corpse
 
}}
 
 
NOTE: Of course, it won't do anything if you kill 'the orcish horde' unless you just attacked it. | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		Hibio Beginner
 
  Joined: 19 Mar 2004 Posts: 22
 
  | 
		
		  
			
			   Posted: Wed Mar 31, 2004 8:03 pm      | 
			 
			
				why bother with abort and more if?  When you can just go 
 
 
And You killed %1
 
 
#IF ("orcish horde" = %1) {
 
get gold from corpse
 
get bow from corpse
 
get vest from corpse into pack
 
get vest from corpse into cloak
 
get all arrow from corpse into pack
 
} 
 
{
 
get gold from corpse
 
get all from corpse into pack
 
get all from corpse into cloak
 
get all from corpse into baldric 2
 
get all from corpse into baldric
 
get all from corpse
 
}
 
 
This way you use the if-then-else approach and will do the "orcish horde" part when it gets the orcish horde msg and anything else you kill will execute the "else" part. | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		| 
		
		 | 
	
	
		 |