Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /oczkosave <integer>:
- permission: wlasciciel
- trigger:
- type of player's tool is any head:
- set {oczko.glowa::%arg%} to player's tool
- send "&aZapisano przedmiot do &4%arg% &aslotu"
- else:
- send "&cTo nie jest glowa"
- command /oczkoget <integer>:
- permission: wlasciciel
- trigger:
- add 1 of {oczko.glowa::%arg%} to player's inventory
- send "&aOtrzymales glowke nr &4%arg%"
- command /oczkolist:
- permission: wlasciciel
- trigger:
- send "&2&lDostepne numery:"
- loop {oczko.glowa::*}:
- send " &a%loop-index%"
- command /oczko:
- permission: op
- trigger:
- open(player, 0)
- function pkt(p: player) :: boolean:
- set {_g} to 0
- set {_c} to 1
- while slot {_c}*9-9 of {_p}'s current inventory is any head:
- add item amount of slot {_c}*9-9 of {_p}'s current inventory to {_g}
- add 1 to {_c}
- set {_c} to 1
- set {_a} to 0
- while slot {_c}*9-1 of {_p}'s current inventory is any head:
- add item amount of slot {_c}*9-1 of {_p}'s current inventory to {_a}
- add 1 to {_c}
- if {_a} > 21:
- return false
- if {_g} > 21:
- return true
- on inventory click:
- if name of player's current inventory is "&5&lGra w Oczko":
- cancel event
- if metadata "oczko.los" of player is true:
- send "&4Juz losujesz"
- stop
- if slot clicked slot of player's current inventory is jukebox of knockback 10 named "&6&lRzuc Kostka!":
- set {_a} to item amount of clicked slot + 1
- set slot clicked slot of player's current inventory to {_a} of jukebox of knockback 10 named "&6&lRzuc Kostka!"
- set metadata "oczko.los" of player to true
- set {_b} to item amount of slot 13 of player's current inventory - 1
- set {_s} to 0
- set {_c} to 1
- while slot {_c}*9-9 of player's current inventory is any head:
- add item amount of slot {_c}*9-9 of player's current inventory to {_s}
- add 1 to {_c}
- if {_s} > 15:
- set slot {_b}*9-9 of player's current inventory to 1 of 166
- else:
- set {_r} to random integer between 2 and 12
- set {_x} to 100+{_r}
- set slot {_b}*9-9 of player's current inventory to {_r} of {oczko.glowa::%{_x}%}
- losLewo(player, 60)
- losPrawo(player, 90)
- stop
- else:
- if slot clicked slot of player's current inventory is bed:
- endConsole(player)
- function endConsole(p: player):
- set metadata "oczko.los" of {_p} to true
- if name of {_p}'s current inventory is "&5&lGra w Oczko":
- set {_b} to item amount of slot 13 of {_p}'s current inventory
- set {_s} to 0
- set {_c} to 1
- while slot {_c}*9-9 of {_p}'s current inventory is any head:
- add item amount of slot {_c}*9-9 of {_p}'s current inventory to {_s}
- add 1 to {_c}
- set {_a} to 0
- set {_c} to 1
- while slot {_c}*9-1 of {_p}'s current inventory is any head:
- add item amount of slot {_c}*9-1 of {_p}'s current inventory to {_a}
- add 1 to {_c}
- if {_a} < {_s}:
- if {_s} < 21:
- wait 1 second
- close {_p}'s inventory
- send {_p} title "&4&lPrzegrales" with subtitle "&7Sprobuj jeszcze raz" for 3 seconds
- clear metadata "oczko.los" of {_p}
- stop
- if {_s} <= 15:
- set {_r} to random integer between 2 and 12
- set {_x} to 100+{_r}
- set slot {_b}*9-9 of {_p}'s current inventory to {_r} of {oczko.glowa::%{_x}%}
- set slot {_b}*9-1 of {_p}'s current inventory to 1 of 166
- set {_b} to item amount of slot 13 of {_p}'s current inventory +1
- set slot 13 of {_p}'s current inventory to {_b} of jukebox of knockback 10 named "&6&lRzuc Kostka!"
- wait 1 seconds
- endConsole({_p})
- else:
- wait 2 seconds
- if {_s} > 21:
- send "&aWygrales!" to {_p}
- if type of {_p}'s current inventory's slot 46 is beacon:
- set {_x} to (item amount of {_p}'s current inventory's slot 46) + 1
- else:
- set {_x} to 1
- open({_p}, {_x})
- clear metadata "oczko.los" of {_p}
- stop
- set {_a} to 0
- set {_c} to 1
- while slot {_c}*9-1 of {_p}'s current inventory is any head:
- add item amount of slot {_c}*9-1 of {_p}'s current inventory to {_a}
- add 1 to {_c}
- if {_a} > {_s}:
- send "&aWygrales!" to {_p}
- if type of {_p}'s current inventory's slot 46 is any beacon:
- set {_x} to (item amount of {_p}'s current inventory's slot 46) + 1
- else:
- set {_x} to 1
- open({_p}, {_x})
- clear metadata "oczko.los" of {_p}
- stop
- else:
- close {_p}'s inventory
- send {_p} title "&4&lPrzegrales" with subtitle "&7Sprobuj jeszcze raz" for 3 seconds
- clear metadata "oczko.los" of {_p}
- stop
- else:
- clear metadata "oczko.los" of {_p}
- function losLewo(p: player, i: integer):
- if name of {_p}'s current inventory is "&5&lGra w Oczko":
- set slot 39 of {_p}'s current inventory to slot 40 of {_p}'s current inventory
- set slot 40 of {_p}'s current inventory to slot 41 of {_p}'s current inventory
- set {_r} to random integer between 1 and 6
- set slot 41 of {_p}'s current inventory to {_r} of {oczko.glowa::%{_r}%} named " "
- if {_i}<9:
- wait "%2*(10-{_i})% ticks" parsed as timespan
- else:
- wait 1 tick
- if {_i}<2:
- clear metadata "oczko.los" of {_p}
- stop
- set {_i} to "%{_i} - 1%" parsed as integer
- losLewo({_p}, {_i})
- function losPrawo(p: player, i: integer) :: boolean:
- if name of {_p}'s current inventory is "&5&lGra w Oczko":
- set slot 33 of {_p}'s current inventory to slot 32 of {_p}'s current inventory
- set slot 32 of {_p}'s current inventory to slot 31 of {_p}'s current inventory
- set slot 31 of {_p}'s current inventory to slot 30 of {_p}'s current inventory
- set slot 30 of {_p}'s current inventory to slot 29 of {_p}'s current inventory
- set {_r} to random integer between 1 and 6
- set slot 29 of {_p}'s current inventory to {_r} of {oczko.glowa::%{_r}%} named " "
- if {_i}<2:
- wait 15 ticks
- clear metadata "oczko.los" of {_p}
- set {_a} to 0
- add item amount of slot 31 of {_p}'s current inventory to {_a}
- add item amount of slot 40 of {_p}'s current inventory to {_a}
- set {_b} to item amount of slot 13 of {_p}'s current inventory - 1
- set {_x} to 100+{_a}
- set slot {_b}*9-1 of {_p}'s current inventory to {_a} of {oczko.glowa::%{_x}%}
- set {_win} to pkt({_p})
- # send "%pkt({_p})%" to {_p}
- if {_win} is true:
- wait 1 second
- send "&aWygrales!" to {_p}
- if type of {_p}'s current inventory's slot 46 is any beacon:
- set {_x} to (item amount of {_p}'s current inventory's slot 46) + 1
- else:
- set {_x} to 1
- open({_p}, {_x})
- stop
- if {_win} is false:
- wait 1 second
- close {_p}'s inventory
- send {_p} title "&4&lPrzegrales" with subtitle "&7Sprobuj jeszcze raz" for 3 seconds
- stop
- if {_i}<9:
- wait "%2*(10-{_i})% ticks" parsed as timespan
- else:
- wait 1 tick
- set {_i} to "%{_i} - 1%" parsed as integer
- losPrawo({_p}, {_i})
- else:
- clear metadata "oczko.los" of {_p}
- function open(p: player, gry: number):
- if {_gry} is 3:
- send {_p} title "&2&lWygrales!" with subtitle "&7Biegnij dalej i ciesz sie swoim akacjowym kolkiem!" for 5 seconds
- open chest with 6 rows named "&5&lGra w Oczko" to {_p}
- wait 2 ticks
- clear metadata "oczko.los" of {_p}
- set {_p}'s current inventory's slot 0 to 1 of pink stained glass pane of lure 10 named "Pusty slot na rzuty"
- set {_p}'s current inventory's slot 1 to 1 of {oczko.glowa::1000} named "&6Pijany Joe"
- set {_p}'s current inventory's slot 2 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 3 to 1 of 426 named " "
- set {_p}'s current inventory's slot 4 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 5 to 1 of 426 named " "
- set {_p}'s current inventory's slot 6 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 7 to 1 of {_p}'s skull named "&6Jakis przystojniak"
- set {_p}'s current inventory's slot 8 to 1 of pink stained glass pane of lure 10 named "Pusty slot na rzuty"
- set {_p}'s current inventory's slot 9 to 1 of pink stained glass pane of lure 10 named "Pusty slot na rzuty"
- set {_p}'s current inventory's slot 10 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 11 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 12 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 13 to 1 of jukebox of knockback 10 named "&6&lRzuc Kostka!"
- set {_p}'s current inventory's slot 14 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 15 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 16 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 17 to 1 of pink stained glass pane of lure 10 named "Pusty slot na rzuty"
- set {_p}'s current inventory's slot 18 to 1 of pink stained glass pane of lure 10 named "Pusty slot na rzuty"
- set {_p}'s current inventory's slot 19 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 20 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 21 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 22 to 1 of light green stained glass pane named "&2&lWyrzucone oczka"
- set {_p}'s current inventory's slot 23 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 24 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 25 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 26 to 1 of pink stained glass pane of lure 10 named "Pusty slot na rzuty"
- set {_p}'s current inventory's slot 27 to 1 of pink stained glass pane of lure 10 named "Pusty slot na rzuty"
- set {_p}'s current inventory's slot 28 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 29 to 4 of {oczko.glowa::4} named " "
- set {_p}'s current inventory's slot 30 to 5 of {oczko.glowa::5} named " "
- set {_p}'s current inventory's slot 31 to 6 of {oczko.glowa::6} named " "
- set {_p}'s current inventory's slot 32 to 1 of {oczko.glowa::1} named " "
- set {_p}'s current inventory's slot 33 to 2 of {oczko.glowa::2} named " "
- set {_p}'s current inventory's slot 34 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 35 to 1 of pink stained glass pane of lure 10 named "Pusty slot na rzuty"
- set {_p}'s current inventory's slot 36 to 1 of pink stained glass pane of lure 10 named "Pusty slot na rzuty"
- set {_p}'s current inventory's slot 37 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 38 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 39 to 1 of {oczko.glowa::1} named " "
- set {_p}'s current inventory's slot 40 to 2 of {oczko.glowa::2} named " "
- set {_p}'s current inventory's slot 41 to 3 of {oczko.glowa::3} named " "
- set {_p}'s current inventory's slot 42 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 43 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 44 to 1 of pink stained glass pane of lure 10 named "Pusty slot na rzuty"
- set {_p}'s current inventory's slot 45 to 1 of pink stained glass pane of lure 10 named "Pusty slot na rzuty"
- if {_gry} = 0:
- set {_p}'s current inventory's slot 46 to 1 of black stained glass pane named " "
- else:
- set {_p}'s current inventory's slot 46 to {_gry} of beacon named "&a&lWygrano: %{_gry}%/3"
- set {_p}'s current inventory's slot 47 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 48 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 49 to 1 of light green stained glass pane named "&2&lWyrzucone oczka"
- set {_p}'s current inventory's slot 50 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 51 to 1 of black stained glass pane named " "
- set {_p}'s current inventory's slot 52 to 1 of 355:14 named "&4&lPasuj"
- set {_p}'s current inventory's slot 53 to 1 of pink stained glass pane of lure 10 named "Pusty slot na rzuty"
Advertisement
Add Comment
Please, Sign In to add comment