recca062

Ez Add Headgears

Feb 3rd, 2016
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.46 KB | None | 0 0
  1. ;
  2. ; AutoHotkey Version: 1.x
  3. ; Language: English
  4. ; Platform: Win9x/NT
  5. ; Author: Recca
  6. ;
  7. ; Script Function:
  8. ; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
  9. ;
  10. ; MAKE COLOR PICKER , QUICK COLOR PICK MAYBE
  11. ; MAKE AUTO COLOR
  12. ; GET ITEM INFO FROM ITEM_DB=====================================================
  13. ; AUTO ASIGN NEXT VIEW ID & CHECK FOR EMPTY IDS
  14. ; COMBO BOX FOR VIEW ID AND ID
  15. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
  16. SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
  17. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory
  18. global WM_USER := 0x00000400
  19. global PBM_SETMARQUEE := WM_USER + 10
  20. global PBM_SETSTATE := WM_USER + 16
  21. global PBS_MARQUEE := 0x00000008
  22. global PBS_SMOOTH := 0x00000001
  23. ;~ global PBS_VERTICAL := 0x00000004
  24. ;~ global PBST_NORMAL := 0x00000001
  25. ;~ global PBST_ERROR := 0x00000002
  26. ;~ global PBST_PAUSE := 0x00000003
  27. ;~ global STAP_ALLOW_NONCLIENT := 0x00000001
  28. ;~ global STAP_ALLOW_CONTROLS := 0x00000002
  29. ;~ global STAP_ALLOW_WEBCONTENT := 0x00000004
  30. ;~ global WM_THEMECHANGED := 0x0000031A
  31.  
  32. ;==============================
  33. IniRead, ROpath, Additem.ini, RO, path
  34. ;====================== COLOR PICKER
  35. IniRead, Color1, Additem.ini, Color, 1
  36. IniRead, Color2, Additem.ini, Color, 2
  37. IniRead, Color3, Additem.ini, Color, 3
  38. IniRead, Color4, Additem.ini, Color, 4
  39. IniRead, Color5, Additem.ini, Color, 5
  40. IniRead, Color6, Additem.ini, Color, 6
  41. IniRead, Color7, Additem.ini, Color, 7
  42. IniRead, Color8, Additem.ini, Color, 8
  43. IniRead, Color9, Additem.ini, Color, 9
  44. IniRead, Color10, Additem.ini, Color, 10
  45. IniRead, Color11, Additem.ini, Color, 11
  46. IniRead, Color12, Additem.ini, Color, 12
  47. IniRead, Color13, Additem.ini, Color, 13
  48. IniRead, Color14, Additem.ini, Color, 14
  49. IniRead, Color15, Additem.ini, Color, 15
  50. ;========Options======
  51. type = 1
  52. AddOpt = 1
  53. MorD = 2
  54. ;===================
  55. ;~ path = %A_ScriptDir%\ CLIENT files\RO\data
  56. Gui, Color, Black
  57. Gui, Font, s10 w600 cBlack
  58.  
  59. Gui, Add, Text, x98 y205 cRed,Class:
  60. ;Gui, Add, DropDownList, vWepType Choose1, <Weapon>|Dagger|1-Hand Sword|2-Hand Sword|1-Hand Spear|2-Hand Spear|1-Hand Axe|2-Hand Axe|Mace|Staff|2-Hand Staff|Bow/CrossBow|Knuckle|Instrument|Whip|Book|Katar|Revolver||Rifle|Shotgun|Gatling Gun|Grenade Launcher|Fuuma Shuriken
  61. Gui, Add, Edit, w320 h25 x5 y5 vDir +ReadOnly cWhite,
  62. Gui, Add, Button, xp+320 yp w70 h25 gBrowse, Browse
  63. Gui, Add, DropDownList, xp-320 yp+60 w60 h120 vslot Choose1 gslot, Slots|1|2|3|4
  64. Gui, Add, Picture, xp yp+35 w0 h-1 vcollection,
  65. Gui, Add, Edit, xp+90 yp-20 w300 h120 vDesc gDesc ,
  66. Gui, Add, Text, xp yp-19 cRed, Descriptions
  67. Gui, Add, Edit, xp yp+140 w300 h120 vTypeBIG gType, Class: ^777777Headgear^000000`nDefense: ^777777^000000`nLocation: ^777777^000000`nWeight: ^777777^000000`nRequired Level: ^777777^000000`nJobs: ^777777All^000000
  68. Gui, Add, Radio, xp+10 yp+130 cRed Checked gType1, Headgear
  69. Gui, Add, Radio, xp+100 yp cRed gType2, Weapon
  70. Gui, Add, Radio, xp-100 yp+20 cRed gType3, Armor
  71. Gui, Add, Radio, xp+100 yp cRed gType4, Item
  72. Gui, Add, Radio, xp+90 yp cRed gType5, Shield
  73. Gui, Add, Radio, xp yp-20 cRed gType6, Accessory
  74. Gui, Add, Radio, xp-190 yp+40 cRed gType7, Card
  75. Gui, Add, Radio, xp+100 yp cRed gType8, Garment
  76. Gui, Add, Radio, xp+90 yp cRed gType9, Shoes
  77. Gui, Add, Edit, xp-242 yp-335 w220 h20 vName,
  78. Gui, Add, Text, xp-42 yp+2 cRed, Name
  79. Gui, Add, Text, xp yp+170 cRed, View ID
  80. Gui, Add, Edit, w70 vVIewID
  81. Gui, Add, UpDown, xp yp+20 w70 Range0-2147483647 0x80 ,
  82. Gui, Add, ActiveX, vWB xp+390 yp-230 w320 h260,Shell . Explorer
  83. wb.navigate("about:blank")
  84. Sleep 20
  85. html =
  86. (
  87. <html>
  88. <body bgcolor="000000"/>
  89. </html>
  90. )
  91. wb.document.write(html)
  92. Gui, Add, ListView, w20 h20 x11 y260 Background%Color1% gColor1,
  93. Gui, Add, ListView, w20 h20 xp+25 yp Background%Color2% gColor2,
  94. Gui, Add, ListView, w20 h20 xp+25 yp Background%Color3% gColor3,
  95. Gui, Add, ListView, w20 h20 xp-50 yp+25 Background%Color4% gColor4,
  96. Gui, Add, ListView, w20 h20 xp+25 yp Background%Color5% gColor5,
  97. Gui, Add, ListView, w20 h20 xp+25 yp Background%Color6% gColor6,
  98. Gui, Add, ListView, w20 h20 xp-50 yp+25 Background%Color7% gColor7,
  99. Gui, Add, ListView, w20 h20 xp+25 yp Background%Color8% gColor8,
  100. Gui, Add, ListView, w20 h20 xp+25 yp Background%Color9% gColor9,
  101. Gui, Add, ListView, w20 h20 xp-50 yp+25 Background%Color10% gColor10,
  102. Gui, Add, ListView, w20 h20 xp+25 yp Background%Color11% gColor11,
  103. Gui, Add, ListView, w20 h20 xp+25 yp Background%Color12% gColor12,
  104. Gui, Add, ListView, w20 h20 xp-50 yp+25 Background%Color13% gColor13,
  105. Gui, Add, ListView, w20 h20 xp+25 yp Background%Color14% gColor14,
  106. Gui, Add, ListView, w20 h20 xp+25 yp Background%Color15% gColor15,
  107. Gui, Add,Text, xp-50 yp+40 cRed, Client's path
  108. Gui, Add, Edit, xp+90 yp +ReadOnly cWhite w550 vcPath,
  109. Gui, Add, Button, xp+550 yp w60 h24 gBrowse2, Browse
  110. Gui, Add, Text, xp-371 yp-362 cRed, ID
  111. Gui, Add, Edit, xp+20 yp-3 w95 vID
  112. Gui, Add, UpDown, xp+20 yp-3 w90 h20 Range0-2147483647 0x80,
  113.  
  114. Gui, Add, Button, xp+112 yp+230 gAdd h115 w60 , ADD
  115. Gui, Add, Radio,xp+65 yp cRed gAdd1 Checked, EVERYTHING
  116. Gui, Add, Radio,xp yp+20 cRed gAdd2 , ONLY itemInfo.lub
  117. Gui, Add, Radio,xp yp+20 cRed gAdd3 , ONLY sprites `&& textures
  118.  
  119. Gui, Add, Progress, xp yp+25 w230 h20 hwndMARQ4 -%PBS_SMOOTH% +%PBS_MARQUEE% vGhost1, 0
  120. DllCall("User32.dll\SendMessage", "Ptr", MARQ4, "Int", PBM_SETMARQUEE, "Ptr",50, "Ptr", -1)
  121.  
  122. Gui, Add, Radio, xp yp+30 cYellow gMorD1, to Client
  123. Gui, Add, Radio, xp+100 yp cYellow Checked gMorD2, to
  124. Gui, Add, Edit, xp+35 yp-1 w100 h20 vDummy, dummyData
  125.  
  126. Gui, Show, w720 h430
  127. GuiControl,, cPath, %ROpath%
  128. GuiControl, Focus, Desc
  129. return
  130. ;============= COLOR PICKER
  131. Color1:
  132. Color2:
  133. Color3:
  134. Color4:
  135. Color5:
  136. Color6:
  137. Color7:
  138. Color8:
  139. Color9:
  140. Color10:
  141. Color11:
  142. Color12:
  143. Color13:
  144. Color14:
  145. Color15:
  146. if A_GuiEvent = DoubleClick
  147. {
  148. Gui, submit, nohide
  149. Color := %A_ThisLabel%
  150. StringSplit, Desc_, Desc, %A_Space%,
  151. lastword := Desc_%Desc_0%
  152. leng := StrLen(lastword)
  153. StringTrimRight, newX, Desc, %leng%
  154. GuiControl,, Desc, %newX%^%Color%%lastword%^000000%A_Space%
  155. GuiControl,Focus, Desc
  156. Send {Down 20}
  157. Send {End}
  158. goto Desc
  159. }
  160. return
  161.  
  162. GuiClose:
  163. ExitApp
  164. return
  165.  
  166. Add1:
  167. Add2:
  168. Add3:
  169. StringRight, currOpt, A_ThisLabel,1
  170. AddOpt = %currOpt%
  171. return
  172.  
  173. MorD1:
  174. MorD2:
  175. StringRight, currOpt1, A_ThisLabel,1
  176. MorD = %currOpt1%
  177. return
  178.  
  179. slot:
  180. Gui, submit, nohide
  181. if slot is number
  182. {
  183. SlotrNah = [%slot%]
  184. }
  185. else
  186. SlotrNah =
  187. goto Type
  188. return
  189.  
  190. Browse:
  191. FileSelectFile, selectFile,,,,*.act
  192. if errorlevel
  193. return
  194. else
  195. {
  196. GuiControl,, Dir, %selectFile%
  197. StringSplit, split_, selectFile, \
  198. fileName := split_%split_0%
  199. StringSplit, fileN_, fileName, .
  200. fileName := fileN_1
  201. StringReplace, path, selectFile, %fileName%.act,
  202. ;~ GuiControl,, item, %path%i%filename%.bmp
  203. GuiControl,, collection, %path%c%filename%.bmp
  204. StringReplace, tempX, fileName,_,%A_Space%,all
  205.  
  206. GuiControl,, Name, %tempX%
  207. }
  208. goto Type
  209. return
  210.  
  211. Browse2:
  212. FileSelectFolder, ROpath,,,,Select RO client folder
  213. if errorlevel
  214. return
  215. else
  216. {
  217. GuiControl,, cPath, %ROpath%
  218. }
  219. return
  220.  
  221. Add:
  222. Gui, submit, nohide
  223. StringReplace, Name2, Name, %A_Space%,_,all
  224. if selectFile =
  225. {
  226. MsgBox Cannot find item files.
  227. goto Browse
  228. }
  229. if ROpath =
  230. {
  231. MsgBox Cannot find client folder.
  232. goto Browse2
  233. }
  234. if ID = 0
  235. {
  236. MsgBox, ID cannot be 0.
  237. GuiControl, focus, ID
  238. return
  239. }
  240. if MorD = 1
  241. AddType = Client
  242. if MorD = 2
  243. AddType = Dummy
  244.  
  245. if (type = 1 && ViewID = 0)
  246. {
  247. MsgBox View ID cannot be 0 for Headgears.
  248. GuiControl, focus, ViewID
  249. return
  250. }
  251.  
  252. if AddType != Client
  253. {
  254. IfnotExist, %A_ScriptDIr%\%Dummy%
  255. {
  256. FileCreateDir, %A_ScriptDIr%\%Dummy%\data\luafiles514\lua files\datainfo\
  257. FileCreateDir, %A_ScriptDIr%\%Dummy%\data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\collection\
  258. FileCreateDir, %A_ScriptDIr%\%Dummy%\data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\item\
  259. FileCreateDir, %A_ScriptDIr%\%Dummy%\data\sprite\¾ÆÀÌÅÛ\
  260. FileCreateDir, %A_ScriptDIr%\%Dummy%\data\sprite\¾Ç¼¼»ç¸®\¿©\
  261. FileCreateDir, %A_ScriptDIr%\%Dummy%\data\sprite\¾Ç¼¼»ç¸®\³²\
  262. FileCopy, %path%\%fileName%.act, %A_ScriptDir%\%Dummy%\data\sprite\¾ÆÀÌÅÛ\%Name2%.act
  263. FileCopy, %path%\%fileName%.spr, %A_ScriptDir%\%Dummy%\data\sprite\¾ÆÀÌÅÛ\%Name2%.spr
  264. FileCopy, %path%\_%fileName%.act, %A_ScriptDir%\%Dummy%\data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_%Name2%.act
  265. FileCopy, %path%\_%fileName%.spr, %A_ScriptDir%\%Dummy%\data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_%Name2%.spr
  266. FileCopy, %path%\_%fileName%.act, %A_ScriptDir%\%Dummy%\data\sprite\¾Ç¼¼»ç¸®\³²\³²_%Name2%.act
  267. FileCopy, %path%\_%fileName%.spr, %A_ScriptDir%\%Dummy%\data\sprite\¾Ç¼¼»ç¸®\³²\³²_%Name2%.spr
  268. FileCopy, %path%\c%fileName%.bmp, %A_ScriptDir%\%Dummy%\data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\collection\%Name2%.bmp
  269. FileCopy, %path%\i%fileName%.bmp, %A_ScriptDir%\%Dummy%\data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\item\%Name2%.bmp
  270. }
  271. }
  272. if AddOpt = 1
  273. {
  274. if type = 1
  275. {
  276. DllCall("User32.dll\SendMessage", "Ptr", MARQ4, "Int", PBM_SETMARQUEE, "Ptr",50, "Ptr", 25)
  277. UpdateAccID()
  278. UpdateAccNameS()
  279. UpdateitemInfo()
  280. totalStr=
  281. DllCall("User32.dll\SendMessage", "Ptr", MARQ4, "Int", PBM_SETMARQUEE, "Ptr",50, "Ptr", -1)
  282. MsgBox Done !
  283. return
  284. }
  285. if type = 2
  286. {
  287. DllCall("User32.dll\SendMessage", "Ptr", MARQ4, "Int", PBM_SETMARQUEE, "Ptr",50, "Ptr", 25)
  288. ;~ UpdateWepTable()
  289. DllCall("User32.dll\SendMessage", "Ptr", MARQ4, "Int", PBM_SETMARQUEE, "Ptr",50, "Ptr", -1)
  290. MsgBox Done !
  291. return
  292. }
  293. }
  294.  
  295. if AddOpt = 2
  296. {
  297. }
  298. if AddOpt = 3
  299. {
  300.  
  301. }
  302. return
  303.  
  304. Type1:
  305. Type2:
  306. Type3:
  307. Type4:
  308. Type5:
  309. Type6:
  310. Type7:
  311. Type8:
  312. Type9:
  313. StringRight, type, A_ThisLabel,1
  314. if type = 1
  315. {
  316. GuiControl, Move, TypeBIG, x95 y201 h120
  317. GuiControl,, TypeBIG,Class: ^777777Headgear^000000`nDefense: ^777777^000000`nLocation: ^777777^000000`nWeight: ^777777^000000`nRequired Level: ^777777^000000`nJobs: ^777777All^000000
  318. goto Type
  319. }
  320. if type = 2
  321. {
  322. Guicontrol, Move, TypeBIG, x95 y225 h96
  323. GuiControl,, TypeBIG,Attack: ^777777^000000`nWeight: ^777777^000000`nWeapon Level: ^777777^000000`nRequired Level: ^777777^000000`nJobs: ^777777^000000
  324. goto Type
  325. }
  326. if type = 3
  327. {
  328. GuiControl, Move, TypeBIG, x95 y201 h120
  329. GuiControl,, TypeBIG,Class: ^777777Armor^000000`nDefense: ^777777^000000`nWeight: ^777777^000000`nRequired Level: ^777777^000000`nJobs: ^777777^000000
  330. goto Type
  331. }
  332. if type = 4
  333. {
  334. GuiControl, Move, TypeBIG, x95 y201 h120
  335. GuiControl,, TypeBIG,^ffffff_^000000`nWeight: ^777777^000000
  336. goto Type
  337. }
  338. if type = 5
  339. {
  340. GuiControl, Move, TypeBIG, x95 y201 h120
  341. GuiControl,, TypeBIG,Class: ^777777Shield^000000`nDefense: ^777777^000000`nWeight: ^777777^000000`nRequired Level: ^777777^000000`nJobs: ^777777^000000
  342. goto Type
  343. }
  344. if type = 6
  345. {
  346. GuiControl, Move, TypeBIG, x95 y201 h120
  347. GuiControl,, TypeBIG,Class: ^777777Accessory^000000`nDefense: ^777777^000000`nWeight: ^777777^000000`nRequired Level: ^777777^000000`nJobs: ^777777^000000
  348. goto Type
  349. }
  350. if type = 7
  351. {
  352. GuiControl, Move, TypeBIG, x95 y201 h120
  353. GuiControl,, TypeBIG,Class: ^777777Card^000000`nCompound on: ^777777^000000`nWeight: ^7777771^000000
  354. goto Type
  355. }
  356. if type = 8
  357. {
  358. GuiControl, Move, TypeBIG, x95 y201 h120
  359. Guicontrol,, TypeBIG,Class: ^777777Garment^000000`nDefense: ^777777^000000`nWeight: ^777777^000000`nRequired Level: ^777777^000000`nJobs: ^777777^000000
  360. goto Type
  361. }
  362. if type = 9
  363. {
  364. GuiControl, Move, TypeBIG, x95 y201 h120
  365. GuiControl,, TypeBIG,Class: ^777777Footwear^000000`nDefense: ^777777^000000`nWeight: ^777777^000000`nRequired Level: ^777777^000000`nJobs: ^777777^000000
  366. goto Type
  367. }
  368. return
  369.  
  370. Desc:
  371. Gui, submit, nohide
  372. Desc = %Desc%<br>%TypeBIG%
  373. StringReplace, Desc, Desc,`n,<br>,all
  374. IfInString, Desc, ^
  375. {
  376. StringSplit, tempo_, Desc, ^
  377. Loop %tempo_0%
  378. {
  379. if A_index = 1
  380. temp := temp tempo_%A_Index%
  381. else
  382. {
  383. temp := temp "^" tempo_%A_Index%
  384. StringLeft, Tcolor, tempo_%A_Index%, 6
  385. if Tcolor != 000000
  386. StringReplace, temp, temp, ^%Tcolor%, <font style="color:%Tcolor%">
  387. else
  388. StringReplace, temp, temp, ^000000, </font>
  389.  
  390. }
  391. }
  392. Loop %tempo_0%
  393. {
  394. tempo_%A_Index%=
  395. }
  396. Desc := temp
  397. temp=
  398. }
  399.  
  400. html =
  401. (
  402. <html>
  403. <body bgcolor="000000"/>
  404. <table style="width:290;color:#ffffff ;font-size:15" border = 1; cellspacing=0 ;cellpadding=3; bordercolor="38719C">
  405. <tr>
  406. <td bgcolor="38719C" valign='bottom'><img src=' %path%i%filename%.bmp'><b>&nbsp;%Name% %SlotrNah%</b></td>
  407. </tr>
  408. <tr>
  409. <td bgcolor="D2EDFF"><div style="overflow: scroll;width: 290px;height: 200px;"><font style="color:Black;font-size:16">%Desc%</font></div></td>
  410. </tr>
  411. </table>
  412. </html>
  413. )
  414. wb.navigate("about:blank")
  415. Sleep 50
  416. wb.document.write(html)
  417. return
  418.  
  419. Type:
  420. Gui, submit, nohide
  421. StringReplace, TypeBIG, TypeBIG,`n,<br>,all
  422. TypeBIG = %Desc%<br>%TypeBIG%
  423. IfInString, TypeBIG, ^
  424. {
  425. StringSplit, tempo_, TypeBIG, ^
  426. Loop %tempo_0%
  427. {
  428. if A_index = 1
  429. temp := temp tempo_%A_Index%
  430. else
  431. {
  432. temp := temp "^" tempo_%A_Index%
  433. StringLeft, Tcolor, tempo_%A_Index%, 6
  434. if Tcolor != 000000
  435. StringReplace, temp, temp, ^%Tcolor%, <font style="color:%Tcolor%">
  436. else
  437. StringReplace, temp, temp, ^000000, </font>
  438. }
  439. }
  440. Loop %tempo_0%
  441. {
  442. tempo_%A_Index%=
  443. }
  444. TypeBIG := temp
  445. temp=
  446. }
  447. html =
  448. (
  449. <html>
  450. <body bgcolor="000000"/>
  451. <table style="width:290;color:#ffffff ;font-size:15" border = 1; cellspacing=0 ;cellpadding=3; bordercolor="38719C">
  452. <tr>
  453. <td bgcolor="38719C" valign='bottom'><img src=' %path%i%filename%.bmp'><b>&nbsp;%Name% %SlotrNah%</b></td>
  454. </tr>
  455. <tr>
  456. <td bgcolor="D2EDFF"><div style="overflow: scroll;width: 290px;height: 200px;"><font style="color:Black;font-size:16">%TypeBIG%</font></div></td>
  457. </tr>
  458. </table>
  459. </html>
  460. )
  461. wb.navigate("about:blank")
  462. Sleep 50
  463. wb.document.write(html)
  464. return
  465.  
  466.  
  467. ;========================FUNC
  468.  
  469. UpdateWepTable()
  470. {
  471. global
  472. IfNotExist, %ROpath%\data\luafiles514\lua files\datainfo\weapontable.lub
  473. {
  474. MsgBox Can't find "weapontable.lub" in Client's folder.
  475. return
  476. }
  477. if AddType = Client
  478. {
  479. Loop, read, %ROpath%\data\luafiles514\lua files\datainfo\weapontable.lub
  480. {
  481.  
  482. }
  483. }
  484. else
  485. {
  486. IfExist, %A_ScriptDIr%\%Dummy%\data\luafiles514\lua files\datainfo\weapontable.lub
  487. tempPath = %A_ScriptDIr%\%Dummy%\data\luafiles514\lua files\datainfo\weapontable.lub
  488. else
  489. tempPath = %ROpath%\data\luafiles514\lua files\datainfo\weapontable.lub
  490. FileRead, data, %tempPath%
  491. StringSplit, data_, data, }
  492. data=
  493. StringTrimRight, data_1, data_1, 1
  494. StringTrimRight, data_2, data_2, 1
  495. StringTrimRight, data_3, data_3, 1
  496. ; FIXHERER
  497. StringReplace, Name3,Name2, _,all
  498. totalStr = %data_1%,`r`n WEAPONTYPE_%Name2% = %ViewID%`r`n}%data_2%,`r`n [Weapon_IDs.WEAPONTYPE_%Name2%] = "_%Name3%"`r`n}%data_3%,`r`n [Weapon_IDs.WEAPONTYPE_%Name2%] = Weapon_IDs.WEAPONTYPE_SWORD`r`n}%data_4%}
  499. data_1=
  500. data_2=
  501. data_3=
  502. FileDelete, %A_ScriptDIr%\%Dummy%\data\luafiles514\lua files\datainfo\weapontable.lub
  503. FileAppend, %totalStr%, %A_ScriptDir%\%Dummy%\data\luafiles514\lua files\datainfo\weapontable.lub
  504. totalStr=
  505. }
  506. }
  507. UpdateAccID()
  508. {
  509. global
  510. IfNotExist, %ROpath%\data\luafiles514\lua files\datainfo\accessoryid.lub
  511. {
  512. MsgBox Can't find "accessoryid.lub" in Client's folder.
  513. return
  514. }
  515. if AddType = Client
  516. {
  517. Loop, read, %ROpath%\data\luafiles514\lua files\datainfo\accessoryid.lub
  518. {
  519. StringRight, currStr, A_LoopReadLine, 1
  520. if currStr != ,
  521. {
  522. if A_Index = 1
  523. {
  524. totalStr = %A_LoopReadLine%
  525. continue
  526. }
  527. totalStr = %totalStr%`n%A_LoopReadLine%,
  528. break
  529. }
  530. totalStr = %totalStr%`n%A_LoopReadLine%
  531. }
  532. totalStr = %totalStr%`n%A_Space%%A_Space%ACCESSORY_%Name2% = %ViewID%`n`}
  533. IfExist, %A_ScriptDir%\accessoryid.lub
  534. FileDelete, %A_ScriptDIr%\accessoryid.lub
  535. FileAppend, %totalStr%, accessoryid.lub
  536. }
  537. else
  538. {
  539. IfExist, %A_ScriptDIr%\%Dummy%\data\luafiles514\lua files\datainfo\accessoryid.lub
  540. tempPath = %A_ScriptDIr%\%Dummy%\data\luafiles514\lua files\datainfo\accessoryid.lub
  541. else
  542. tempPath = %ROpath%\data\luafiles514\lua files\datainfo\accessoryid.lub
  543. Loop, read, %tempPath%
  544. {
  545. StringRight, currStr, A_LoopReadLine, 1
  546. if currStr != ,
  547. {
  548. if A_Index = 1
  549. {
  550. totalStr = %A_LoopReadLine%
  551. continue
  552. }
  553. totalStr = %totalStr%`n%A_LoopReadLine%,
  554. break
  555. }
  556. totalStr = %totalStr%`n%A_LoopReadLine%
  557. }
  558. totalStr = %totalStr%`n%A_Space%%A_Space%ACCESSORY_%Name2% = %ViewID%`n}
  559. FileDelete, %A_ScriptDIr%\%Dummy%\data\luafiles514\lua files\datainfo\accessoryid.lub
  560. FileAppend, %totalStr%, %A_ScriptDir%\%Dummy%\data\luafiles514\lua files\datainfo\accessoryid.lub
  561. }
  562. }
  563. UpdateAccNameS()
  564. {
  565. global
  566. IfNotExist, %ROpath%\data\luafiles514\lua files\datainfo\accname.lub
  567. {
  568. MsgBox Can't find "accname.lub" in Client's folder.
  569. return
  570. }
  571. IfNotExist, %ROpath%\data\luafiles514\lua files\datainfo\accname_eng.lub
  572. {
  573. MsgBox Can't find "accname_eng.lub" in Client's folder.
  574. return
  575. }
  576. if AddType = Client
  577. {
  578. Loop, read, %ROpath%\data\luafiles514\lua files\datainfo\accname.lub
  579. {
  580. StringRight, currStr, A_LoopReadLine, 1
  581. if currStr != ,
  582. {
  583. if A_Index = 1
  584. {
  585. totalStr = %A_LoopReadLine%
  586. continue
  587. }
  588. totalStr = %totalStr%`n%A_LoopReadLine%,
  589. break
  590. }
  591. totalStr = %totalStr%`n%A_LoopReadLine%
  592. }
  593. totalStr = %totalStr%`n%A_Space%%A_Space%[ACCESSORY_IDs.ACCESSORY_%Name2%] = "_%Name2%"`n}
  594.  
  595. FileDelete, %A_ScriptDIr%\accname.lub
  596. FileAppend, %totalStr%,accname.lub
  597.  
  598. Loop, read, %ROpath%\data\luafiles514\lua files\datainfo\accname_eng.lub
  599. {
  600. StringRight, currStr, A_LoopReadLine, 1
  601. if currStr != ,
  602. {
  603. if A_Index = 1
  604. {
  605. totalStr = %A_LoopReadLine%
  606. continue
  607. }
  608. totalStr = %totalStr%`n%A_LoopReadLine%,
  609. break
  610. }
  611. totalStr = %totalStr%`n%A_LoopReadLine%
  612. }
  613. totalStr = %totalStr%`n%A_Space%%A_Space%[ACCESSORY_IDs.ACCESSORY_%Name2%] = "_%Name2%"`n}
  614. FileDelete, %A_ScriptDIr%\accname_eng.lub
  615. FileAppend, %totalStr%,accname_eng.lub
  616. }
  617. else
  618. {
  619. IfExist, %A_ScriptDIr%\%Dummy%\data\luafiles514\lua files\datainfo\accname.lub
  620. tempPath = %A_ScriptDIr%\%Dummy%\data\luafiles514\lua files\datainfo\accname.lub
  621. else
  622. tempPath = %ROpath%\data\luafiles514\lua files\datainfo\accname.lub
  623. Loop, read, %tempPath%
  624. {
  625. StringRight, currStr, A_LoopReadLine, 1
  626. if currStr != ,
  627. {
  628. if A_Index = 1
  629. {
  630. totalStr = %A_LoopReadLine%
  631. continue
  632. }
  633. totalStr = %totalStr%`n%A_LoopReadLine%,
  634. break
  635. }
  636. totalStr = %totalStr%`n%A_LoopReadLine%
  637. }
  638. totalStr = %totalStr%`n%A_Space%%A_Space%[ACCESSORY_IDs.ACCESSORY_%Name2%] = "_%Name2%"`n}
  639. FileDelete, %A_ScriptDIr%\%Dummy%\data\luafiles514\lua files\datainfo\accname.lub
  640. FileAppend, %totalStr%,%A_ScriptDir%\%Dummy%\data\luafiles514\lua files\datainfo\accname.lub
  641.  
  642. IfExist, %A_ScriptDIr%\%Dummy%\data\luafiles514\lua files\datainfo\accname_eng.lub
  643. tempPath = %A_ScriptDIr%\%Dummy%\data\luafiles514\lua files\datainfo\accname_eng.lub
  644. else
  645. tempPath = %ROpath%\data\luafiles514\lua files\datainfo\accname_eng.lub
  646. Loop, read, %tempPath%
  647. {
  648. StringRight, currStr, A_LoopReadLine, 1
  649. if currStr != ,
  650. {
  651. if A_Index = 1
  652. {
  653. totalStr = %A_LoopReadLine%
  654. continue
  655. }
  656. totalStr = %totalStr%`n%A_LoopReadLine%,
  657. break
  658. }
  659. totalStr = %totalStr%`n%A_LoopReadLine%
  660. }
  661. totalStr = %totalStr%`n%A_Space%%A_Space%[ACCESSORY_IDs.ACCESSORY_%Name2%] = "_%Name2%"`n}
  662. FileDelete, %A_ScriptDIr%\%Dummy%\data\luafiles514\lua files\datainfo\accname_eng.lub
  663. FileAppend, %totalStr%,%A_ScriptDir%\%Dummy%\data\luafiles514\lua files\datainfo\accname_eng.lub
  664. }
  665. }
  666. UpdateitemInfo()
  667. {
  668. global
  669. IfNotExist, %ROpath%\System\itemInfo.lub
  670. {
  671. MsgBox Can't find "itemInfo.lub" in Client's folder.
  672. return
  673. }
  674. if AddType = Client
  675. {
  676. Loop, read, %ROpath%\System\itemInfo.lub
  677. {
  678. if A_Index = 1
  679. {
  680. totalStr = %A_LoopReadLine%
  681. continue
  682. }
  683. IfInString, A_Loopreadline, main = function()
  684. {
  685. breakLine := A_Index
  686. break
  687. }
  688. totalStr = %totalStr%`n%A_LoopReadLine%
  689. }
  690. StringTrimRight, totalStr, totalStr, 1
  691. if slot is not number
  692. slot = 0
  693. bigData = %Desc%`n%TypeBIG%
  694. StringSplit, bigData_, bigData, `n
  695. Loop %bigData_0%
  696. {
  697. plugin := bigData_%A_Index%
  698. if A_index = 1
  699. {
  700. infoDesc = "%plugin%",
  701. continue
  702. }
  703. if A_index = %bigData_0%
  704. {
  705. infoDesc = %infoDesc%`n%A_Tab%%A_Tab%%A_Tab%"%plugin%"
  706. break
  707. }
  708. infoDesc = %infoDesc%`n%A_Tab%%A_Tab%%A_Tab%"%plugin%",
  709. }
  710. if Desc =
  711. {
  712. DeEnd =
  713. (
  714. [%ID%] = {
  715. unidentifiedDisplayName = "%Name%",
  716. unidentifiedResourceName = "%Name2%",
  717. unidentifiedDescriptionName = {
  718. },
  719. identifiedDisplayName = "%Name%",
  720. identifiedResourceName = "%Name2%",
  721. identifiedDescriptionName = {
  722. },
  723. slotCount = %slot%,
  724. ClassNum = %viewID%
  725. },
  726.  
  727. }
  728.  
  729. )
  730. }
  731. else
  732. {
  733. DeEnd =
  734. (
  735. [%ID%] = {
  736. unidentifiedDisplayName = "%Name%",
  737. unidentifiedResourceName = "%Name2%",
  738. unidentifiedDescriptionName = {
  739. },
  740. identifiedDisplayName = "%Name%",
  741. identifiedResourceName = "%Name2%",
  742. identifiedDescriptionName = {
  743. %infoDesc%
  744. },
  745. slotCount = %slot%,
  746. ClassNum = %viewID%
  747. },
  748.  
  749. }
  750.  
  751. )
  752. }
  753. lineBig=
  754. Loop
  755. {
  756. FileReadLine, lineInfo, %ROpath%\System\itemInfo.lub, %breakLine%
  757. if errorlevel
  758. break
  759. else
  760. {
  761. breakLine++
  762. lineBig = %lineBig%`n%lineInfo%
  763. }
  764. }
  765. IfExist, %A_ScriptDir%\itemInfo.lub
  766. FileDelete, %A_ScriptDir%\itemInfo.lub
  767. FileAppend, %totalStr%%A_Tab%%DeEnd%%lineBig%,%A_ScriptDir%\itemInfo.lub
  768. }
  769. else
  770. {
  771. IfExist, %A_ScriptDIr%\%Dummy%\itemInfo.lub
  772. tempPath = %A_ScriptDIr%\%Dummy%\itemInfo.lub
  773. else
  774. tempPath = %ROpath%\System\itemInfo.lub
  775. Loop, read, %tempPath%
  776. {
  777. if A_Index = 1
  778. {
  779. totalStr = %A_LoopReadLine%
  780. continue
  781. }
  782. IfInString, A_Loopreadline, main = function()
  783. {
  784. breakLine := A_Index
  785. break
  786. }
  787. totalStr = %totalStr%`n%A_LoopReadLine%
  788. }
  789. StringTrimRight, totalStr, totalStr, 1
  790. if slot is not number
  791. slot = 0
  792. bigData = %Desc%`n%TypeBIG%
  793. StringSplit, bigData_, bigData, `n
  794. Loop %bigData_0%
  795. {
  796. plugin := bigData_%A_Index%
  797. if A_index = 1
  798. {
  799. infoDesc = "%plugin%",
  800. continue
  801. }
  802. if A_index = %bigData_0%
  803. {
  804. infoDesc = %infoDesc%`n%A_Tab%%A_Tab%%A_Tab%"%plugin%"
  805. break
  806. }
  807. infoDesc = %infoDesc%`n%A_Tab%%A_Tab%%A_Tab%"%plugin%",
  808. }
  809. if Desc =
  810. {
  811. DeEnd =
  812. (
  813. [%ID%] = {
  814. unidentifiedDisplayName = "%Name%",
  815. unidentifiedResourceName = "%Name2%",
  816. unidentifiedDescriptionName = {
  817. },
  818. identifiedDisplayName = "%Name%",
  819. identifiedResourceName = "%Name2%",
  820. identifiedDescriptionName = {
  821. },
  822. slotCount = %slot%,
  823. ClassNum = %viewID%
  824. },
  825.  
  826. }
  827.  
  828. )
  829. }
  830. else
  831. {
  832. DeEnd =
  833. (
  834. [%ID%] = {
  835. unidentifiedDisplayName = "%Name%",
  836. unidentifiedResourceName = "%Name2%",
  837. unidentifiedDescriptionName = {
  838. },
  839. identifiedDisplayName = "%Name%",
  840. identifiedResourceName = "%Name2%",
  841. identifiedDescriptionName = {
  842. %infoDesc%
  843. },
  844. slotCount = %slot%,
  845. ClassNum = %viewID%
  846. },
  847.  
  848. }
  849.  
  850. )
  851. }
  852. lineBig=
  853. Loop
  854. {
  855. FileReadLine, lineInfo, %tempPath%, %breakLine%
  856. if errorlevel
  857. break
  858. else
  859. {
  860. breakLine++
  861. lineBig = %lineBig%`n%lineInfo%
  862. ;~ FileAppend, %lineInfo%`n,%A_ScriptDir%\DummyData\itemInfo.lub
  863. }
  864. }
  865. IfExist, %A_ScriptDir%\%Dummy%\itemInfo.lub
  866. FileDelete, %A_ScriptDIr%\%Dummy%\itemInfo.lub
  867. FileAppend, %totalStr%%A_Tab%%DeEnd%%lineBig%,%A_ScriptDir%\%Dummy%\itemInfo.lub
  868. }
  869. }
Advertisement
Add Comment
Please, Sign In to add comment