Advertisement
Guest User

AutoGunShopCarloZ'a.

a guest
Jul 26th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.01 KB | None | 0 0
  1. @name CarloZ Auto Gunshop 3.1 Final
  2. @inputs CS:wirelink [R1 R2 R3 R4 R5 R6 R7 R8 R9 R10]:entity MoneyPot Up Down OkButton
  3. @outputs SpawnMoneyPot U1 U2 U3 U4 U5 U6 U7 U8 U9 U10
  4. @persist Select P1 P2 P3 P4 P5 P6 P7 P8 P9 P10
  5. @trigger
  6.  
  7.  
  8. interval(21) #runs code
  9. if(first())
  10. {
  11. Select = 1
  12. CS[2041] = 1 #refresh on startup
  13.  
  14. hint("Skrypt zrobiony przez Carloz'a!",5)
  15. hint("Zakaz rozpowszechniania go!",5)
  16. print("Aby zmienic cene !price (slot) (price)")
  17. print("np. !price 1 350")
  18. print("To jest ostatni update.")
  19.  
  20. P1=100
  21. P2=200
  22. P3=300
  23. P4=400
  24. P5=500
  25. P6=600
  26. P7=700
  27. P8=800
  28. P9=900
  29. P10=1000
  30. }
  31.  
  32. S = owner():lastSaid():explode(" ")
  33.  
  34. if(S[1,string] == "!price")
  35. {
  36. if(S[2,string]:toNumber() == 1){ P1 = S[3,string]:toNumber() }
  37. if(S[2,string]:toNumber() == 2){ P2 = S[3,string]:toNumber() }
  38. if(S[2,string]:toNumber() == 3){ P3 = S[3,string]:toNumber() }
  39. if(S[2,string]:toNumber() == 4){ P4 = S[3,string]:toNumber() }
  40. if(S[2,string]:toNumber() == 5){ P5 = S[3,string]:toNumber() }
  41. if(S[2,string]:toNumber() == 6){ P6 = S[3,string]:toNumber() }
  42. if(S[2,string]:toNumber() == 7){ P7 = S[3,string]:toNumber() }
  43. if(S[2,string]:toNumber() == 8){ P8 = S[3,string]:toNumber() }
  44. if(S[2,string]:toNumber() == 9){ P9 = S[3,string]:toNumber() }
  45. if(S[2,string]:toNumber() == 10){ P10 = S[3,string]:toNumber() }
  46.  
  47. }
  48.  
  49. if(changed(R1:isShipment())){
  50. CS[2041] = 1
  51. }
  52.  
  53. if(changed(R2:isShipment())){
  54. CS[2041] = 1
  55. }
  56.  
  57. if(changed(R3:isShipment())){
  58. CS[2041] = 1
  59. }
  60.  
  61. if(changed(R4:isShipment())){
  62. CS[2041] = 1
  63. }
  64.  
  65. if(changed(R5:isShipment())){
  66. CS[2041] = 1
  67. }
  68.  
  69. if(changed(R6:isShipment())){
  70. CS[2041] = 1
  71. }
  72.  
  73. if(changed(R7:isShipment())){
  74. CS[2041] = 1
  75. }
  76.  
  77. if(changed(R8:isShipment())){
  78. CS[2041] = 1
  79. }
  80.  
  81. if(changed(R9:isShipment())){
  82. CS[2041] = 1
  83. }
  84.  
  85. if(changed(R10:isShipment())){
  86. CS[2041] = 1
  87. }
  88.  
  89.  
  90. CS:writeString("Witaj w AutoGunshopie CarloZa ",15,3,999,45)
  91. CS:writeString(" yt.com/user/thematek4444 ",15,3,999,46)
  92. CS:writeString(" Bron Cena",0,15,999,38)
  93.  
  94.  
  95. CS:writeString("Tutorial ",0,15,999,38)
  96. CS:writeString("Wybierz bron i wluz pieniadze ",15,3,999,47)
  97. CS:writeString("Nacisni przycisk OK i gotowe! ",15,3,999,48)
  98. CS:writeString("Money Inside Pot:" + MoneyPot + "$" + " ",0,17,999,19)
  99.  
  100. CS:writeString(R1:shipmentName() + " X" +R1:shipmentAmount():toString(),3,3,999) #select = 3
  101. CS:writeString(R2:shipmentName() + " X" +R2:shipmentAmount():toString(),3,4,999) #select = 2
  102. CS:writeString(R3:shipmentName() + " X" +R3:shipmentAmount():toString(),3,5,999) #select = 1
  103. CS:writeString(R4:shipmentName() + " X" +R4:shipmentAmount():toString(),3,6,999) #select = 1
  104. CS:writeString(R5:shipmentName() + " X" +R5:shipmentAmount():toString(),3,7,999) #select = 1
  105. CS:writeString(R6:shipmentName() + " X" +R6:shipmentAmount():toString(),3,8,999) #select = 1
  106. CS:writeString(R7:shipmentName() + " X" +R7:shipmentAmount():toString(),3,9,999) #select = 1
  107. CS:writeString(R8:shipmentName() + " X" +R8:shipmentAmount():toString(),3,10,999) #select = 1
  108. CS:writeString(R9:shipmentName() + " X" +R9:shipmentAmount():toString(),3,11,999) #select = 1
  109. CS:writeString(R10:shipmentName() + " X" +R10:shipmentAmount():toString(),3,12,999) #select = 1
  110.  
  111. #Prices
  112. CS:writeString(P1 + "$",25,3,999)
  113. CS:writeString(P2 + "$",25,4,999)
  114. CS:writeString(P3 + "$",25,5,999)
  115. CS:writeString(P4 + "$",25,6,999)
  116. CS:writeString(P5 + "$",25,7,999)
  117. CS:writeString(P6 + "$",25,8,999)
  118. CS:writeString(P7 + "$",25,9,999)
  119. CS:writeString(P8 + "$",25,10,999)
  120. CS:writeString(P9 + "$",25,11,999)
  121. CS:writeString(P10 + "$",25,12,999)
  122.  
  123. CS:writeString("->",0,6-Select,38) #if select is 3, 6-3= line 3, if 2 then line 6-2=4
  124.  
  125.  
  126. if(Up && changed(Up))
  127. {
  128.  
  129. Select++
  130. CS[2041] = 1
  131. }
  132.  
  133. if(Down&& changed(Down))
  134. {
  135. Select--
  136. CS[2041] = 1
  137. }
  138.  
  139. if(Select>3)
  140. {
  141. Select = -6
  142. }
  143. if(Select<-6)
  144. {
  145. Select = 3
  146. }
  147.  
  148.  
  149. if(Select==3 && MoneyPot==P1 && OkButton)
  150. {
  151. U1 =1
  152. SpawnMoneyPot = 1
  153. }
  154. else
  155. {
  156. U1 = 0
  157. }
  158.  
  159.  
  160. if(Select==2 && MoneyPot==P2 && OkButton)
  161. {
  162. U2 =1
  163. SpawnMoneyPot = 1
  164. }
  165. else
  166. {
  167. U2 = 0
  168. }
  169.  
  170. if(Select==1 && MoneyPot==P3 && OkButton)
  171. {
  172. U3 =1
  173. SpawnMoneyPot = 1
  174. }
  175. else
  176. {
  177. U3 = 0
  178. }
  179.  
  180. if(Select==0 && MoneyPot==P4 && OkButton)
  181. {
  182. U4 =1
  183. SpawnMoneyPot = 1
  184. }
  185. else
  186. {
  187. U4 = 0
  188. }
  189.  
  190. if(Select==-1 && MoneyPot==P5 && OkButton)
  191. {
  192. U5 =1
  193. SpawnMoneyPot = 1
  194. }
  195. else
  196. {
  197. U5 = 0
  198. }
  199.  
  200. if(Select==-2 && MoneyPot==P6 && OkButton)
  201. {
  202. U6 =1
  203. SpawnMoneyPot = 1
  204. }
  205. else
  206. {
  207. U6 = 0
  208. }
  209.  
  210. if(Select==-3 && MoneyPot==P7 && OkButton)
  211. {
  212. U7 =1
  213. SpawnMoneyPot = 1
  214. }
  215. else
  216. {
  217. U7 = 0
  218. }
  219.  
  220. if(Select==-4 && MoneyPot==P8 && OkButton)
  221. {
  222. U8 =1
  223. SpawnMoneyPot = 1
  224. }
  225. else
  226. {
  227. U8 = 0
  228. }
  229.  
  230. if(Select==-5 && MoneyPot==P9 && OkButton)
  231. {
  232. U9 =1
  233. SpawnMoneyPot = 1
  234. }
  235. else
  236. {
  237. U9 = 0
  238. }
  239.  
  240. if(Select==-6 && MoneyPot==P10 && OkButton)
  241. {
  242. U10 =1
  243. SpawnMoneyPot = 1
  244. }
  245. else
  246. {
  247. U10 = 0
  248. }
  249.  
  250.  
  251. if(!OkButton)
  252. {
  253. SpawnMoneyPot = 0
  254. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement