| 
	
		|  |  
		| Churlant Novice
 
 
 Joined: 17 Oct 2002
 Posts: 44
 Location: USA
 
 | 
			
			  |  Posted: Fri Jan 17, 2003 12:11 am 
 Multiple pieces of info in string...
 
 |  
				| I am trying to store information on objects, then either organize them by one of two pieces of info, or select them based on weight. Such as: 
 >identify red stone
 Object: RedStone Weight: 200
 
 >identify blue stone
 Object: BlueStone Weight: 320
 
 I would want to pick out the information with a trigger, both the item name and its individual weight, then pull back a the heaviest stone in the list with an alias or trigger command.. then the second heaviest, etc... possibly in descending order of weight.
 
 This probably requires database use, but I'm fuzzy on how to capture the info with triggers and insert it into a db while on the fly. I would want to erase the entire db and re-start a stone and weight list from scratch.
 
 >-Churlant-<
 |  |  
	  |  |  
		|  |  
		| megamog75 Enchanter
 
  
 Joined: 20 Nov 2002
 Posts: 627
 Location: USA
 
 | 
			
			  |  Posted: Wed Jun 18, 2003 12:16 am 
 |  
				| Hey I know you have waited a really long time but I hope you like what I've done so far if this is kind of what you want then let me know and i will keep tailoring it for you :) 
 
 
 #CLASS {WeighIt}
 #VAR new {640cyanStone900tealStone110WhiteStone320BlueStone200RedStone500teaStone}
 #VAR new2 {640=cyanStone|900=tealStone|110=WhiteStone|320=BlueStone|200=RedStone|500=teaStone}
 #VAR new3 {900=tealStone|640=cyanStone|500=teaStone|320=BlueStone|200=RedStone|110=WhiteStone}
 #VAR new4 {900tealStone640cyanStone500teaStone320BlueStone200RedStone110WhiteStone}
 #TRIGGER {Object~: (%w) Weight~: (%d)$} {#addkey new %2 %1;#var new2 "";#var new3 "";#var new4 "";#var new2 %expanddb(@new,"|");#var new3 %sort(@new2,1);#forall @new3 {#addkey New4 {%i}};#echo %ansi(high,Yellow)_____________________________________;#echo %expanddb(@new4,%crlf,": ");#echo %ansi(high,Yellow)_____________________________________;}
 #CLASS 0
 
 
 
 This works from a trigger of the rresponse after you examine the object
 Puts it in the list, and then puts it in order
 then spits it out for you to see.
 
 megamog75
   I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere
 |  |  
	  |  |  
		|  |  
		|  |  
		|  |  
  
	| 
 
 | You cannot post new topics in this forum You cannot reply to topics in this forum
 You cannot edit your posts in this forum
 You cannot delete your posts in this forum
 You cannot vote in polls in this forum
 
 |  |