Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GetCoOrdinates(e: IInterface): string;
- var
- sName, sGrid: string;
- iWrldPos: Integer;
- begin
- sName := Name(e);
- iWrldPos := Pos('[WRLD:', sName);
- if iWrldPos <> 0 then sGrid := Copy(sName, iWrldPos+Length('[WRLD:00000000] at ')+1, Length(sName)-(iWrldPos+Length('[WRLD:00000000] at ')+1));
- Result := sGrid;
- end;
- function StrBeginsWith(s, delimiter: string): string;
- var
- sTempString: string;
- iCharCount: int;
- begin
- iCharCount := Pred(Pos(delimiter, s));
- if iCharCount <> 0 then begin
- sTempString := Copy(s,0,iCharCount);
- end;
- Result := sTempString;
- end;
- function StrToBool(s: string): Boolean;
- begin
- result := (LowerCase(s) = 'true') OR (s = '1');
- end;
- function IsStatic(e: IInterface): Boolean;
- begin
- Result := (Pos('STAT:',Name(e)) <> 0);
- end;
- //Function to retrieve the FormID string of a Cell that is linked via XTEL\DOOR
- function GetLinkedCellFormID(e: IInterface): string;
- var
- sFormID, sTemp: string;
- begin
- sTemp := geev(e, 'XTEL\Door');
- //Search for CELL: in the string, appears to be the only Identifing trait of the geev
- sFormID := Copy(sTemp,Pos('CELL:',sTemp)+5,8);
- //Returns full LinkedFormID
- Result := sFormID;
- end;
- //Function to get the EDID of a Cell via the XTEL\DOOR
- function GetLinkedCellEDID(e: IInterface): string;
- var
- sFormID: string;
- begin
- sFormID := GetLinkedCellFormID(e);
- //AddMessage(sFormID);
- Result := geev(RecordByHexFormID(sFormID),'EDID');
- end;
Advertisement
Add Comment
Please, Sign In to add comment