Advertisement
Guest User

Untitled

a guest
Dec 14th, 2015
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.21 KB | None | 0 0
  1. Program FinalGE;
  2. {$DEFINE SMART}
  3. {$i AeroLib/AeroLib.Simba}
  4. {$i Reflection/Reflection.simba}
  5. {$i stephen\GE07.simba}
  6.  
  7.  
  8.  
  9. procedure DeclarePlayer();
  10. begin
  11. Me.Name := 'draprastuc@thrma.com';
  12. Me.Pass := 'monkey123';
  13. Me.Active := True;
  14. me.Member := false;
  15. end;
  16.  
  17.  
  18. type _stats = record
  19. numBought : integer;
  20. numSold : integer;
  21. profitHr : integer;
  22. end;
  23.  
  24.  
  25. type _item = record
  26. name : string;
  27. bought : integer;
  28. sold : integer;
  29. totalBought : integer;
  30. totalSold : integer;
  31. quantity : integer;
  32. profitHr : integer;
  33. limit : integer;
  34. available : boolean;
  35. end;
  36.  
  37. type _auction = record
  38. isOpen : boolean;
  39. time : ttimer;
  40. numBought : integer;
  41. numSold : integer;
  42. profitHr : integer;
  43. item : ^_item;
  44. end;
  45.  
  46.  
  47. var
  48. auction : array [0..5] of _auction;
  49. slot : integer;
  50. testItem : _item;
  51. itemsList : array of _item;
  52. i : integer;
  53.  
  54.  
  55. function getItem : ^_item;
  56. begin
  57. for i := 0 to length(itemsList)-1 do
  58. begin
  59. if ( itemsList[i].available ) then
  60. begin
  61. itemsList[i].available := false;
  62. result := @itemsList[i];
  63. end;
  64. end;
  65. end;
  66.  
  67. function GetWordsEx(text, wordCharacters: string): TStringArray; //thanks Janilabo
  68. var
  69. l, r: Integer;
  70. begin
  71. l := Length(text);
  72. if ((l > 0) and (wordCharacters <> '')) then
  73. begin
  74. SetLength(Result, l);
  75. for i := 1 to l do
  76. if (Pos(text[i], wordCharacters) > 0) then
  77. begin
  78. Result[r] := text[i];
  79. for i := (i + 1) to l do
  80. if (Pos(text[i], wordCharacters) > 0) then
  81. Result[r] := (Result[r] + text[i])
  82. else
  83. Break;
  84. Inc(r);
  85. end;
  86. end;
  87. SetLength(Result, r);
  88. end;
  89.  
  90.  
  91. procedure getItemsList;
  92. var
  93. ReflectPlayer: TReflectLocalPlayer;
  94. accountStrings: TStringArray;
  95. accountString: String;
  96. myGameTab: TReflectionGameTab;
  97. itemCt : integer;
  98. begin
  99. itemCt := 1;
  100. while (itemCt = 1 ) or not ( length(accountString) = 0 ) do
  101. begin
  102. setlength(itemsList,itemCt);
  103. accountString := ReadINI('item', intToStr(itemCt), 'C:/Simba/Scripts/'+'itemList.txt');
  104. accountStrings := GetWordsEx(accountString, '01234567890@.qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM_-');
  105. if ( length(accountString) = 0 ) then
  106. exit;
  107. itemsList[itemct-1].name := accountStrings[0];
  108. itemsList[itemct-1].quantity := strToInt(accountStrings[1]);
  109. itemsList[itemct-1].limit := strToInt(accountstrings[2]);
  110. writeln(itemsList[itemct-1]);
  111. inc(itemCt);
  112. end;
  113. end;
  114.  
  115.  
  116.  
  117.  
  118.  
  119. function GEOpen:boolean;
  120. var
  121. closeButton,x,y: integer;
  122. begin
  123.  
  124. result := false;
  125. closeButton := DTMFromString('mAAEAAHic42FgYHjGwsDwCIhfQzGI/YIFIv4QiN8A8UcgvgvEz4HYmZGBwQOK7aDYCsp3AGInIHaBYl8gZmBgxMATW/IZIn0tGbJjnRlSwh3R5FEBPxpGB5im48fIAACMwRL7');
  126. if ( findDtm(closeButton,x,y,468,20,500,50) ) then
  127. begin
  128. result:= true;
  129. writeln('-isGEOpen- (true)Found close icon');
  130. end else
  131. writeln('-isGEOpen- Failed to find close icon');
  132. freeDTM(closeButton);
  133. end;
  134.  
  135. function auctionOpen(var slot_ : integer): boolean;
  136. begin
  137.  
  138.  
  139.  
  140. end;
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147. function listItem(var item : _item; save: boolean):boolean;
  148. begin
  149.  
  150. end;
  151.  
  152. function _testItem(var item : _item): boolean;
  153. begin
  154. result := false;
  155. if ( listItem(item,false) ) then
  156. result := true;
  157. end;
  158.  
  159.  
  160. function auctionIsDone(_slot : integer) : boolean;
  161. begin
  162. end;
  163.  
  164.  
  165. procedure checkAuctions;
  166. var
  167. _slot : integer;
  168. begin
  169.  
  170. for _slot :=0 to 5 do
  171. begin
  172. if ( auctionIsDone(_slot) ) then
  173. begin
  174.  
  175. end;
  176. end;
  177. end;
  178.  
  179.  
  180. function itemsAvailable(var item :_item): boolean;
  181. begin
  182.  
  183. end;
  184.  
  185. procedure timesUp
  186. var
  187. _slot: integer;
  188. begin
  189.  
  190. end;
  191.  
  192.  
  193.  
  194.  
  195. procedure initItemList;
  196. begin
  197. for i:=0 to length(itemsList) -1 do
  198. begin
  199. itemsList[i].available := true;
  200. end;
  201. end;
  202.  
  203. procedure main;
  204. begin
  205. repeat
  206. if (true ) then
  207. begin
  208. //listItem(listedItems[slot] ,true);
  209. end;
  210. //checkAuctions;
  211. //timesUp;
  212. wait(1300);
  213. until 1 = 2;
  214.  
  215.  
  216. end;
  217.  
  218. begin
  219. //initAL();
  220. //reflect.Setup;
  221. clearDebug;
  222. //declarePlayer;
  223. getItemsList;
  224.  
  225. auction[0].item := @testItem;
  226. auction[0].item^.name := 'test';
  227. writeln(auction[0].item^.name);
  228.  
  229.  
  230.  
  231. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement