Advertisement
zGhol

Untitled

Mar 22nd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.04 KB | None | 0 0
  1. # By: AfonsoSK (!Afonso)
  2. # Name: AfonsoEFight
  3. # Version: 1.0
  4. # Support: pedro_afonsoaapp <skype>
  5. # Perms: fight.adm
  6. # Dep's: Skript, SkPower(1.5.2) ou SkQuery (1.7+)
  7.  
  8. options:
  9. #Principal
  10. #Perm
  11. spm: &6[Fight]&c Sem permissao.
  12. #Anuncios
  13. ads: 6
  14. #Tempo entre cada
  15. tca: 20
  16. #Prêmio
  17. pde: 50000
  18. #TAG
  19. tag: &4[Fighter]
  20.  
  21. #HELP Comandos
  22. fh1: &6[Fight]&a /fight participar &7-&3 Entra no evento.
  23. fh2: &6[Fight]&a /fight sair &7-&3 Sai do evento.
  24. fh3: &6[Fight]&a /fight help &7-&3 Comandos do fight.
  25. fh4: &6[Fight]&a /fight tuto &7-&3 Tutorial do evento.
  26. fh5: &5[Fight]&a /fight iniciar &7-&3 Inicia o evento.
  27. fh6: &5[Fight]&a /fight cancelar &7-&3 Cancela o evento.
  28. fh7: &5[Fight]&a /fight setentrada &7-&3 Seta local de entrada.
  29. fh8: &5[Fight]&a /fight setsaida &7-&3 Seta local de saída.
  30. fh9: &5[Fight]&a /fight setloc1 &7-&3 Seta local da batalha 1.
  31. fh10: &5[Fight]&a /fight setloc2 &7-&3 Seta local da batalha 2.
  32.  
  33. #Tutorial
  34. ft1: &c>>&6 [Tutorial do evento Fight]
  35. ft2: &3Os players participantes se enfrentam, 2 a 2,
  36. ft3: &3em uma arena utilizando apenas as armas entregues
  37. ft4: &3pelos realizadores do evento, quem ganha a luta
  38. ft5: &3avança para a próxima fase, até que sobre apenas 1 vencedor.
  39.  
  40. #Participando
  41. fp1: &6[Fight]&c O evento ja está acontecendo.
  42. fp2: &6[Fight]&c Você já está participando do evento.
  43. fp3: &6[Fight]&c Esvazie o inventário para entrar no evento.
  44. fp4: &6[Fight]&3 Você entrou no evento.
  45. fp5: &6[Fight]&c Nao há nenhum evento acontecendo.
  46.  
  47. #Saindo
  48. fs1: &6[Fight]&c Você saiu do evento.
  49. fs2: &6[Fight]&c Você nao está no evento.
  50.  
  51. #Iniciando
  52. fi1: &6[Fight]&c O evento ja está acontecendo.
  53. fi2: &6[Fight]&3 Evento Fight iniciado!
  54. fi3: &6[Fight]&3 Para participar /fight participar.
  55. fi4: &6[Fight]&3 Prêmio do evento: &a50000
  56. fi5: &6[Fight]&3 Evento Fight cancelado!
  57. fi6: &6[Fight]&c Motivo: Jogadores insuficientes.
  58. fi7: &6[Fight]&3 FIGHT!!! &c{fighter1}&7 x&c {fighter2}
  59. fi8: &6[Fight]&c {fighter1}&3 venceu&c {fighter2}
  60. fi9: &6[Fight]&3 Evento Fight finalizado!
  61. fi10: &6[Fight]&3 Prêmio do evento: &a50000&3 + TAG &4[Fighter]&3.
  62. fi11: &6[Fight]&3 Vencedor do evento: %{fight.winner}%
  63.  
  64. #Cancelando
  65. fc1: &6[Fight]&c Evento Fight cancelado!
  66. fc2: &6[Fight]&c Motivo: Staffer cancelou o evento.
  67. fc3: &6[Fight]&c Nao há nenhum evento acontecendo.
  68.  
  69. #SetLocais
  70. fse: &5[Fight]&3 Local de entrada setado com sucesso!
  71. f11: &5[Fight]&3 Local de batalha 1 setado com sucesso!
  72. f12: &5[Fight]&3 Local de batalha 2 setado com sucesso!
  73. fss: &5[Fight]&3 Local de saída setado com sucesso!
  74. #Options 2 a baixo do código script
  75.  
  76. command /fight [<text>]:
  77. trigger:
  78. if arg 1 is not set:
  79. execute player command "/fight help"
  80. if arg 1 is "help":
  81. if player dues not permission "fight.adm":
  82. send "{@fh1}"
  83. send "{@fh2}"
  84. send "{@fh3}"
  85. send "{@fh4}"
  86. stop
  87. if player has permission "fight.adm":
  88. send "{@fh5}"
  89. send "{@fh6}"
  90. send "{@fh7}"
  91. send "{@fh8}"
  92. send "{@fh9}"
  93. send "{@fh10}"
  94. stop
  95. if arg 1 is "tuto":
  96. send "{@ft1}"
  97. send "{@ft2}"
  98. send "{@ft3}"
  99. send "{@ft4}"
  100. send "{@ft5}"
  101. stop
  102. if arg 1 is "participar" or "join":
  103. if {fight.happening.start} is true:
  104. if {fight.start.block.input} is true:
  105. send "{@fp1}"
  106. stop
  107. else:
  108. if {fight.inside.event::%player%} is true:
  109. send "{@fp2}"
  110. stop
  111. else:
  112. loop items in player's inventory:
  113. add loop-item to {temporary.%player%::*}
  114. if {temporary.%player%::*} is set:
  115. send "{@fp3}"
  116. clear {temporary.%player%::*}
  117. stop
  118. if player's helmet or chestplate or leggings or boots is not air:
  119. send "{@fp3}"
  120. stop
  121. clear {temporary.%player%::*}
  122. add 1 to {fight.players.checker}
  123. add player's name to {fight.name.players.participating::*}
  124. set {fight.inside.event::%player%} to true
  125. teleport player to {fight.input}
  126. send "{@fp4}"
  127. stop
  128. else:
  129. send "{@fp5}"
  130. stop
  131. if arg 1 is "sair" or "leave":
  132. if {fight.inside.event::%player%} is true:
  133. clear {fight.inside.event::%player%}
  134. remove 1 from {fight.players.checker}
  135. remove player's name from {fight.name.players.participating::*}
  136. clear the inventory of player
  137. send "{@fs1}"
  138. teleport player to {fight.output}
  139. else:
  140. send "{@fs2}"
  141. if arg 1 is "iniciar" or "start":
  142. if player has permission "fight.adm":
  143. if {fight.happening.start} is true:
  144. send "{@fi1}"
  145. stop
  146. else:
  147. set {fight.happening.start} to true
  148. set {ads} to {@ads}
  149. remove 1 from {ads}
  150. loop {ads} times:
  151. if {fight.happening.start} is true:
  152. broadcast "{@fi2}"
  153. broadcast "{@fi3}"
  154. broadcast "{@fi4}"
  155. remove 1 from {ads}
  156. wait {@tca} seconds
  157. else:
  158. stop
  159. if {fight.happening.start} is true:
  160. if {fight.players.checker} is not set:
  161. broadcast "{@fi5}"
  162. broadcast "{@fi6}"
  163. clear {fight.inside.event::*}
  164. clear {fight.start.block.input}
  165. clear {fight.players.checker}
  166. clear {fight.happening.start}
  167. clear {fight.name.players.participating::*}
  168. stop
  169. else:
  170. if {fight.players.checker} = 4:
  171. broadcast "{@fi5}"
  172. broadcast "{@fi6}"
  173. clear {fight.inside.event::*}
  174. clear {fight.start.block.input}
  175. clear {fight.players.checker}
  176. clear {fight.happening.start}
  177. clear {fight.name.players.participating::*}
  178. stop
  179. else:
  180. set {fight.start.block.input} to true
  181. broadcast "{@fi2}"
  182. broadcast "{@fi3}"
  183. broadcast "{@fi4}"
  184. wait 10 seconds:
  185. loop 100 times:
  186. set {fighter1} to a random element out of {fight.name.players.participating::*}
  187. set {fighter2} to a random element out of {fight.name.players.participating::*}
  188. while {fighter1} is {fighter2}:
  189. if {fight.happening.start} is true:
  190. set {fighter1} to a random element out of {fight.name.players.participating::*}
  191. set {fighter2} to a random element out of {fight.name.players.participating::*}
  192. equip {fighter1} with a leather helmet
  193. equip {fighter1} with a leather chestplate
  194. equip {fighter1} with a leather leggings
  195. equip {fighter1} with a leather boots
  196. give 5 golden apple to the {fighter1}
  197. give 1 wood sword with unbreaking 50 to the {fighter1}
  198. give 1 golden apple:1 to the {fighter1}
  199. equip {fighter2} with a leather helmet
  200. equip {fighter2} with a leather chestplate
  201. equip {fighter2} with a leather leggings
  202. equip {fighter2} with a leather boots
  203. give 5 golden apple to the {fighter2}
  204. give 1 wood sword with unbreaking 50 to the {fighter2}
  205. give 1 golden apple:1 to the {fighter2}
  206. broadcast "{@fi7}"
  207. teleport {fighter1} to {fight.loc1}
  208. teleport {fighter2} to {fight.loc2}
  209. set {battle.check} to true
  210. while {battle.check} is true:
  211. if {fight.happening.start} is true:
  212. if {fight.dc.death.%{fighter1}%} is not set:
  213. if {fight.dc.death.%{fighter2}%} is not set:
  214. wait 3 seconds
  215. else:
  216. teleport {fighter1} to {fight.input}
  217. broadcast "{@fi8}"
  218. clear {battle.check}
  219. clear {fight.dc.death.%{fighter2}%}
  220. if {fight.players.checker} = 4:
  221. if {fight.happening.start} is true:
  222. set {fight.winner} to "%{fight.name.players.participating::*}%"
  223. broadcast "{@fi9}"
  224. broadcast "{@fi10}"
  225. broadcast "{@fi11}"
  226. add {@pde} to {fight.winner}'s balance
  227. set the {fighter.winner}'s prefix to "&f"
  228. set the attacker's prefix to "{@tag}&f"
  229. clear {fight.winner}
  230. clear {fight.inside.event::*}
  231. clear {fight.start.block.input}
  232. clear {fight.players.checker}
  233. clear {fight.happening.start}
  234. clear {fighter1}
  235. clear {fighter2}
  236. clear {battle.check}
  237. clear {fight.name.players.participating::*}
  238. stop loop
  239. stop
  240. else:
  241. send "{@spm}"
  242. stop
  243. if arg 1 is "cancelar" or "cancel":
  244. if player has permission "fight.adm":
  245. if {fight.happening.start} is true:
  246. broadcast "{@fc1}"
  247. broadcast "{@fc2}"
  248. clear {fight.inside.event::*}
  249. clear {fight.start.block.input}
  250. clear {fight.players.checker}
  251. clear {fight.happening.start}
  252. clear {fighter1}
  253. clear {fighter2}
  254. clear {battle.check}
  255. loop {fight.name.players.participating::*}:
  256. teleport loop-value to {fight.output}
  257. clear the inventory of loop-value
  258. clear {fight.name.players.participating::*}
  259. clear {fight.inside.event::%player%}
  260. else:
  261. send "{@fc3}"
  262. stop
  263. else:
  264. send "{@spm}"
  265. stop
  266. if arg 1 is "setloc1":
  267. if player has permission "fight.adm":
  268. set {fight.loc1} to location of player
  269. send "{@f11}"
  270. stop
  271. else:
  272. send "{@spm}"
  273. stop
  274. if arg 1 is "setloc2":
  275. if player has permission "fight.adm":
  276. set {fight.loc2} to location of player
  277. send "{@f12}"
  278. stop
  279. else:
  280. send "{@spm}"
  281. stop
  282. if arg 1 is "setentrada" or "setinput":
  283. if player has permission "fight.adm":
  284. set {fight.input} to location of player
  285. send "{@fse}"
  286. stop
  287. else:
  288. send "{@spm}"
  289. stop
  290. if arg 1 is "setsaida" or "setoutput":
  291. if player has permission "fight.adm":
  292. set {fight.output} to location of player
  293. send "{@fss}"
  294. stop
  295. else:
  296. send "{@spm}"
  297. stop
  298.  
  299. options:
  300. oc1: &6[Fight]&c Este comando nao é permitido durante o evento.
  301. oc2: &6[Fight]&c Termine a batalha para utilizar comandos.
  302. oq1: &6[Fight]&c %{fighter1}%&3 deu dc no meio do combate contra &c%{fighter2}%&3.
  303. oq2: &6[Fight]&c %{fighter2}%&3 deu dc no meio do combate contra &c%{fighter1}%&3.
  304.  
  305. on command:
  306. if {fight.happening.start} is true:
  307. if {fight.start.block.input} is true:
  308. if {fight.inside.event::%player%} is true:
  309. if player is not {fighter1} or {fighter2}:
  310. if command is "/fight sair" or "/fight cancelar" or "/g" or "/tell" or "/r" or "/." or "/ally":
  311. stop
  312. else:
  313. send "{@oc1}"
  314. cancel event
  315. else:
  316. if command is "/login" or "/register":
  317. stop
  318. else:
  319. send "{@oc2}"
  320. cancel event
  321.  
  322. on death:
  323. if {fight.happening.start} is true:
  324. if {fight.start.block.input} is true:
  325. if {fight.inside.event::%victim%} is true:
  326. if victim is {fighter1}:
  327. wait 1 seconds
  328. clear {fight.dc.death.%{fighter1}%}
  329. clear {fight.inside.event::%victim%}
  330. remove 1 from {fight.players.checker}
  331. remove victim's name from {fight.name.players.participating::*}
  332. clear the inventory of victim
  333. teleport victim to {fight.output}
  334. else:
  335. if victim is {fighter2}:
  336. clear {fight.dc.death.%{fighter2}%}
  337. clear {fight.inside.event::%victim%}
  338. remove 1 from {fight.players.checker}
  339. remove victim's name from {fight.name.players.participating::*}
  340. clear the inventory of victim
  341. teleport victim to {fight.output}
  342.  
  343. on quit:
  344. if {fight.happening.start} is true:
  345. if {fight.start.block.input} is true:
  346. if {fight.inside.event::%player%} is true:
  347. if player is {fighter1}:
  348. wait 1 seconds
  349. clear {fight.dc.death.%{fighter1}%}
  350. broadcast "{@oq1}"
  351. clear {fight.inside.event::%player%}
  352. remove 1 from {fight.players.checker}
  353. remove player's name from {fight.name.players.participating::*}
  354. clear the inventory of player
  355. teleport player to {fight.output}
  356. else:
  357. if player is {fighter2}:
  358. clear {fight.dc.death.%{fighter2}%}
  359. broadcast "{@oq2}"
  360. clear {fight.inside.event::%player%}
  361. remove 1 from {fight.players.checker}
  362. remove player's name from {fight.name.players.participating::*}
  363. clear the inventory of player
  364. teleport player to {fight.output}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement