nefthon

Untitled

Jan 19th, 2014
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.05 KB | None | 0 0
  1. ////////////////////////////////////////////////////////////////////////////////////////////
  2. //New .add dialog version 1.4
  3. //The first you have to check is that you have this in your sphere.ini:
  4. //
  5. //[RESOURCELIST]
  6. // ITEMDEF
  7. // CHARDEF
  8. //
  9. //To install it type .f_add_setup
  10. //To see the dialog type .add1
  11. //To 'reset' data, type .f_add_clear and then .f_add_setup again
  12. //
  13. //Note: As it is reading items/chars placed and no placed in the world, you may get some errors in console regarding to these items/chars
  14. ////////////////////////////////////////////////////////////////////////////////////////////
  15.  
  16. //v1.1 Lists modified to use numbers instead of names, so there are not needed the functions to fix their names and thei are now seen 100% like in the scripts
  17. //WARNING: To update the script you must type f_add_update otherwise the dialog wont show anything if you dont update the lists or you will have useless lists if you do not clear the old ones.
  18. //
  19. //v1.2 Removed tilepics from items/chars and placed a button that adds a new block with information about them, also a 'spawner' for chars.
  20. //
  21. //v1.3 Using tags instead of args to create the lists, so categories,etc with commas doesn't get fucked up in the proccess (This fixes some categories wrong sorted).
  22. // Now each block is showing 1 entry less so it shows a header of the menu you are on and a count of entry/total entries and page/totalpages in the items/chars section, also removed this from the top of the dialog in preparation for search box
  23. //
  24. //v1.4 Added search function, it's heavy so not recommended to use with players in the server since it will stop sphere for 3 seconds aprox. (It comes with a def so you can disable it via script and any staff member use it)
  25. //Fixed Create button from item's show box not working in pages > 0
  26. //Added a bypass for .add i_whatever/c_whatever while using f_oncommand override.
  27.  
  28.  
  29. [DEFNAME adddef]
  30. adddialog_search=1 //Set this to 0 if you do not want the dialog to be able to search items.
  31.  
  32. [FUNCTION f_oncommand]
  33. if (STRMATCH("add *","<args>")==1) //old .add i_whatever behaviour.
  34. return 0
  35. elseif (STRMATCH("add","<args>")==1)
  36. add1
  37. return 1
  38. endif
  39.  
  40. [function add1]
  41. if !(<ldb.connected>)
  42. ldb.connect adddialog.db
  43. // serv.log Connecting to table adddialog
  44. endif
  45. dialogclose d_add
  46. dialog d_add
  47. ldb.close
  48.  
  49. [function f_add_setup]
  50. if !(<ldb.connected>)
  51. ldb.connect "adddialog.db"
  52. // serv.log Connecting to table adddialog
  53. endif
  54. ldb.EXECUTE DROP TABLE IF EXISTS 'items'
  55. // ldb.EXECUTE DROP TABLE IF EXISTS 'items.category'
  56. // ldb.EXECUTE DROP TABLE IF EXISTS 'items.subsection'
  57. // ldb.EXECUTE DROP TABLE IF EXISTS 'items.description'
  58. ldb.EXECUTE DROP TABLE IF EXISTS 'chars'
  59. // ldb.EXECUTE DROP TABLE IF EXISTS 'chars.category'
  60. // ldb.EXECUTE DROP TABLE IF EXISTS 'chars.subsection'
  61. // ldb.EXECUTE DROP TABLE IF EXISTS 'chars.description'
  62. if (<ldb.connected>)
  63. ldb.execute CREATE TABLE 'items' ('id' VARCHAR(128) PRIMARY KEY NOT NULL,'defname' WORD, 'name' VARCHAR(32),'category' VARCHAR(32),'subsection' VARCHAR(32),'description' VARCHAR(32))
  64. // ldb.execute CREATE TABLE 'items.category' ('id' VARCHAR(32) UNIQUE)
  65. // ldb.execute CREATE TABLE 'items.subsection' ('id' VARCHAR(32) UNIQUE)
  66. // ldb.execute CREATE TABLE 'items.desccription' ('id' VARCHAR(32) UNIQUE)
  67. ldb.execute CREATE TABLE 'chars' ('id' VARCHAR(128) PRIMARY KEY NOT NULL,'defname' WORD, 'name' VARCHAR(32))
  68. // ldb.execute CREATE TABLE 'chars.category' ('id' VARCHAR(32) UNIQUE)
  69. // ldb.execute CREATE TABLE 'chars.subsection' ('id' VARCHAR(32) UNIQUE)
  70. // ldb.execute CREATE TABLE 'chars.desccription' ('id' VARCHAR(32) UNIQUE)
  71. local.hour=<serv.rticks>
  72. LDB.EXECUTE BEGIN
  73. for 0 500//<eval <serv.deflist.itemdef.count>-1>
  74. local.item=<serv.deflist.itemdef.<dlocal._for>>
  75. local.name=<serv.itemdef.<local.item>.name>
  76. local.defname=<qval <isempty <serv.itemdef.<local.item>.defname>>?NULL:<serv.itemdef.<local.item>.defname>>
  77. local.category=<qval <isempty <serv.itemdef.<local.item>.category>>?Uncategorized:<serv.itemdef.<local.item>.category>>
  78. local.subsection=<qval <isempty <serv.itemdef.<local.item>.subsection>>?Uncategorized:<serv.itemdef.<local.item>.subsection>>
  79. local.description=<qval <isempty <serv.itemdef.<local.item>.description>>?Uncategorized:<serv.itemdef.<local.item>.description>>
  80. // serv.log Query items = ('id','defname','name') VALUES ('<local.item>','<local.defname>','<local.name>')
  81. // serv.log Query info[<local.item>] = <local.category> , <local.subsection> , <local.description>
  82. // ldb.QUERY INSERT INTO 'items' ('id','defname','name') VALUES ('<local.item>','<local.defname>','<local.name>')
  83. ldb.QUERY INSERT INTO 'items' ('id','defname','name','category','subsection','description') VALUES ('<local.item>','<local.defname>','<db.escapedata <local.name>>','<db.escapedata <local.category>>','<db.escapedata <local.subsection>>','<db.escapedata <local.description>>')
  84. // if !(<local.category.<local.category>>)
  85. // ldb.QUERY INSERT INTO 'items.category' ('id') VALUES ('<local.category>')
  86. // local.category.<local.category>=1
  87. // else
  88. // serv.log duplicate cat
  89. // endif
  90. // if !(<local.subsection.<local.subsection>>)
  91. // ldb.QUERY INSERT INTO 'items.subsection' ('id') VALUES ('<local.subsection>')
  92. // local.subsection.<local.subsection>=1
  93. // else
  94. // serv.log duplicate sun
  95. // endif
  96. // if !(<local.description.<local.description>>)
  97. // ldb.QUERY INSERT INTO 'items.description' ('id') VALUES ('<local.description>')
  98. // local.description.<local.description>=1
  99. // else
  100. // serv.log duplicate desc
  101. // endif
  102. endfor
  103. LDB.EXECUTE COMMIT
  104. serv.log Output done in <eval <serv.rticks>-<local.hour>> seconds.
  105. endfor
  106. ldb.close
  107.  
  108.  
  109. [function f_add_clear]
  110. ldb.EXECUTE DROP TABLE IF EXISTS 'items'
  111. ldb.EXECUTE DROP TABLE IF EXISTS 'chars'
  112.  
  113. [function f_add_search]
  114.  
  115.  
  116. [function f_add_generate_main]
  117. //Img
  118. resizepic 0 0 9200 230 137 // background border
  119. gumppictiled 10 10 210 117 2624 // darker background
  120. checkertrans 10 10 210 117 // transparency layer
  121. //Modes
  122. dtext 90 30 0480 Items
  123. button 50 30 4005 4007 <qval <isempty <serv.list.items.count>>?0:1> 0 1 //No references in list? no click on buttons
  124. dtext 90 90 0480 Npcs
  125. button 50 90 4005 4007 <qval <isempty <serv.list.chars.count>>?0:1> 0 2
  126.  
  127. [function f_add_generate_background]
  128. //img
  129. if !(<isempty <ctag.add_show>>)
  130. resizepic 0 0 9200 800 587 // background border
  131. gumppictiled 10 10 780 567 2624 // darker background
  132. gumppictiled 10 32 780 5 5058 // 1 grey separators - start here
  133. gumppictiled 230 37 5 400 5058 // 1
  134. gumppictiled 510 37 5 400 5058 // 2
  135. gumppictiled 10 32 510 5 5058 // 4
  136. gumppictiled 10 432 780 5 5058 // 5
  137. gumppictiled 120 432 5 150 5058 // 5
  138. checkertrans 10 10 780 567 // transparency layer
  139. elseif !(<isempty <ctag.add_sub>>) //Dynamic gump, more info = more gump, no modules, no different dialogs for the same.
  140. resizepic 0 0 9200 800 437 // background border
  141. gumppictiled 10 10 780 417 2624 // darker background
  142. gumppictiled 10 32 780 5 5058 // 1 grey separators - start here
  143. gumppictiled 230 37 5 400 5058 // 1
  144. gumppictiled 510 37 5 400 5058 // 2
  145. gumppictiled 10 32 510 5 5058 // 4
  146. checkertrans 10 10 780 417 // transparency layer
  147. elseif !(<isempty <ctag.add_cat>>)
  148. resizepic 0 0 9200 530 437 // background/border
  149. gumppictiled 10 10 510 417 2624 // darker background
  150. gumppictiled 10 32 510 5 5058 // 1 grey separators - start here
  151. gumppictiled 230 37 5 400 5058 // 2
  152. checkertrans 10 10 510 417 // transparency layer
  153. else
  154. resizepic 0 0 9200 250 437 // background/border
  155. gumppictiled 10 10 230 417 2624 // darker background
  156. gumppictiled 10 32 230 5 5058 // 1 grey separators - start here
  157. checkertrans 10 10 230 417 // transparency layer
  158. endif
  159.  
  160. [function f_Add_generate_topbar]
  161. dtext 40 10 0480 <ctag.add_mode>
  162. button 10 10 4014 4045 1 0 3 //Change between items/npcs
  163. if (<def.adddialog_search>==1)
  164. dtext 170 10 0480 Search
  165. button 140 10 4011 4012 1 0 10 //Change between items/npcs
  166. endif
  167. if !(<isempty <ctag.add_search>>)
  168. local.max=<eval <f_argv <ctag.add_search>>-1>
  169. if (<ctag.add_search_id><<local.max>)
  170. dtext 480 10 0480 Search Next
  171. button 555 10 4005 4007 1 0 11
  172. endif
  173. if (<ctag.add_search_id>>0)
  174. dtext 350 10 0480 Search Previous
  175. button 310 10 4014 4045 1 0 12
  176. endif
  177. endif
  178.  
  179. [function f_add_generate_categories]
  180. local.cx=41 //Category X
  181. local.cy=70 //Category Y
  182. local.header=<serv.list.<ctag.add_mode>.<dctag.add_cat>>
  183. if (<eval STRLEN(<local.header>)>>25)
  184. local.header=<strsub 0 25 <local.header>>
  185. endif
  186. ldb.close
  187. ldb.connect adddialog.db
  188. dtext 10 45 0480 <qval <isempty <ctag.add_cat>>==0?<local.header> (<dctag.add_cat>/<eval <serv.list.<ctag.add_mode>.count>-1>):>
  189. local.list=<ctag.add_mode> //To avoid confusion, its better to store 'list structure' in one local and then get it out
  190. local.index=<eval 14*<ctag0.adddialog_page>>//We get FOR data from items_per_page*page_number
  191. LDB.query "SELECT category FROM <local.list> WHERE ROWID >= <dlocal.index> AND ROWID <= <eval <local.index>+14>"
  192. sysmessage=total= <ldb.row.numrows> ("SELECT * FROM <local.list> WHERE ROWID >= <dlocal.index> AND ROWID <= <eval <local.index>+14>")
  193. for 0 13
  194. local.num=<local.index>+<local._for>
  195. if !(<isempty <serv.list.<local.list>.<dlocal.num>>>)
  196. local.text=<ldb.row.<dlocal.num>.category>
  197. if (<eval STRLEN(<local.text>)>>28)
  198. local.text=<strsub 0 28 <local.text>>
  199. endif
  200. dtext <dlocal.cx> <dlocal.cy> 0480 <local.text>
  201. button <eval <local.cx>-30> <dlocal.cy> 4005 4007 1 0 <eval 100+<dlocal._for>>
  202. local.cy +=23
  203. endif
  204. endfor
  205. if <serv.list.<local.list>.count> //I check this alone first to avoid console errors
  206. IF (<serv.list.<local.list>.count> > <eval <local.index>+15>)
  207. button 200 400 4005 4007 1 0 4
  208. dtext 130 400 0480 Next Page
  209. endif
  210. endif
  211. if (<ctag0.adddialog_page>> 0)
  212. button 10 400 4014 4045 1 0 5
  213. dtext 40 400 0480 Previous Page
  214. endif
  215.  
  216.  
  217. [function f_add_generate_subsections]
  218. IF !(<isempty <ctag.add_cat>>)
  219. local.sx=266 //Subsection X
  220. local.sy=70 //Subsection Y
  221. local.header=<serv.list.<ctag.add_mode>_<dctag.add_cat>.<dctag.add_sub>>
  222. dtext 236 45 0480 <qval <isempty <ctag.add_sub>>==0?<local.header> (<dctag.add_sub>/<eval <serv.list.<ctag.add_mode>_<dctag.add_cat>.count>-1>):>
  223. local.index=<eval 14*<ctag.add_cat_page>>
  224. local.list=<ctag.add_mode>_<dctag.add_cat>
  225. for 0 13
  226. local.num=<local.index>+<local._for>
  227. if <dlocal.num>< <serv.list.<local.list>.count>
  228. local.text=<serv.list.<local.list>.<dlocal.num>>
  229. if (<eval STRLEN(<local.text>)>>38)
  230. local.text=<strsub 0 38 <local.text>>
  231. endif
  232. dtext <dlocal.sx> <dlocal.sy> 0480 <local.text>
  233. button <eval <dlocal.sx>-30> <dlocal.sy> 4005 4007 1 0 <eval 200+<dlocal._for>> //boton aceptar
  234. local.sy +=23
  235. endif
  236. endfor
  237. if <serv.list.<local.list>.count>
  238. IF (<serv.list.<local.list>.count> > <eval <local.index>+13>)
  239. button 480 400 4005 4007 1 0 6
  240. dtext 410 400 0480 Next Page
  241. endif
  242. endif
  243. if (<ctag0.adddialog_cat_page>> 0)
  244. button 236 400 4014 4045 1 0 7
  245. dtext 271 400 0480 Previous Page
  246. endif
  247. endif
  248.  
  249. [function f_Add_generate_descriptions]
  250. IF !(<isempty <ctag.add_sub>>)
  251. local.dx=546 //Subsection X
  252. local.dy=70 //Subsection Y
  253. if (<ctag0.adddialog_sub_page>)
  254. local.index=<eval 14*<ctag.add_sub_page>>
  255. else
  256. local.index=0
  257. endif
  258. local.header=<serv.list.<ctag.add_mode>_<dctag.add_cat>.<dctag.add_sub>>
  259. dtext 516 45 0480 Page (<dctag.add_sub_page>/<eval <serv.list.<ctag.add_mode>_<dctag.add_cat>_<dctag.add_sub>.count>/14>)
  260. local.list=<ctag.add_mode>_<dctag.add_cat>_<dctag.add_sub>
  261. for 0 13
  262. local.num=<local.index>+<local._for>
  263. local.id=<serv.list.<local.list>.<dlocal.num>>
  264. IF (STRMATCH("items","<ctag.add_mode>")==1)
  265. local.pic <serv.itemdef.<local.id>.id>
  266. if (<isempty <serv.itemdef.<local.id>.description>>)
  267. local.desc=<serv.itemdef.<local.id>.name>
  268. else
  269. local.desc=<serv.itemdef.<local.id>.description>
  270. endif
  271. else
  272. local.pic <serv.itemdef.<serv.chardef.<local.id>.icon>.id>
  273. local.char=1
  274. if (<isempty <serv.chardef.<local.id>.description>>)
  275. local.desc=<serv.chardef.<local.id>.name>
  276. else
  277. local.desc=<serv.chardef.<local.id>.description>
  278. endif
  279. endif
  280. if !(<isempty <serv.list.<local.list>.<dlocal.num>>>)
  281. dtext <dlocal.dx> <dlocal.dy> 0480 <local.desc>
  282. button 760 <dlocal.dy> 4005 4007 1 0 <eval 1000+<dlocal._for>>
  283. button 516 <dlocal.dy> 4011 4012 1 0 <eval 1100+<dlocal._for>>
  284. local.dy +=23
  285. endif
  286. endfor
  287. if <serv.list.<local.list>.count>
  288. IF (<serv.list.<local.list>.count> > <eval <local.index>+14>)
  289. button 760 400 4005 4007 1 0 8
  290. dtext 690 400 0480 Next Page
  291. endif
  292. endif
  293. if !(<isempty <ctag.add_sub_page>>)
  294. button 515 400 4014 4045 1 0 9
  295. dtext 550 400 0480 Previous page
  296. endif
  297. endif
  298.  
  299. [function f_add_generate_views]
  300. IF !(<isempty <ctag.add_show>>)
  301. if (<ctag0.adddialog_sub_page>)
  302. local.index=<eval 14*<ctag.add_sub_page>>
  303. else
  304. local.index=0
  305. endif
  306. local.listid=<ctag.add_mode>_<dctag.add_cat>_<dctag.add_sub>
  307. local.id=<serv.list.<local.listid>.<eval <local.index>+<ctag.add_show>>>
  308. // local.id=<serv.list.<ctag.add_mode>_<dctag.add_cat>_<dctag.add_sub>.<dctag.add_show>>
  309. if (STRMATCH("<ctag.add_mode>","items")==1)
  310. dtext 126 440 0480 ID: <local.id> <qval <serv.itemdef.<local.id>.defname>?(<serv.itemdef.<local.id>.defname>):>
  311. dtext 126 460 0480 Name: <serv.itemdef.<local.id>.name>
  312. dtext 126 480 0480 Type: <serv.itemdef.<local.id>.type>
  313. if !(<isempty <serv.itemdef.<local.id>.tevents>>)
  314. dtext 126 500 0480 Tevents: <serv.itemdef.<local.id>.tevents>
  315. endif
  316. local.y=440
  317. if !(<isempty <serv.itemdef.<local.id>.skillmake>>)
  318. dtext 366 <dlocal.y> 0480 Skillmake: <serv.itemdef.<local.id>.skillmake>
  319. local.y +=20
  320. endif
  321. if !(<isempty <serv.itemdef.<local.id>.resources>>)
  322. dtext 366 <dlocal.y> 0480 Resources: <serv.itemdef.<local.id>.resources>
  323. local.y +=20
  324. endif
  325. if (<serv.itemdef.<local.id>.tag0.GargoyleOnly>==1)
  326. dtext 366 <dlocal.y> 0480 Gargoyle Item
  327. local.y +=20
  328. endif
  329. tilepic 30 440 <serv.itemdef.<local.id>.id>
  330. button 126 554 4005 4007 1 0 <eval 1000+<ctag.add_show>>
  331. dtext 156 554 0480 Create
  332. else
  333. dtext 126 440 0480 ID: <local.id>
  334. dtext 126 460 0480 Name: <serv.chardef.<local.id>.name>
  335. dtext 126 480 0480 //Tevents: <serv.chardef.<local.id>.tevents>
  336. dtext 126 500 0480
  337. local.y=440
  338. tilepic 30 440 <serv.chardef.<local.id>.icon>
  339. button 126 554 4005 4007 1 0 <eval 1000+<ctag.add_show>>
  340. dtext 156 554 0480 Create
  341. dtext 626 440 0480 Create spawn
  342. dtext 600 460 0480 Amount
  343. dtextentry 680 460 20 20 33 1 1
  344. dtext 600 480 0480 Min Time
  345. dtextentry 680 480 20 20 33 2 5
  346. dtext 600 500 0480 Max Time
  347. dtextentry 680 500 20 20 33 3 15
  348. dtext 600 520 0480 Max Distance
  349. dtextentry 680 520 20 20 33 4 15
  350. button 600 554 4005 4007 1 0 <eval 1200+<ctag.add_show>>
  351. dtext 630 554 0480 Create Spawn
  352. endif
  353. endif
  354.  
  355. [dialog d_add]
  356. 6,32
  357. IF (<isempty <ctag.add_mode>>)
  358. f_add_generate_main //Dialog shown when no item or npc view is selected yet.
  359. else
  360. f_add_generate_background //Dynamic background increasing/decreasing according to the amount of menus we are seeing.
  361. f_add_generate_topbar //Displaying top bar
  362. f_add_generate_categories //Filling categories menu (if selected items or npcs)
  363. f_add_generate_subsections //Filling subsections menu (if looking into any)
  364. f_add_generate_descriptions //Final list of items or npcs of the selected category+subsection
  365. f_add_generate_views //Showing detailed information about the selected item or npc
  366. endif
  367. ldb.close
  368.  
  369. [DIALOG d_add BUTTON]
  370. ON=1
  371. ctag.add_mode=items
  372. dialog d_add
  373.  
  374. ON=2
  375. ctag.add_mode=chars
  376. dialog d_Add
  377.  
  378. ON=3
  379. ctag.add_show
  380. ctag.add_page
  381. ctag.add_mode
  382. ctag.add_cat
  383. ctag.add_sub
  384. ctag.add_cat_page
  385. ctag.add_sub_page
  386. ctag.add_search
  387. ctag.add_search_id
  388. dialog d_add
  389.  
  390. ON=4
  391. ctag0.adddialog_page +=1
  392. dialog d_add
  393. ON=5
  394. ctag0.adddialog_page -=1
  395. dialog d_add
  396.  
  397. ON=6
  398. ctag0.adddialog_cat_page +=1
  399. dialog d_add
  400. ON=7
  401. ctag0.adddialog_cat_page -=1
  402. dialog d_add
  403.  
  404. ON=8
  405. ctag0.adddialog_sub_page +=1
  406. dialog d_add
  407. ON=9
  408. ctag0.adddialog_sub_page -=1
  409. dialog d_add
  410. ON=10
  411. sysmessage=Type the text to search.
  412. promptconsole f_add_search
  413.  
  414. ON=11
  415. f_add_search <eval <ctag.add_search_id>+1>
  416. ON=12
  417. f_add_search <eval <ctag.add_search_id>-1>
  418.  
  419. ON=100 115 //categories
  420. if (<ctag0.adddialog_page>)
  421. local.index=<eval 14*<ctag.add_page>>
  422. else
  423. local.index=0
  424. endif
  425. local.num=<eval (<argn>-100)+<local.index>>
  426. ctag.add_cat=<local.num>
  427. ctag.add_cat_page
  428. ctag.add_sub
  429. ctag.add_sub_page
  430. ctag.add_show
  431. ctag.add_search
  432. ctag.add_search_id
  433. dialog d_Add
  434.  
  435. ON=200 215
  436. if (<ctag0.adddialog_cat_page>)
  437. local.index=<eval 14*<ctag.add_cat_page>>
  438. else
  439. local.index=0
  440. endif
  441. local.num=<eval (<argn>-200)+<local.index>>
  442. ctag.add_sub=<local.num>
  443. ctag.add_sub_page
  444. ctag.add_show
  445. ctag.add_search
  446. ctag.add_search_id
  447. dialog d_Add
  448.  
  449. ON=1000 1015
  450. if (<ctag0.adddialog_sub_page>)
  451. local.index=<eval 14*<ctag.add_sub_page>>
  452. else
  453. local.index=0
  454. endif
  455. local.listid=<ctag.add_mode>_<dctag.add_cat>_<dctag.add_sub>
  456. local.id=<serv.list.<local.listid>.<eval <local.index>+(<argn>-1000)>>
  457. if (STRMATCH("ITEMS","<ctag.add_mode>")==1)
  458. if (<serv.itemdef.<local.id>.id>)
  459. add <local.id>
  460. endif
  461. elseif (STRMATCH("chars","<ctag.add_mode>")==1)
  462. if (<serv.chardef.<local.id>>)
  463. addnpc <local.id>
  464. endif
  465. endif
  466.  
  467. ON=1100 1115
  468. if (<ctag0.adddialog_sub_page>)
  469. local.index=<eval 14*<ctag.add_sub_page>>
  470. else
  471. local.index=0
  472. endif
  473. ctag.add_show=<eval <argn>-1100>
  474. dialog d_add
  475.  
  476. ON=1200 1215
  477. if (<ctag0.adddialog_sub_page>)
  478. local.index=<eval 14*<ctag.add_sub_page>>
  479. else
  480. local.index=0
  481. endif
  482. local.listid=<ctag.add_mode>_<dctag.add_cat>_<dctag.add_sub>
  483. local.id=<serv.list.<local.listid>.<eval <local.index>+(<argn>-1200)>>
  484. targetfg f_createspawn <local.id>,<argtxt[1]>,<argtxt[2]>,<argtxt[3]>,<argtxt[4]>
  485. sysmessage=Where do you want to place the spawn?
  486.  
  487. [FUNCTION f_argv]
  488. RETURN <ARGV>
  489.  
  490. [function f_createspawn]
  491. serv.newitem=i_worldgem_bit
  492. new.more=<argv[0]>
  493. new.amount=<argv[1]>
  494. new.morep=<argv[2]>,<argv[3]>,<argv[4]>
  495. new.p=<p>
  496. new.p=<targp>
  497. new.dclick
  498. [EOF]
Advertisement
Add Comment
Please, Sign In to add comment