setCount = 0;
function setInfo()
setCount = setCount+1;
if setCount == 1 then
MessageBox(GetMapDataPath()..'count1from8.txt');
elseif setCount == 2 then
MessageBox(GetMapDataPath()..'count2from8.txt');
elseif setCount == 3 then
MessageBox(GetMapDataPath()..'count3from8.txt');
elseif setCount == 4 then
MessageBox(GetMapDataPath()..'count4from8.txt');
elseif setCount == 5 then
MessageBox(GetMapDataPath()..'count5from8.txt');
elseif setCount == 6 then
MessageBox(GetMapDataPath()..'count6from8.txt');
elseif setCount == 7 then
MessageBox(GetMapDataPath()..'count7from8.txt');
elseif setCount == 8 then
MessageBox(GetMapDataPath()..'count8from8.txt');
GiveArtefact("heroname", artifact1Id);
GiveArtefact("heroname", artifact2Id);
ChangeHeroStat("heroname", STAT, count);
end;
end;
Trigger(OBJECT_TOUCH_TRIGGER, 'dragonGuard1', 'setInfo');
Trigger(OBJECT_TOUCH_TRIGGER, 'dragonGuard2', 'setInfo');
Trigger(OBJECT_TOUCH_TRIGGER, 'dragonGuard3', 'setInfo');
Trigger(OBJECT_TOUCH_TRIGGER, 'dragonGuard4', 'setInfo');
Trigger(OBJECT_TOUCH_TRIGGER, 'dragonGuard5', 'setInfo');
Trigger(OBJECT_TOUCH_TRIGGER, 'dragonGuard6', 'setInfo');
Trigger(OBJECT_TOUCH_TRIGGER, 'dragonGuard7', 'setInfo');
Trigger(OBJECT_TOUCH_TRIGGER, 'dragonGuard8', 'setInfo');
If anything is unclear, I'll describe everything that happens here in more detail.
P.S. All of this is actually in the "scripts" topic, although you'll have to search for it there for a very long time