Advertisement
Ploizeibe_Kant

1.0.4 - No Base safe extDB3 exile.ini

Mar 18th, 2018
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.80 KB | None | 0 0
  1. [Default]
  2.  
  3. Version = 1
  4.  
  5. ;Sanitize Input Value Check = false
  6. ;Sanitize Output Value Check = false
  7. ;Prepared Statement Cache = true
  8. ;Return InsertID = false
  9. ;Strip = true
  10. ;Strip Chars Action = STRIP
  11. Strip Chars = "\/\|;{}<>\'"
  12. ;Strip Custom Chars = "\/\|;{}<>\'"
  13. Strip Chars Mode = 0
  14. Input SQF Parser = false
  15.  
  16.  
  17. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  18. ;; Account related queries
  19. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  20.  
  21. [isKnownAccount]
  22. SQL1_1 = SELECT CASE WHEN EXISTS(SELECT uid FROM account WHERE uid = ?) THEN 'true' ELSE 'false' END
  23.  
  24. SQL1_INPUTS = 1
  25. OUTPUT = 1
  26.  
  27. [createAccount]
  28. SQL1_1 = INSERT INTO account SET uid = ?, name = ?
  29.  
  30. SQL1_INPUTS = 1,2
  31.  
  32. [startAccountSession]
  33. SQL1_1 = UPDATE account SET name = ?, last_connect_at = NOW(), total_connections = total_connections + 1 WHERE uid = ?
  34.  
  35. SQL1_INPUTS = 2,1
  36.  
  37. [endAccountSession]
  38. SQL1_1 = UPDATE account SET last_disconnect_at = NOW() WHERE uid = ?
  39.  
  40. SQL1_INPUTS = 1
  41.  
  42. [getAccountStats]
  43. SQL1_1 = SELECT score, kills, deaths, clan_id, locker FROM account WHERE uid = ?
  44.  
  45. SQL1_INPUTS = 1
  46. OUTPUT = 1,2,3,4,5
  47.  
  48. [addAccountKill]
  49. SQL1_1 = UPDATE account SET kills = kills + 1 WHERE uid = ?
  50.  
  51. SQL1_INPUTS = 1
  52.  
  53. [addAccountDeath]
  54. SQL1_1 = UPDATE account SET deaths = deaths + 1 WHERE uid = ?
  55.  
  56. SQL1_INPUTS = 1
  57.  
  58. [getAccountScore]
  59. SQL1_1 = SELECT score FROM account WHERE uid = ?
  60.  
  61. SQL1_INPUTS = 1
  62. OUTPUT = 1
  63.  
  64. [setAccountScore]
  65. SQL1_1 = UPDATE account SET score = ? WHERE uid = ?
  66.  
  67. SQL1_INPUTS = 1,2
  68.  
  69. [modifyAccountScore]
  70. SQL1_1 = UPDATE account SET score = score + ? WHERE uid = ?
  71.  
  72. SQL1_INPUTS = 1,2
  73.  
  74. [updateLocker]
  75. SQL1_1 = UPDATE account SET locker = ? WHERE uid = ?
  76.  
  77. SQL1_INPUTS = 1,2
  78.  
  79. [getLocker]
  80. SQL1_1 = SELECT locker FROM account WHERE uid = ?
  81.  
  82. SQL1_INPUTS = 1
  83. OUTPUT = 1
  84.  
  85. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  86. ;; Player related queries
  87. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  88.  
  89. [hasAlivePlayer]
  90. SQL1_1 = SELECT CASE WHEN EXISTS(SELECT account_uid FROM player WHERE account_uid = ? AND damage < 1) THEN 'true' ELSE 'false' END
  91.  
  92. SQL1_INPUTS = 1
  93. OUTPUT = 1
  94.  
  95. [createPlayer]
  96. SQL1_1 = INSERT INTO player SET account_uid = ?, name = ?
  97.  
  98. SQL1_INPUTS = 1,2
  99. Return InsertID = true
  100.  
  101. [insertPlayerHistory]
  102. SQL1_1 = INSERT INTO player_history SET account_uid = ?, name = ?, position_x = ?, position_y = ?, position_z = ?
  103.  
  104. SQL1_INPUTS = 1,2,3,4,5
  105.  
  106. [deletePlayer]
  107. SQL1_1 = DELETE FROM player WHERE id = ?
  108.  
  109. SQL1_INPUTS = 1
  110.  
  111. [loadPlayer]
  112. SQL1_1 = SELECT p.id,
  113. SQL1_2 = p.name,
  114. SQL1_3 = p.account_uid,
  115. SQL1_4 = p.damage,
  116. SQL1_5 = p.hunger,
  117. SQL1_6 = p.thirst,
  118. SQL1_7 = p.alcohol,
  119. SQL1_8 = p.oxygen_remaining,
  120. SQL1_9 = p.bleeding_remaining,
  121. SQL1_10 = p.hitpoints,
  122. SQL1_11 = p.direction,
  123. SQL1_12 = p.position_x,
  124. SQL1_13 = p.position_y,
  125. SQL1_14 = p.position_z,
  126. SQL1_15 = p.assigned_items,
  127. SQL1_16 = p.backpack,
  128. SQL1_17 = p.backpack_items,
  129. SQL1_18 = p.backpack_magazines,
  130. SQL1_19 = p.backpack_weapons,
  131. SQL1_20 = p.current_weapon,
  132. SQL1_21 = p.goggles,
  133. SQL1_22 = p.handgun_items,
  134. SQL1_23 = p.handgun_weapon,
  135. SQL1_24 = p.headgear,
  136. SQL1_25 = p.binocular,
  137. SQL1_26 = p.loaded_magazines,
  138. SQL1_27 = p.primary_weapon,
  139. SQL1_28 = p.primary_weapon_items,
  140. SQL1_29 = p.secondary_weapon,
  141. SQL1_30 = p.secondary_weapon_items,
  142. SQL1_31 = p.uniform,
  143. SQL1_32 = p.uniform_items,
  144. SQL1_33 = p.uniform_magazines,
  145. SQL1_34 = p.uniform_weapons,
  146. SQL1_35 = p.vest,
  147. SQL1_36 = p.vest_items,
  148. SQL1_37 = p.vest_magazines,
  149. SQL1_38 = p.vest_weapons,
  150. SQL1_39 = p.money,
  151. SQL1_40 = a.score,
  152. SQL1_41 = a.kills,
  153. SQL1_42 = a.deaths,
  154. SQL1_43 = c.id,
  155. SQL1_44 = c.name,
  156. SQL1_45 = p.temperature,
  157. SQL1_46 = p.wetness,
  158. SQL1_47 = a.locker
  159. SQL1_48 = FROM player p
  160. SQL1_49 = INNER JOIN account a
  161. SQL1_50 = ON a.uid = p.account_uid
  162. SQL1_51 = LEFT JOIN clan c
  163. SQL1_52 = ON c.id = a.clan_id
  164. SQL1_53 = WHERE p.account_uid = ?
  165.  
  166. SQL1_INPUTS = 1
  167. OUTPUT = 1,2-STRING,3-STRING,4,5,6,7,8,9,10,11,12,13,14,15,16-STRING,17,18,19,20-STRING,21-STRING,22,23-STRING,24-STRING,25-STRING,26,27-STRING,28,29-STRING,30,31-STRING,32,33,34,35-STRING,36,37,38,39,40,41,42,43,44-STRING,45,46,47
  168.  
  169. [updatePlayer]
  170. SQL1_1 = UPDATE player SET
  171. SQL1_2 = name = ?,
  172. SQL1_3 = damage = ?,
  173. SQL1_4 = hunger = ?,
  174. SQL1_5 = thirst = ?,
  175. SQL1_6 = alcohol = ?,
  176. SQL1_7 = oxygen_remaining = ?,
  177. SQL1_8 = bleeding_remaining = ?,
  178. SQL1_9 = hitpoints = ?,
  179. SQL1_10 = direction = ?,
  180. SQL1_11 = position_x = ?,
  181. SQL1_12 = position_y = ?,
  182. SQL1_13 = position_z = ?,
  183. SQL1_14 = assigned_items = ?,
  184. SQL1_15 = backpack = ?,
  185. SQL1_16 = backpack_items = ?,
  186. SQL1_17 = backpack_magazines = ?,
  187. SQL1_18 = backpack_weapons = ?,
  188. SQL1_19 = current_weapon = ?,
  189. SQL1_20 = goggles = ?,
  190. SQL1_21 = handgun_items = ?,
  191. SQL1_22 = handgun_weapon = ?,
  192. SQL1_23 = headgear = ?,
  193. SQL1_24 = binocular = ?,
  194. SQL1_25 = loaded_magazines = ?,
  195. SQL1_26 = primary_weapon = ?,
  196. SQL1_27 = primary_weapon_items = ?,
  197. SQL1_28 = secondary_weapon = ?,
  198. SQL1_29 = secondary_weapon_items = ?,
  199. SQL1_30 = uniform = ?,
  200. SQL1_31 = uniform_items = ?,
  201. SQL1_32 = uniform_magazines = ?,
  202. SQL1_33 = uniform_weapons = ?,
  203. SQL1_34 = vest = ?,
  204. SQL1_35 = vest_items = ?,
  205. SQL1_36 = vest_magazines = ?,
  206. SQL1_37 = vest_weapons = ?,
  207. SQL1_38 = temperature = ?,
  208. SQL1_39 = wetness = ?
  209. SQL1_40 = WHERE id = ?
  210.  
  211. SQL1_INPUTS = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39
  212.  
  213. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  214. ;; Vehicle related queries
  215. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  216.  
  217. [insertVehicle]
  218. SQL1_1 = INSERT INTO vehicle SET
  219. SQL1_2 = class = ?,
  220. SQL1_3 = account_uid = ?,
  221. SQL1_4 = is_locked = ?,
  222. SQL1_5 = position_x = ?,
  223. SQL1_6 = position_y = ?,
  224. SQL1_7 = position_z = ?,
  225. SQL1_8 = direction_x = ?,
  226. SQL1_9 = direction_y = ?,
  227. SQL1_10 = direction_z = ?,
  228. SQL1_11 = up_x = ?,
  229. SQL1_12 = up_y = ?,
  230. SQL1_13 = up_z = ?,
  231. SQL1_14 = pin_code = ?
  232.  
  233. SQL1_INPUTS = 1,2,3,4,5,6,7,8,9,10,11,12,13
  234. Return InsertID = true
  235.  
  236. [deleteVehicle]
  237. SQL1_1 = DELETE FROM vehicle WHERE id = ?
  238.  
  239. SQL1_INPUTS = 1
  240.  
  241. [loadVehicleIdPage]
  242. SQL1_1 = SELECT id FROM vehicle WHERE deleted_at IS NULL AND territory_id IS NULL LIMIT ?,?
  243. SQL1_INPUTS = 1,2
  244. OUTPUT = 1
  245.  
  246. [loadVehicle]
  247. SQL1_1 = SELECT id,class,spawned_at,account_uid,is_locked,fuel,damage,hitpoints,position_x,position_y,position_z,direction_x,direction_y,direction_z,up_x,up_y,up_z,cargo_items,cargo_magazines,cargo_weapons,pin_code,vehicle_texture,deleted_at,money FROM vehicle WHERE id = ?
  248.  
  249. SQL1_INPUTS = 1
  250. OUTPUT = 1,2-STRING,3-STRING,4-STRING,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21-STRING,22,23,24
  251.  
  252. [loadVehicleContainer]
  253. SQL1_1 = SELECT cargo_container FROM vehicle WHERE id = ?
  254.  
  255. SQL1_INPUTS = 1
  256. OUTPUT = 1
  257.  
  258. [updateVehicle]
  259. SQL1_1 = UPDATE vehicle SET
  260. SQL1_2 = is_locked = ?,
  261. SQL1_3 = fuel = ?,
  262. SQL1_4 = damage = ?,
  263. SQL1_5 = hitpoints = ?,
  264. SQL1_6 = position_x = ?,
  265. SQL1_7 = position_y = ?,
  266. SQL1_8 = position_z = ?,
  267. SQL1_9 = direction_x = ?,
  268. SQL1_10 = direction_y = ?,
  269. SQL1_11 = direction_z = ?,
  270. SQL1_12 = up_x = ?,
  271. SQL1_13 = up_y = ?,
  272. SQL1_14 = up_z = ?,
  273. SQL1_15 = cargo_items = ?,
  274. SQL1_16 = cargo_magazines = ?,
  275. SQL1_17 = cargo_weapons = ?,
  276. SQL1_18 = cargo_container = ?,
  277. SQL1_19 = money = ?,
  278. SQL1_20 = last_updated_at = NOW()
  279. SQL1_21 = WHERE id = ?
  280.  
  281. SQL1_INPUTS = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
  282.  
  283. [updateVehicleSkin]
  284. SQL1_1 = UPDATE vehicle SET vehicle_texture = ?, last_updated_at = NOW() WHERE id = ?
  285.  
  286. SQL1_INPUTS = 1,2
  287.  
  288. [vehicleSetPinCode]
  289. SQL1_1 = UPDATE vehicle SET pin_code = ?, last_updated_at = NOW() WHERE id = ?
  290.  
  291. SQL1_INPUTS = 1,2
  292.  
  293. [storeVehicle]
  294. SQL1_1 = UPDATE vehicle SET territory_id = ?, nickname = ?, last_updated_at = NOW() WHERE id = ?
  295.  
  296. SQL1_INPUTS = 1,2,3
  297.  
  298. [retrieveVehicle]
  299. SQL1_1 = UPDATE vehicle SET territory_id = NULL, last_updated_at = NOW(), nickname = '' WHERE id = ?
  300.  
  301. SQL1_INPUTS = 1
  302.  
  303. [confirmVehicleOwnership]
  304. SQL1_1 = SELECT id, territory_id FROM vehicle WHERE nickname = ?
  305.  
  306. SQL1_INPUTS = 1
  307. OUTPUT = 1,2
  308.  
  309. [loadTerritoryVirtualGarage]
  310. SQL1_1 = SELECT class, nickname FROM vehicle WHERE territory_id = ?
  311.  
  312. SQL1_INPUTS = 1
  313. OUTPUT = 1-STRING,2-STRING
  314.  
  315. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  316. ;; Construction related queries
  317. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  318.  
  319. [insertConstruction]
  320. SQL1_1 = INSERT INTO construction SET
  321. SQL1_2 = class = ?,
  322. SQL1_3 = account_uid = ?,
  323. SQL1_4 = position_x = ?,
  324. SQL1_5 = position_y = ?,
  325. SQL1_6 = position_z = ?,
  326. SQL1_7 = direction_x = ?,
  327. SQL1_8 = direction_y = ?,
  328. SQL1_9 = direction_z = ?,
  329. SQL1_10 = up_x = ?,
  330. SQL1_11 = up_y = ?,
  331. SQL1_12 = up_z = ?,
  332. SQL1_13 = territory_id = $CUSTOM_1$
  333. ;SQL1_13 = territory_id = ?
  334.  
  335. SQL1_INPUTS = 1,2,3,4,5,6,7,8,9,10,11
  336. Return InsertID = true
  337.  
  338. [deleteConstruction]
  339. SQL1_1 = DELETE FROM construction WHERE id = ?
  340.  
  341. SQL1_INPUTS = 1
  342.  
  343. [loadConstructionIdPage]
  344. SQL1_1 = SELECT id FROM construction WHERE deleted_at IS NULL LIMIT ?,?
  345.  
  346. SQL1_INPUTS = 1,2
  347. OUTPUT = 1
  348.  
  349. [loadConstruction]
  350. SQL1_1 = SELECT id,class,account_uid,spawned_at,position_x,position_y,position_z,direction_x,direction_y,direction_z,up_x,up_y,up_z,is_locked,pin_code,territory_id,deleted_at,damage FROM construction WHERE id = ?
  351.  
  352. SQL1_INPUTS = 1
  353. OUTPUT = 1,2-STRING,3-STRING,4-STRING,5,6,7,8,9,10,11,12,13,14,15-STRING,16,17,18
  354.  
  355. [countConstruction]
  356. SQL1_1 = SELECT COUNT(*) FROM construction
  357.  
  358. OUTPUT = 1
  359.  
  360. [constructionSetPinCode]
  361. SQL1_1 = UPDATE construction SET pin_code= ?, last_updated_at = NOW() WHERE id = ?
  362.  
  363. SQL1_INPUTS = 1,2
  364.  
  365. [upgradeObject]
  366. SQL1_1 = UPDATE construction SET class = ?, last_updated_at = NOW() WHERE id = ?
  367.  
  368. SQL1_INPUTS = 1,2
  369.  
  370. [addDoorLock]
  371. SQL1_1 = UPDATE construction SET pin_code = ?, is_locked = -1, last_updated_at = NOW() WHERE id = ?
  372.  
  373. SQL1_INPUTS = 1,2
  374.  
  375. [removeDoorLock]
  376. SQL1_1 = UPDATE construction SET pin_code = '000000', is_locked = 0, last_updated_at = NOW() WHERE id = ?
  377.  
  378. SQL1_INPUTS = 1
  379.  
  380. [updateLock]
  381. SQL1_1 = UPDATE construction SET is_locked = ?, last_updated_at = NOW() WHERE id = ?
  382.  
  383. SQL1_INPUTS = 1,2
  384.  
  385. [updateConstructionTerritoryIDs]
  386. SQL1_1 = UPDATE construction SET territory_id = ? WHERE id IN(?)
  387.  
  388. SQL1_INPUTS = 1,2
  389.  
  390. [updateDamage]
  391. SQL1_1 = UPDATE construction SET damage = ?, last_updated_at = NOW() WHERE id = ?
  392.  
  393. SQL1_INPUTS = 1,2
  394.  
  395. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  396. ;; Containers related queries
  397. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  398.  
  399. [insertContainer]
  400. SQL1_1 = INSERT INTO container SET
  401. SQL1_2 = class = ?,
  402. SQL1_3 = account_uid = ?,
  403. SQL1_4 = position_x = ?,
  404. SQL1_5 = position_y = ?,
  405. SQL1_6 = position_z = ?,
  406. SQL1_7 = direction_x = ?,
  407. SQL1_8 = direction_y = ?,
  408. SQL1_9 = direction_z = ?,
  409. SQL1_10 = up_x = ?,
  410. SQL1_11 = up_y = ?,
  411. SQL1_12 = up_z = ?,
  412. SQL1_13 = cargo_items = ?,
  413. SQL1_14 = cargo_magazines = ?,
  414. SQL1_15 = cargo_weapons = ?,
  415. SQL1_16 = cargo_container = ?,
  416. SQL1_17 = money = ?,
  417. SQL1_18 = pin_code = ?,
  418. SQL1_19 = territory_id = $CUSTOM_1$
  419. ;SQL1_19 = territory_id = ?
  420.  
  421. SQL1_INPUTS = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
  422. Return InsertID = true
  423.  
  424. [deleteContainer]
  425. SQL1_1 = DELETE FROM container WHERE id = ?
  426.  
  427. SQL1_INPUTS = 1
  428.  
  429. [loadContainerIdPage]
  430. SQL1_1 = SELECT id FROM container WHERE deleted_at IS NULL LIMIT ?,?
  431.  
  432. SQL1_INPUTS = 1,2
  433. OUTPUT = 1
  434.  
  435. [loadContainer]
  436. SQL1_1 = SELECT id,class,account_uid,is_locked,position_x,position_y,position_z,direction_x,direction_y,direction_z,up_x,up_y,up_z,cargo_items,cargo_magazines,cargo_weapons,pin_code,territory_id,abandoned,deleted_at,money FROM container WHERE id = ?
  437.  
  438. SQL1_INPUTS = 1
  439. OUTPUT = 1,2-STRING,3-STRING,4,5,6,7,8,9,10,11,12,13,14,15,16,17-STRING,18,19-STRING,20,21
  440.  
  441. [loadContainerCargo]
  442. SQL1_1 = SELECT cargo_container FROM container WHERE id = ?
  443.  
  444. SQL1_INPUTS = 1
  445. OUTPUT = 1
  446.  
  447. [updateContainer]
  448. SQL1_1 = UPDATE container SET
  449. SQL1_2 = is_locked = ?,
  450. SQL1_3 = position_x = ?,
  451. SQL1_4 = position_y = ?,
  452. SQL1_5 = position_z = ?,
  453. SQL1_6 = direction_x = ?,
  454. SQL1_7 = direction_y = ?,
  455. SQL1_8 = direction_z = ?,
  456. SQL1_9 = up_x = ?,
  457. SQL1_10 = up_y = ?,
  458. SQL1_11 = up_z = ?,
  459. SQL1_12 = cargo_items = ?,
  460. SQL1_13 = cargo_magazines = ?,
  461. SQL1_14 = cargo_weapons = ?,
  462. SQL1_15 = cargo_container = ?,
  463. SQL1_16 = territory_id = $CUSTOM_1$,
  464. ;SQL1_16 = territory_id = ?,
  465. SQL1_17 = money = ?,
  466. SQL1_18 = last_updated_at = NOW()
  467. SQL1_19 = WHERE id = ?
  468. SQL1_INPUTS = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
  469.  
  470. [containerSetPinCode]
  471. SQL1_1 = UPDATE container SET pin_code= ?, last_updated_at = NOW() WHERE id = ?
  472.  
  473. SQL1_INPUTS = 1,2
  474.  
  475. [updateContainerTerritoryIDs]
  476. SQL1_1 = UPDATE container SET territory_id = ? WHERE id IN(?)
  477.  
  478. SQL1_INPUTS = 1,2
  479.  
  480. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  481. ;; Clan related queries
  482. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  483.  
  484. [createClan]
  485. SQL1_1 = INSERT INTO clan SET leader_uid = ?, name = ?
  486.  
  487. SQL1_INPUTS = 1,2
  488. Return InsertID = true
  489.  
  490. [setAccountClanLink]
  491. SQL1_1 = UPDATE account SET clan_id = ? WHERE uid = ?
  492.  
  493. SQL1_INPUTS = 1,2
  494.  
  495. [unLinkClanLink]
  496. SQL1_1 = UPDATE account SET clan_id = NULL WHERE uid = ?
  497.  
  498. SQL1_INPUTS = 1
  499.  
  500. [updateClanLeader]
  501. SQL1_1 = UPDATE clan SET leader_uid = ? WHERE id = ?
  502.  
  503. SQL1_INPUTS = 1,2
  504.  
  505. [deleteClan]
  506. SQL1_1 = DELETE FROM clan WHERE id = ?
  507.  
  508. SQL1_INPUTS = 1
  509.  
  510. [loadClansIdPage]
  511. SQL1_1 = SELECT id FROM clan LIMIT ?,?
  512.  
  513. SQL1_INPUTS = 1,2
  514. OUTPUT = 1
  515.  
  516. [getClanInfo]
  517. SQL1_1 = SELECT name,leader_uid FROM clan WHERE id = ?
  518.  
  519. SQL1_INPUTS = 1
  520. OUTPUT = 1-STRING,2-STRING
  521.  
  522. [getClanMembers]
  523. SQL1_1 = SELECT uid,name FROM account WHERE clan_id = ?
  524.  
  525. SQL1_INPUTS = 1
  526. OUTPUT = 1-STRING,2-STRING
  527.  
  528. [getClanMarkers]
  529. SQL1_1 = SELECT id,markerType,positionArr,color,icon,iconSize,label,labelSize FROM clan_map_marker WHERE clan_id = ?
  530.  
  531. SQL1_INPUTS = 1
  532. OUTPUT = 1,2,3,4,5-STRING,6,7-STRING,8
  533.  
  534. [addMarker]
  535. SQL1_1 = INSERT INTO clan_map_marker SET clan_id = ?, markerType = 0, positionArr = ?, color = ?, icon = ?, iconSize = ?, label = ?, labelSize = ?
  536.  
  537. SQL1_INPUTS = 1,2,3,4,5,6,7
  538. Return InsertID = true
  539.  
  540. [addPoly]
  541. SQL1_1 = INSERT INTO clan_map_marker SET clan_id = ?, markerType = 1, positionArr = ?, color = ?
  542.  
  543. SQL1_INPUTS = 1,2,3
  544. Return InsertID = true
  545.  
  546. [deleteMarker]
  547. SQL1_1 = DELETE FROM clan_map_marker WHERE id = ?
  548.  
  549. SQL1_INPUTS = 1
  550.  
  551. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  552. ;; Territory related queries
  553. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  554.  
  555. [createTerritory]
  556. SQL1_1 = INSERT INTO territory SET owner_uid = ?, name = ?, position_x = ? , position_y = ? , position_z = ?, radius = ? , level = ? , flag_texture = ? , flag_stolen = ? , flag_stolen_by_uid =$CUSTOM_1$ , build_rights = ? , moderators = ?
  557. ;SQL1_1 = INSERT INTO territory SET owner_uid = ?, name = ?, position_x = ? , position_y = ? , position_z = ?, radius = ? , level = ? , flag_texture = ? , flag_stolen = ? , flag_stolen_by_uid = ? , build_rights = ? , moderators = ?
  558. SQL1_INPUTS = 1,2,3,4,5,6,7,8,9,10,11
  559. Return InsertID = true
  560.  
  561. [loadTerriotryIdPage]
  562. SQL1_1 = SELECT id FROM territory WHERE deleted_at IS NULL LIMIT ?,?
  563.  
  564. SQL1_INPUTS = 1,2
  565. OUTPUT = 1
  566.  
  567. [loadTerritory]
  568. SQL1_1 = SET @connector = ?;
  569. SQL2_1 = SELECT id,owner_uid,name,position_x,position_y,position_z,radius, level,flag_texture,flag_stolen,flag_stolen_by_uid,last_paid_at,build_rights,moderators,deleted_at,(SELECT COUNT(*)FROM construction c WHERE c.territory_id = @connector) FROM territory WHERE id = @connector
  570.  
  571. SQL1_INPUTS = 1
  572. ;OUTPUT = 1,2-STRING,3-STRING,4,5,6,7,8,9-STRING,10,11-STRING,12-DateTime_ISO8601,13,14,15,16
  573. OUTPUT = 1,2-STRING,3-STRING,4,5,6,7,8,9-STRING,10,11-STRING,12,13,14,15,16
  574.  
  575. [setTerritoryLevel]
  576. SQL1_1 = UPDATE territory SET level = ? WHERE id = ?
  577.  
  578. SQL1_INPUTS = 1,2
  579.  
  580. [setTerritorySize]
  581. SQL1_1 = UPDATE territory SET radius = ? WHERE id = ?
  582.  
  583. SQL1_INPUTS = 1,2
  584.  
  585. [updateTerritoryBuildRights]
  586. SQL1_1 = UPDATE territory SET build_rights = ? WHERE id = ?
  587.  
  588. SQL1_INPUTS = 1,2
  589.  
  590. [updateTerritoryModerators]
  591. SQL1_1 = UPDATE territory SET moderators = ? WHERE id = ?
  592.  
  593. SQL1_INPUTS = 1,2
  594.  
  595. [maintainTerritory]
  596. SQL1_1 = UPDATE territory SET last_paid_at = NOW(),xm8_protectionmoney_notified = 0 WHERE id = ?
  597.  
  598. SQL1_INPUTS = 1
  599.  
  600. [deleteTerritory]
  601. SQL1_1 = DELETE FROM territory WHERE id = ?
  602.  
  603. SQL1_INPUTS = 1
  604.  
  605. [flagStolen]
  606. SQL1_1 = UPDATE territory SET flag_stolen = 1, flag_stolen_by_uid = ?, flag_stolen_at = NOW() WHERE id = ?
  607.  
  608. SQL1_INPUTS = 1,2
  609.  
  610. [flagRestore]
  611. SQL1_1 = UPDATE territory SET flag_stolen = 0, flag_stolen_by_uid = NULL, flag_stolen_at = NULL WHERE id = ?
  612.  
  613. SQL1_INPUTS = 1
  614.  
  615. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  616. ;; Garbage Collector
  617. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  618.  
  619. ; Marks for deletion containers outside territories that were not accessed within ? days
  620. [markDeleteOldContainers]
  621. SQL1_1 = UPDATE container SET deleted_at = NOW() WHERE last_updated_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND territory_id IS NULL AND deleted_at IS NULL
  622.  
  623. SQL1_INPUTS = 1
  624.  
  625. ; Removes containers outside territories that were not accessed within ? days
  626. [deleteOldContainers]
  627. SQL1_1 = DELETE FROM container WHERE deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND territory_id IS NULL
  628.  
  629. SQL1_INPUTS = 1
  630.  
  631. ; Marks contructions outside territories deleted after ? days
  632. [markDeleteOldConstructions]
  633. SQL1_1 = UPDATE construction SET deleted_at = NOW() WHERE spawned_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND territory_id IS NULL AND deleted_at IS NULL
  634.  
  635. SQL1_INPUTS = 1
  636.  
  637. ; Removes contructions outside territories after ? days
  638. [deleteOldConstructions]
  639. SQL1_1 = DELETE FROM construction WHERE deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND territory_id IS NULL
  640.  
  641. SQL1_INPUTS = 1
  642.  
  643. ; Marks for deletion vehicles that were not used within ? days
  644. [markDeleteOldVehicles]
  645. SQL1_1 = UPDATE vehicle SET deleted_at = NOW() WHERE last_updated_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND deleted_at IS NULL
  646. SQL1_INPUTS = 1
  647.  
  648. ; Removes vehicles that were not used within ? days
  649. [deleteOldVehicles]
  650. SQL1_1 = DELETE FROM vehicle WHERE deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY)
  651. SQL1_INPUTS = 1
  652.  
  653. ; Marks territories (and all containers/constructions) that were not paid within ? days as deleted
  654. [markDeleteUnpaidTerritories]
  655. SQL1_1 = UPDATE territory SET deleted_at = NOW() WHERE last_paid_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND deleted_at IS NULL
  656. SQL2_1 = UPDATE construction SET deleted_at = (SELECT deleted_at FROM territory WHERE territory.id = construction.territory_id AND territory.deleted_at IS NOT NULL) WHERE construction.territory_id IS NOT NULL
  657. SQL3_1 = UPDATE container SET deleted_at = (SELECT deleted_at FROM territory WHERE territory.id = container.territory_id AND territory.deleted_at IS NOT NULL) WHERE container.territory_id IS NOT NULL
  658.  
  659. SQL1_INPUTS = 1
  660.  
  661. ; Removes territories (and all containers/constructions) that were not paid within ? days
  662. [deleteUnpaidTerritories]
  663. SQL1_1 = DELETE FROM territory WHERE deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY)
  664.  
  665. SQL1_INPUTS = 1
  666.  
  667. [addAbandonedSafes]
  668. SQL1_1 = UPDATE container SET abandoned = NOW(), pin_code = '0000' WHERE last_updated_at < DATE_SUB(NOW(), INTERVAL ? DAY) AND class = "Exile_Container_Safe" AND territory_id IS NULL
  669.  
  670. SQL1_INPUTS = 1
  671.  
  672. [deleteBaseFlagStolen]
  673. SQL1_1 = DELETE FROM territory WHERE flag_stolen_at < DATE_SUB(NOW(), INTERVAL ? DAY)
  674.  
  675. SQL1_INPUTS = 1
  676.  
  677. ; Unlock doors and mark safes as abandoned if flag stolen for X days
  678. [setAbandonedUnlocked]
  679. SQL1_1 = UPDATE container SET abandoned = NOW(), pin_code = '0000' WHERE (SELECT flag_stolen_at FROM territory WHERE territory.id = container.territory_id AND territory.flag_stolen_at < DATE_SUB(NOW(), INTERVAL ? DAY));
  680. SQL2_1 = UPDATE construction SET pin_code = '0000' WHERE (SELECT flag_stolen_at FROM territory WHERE territory.id = construction.territory_id AND territory.flag_stolen_at < DATE_SUB(NOW(), INTERVAL ? DAY)) AND pin_code != '000000'
  681.  
  682. SQL1_INPUTS = 1
  683. SQL2_INPUTS = 1
  684.  
  685. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  686. ;; Moneh moneh moneh
  687. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  688.  
  689. [setPlayerMoney]
  690. SQL1_1 = UPDATE player SET money = ? WHERE id = ?
  691.  
  692. SQL1_INPUTS = 1,2
  693.  
  694. [getPlayerMoney]
  695. SQL1_1 = SELECT money FROM player WHERE id = ?
  696.  
  697. SQL1_INPUTS = 1
  698. OUTPUT = 1
  699.  
  700. [setContainerMoney]
  701. SQL1_1 = UPDATE container SET money = ?, last_updated_at = NOW() WHERE id = ?
  702.  
  703. SQL1_INPUTS = 1,2
  704.  
  705. [setVehicleMoney]
  706. SQL1_1 = UPDATE vehicle SET money = ?, last_updated_at = NOW() WHERE id = ?
  707.  
  708. SQL1_INPUTS = 1,2
  709.  
  710. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  711. ;; XM8
  712. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  713.  
  714. [getAllNotifTerritory]
  715. SQL1_1 = SELECT id FROM territory WHERE last_paid_at < DATE_SUB(NOW(), INTERVAL ? - 1 DAY) and xm8_protectionmoney_notified = 0
  716.  
  717. SQL1_INPUTS = 1
  718.  
  719. [setTerritoryNotified]
  720. SQL1_1 = UPDATE territory SET xm8_protectionmoney_notified = ? WHERE id = ?
  721.  
  722. SQL1_INPUTS = 1,2
  723.  
  724. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  725. ;; Exile Escape
  726. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  727.  
  728. [addAccountWin]
  729. SQL1_1 = UPDATE account SET wins = wins + 1 WHERE uid = ?
  730.  
  731. SQL1_INPUTS = 1
  732.  
  733.  
  734. [addAccountMatches]
  735. SQL1_1 = UPDATE account SET matches = matches + 1 WHERE uid = ?
  736.  
  737. SQL1_INPUTS = 1
  738.  
  739. [createMatch]
  740. SQL1_1 = INSERT INTO game_data SET players = ?, total_players = ?
  741.  
  742. SQL1_INPUTS = 1,2
  743. Return InsertID = true
  744.  
  745. [setMatchWinner]
  746. SQL1_1 = UPDATE game_data SET winner_uid = ?, win_type = ? WHERE id = ?
  747.  
  748. SQL1_INPUTS = 1,2,3
  749.  
  750. [getEscapeAccountStats]
  751. SQL1_1 = SELECT wins, matches FROM account WHERE uid = ?
  752.  
  753. SQL1_INPUTS = 1
  754. OUTPUT = 1,2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement