Advertisement
Guest User

[GrandTheftMinecraft] v1.0 by XziomekX

a guest
Apr 17th, 2014
627
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.38 KB | None | 0 0
  1. #===========================================#
  2. #                                           #
  3. #           Informacje o skrypcie           #
  4. #                                           #
  5. #===========================================#
  6. #                                           #
  7. #   Nazwa: GrandTheftMinecraft              #
  8. #   Wersja: 1.0                             #
  9. #   WWW: http://ziomeks.cba.pl/             #
  10. #   Wymaga:                                 #
  11. #    - Vault                                #
  12. #    - iConomy                              #
  13. #                                           #
  14. #===========================================#
  15.  
  16. #===========================================#
  17. #                                           #
  18. #               Licencja skryptu            #
  19. #                                           #
  20. #===========================================#
  21. #                                           #
  22. #   1. Zakazane jest publikowanie skryptu   #
  23. #      na innych forach, stronach itp!      #
  24. #   2. Zakazane jest sprzedawanie skryptu!  #
  25. #   3. Zakazane jest usuwanie informacji    #
  26. #      autorze!                             #
  27. #   4. Zakazane jest podpisywanie sie jako  #
  28. #      autor skryptu!                       #
  29. #   5. Zakazane jest kradnięcie kodu do        #
  30. #      swoich skryptów!                        #
  31. #   6. Zezwalam na edycje kodu na swoje     #
  32. #      potrzeby!                            #
  33. #   7. Zakaz kopiowania pomysłu!           #
  34. #                                           #
  35. #===========================================#
  36.  
  37. #===========================================#
  38. #                                           #
  39. #           Opcje główne skryptu          #
  40. #                                           #
  41. #===========================================#
  42.  
  43. options:
  44.  
  45.     # Prefix, czyli to np [GrandTheftMinecraft] Nie masz uprawnien
  46.     prefix: &7[&2GrandTheftMinecraft&7]
  47.    
  48.     # Wiadomość, gdy nie masz uprawnień
  49.     noper: &cNie masz uprawnien
  50.    
  51.     # Główna nazwa skryptu ( Domyślnie GrandTheftMinecraft.sk )
  52.     skname: GrandTheftMinecraft.sk
  53.    
  54.     # Ilość kasy za misje
  55.     mission: 250
  56.    
  57.     # Ilość kasy za zabicie innego gracza
  58.     player: 1500
  59.  
  60. #===========================================#
  61. #                                           #
  62. #   Zmienne skryptu GrandTheftMinecraft     #
  63. #                                           #
  64. #===========================================#
  65. variables:
  66.  
  67.     {grandtheftminecraft.money.%player%} = 0
  68.     {grandtheftminecraft.misssion.accept.%player%} = false
  69.     {grandtheftminecraft.mission.made.%player%} = 0
  70.     {grandtheftminecraft.cj.limit} = false
  71.    
  72. #===========================================#
  73. #                                           #
  74. #                   Komendy                 #
  75. #                                           #
  76. #===========================================#
  77.  
  78. command /grandtheftminecraft [<text>] [<text>] [<player>]:
  79.     aliases: gtm, gta, grandtm
  80.     trigger:
  81.         if arg 1 is not set:
  82.             message "&e&l======== {@prefix} &7[&e1&7/&22&7] &e&l========"
  83.             message ""
  84.             message "&2/gtm help &7- &eLista komend"
  85.             message "&2/gtm setjail &7- &eUstawia wiezienie"
  86.             message "&2/gtm sethospital &7- &eUstawia szpital"
  87.             message "&2/gtm setcj &7- &eUstawia miejsce, gdzie jest DJ"
  88.             message "&2/gtm jail <nick> <czas> &7- &eWrzuca gracza do wiezienia"
  89.             message "&e&l======== &2Wpisz /gtm help 2 &e&l========"
  90.         if arg 1 is "help" or "1":
  91.             message "&e&l======== {@prefix} &7[&e1&7/&22&7] &e&l========"
  92.             message ""
  93.             message "&2/gtm help &7- &eLista komend"
  94.             message "&2/gtm setjail &7- &eUstawia wiezienie"
  95.             message "&2/gtm sethospital &7- &eUstawia szpital"
  96.             message "&2/gtm setcj &7- &eUstawia miejsce, gdzie jest DJ"
  97.             message "&2/gtm jail <czas> <nick> &7- &eWrzuca gracza do wiezienia"
  98.             message "&e&l======== &2Wpisz /gtm help 2 &e&l========"
  99.         if arg 2 is "2":
  100.             message "&e&l======== {@prefix} &7[&e2&7/&22&7] &e&l========"
  101.             message ""
  102.             message "&2/gtm money &7- &eSprawdza stan konta"
  103.             message "&2/gtm mission &7- &eSprawdza stan wykonanych misjii"
  104.             message "&2/gtm removecj &7- &eUsuwa DJ"
  105.             message "&2/gtm autor &7- &eInformacje o autorze"
  106.             message "&2/gtm reload &7- &ePrzeladowuje skrypt"
  107.            
  108.         if arg 1 is "reload":
  109.             if player has permission "grandtheftminecraft.admin" or "gtm.admin" or "gtm.*":
  110.                 execute console command "sk reload {@skname}"
  111.                 message "{@prefix} &2Skrypt przeladowany pomyslnie!"
  112.             else:
  113.                 message "{@prefix} {@noper}"
  114.                
  115.         if arg 1 is "autor":
  116.             message "&e&l======== {@prefix} &e&l========"
  117.             message ""
  118.             message "&eAutor: &2XziomekX"
  119.             message "&eWWW: &2http://ziomeks.cba.pl/"
  120.            
  121.         if arg 1 is "mission":
  122.             if player has permission "grandtheftminecraft.default" or "gtm.default" or "gtm.*":
  123.                 message "{@prefix} &eWykonales juz &2%{grandtheftminecraft.mission.made.%player%}% &emisjii."
  124.             else:
  125.                 message "{@prefix} {@noper}"
  126.                
  127.         if arg 1 is "setjail":
  128.             if player has permission "grandtheftminecraft.admin" or "gtm.admin" or "gtm.*":
  129.                 set {grandtheftminecraft.jail} to location of player
  130.                 message "{@prefix} &eStworzyles wiezienie!"
  131.             else:
  132.                 message "{@prefix} {@noper}"
  133.                
  134.         if arg 1 is "removecj":
  135.             if player has permission "grandtheftminecraft.admin" or "gtm.admin" or "gtm.*":
  136.                 loop all entities:
  137.                     if type of loop-entity-1 is creature:
  138.                         if name of loop-entity-1 is "&e&lCJ":
  139.                             if type of loop-entity-1 is a villager:
  140.                                 kill loop-entity-1
  141.                                 message "{@prefix} &eCJ zostal usuniety!"
  142.                                 set {grandtheftminecraft.cj.limit} to false
  143.             else:
  144.                 message "{@prefix} {@noper}"
  145.                
  146.         if arg 1 is "jail":
  147.             if player has permission "grandtheftminecraft.mod" or "gtm.mod" or "gtm.*":
  148.                 if {grandtheftminecraft.jail} is not set:
  149.                     message "{@prefix} &cNie ustawinono wiezienia"
  150.                     stop
  151.                 if arg 2 is not set:
  152.                     message "{@prefix} &cPodaj czas!"
  153.                     stop
  154.             if arg 3 is not set:
  155.                 message "{@prefix} &cPodaj nick gracza!"
  156.                 stop
  157.             if arg 3 is set:
  158.                 teleport arg player to {grandtheftminecraft.jail}
  159.                 message "{@prefix} &eWrzuciles do wiezienia gracza &c%arg 3%"
  160.                
  161.         if arg 1 is "sethospital":
  162.             if player has permission "grandtheftminecraft.admin" or "gtm.admin" or "gtm.*":
  163.                 set {grandtheftminecraft.hospital} to location of player
  164.                 message "{@prefix} &eSzpital zostal ustawiony!"
  165.             else:
  166.                 message "{@prefix} {@noper}"
  167.                
  168.         if arg 1 is "money":
  169.             if player has permission "grandtheftminecraft.default" or "gtm.default" or "gtm.*":
  170.                 message "{@prefix} &2StanKonta: &e%{grandtheftminecraft.money.%player%}%&2 ."  
  171.             else:
  172.                 message "{@prefix} {@noper}"
  173.                
  174.         if arg 1 is "setcj":
  175.             has permission "grandtheftminecraft.admin" or "gtm.admin" or "gtm.*":
  176.                 if {grandtheftminecraft.cj.limit} is true:
  177.                     message "{@prefix} &cCJ moze byc tylko jeden..."
  178.                     stop
  179.                 set {grandtheftminecraft.cj} to location of player
  180.                 message "{@prefix} &eCJ zostal stworzony! W nim sa teraz misje"
  181.                 spawn villager at location of player
  182.                 apply slowness 100 to the last spawned entity for 100 days
  183.                 set display name of the last spawned entity to "&e&lCJ"
  184.                 set {grandtheftminecraft.cj.limit} to true
  185.             else:
  186.                 message "{@prefix} {@noper}"
  187.  
  188. #===========================================#
  189. #                                           #
  190. #           Opcja odradzanie sie            #
  191. #                                           #
  192. #===========================================#
  193.  
  194. on respawn:
  195.     wait 5 tick
  196.     teleport player to {grandtheftminecraft.hospital}
  197.     message "{@prefix} &cZmarles! Odrodziles sie w szpitalu. Stan konta zostal usuniety!"
  198.     set {grandtheftminecraft.money.%player%} to 0
  199.  
  200. #===========================================#
  201. #                                           #
  202. #               Opcje misjii ( CJ )         #
  203. #                                           #
  204. #===========================================#
  205.  
  206. on rightclick on villager:
  207.     cancel event
  208.     if name of the clicked entity is "&e&lCJ":
  209.     if {grandtheftminecraft.misssion.accept.%player%} is false:
  210.         if {grandtheftminecraft.mission.made.%player%} is 0:
  211.             message "{@prefix} &cNie wybrales zadnej misjii"
  212.             message "{@prefix} &eCzy chcesz zakceptowac misje I? ( zbierz 64 miesa zombie ( Wypada z ludzi )) &2&lTAK /tak &4NIE /nie"
  213.             stop
  214.         if {grandtheftminecraft.mission.made.%player%} is 2:
  215.             message "{@prefix} &eZetnij 64 trawki ( to jest to mala trawa )"
  216.             message "{@prefix} &eCzy chcesz zakceptowac misje I? ( zbierz 64 miesa zombie ( Wypada z ludzi )) &2&lTAK /tak &4NIE /nie"
  217.             stop
  218.     if {grandtheftminecraft.misssion.accept.%player%} is true:
  219.         if {grandtheftminecraft.mission.made.%player%} is 0:
  220.             if player has 64 367:
  221.                 remove 64 367 from player
  222.                 message "{@prefix} &eMisja zakoniczona!"
  223.                 set {grandtheftminecraft.misssion.accept.%player%} to false
  224.                 add 2 to {grandtheftminecraft.mission.made.%player%}
  225.                 add {@mission} to {grandtheftminecraft.money.%player%}
  226.             else:
  227.                 message "{@prefix} &cNie posiadasz jeszcze przedmiotu"
  228.                 stop
  229.         if {grandtheftminecraft.mission.made.%player%} is 2:
  230.             if player has 64 31:1:
  231.                 remove 64 31:1 from player
  232.                 message "{@prefix} &eMisja zakoniczona!"
  233.                 set {grandtheftminecraft.misssion.accept.%player%} to false
  234.                 add 1 to {grandtheftminecraft.mission.made.%player%}
  235.                 add {@mission} to {grandtheftminecraft.money.%player%}
  236.             else:
  237.                 message "{@prefix} &cNie posiadasz jeszcze przedmiotu"
  238.                 stop
  239.  
  240. #===========================================#
  241. #                                           #
  242. #           Opcje dropu z gracza            #
  243. #                                           #
  244. #===========================================#
  245.  
  246. on death:
  247.     if victim is player:
  248.         if attacker is a player:
  249.             add {@player} to {grandtheftminecraft.money.%player%}
  250.             chance of 15%:
  251.                 give 1 367 to attacker
  252.  
  253. #===========================================#
  254. #                                           #
  255. #       Blokada zabicia villagera           #
  256. #                                           #
  257. #===========================================#
  258.                
  259. on damage of a villager:
  260.     cancel event
  261.  
  262.    
  263. #===========================================#
  264. #                                           #
  265. #           Komendy do akceptowania         #
  266. #                                           #
  267. #===========================================#
  268.  
  269. command /tak:
  270.     trigger:
  271.         set {grandtheftminecraft.misssion.accept.%player%} to true
  272.         message "{@prefix} &eZakceptowales misje!"
  273. command /nie:
  274.     trigger:
  275.         message "{@prefix} &cOdrzuciles misje!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement