Sumilion
2006-10-12 12:32:55
I recently made a thread in SRL Bugs about the dwarfitem also checking up on the emerald. It's no big deal, but i had a some time left so i decided to make one myself. The only problem is that The normal DwarfItem also searched for the Spinach role, but since i don't have one i can't make a BMP mask out of it. For that reason and the reason that i don't know if this procedure will also react on other items i posted it in the test corner.
( If you have a Spinach role, please make a screenie of it and send it to my e-mail, thnx )
( If you have a Spinach role, please make a screenie of it and send it to my e-mail, thnx )
{*******************************************************************************
procedure DwarfItem;
by: Sumilion
Description: Drops Items left by Dwarf
*******************************************************************************}
procedure DwarfItem;
Var
Ix, Iy, Kebab, ItemMark, Beer: Integer;
Begin
Kebab := BitmapFromString(8, 9, 'z78DA3330200DB88181011D752' +
'103DAD93BB02A89570F00CD145629');
Beer := BitmapFromString(8, 6, 'z78DA3330C00EDCC0C0800840BC' +
'4A4AD42303031201257A01BC683A21');
GameTab(4);
MarkTime(ItemMark);
While(FindBitmapMaskTolerance(Kebab, Ix, Iy, MIX1, MIY1, MIX2, MIY2, 0, 0) or
FindBitmapMaskTolerance(Beer, Ix, Iy, MIX1, MIY1, MIX2, MIY2, 0, 0)) Do
Begin
Mouse(Ix, Iy, 5, 5, false);
ChooseOption(x, y, 'rop');
Wait(500+Random(500));
If(TimeFromMark(ItemMark) > 20000) Then Break;
End;
End;