Im sure there the more recent versions of MC features DB options, but im not familiar with them yet, so I would use an array and world.AddTrigger function. I dont see how you can manage to do what you want without 2 triggers for each item though ( not 3 as you were thinking as the inventory, held or wear has the same desc if you use the right match ), you dont need to build those triggers by hand though.
i would build a solution like this ( example in JScript ):
var eEnabled = 1; // enable trigger
var eTriggerRegularExpression = 32; // trigger uses regular expression
var eReplace = 1024; // replace existing trigger of same name
var match = new Array()
// match [i] = "ground desc|inventory desc|quest mob"
match [0] = "A small black tool lies on the ground.|a ranger tool|Chaste"
match [1] = "A big rock lies on the ground.|a big rock|mason"
for ( i = 0 ; i < match.length ; i++ ) {
var list = match[i].split("|"); // splits each match line in the 3 parts that we want
var send_ = list [1] + " - job item for " + list [2] // creates the note "x - job item for Y"
var flags_ = eEnabled | eTriggerRegularExpression | eReplace;
// AddTrigger(TriggerName, MatchText, ResponseText, Flags, Colour, Wildcard, SoundFileName, ScriptName);
world.addtrigger( "Quest_G" + i , list [0] , send_ , flags_ , -1 , 0 , "" , "" );
world.addtrigger( "Quest_I" + i , list [1] , send_ , flags_ , -1 , 0 , "" , "" );
world.settriggeroption ( "Quest_G" + i , "send_to", 2 ); // set the trigger to send as note
world.settriggeroption ( "Quest_I" + i , "send_to", 2 ); // set the trigger to send as note
}
|