SRL Archive - MSI Archives

A Guide on the MSI Core!


Coh3n

2010-04-22 18:25:18

The "official" tutorial thread can be found here. Please post any comments/suggestions on that thread.

Thanks,
The MSI Team

Sir R. M8gic1an

2010-06-06 13:04:31

This was written by the MSI SLs. Feel free to post any questions :)

~RM

Coh3n

2010-06-06 14:14:30

From: Rasta Magician
This was written by the MSI SLs. Feel free to post any questions :)

Or things that need to be explained further/added. :)

Coh3n

2010-06-10 15:18:19

Updated the Globals.scar section as a few things have changed. :)

marpis

2010-06-12 13:15:48

Oh, forgot a few important things from Objects!

When clicking an object in your procedures, do it like this:

function ClickRock(WhichIndex: integer): boolean;
var
TemporaryObject: TMSObject; // Create a variable for the TMSObject
begin
TemporaryObject := MSI_GetObject(WhichIndex); // Save it to the temp variable
Result := MSI_FindObject(TemporaryObject, ClickLeft);
// This way the object info won't haunt in the memory! :)
end;

Also: Finding items in your inventory (going to make a thread about this after this post)
See ItemInfo.simba for item index's (under MSI_GetItem-function)

{******************************************************************************}
{ Function MSI_FindItemSlots(ItemID: Integer): TIntegerArray; }
{ By: marpis }
{ Date: 10 June 2010 }
{ Description: Returns itemslots in which item "ItemID" is found }
{******************************************************************************}


{******************************************************************************}
{ Procedure MSI_ClickItems(ItemIDs: TIntegerArray; Option: String); }
{ By: marpis }
{ Date: 10 June 2010 }
{ Description: Clicks all items declared in ItemIDs array. }
{******************************************************************************}


procedure MSI_ExamineOakLogs;
var
TIA: TIntegerArray;
begin
TIA := MSI_FindItemSlots(LOGS_OAK); // if you have logs in invslots 2, 5, 6 and 8, this results [2, 5, 6, 8]
WriteLn('We have '+IntToStr(Length(TIA))+' Oak logs in inventory!');
MSI_ClickItems([LOGS_OAK], ['xam', 'Exa']); // Note: both parameters are arrays!
end;

Coh3n

2010-06-12 14:26:00

marpis, can you not edit the first post?

marpis

2010-06-12 14:39:18

From: Coh3n
marpis, can you not edit the first post?


nopes.

Coh3n

2010-06-14 06:08:33

From: marpis
nopes.

Another thread said RM gave you mod powers. :)

marpis

2010-06-15 13:33:54

From: Coh3n
Another thread said RM gave you mod powers. :)


Ok, now I can :p
Thanks rasty!

Coh3n

2010-08-25 00:00:19

Alright this guide needs updating! There are a lot of new functions that aren't in this guide and a lot of functions are in the guide that are no longer in the include. If you don't have edit access (non-SLs), please post any changes and one of us will fix things up.

Thanks! :)

NCDS

2010-09-14 01:44:50

Added Skills.Simba