SHARE
TWEET

Untitled

a guest Jul 23rd, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. truhensystem={["start"]=0,findPos= function (belPos,size)local poses = { }
  2. for i = 0 , 44 begin
  3. if belPos [ i ] == nil then
  4. local thisfits = true
  5. for y = 0 , size - 1 begin
  6. local actpos = i + y * 5
  7. if belPos [ actpos ] == nil and actpos < 45 then
  8. thisfits = true
  9. else
  10. thisfits = false
  11. break
  12. end
  13. end
  14. if thisfits == true then
  15. table . insert ( poses , i )
  16. end
  17. end
  18. end
  19. return poses
  20. end ,checkPos= function (owner)local mall = mysql_query ( "SELECT pos,vnum FROM player.item WHERE owner_id='" .. owner .. "' AND window='MALL'" )
  21. local islpos = { }
  22. for i = 1 , table . getn ( mall ) begin
  23. local size = item . get_size_by_vnum ( tonumber ( mall [ i ] [ 2 ] ) )
  24. local actpos = mall [ i ] [ 1 ]
  25. for x = 1 , size begin
  26. islpos [ actpos ] = mall [ i ] [ 2 ]
  27. actpos = actpos + 5
  28. end
  29. end
  30. return islpos
  31. end ,hasChestKey= function (vnum)local tab = {
  32. [ 300008 ] = { 300010 } ,
  33. [ 300009 ] = { 300011 } ,
  34. }
  35. if pc . count_item ( tab [ vnum ] [ 1 ] ) < 1 then
  36. syschat ( "Du hast keinen Schlüssel für diese Truhe!" )
  37. return 0 , tab [ vnum ] [ 1 ]
  38. end
  39. return 1 , tab [ vnum ] [ 1 ]
  40. end ,getChestItems= function (vnum)local tab = {
  41. [ 300008 ] = {
  42. { 51269 , 15.1 } ,
  43. { 51279 , 15.2 } ,
  44. { 51289 , 15.3 } ,
  45. { 51299 , 15.4 } ,
  46. { 51179 , 15.5 } ,
  47. { 51189 , 15.6 } ,
  48. { 51199 , 15.7 } ,
  49. { 51219 , 15.8 } ,
  50. { 51229 , 15.9 } ,
  51. { 51239 , 15.1 } ,
  52. { 51249 , 15.11 } ,
  53. { 51259 , 15.12 } ,
  54. { 51009 , 15.13 } ,
  55. { 51019 , 15.14 } ,
  56. { 51029 , 15.15 } ,
  57. { 51039 , 15.16 } ,
  58. { 51049 , 15.17 } ,
  59. { 51059 , 15.18 } ,
  60. { 51069 , 15.19 } ,
  61. { 51079 , 15.2 } ,
  62. { 21219 , 20.1 } ,
  63. { 21229 , 20.2 } ,
  64. { 21239 , 20.3 } ,
  65. { 21249 , 20.4 } ,
  66. { 21279 , 20.5 } ,
  67. { 21289 , 20.6 } ,
  68. { 889 , 20.7 } ,
  69. { 899 , 20.8 } ,
  70. { 909 , 20.9 } ,
  71. { 979 , 20.1 } ,
  72. { 989 , 20.11 } ,
  73. { 999 , 20.12 } ,
  74. { 21299 , 20.13 } ,
  75. { 21309 , 20.14 } ,
  76. { 21319 , 20.15 } ,
  77. { 21329 , 20.16 } ,
  78. { 21339 , 20.17 } ,
  79. { 21149 , 20.18 } ,
  80. { 21159 , 20.19 } ,
  81. { 21169 , 20.2 } ,
  82. { 21189 , 20.21 } ,
  83. { 21139 , 20.22 } ,
  84. { 22189 , 10.11 } ,
  85. { 22199 , 10.12 } ,
  86. { 22209 , 10.13 } ,
  87. { 22219 , 10.14 } ,
  88. { 22229 , 10.15 } ,
  89. { 22239 , 10.16 } ,
  90. { 22249 , 10.17 } ,
  91. { 310 , 30.1 } ,
  92. { 311 , 30.2 } ,
  93. { 312 , 30.3 } ,
  94. { 313 , 30.4 } ,
  95. { 314 , 30.5 } ,
  96. { 315 , 30.6 } ,
  97. { 316 , 30.7 } ,
  98. { 317 , 30.8 } ,
  99. { 330 , 30.9 } ,
  100. { 331 , 30.1 } ,
  101. { 332 , 30.11 } ,
  102. { 333 , 30.12 } ,
  103. { 334 , 30.13 } ,
  104. { 335 , 30.14 } ,
  105. { 336 , 30.15 } ,
  106. { 337 , 30.16 } ,
  107. { 71203 , 15 } ,
  108. { 71204 , 12.1 } ,
  109. { 71205 , 10.1 } ,
  110. } ,
  111. [ 300009 ] = {
  112. { 9939 , 30.1 } ,
  113. { 9039 , 30.2 } ,
  114. { 579 , 30.3 } ,
  115. { 919 , 30.4 } ,
  116. { 8049 , 30.5 } ,
  117. { 7239 , 30.6 } ,
  118. { 9969 , 30.7 } ,
  119. { 9019 , 30.8 } ,
  120. { 8089 , 15.9 } ,
  121. { 8039 , 30.1 } ,
  122. { 9959 , 15.11 } ,
  123. { 9919 , 30.12 } ,
  124. { 629 , 30.13 } ,
  125. { 589 , 30.14 } ,
  126. { 8069 , 30.15 } ,
  127. { 369 , 11.16 } ,
  128. { 5509 , 11 } ,
  129. { 5519 , 12 } ,
  130. { 5529 , 13 } ,
  131. { 5539 , 14 } ,
  132. { 300 , 30.17 } ,
  133. { 301 , 30.18 } ,
  134. { 302 , 30.19 } ,
  135. { 303 , 30.2 } ,
  136. { 304 , 30.21 } ,
  137. { 305 , 30.22 } ,
  138. { 306 , 30.23 } ,
  139. { 307 , 30.24 } ,
  140. { 320 , 30.25 } ,
  141. { 321 , 30.26 } ,
  142. { 322 , 30.27 } ,
  143. { 323 , 30.28 } ,
  144. { 324 , 30.29 } ,
  145. { 325 , 30.31 } ,
  146. { 326 , 30.32 } ,
  147. { 327 , 30.33 } ,
  148. { 71203 , 2.3 } ,
  149. { 71204 , 2.2 } ,
  150. { 71205 , 2.1 } ,
  151. } ,
  152. }
  153. return tab [ vnum ]
  154. end ,getWinItem= function (vnum)local items = truhensystem . getChestItems ( vnum )
  155. local got = false
  156. local got2 = 0
  157. while got == false begin
  158. local test = number ( 1 , table . getn ( items ) )
  159. if items [ test ] [ 2 ] >= number ( 1 , 100 ) then
  160. got = items [ test ] [ 1 ]
  161. got2 = test
  162. end
  163. end
  164. return got , got2
  165. end }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top