Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.70 KB | None | 0 0
  1. --Door Script Edited by Danielo--
  2. function onUse(cid, item, frompos, item2, topos)
  3.  
  4. doorpos = {x=topos.x, y=topos.y, z=topos.z, stackpos=253}   -- mod by Yurez
  5. doorplayer = getThingfromPos(doorpos)
  6.  
  7. if doorplayer.itemid > 0 then
  8.     doPlayerSendCancel(cid,"Someone is blocking the door.")
  9.     return 1
  10. end
  11.  
  12. if item.itemid == 1209 then
  13. if item.actionid == 0 then
  14. doTransformItem(item.uid,1211)
  15. else
  16. doPlayerSendTextMessage(cid,22,"It is locked.")
  17. end
  18. elseif item.itemid == 1211 then
  19. doTransformItem(item.uid,1209)
  20. elseif item.itemid == 1250 then
  21. if item.actionid == 0 then
  22. doTransformItem(item.uid,1251)
  23. else
  24. doPlayerSendTextMessage(cid,22,"It is locked.")
  25. end
  26. elseif item.itemid == 1251 then
  27. doTransformItem(item.uid,1250)
  28. elseif item.itemid == 1232 then
  29. if item.actionid == 0 then
  30. doTransformItem(item.uid,1233)
  31. else
  32. doPlayerSendTextMessage(cid,22,"It is locked.")
  33. end
  34. elseif item.itemid == 1232 then
  35. doTransformItem(item.uid,1233)
  36. elseif item.itemid == 1253 then
  37. if item.actionid == 0 then
  38. doTransformItem(item.uid,1254)
  39. else
  40. doPlayerSendTextMessage(cid,22,"It is locked.")
  41. end
  42. elseif item.itemid == 1254 then
  43. doTransformItem(item.uid,1253)
  44.  
  45. elseif item.itemid == 1235 then
  46. if item.actionid == 0 then
  47. doTransformItem(item.uid,1236)
  48. else
  49. doPlayerSendTextMessage(cid,22,"It is locked.")
  50. end
  51. elseif item.itemid == 1236 then
  52. doTransformItem(item.uid,1235)
  53.  
  54. elseif item.itemid == 1212 then
  55. if item.actionid == 0 then
  56. doTransformItem(item.uid,1214)
  57. else
  58. doPlayerSendTextMessage(cid,22,"It is locked.")
  59. end
  60. elseif item.itemid == 1214 then
  61. doTransformItem(item.uid,1212)
  62.  
  63. elseif item.itemid == 1219 then
  64. if item.actionid == 0 then
  65. doTransformItem(item.uid,1220)
  66. else
  67. doPlayerSendTextMessage(cid,22,"It is locked.")
  68. end
  69. elseif item.itemid == 1220 then
  70. doTransformItem(item.uid,1219)
  71.  
  72. elseif item.itemid == 1221 then
  73. if item.actionid == 0 then
  74. doTransformItem(item.uid,1222)
  75. else
  76. doPlayerSendTextMessage(cid,22,"It is locked.")
  77. end
  78. elseif item.itemid == 1222 then
  79. doTransformItem(item.uid,1221)
  80.  
  81. elseif item.itemid == 1223 then
  82. if item.actionid == 0 then
  83. doTransformItem(item.uid,1224)
  84. else
  85. doPlayerSendTextMessage(cid,22,"It is locked.")
  86. end
  87. elseif item.itemid == 1224 then
  88. doTransformItem(item.uid,1223)
  89. ----
  90. elseif item.itemid == 1225 then
  91. if item.actionid == 0 then
  92. doTransformItem(item.uid,1226)
  93. else
  94. doPlayerSendTextMessage(cid,22,"It is locked.")
  95. end
  96.  
  97.  
  98. -----
  99. elseif item.itemid == 1226 then
  100. doTransformItem(item.uid,1225)
  101.  
  102. elseif item.itemid == 1227 then
  103. if item.actionid == 0 then
  104. doTransformItem(item.uid,1228)
  105. else
  106. doPlayerSendTextMessage(cid,22,"It is locked.")
  107. end
  108. elseif item.itemid == 1228 then
  109. doTransformItem(item.uid,1227)
  110.  
  111. elseif item.itemid == 1229 then
  112. if item.actionid == 0 then
  113. doTransformItem(item.uid,1230)
  114. else
  115. doPlayerSendTextMessage(cid,22,"It is locked.")
  116. end
  117. elseif item.itemid == 1230 then
  118. doTransformItem(item.uid,1229)
  119.  
  120. elseif item.itemid == 1231 then
  121. if item.actionid == 0 then
  122. doTransformItem(item.uid,1233)
  123. else
  124. doPlayerSendTextMessage(cid,22,"It is locked.")
  125. end
  126. elseif item.itemid == 1233 then
  127. doTransformItem(item.uid,1231)
  128.  
  129. elseif item.itemid == 1234 then
  130. if item.actionid == 0 then
  131. doTransformItem(item.uid,1236)
  132. else
  133. doPlayerSendTextMessage(cid,22,"It is locked.")
  134. end
  135. elseif item.itemid == 1236 then
  136. doTransformItem(item.uid,1234)
  137.  
  138. elseif item.itemid == 1237 then
  139. if item.actionid == 0 then
  140. doTransformItem(item.uid,1238)
  141. else
  142. doPlayerSendTextMessage(cid,22,"It is locked.")
  143. end
  144. elseif item.itemid == 1238 then
  145. doTransformItem(item.uid,1237)
  146.  
  147. elseif item.itemid == 1239 then
  148. if item.actionid == 0 then
  149. doTransformItem(item.uid,1240)
  150. else
  151. doPlayerSendTextMessage(cid,22,"It is locked.")
  152. end
  153. elseif item.itemid == 1240 then
  154. doTransformItem(item.uid,1239)
  155.  
  156. elseif item.itemid == 1241 then
  157. if item.actionid == 0 then
  158. doTransformItem(item.uid,1242)
  159. else
  160. doPlayerSendTextMessage(cid,22,"It is locked.")
  161. end
  162. elseif item.itemid == 1242 then
  163. doTransformItem(item.uid,1241)
  164.  
  165. elseif item.itemid == 1243 then
  166. if item.actionid == 0 then
  167. doTransformItem(item.uid,1244)
  168. else
  169. doPlayerSendTextMessage(cid,22,"It is locked.")
  170. end
  171. elseif item.itemid == 1244 then
  172. doTransformItem(item.uid,1243)
  173.  
  174. elseif item.itemid == 1245 then
  175. if item.actionid == 0 then
  176. doTransformItem(item.uid,1246)
  177. else
  178. doPlayerSendTextMessage(cid,22,"It is locked.")
  179. end
  180. elseif item.itemid == 1246 then
  181. doTransformItem(item.uid,1245)
  182.  
  183. elseif item.itemid == 1247 then
  184. if item.actionid == 0 then
  185. doTransformItem(item.uid,1248)
  186. else
  187. doPlayerSendTextMessage(cid,22,"It is locked.")
  188. end
  189. elseif item.itemid == 1248 then
  190. doTransformItem(item.uid,1247)
  191.  
  192. elseif item.itemid == 1249 then
  193. if item.actionid == 0 then
  194. doTransformItem(item.uid,1251)
  195. else
  196. doPlayerSendTextMessage(cid,22,"It is locked.")
  197. end
  198. elseif item.itemid == 1251 then
  199. doTransformItem(item.uid,1249)
  200.  
  201. elseif item.itemid == 1252 then
  202. if item.actionid == 0 then
  203. doTransformItem(item.uid,1254)
  204. else
  205. doPlayerSendTextMessage(cid,22,"It is locked.")
  206. end
  207. elseif item.itemid == 1254 then
  208. doTransformItem(item.uid,1252)
  209.  
  210. elseif item.itemid == 1255 then
  211. if item.actionid == 0 then
  212. doTransformItem(item.uid,1256)
  213. else
  214. doPlayerSendTextMessage(cid,22,"It is locked.")
  215. end
  216. elseif item.itemid == 1256 then
  217. doTransformItem(item.uid,1255)
  218.  
  219. elseif item.itemid == 1257 then
  220. if item.actionid == 0 then
  221. doTransformItem(item.uid,1258)
  222. else
  223. doPlayerSendTextMessage(cid,22,"It is locked.")
  224. end
  225. elseif item.itemid == 1258 then
  226. doTransformItem(item.uid,1257)
  227.  
  228. elseif item.itemid == 1259 then
  229. if item.actionid == 0 then
  230. doTransformItem(item.uid,1260)
  231. else
  232. doPlayerSendTextMessage(cid,22,"It is locked.")
  233. end
  234. elseif item.itemid == 1260 then
  235. doTransformItem(item.uid,1259)
  236.  
  237. elseif item.itemid == 1261 then
  238. if item.actionid == 0 then
  239. doTransformItem(item.uid,1262)
  240. else
  241. doPlayerSendTextMessage(cid,22,"It is locked.")
  242. end
  243. elseif item.itemid == 1262 then
  244. doTransformItem(item.uid,1261)
  245.  
  246. --another simple door--
  247. elseif item.itemid == 1634 then
  248. if item.actionid == 0 then
  249. doTransformItem(item.uid,1635)
  250. else
  251. doPlayerSendTextMessage(cid,22,"It is locked.")
  252. end
  253. elseif item.itemid == 1635 then
  254. doTransformItem(item.uid,1634)
  255.  
  256. elseif item.itemid == 1636 then
  257. if item.actionid == 0 then
  258. doTransformItem(item.uid,1637)
  259. else
  260. doPlayerSendTextMessage(cid,22,"It is locked.")
  261. end
  262. elseif item.itemid == 1637 then
  263. doTransformItem(item.uid,1636)
  264.  
  265. --another simple door--
  266.  
  267. elseif item.itemid == 1638 then
  268. if item.actionid == 0 then
  269. doTransformItem(item.uid,1639)
  270. else
  271. doPlayerSendTextMessage(cid,22,"It is locked.")
  272. end
  273. elseif item.itemid == 1639 then
  274. doTransformItem(item.uid,1638)
  275.  
  276. elseif item.itemid == 5082 then
  277. if item.actionid == 0 then
  278. doTransformItem(item.uid,5083)
  279. else
  280. doPlayerSendTextMessage(cid,22,"It is locked.")
  281. end
  282. elseif item.itemid == 5083 then
  283. doTransformItem(item.uid,5082)
  284.  
  285. elseif item.itemid == 5084 then
  286. if item.actionid == 0 then
  287. doTransformItem(item.uid,5085)
  288. else
  289. doPlayerSendTextMessage(cid,22,"It is locked.")
  290. end
  291. elseif item.itemid == 5085 then
  292. doTransformItem(item.uid,5084)
  293.  
  294. elseif item.itemid == 4913 then
  295. if item.actionid == 0 then
  296. doTransformItem(item.uid,4914)
  297. else
  298. doPlayerSendTextMessage(cid,22,"It is locked.")
  299. end
  300. elseif item.itemid == 4914 then
  301. doTransformItem(item.uid,4913)
  302.  
  303. elseif item.itemid == 4915 then
  304. if item.actionid == 0 then
  305. doTransformItem(item.uid,4916)
  306. else
  307. doPlayerSendTextMessage(cid,22,"It is locked.")
  308. end
  309. elseif item.itemid == 4916 then
  310. doTransformItem(item.uid,4915)
  311.  
  312. elseif item.itemid == 3535 then
  313. if item.actionid == 0 then
  314. doTransformItem(item.uid,3537)
  315. else
  316. doPlayerSendTextMessage(cid,22,"It is locked.")
  317. end
  318. elseif item.itemid == 3537 then
  319. doTransformItem(item.uid,3535)
  320.  
  321. elseif item.itemid == 3536 then
  322. if item.actionid == 0 then
  323. doTransformItem(item.uid,3537)
  324. else
  325. doPlayerSendTextMessage(cid,22,"It is locked.")
  326. end
  327. elseif item.itemid == 3537 then
  328. doTransformItem(item.uid,3536)
  329.  
  330. elseif item.itemid == 3538 then
  331. if item.actionid == 0 then
  332. doTransformItem(item.uid,3539)
  333. else
  334. doPlayerSendTextMessage(cid,22,"It is locked.")
  335. end
  336. elseif item.itemid == 3539 then
  337. doTransformItem(item.uid,3538)
  338.  
  339. elseif item.itemid == 3540 then
  340. if item.actionid == 0 then
  341. doTransformItem(item.uid,3541)
  342. else
  343. doPlayerSendTextMessage(cid,22,"It is locked.")
  344. end
  345. elseif item.itemid == 3541 then
  346. doTransformItem(item.uid,3540)
  347.  
  348. elseif item.itemid == 3542 then
  349. if item.actionid == 0 then
  350. doTransformItem(item.uid,3543)
  351. else
  352. doPlayerSendTextMessage(cid,22,"It is locked.")
  353. end
  354. elseif item.itemid == 3543 then
  355. doTransformItem(item.uid,3542)
  356.  
  357. elseif item.itemid == 3544 then
  358. if item.actionid == 0 then
  359. doTransformItem(item.uid,3546)
  360. else
  361. doPlayerSendTextMessage(cid,22,"It is locked.")
  362. end
  363. elseif item.itemid == 3546 then
  364. doTransformItem(item.uid,3544)
  365.  
  366. elseif item.itemid == 3545 then
  367. if item.actionid == 0 then
  368. doTransformItem(item.uid,3546)
  369. else
  370. doPlayerSendTextMessage(cid,22,"It is locked.")
  371. end
  372. elseif item.itemid == 3546 then
  373. doTransformItem(item.uid,3545)
  374.  
  375. elseif item.itemid == 3547 then
  376. if item.actionid == 0 then
  377. doTransformItem(item.uid,3548)
  378. else
  379. doPlayerSendTextMessage(cid,22,"It is locked.")
  380. end
  381. elseif item.itemid == 3548 then
  382. doTransformItem(item.uid,3547)
  383.  
  384. elseif item.itemid == 3549 then
  385. if item.actionid == 0 then
  386. doTransformItem(item.uid,3550)
  387. else
  388. doPlayerSendTextMessage(cid,22,"It is locked.")
  389. end
  390. elseif item.itemid == 3550 then
  391. doTransformItem(item.uid,3549)
  392.  
  393. elseif item.itemid == 3551 then
  394. if item.actionid == 0 then
  395. doTransformItem(item.uid,3552)
  396. else
  397. doPlayerSendTextMessage(cid,22,"It is locked.")
  398. end
  399. elseif item.itemid == 3552 then
  400. doTransformItem(item.uid,3551)
  401.  
  402. elseif item.itemid == 1640 then
  403. if item.actionid == 0 then
  404. doTransformItem(item.uid,1641)
  405. else
  406. doPlayerSendTextMessage(cid,22,"It is locked.")
  407. end
  408. elseif item.itemid == 1641 then
  409. doTransformItem(item.uid,1640)
  410.  
  411. elseif item.itemid == 1213 then
  412. if item.actionid == 0 then
  413. doTransformItem(item.uid,1214)
  414. else
  415. doPlayerSendTextMessage(cid,22,"It is locked.")
  416. end
  417. elseif item.itemid == 1214 then
  418. doTransformItem(item.uid,1213)
  419.  
  420. elseif item.itemid == 1210 then
  421. if item.actionid == 0 then
  422. doTransformItem(item.uid,1211)
  423. else
  424. doPlayerSendTextMessage(cid,22,"It is locked.")
  425. end
  426. elseif item.itemid == 1211 then
  427. doTransformItem(item.uid,1210)
  428.  
  429. elseif item.itemid == 1539 then
  430. if item.actionid == 0 then
  431. doTransformItem(item.uid,1540)
  432. else
  433. doPlayerSendTextMessage(cid,22,"It is locked.")
  434. end
  435. elseif item.itemid == 1540 then
  436. doTransformItem(item.uid,1539)
  437.  
  438. elseif item.itemid == 1541 then
  439. if item.actionid == 0 then
  440. doTransformItem(item.uid,1542)
  441. else
  442. doPlayerSendTextMessage(cid,22,"It is locked.")
  443. end
  444. elseif item.itemid == 1542 then
  445. doTransformItem(item.uid,1541)
  446. else
  447. return 0
  448. end
  449. return 1
  450. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement