Paste #49376: Untitled Paste

Date: 2018/08/23 11:36:25 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


XPiekarz:
  type: assignment
  debug: false
  actions:
    on assignment:
      - trigger name:click state:true
    on click:
      - inventory open d:in@piekarz_inv

piekarz_inv:
  type: inventory
  debug: false
  title: "    <&5>[xLife]   <&8>Piekarz   <&5>[xLife]"
  size: 18
  slots:
  - "[i@chleb] [i@ciasto] [i@ciastka] [i@placekdyniowy] [i@zupagrz] [i@zupazkro] [i@barszcz] [i@air] [i@air]"
  - "[i@air] [i@air] [i@air] [i@air] [i@air] [i@air] [i@air] [i@air] [i@air]" 


piekarz_inv_zasady:
  type: world
  debug: false
  events:
    on player clicks in piekarz_inv:
    - determine cancelled
    on player drags in piekarz_inv:
    - determine cancelled


############################ ITKI ####################################
chleb:
    type: item
    material: "297"
    display name: "<&7>    Chleb"
    lore:
     - "<&4>        Kupno:          "
     - "<&4><&4>Ilosc: 16 - Cena: 320 $"
     - "<&4>Ilosc: 64 - Cena: 1280 $"
     - "<&2>      Sprzedarz:        " 
     - "<&2>Ilosc: 16 - Cena: 224 $ "
     - "<&2>Ilosc: 64 - Cena: 896 $"

ciasto:
    type: item
    material: "354"
    display name: "<&7>    Ciasto"
    lore:
     - "<&4>        Kupno:          "
     - "<&4><&4>Ilosc: 1 - Cena: 50 $"
     - "<&4>Ilosc: 9 - Cena: 450 $"
     - "<&2>      Sprzedarz:        " 
     - "<&2>Ilosc: 1 - Cena: 35 $ "
     - "<&2>Ilosc: 9 - Cena: 315 $"

ciastka:
    type: item
    material: "357"
    display name: "<&7>    Ciastka"
    lore:
     - "<&4>        Kupno:          "
     - "<&4><&4>Ilosc: 16 - Cena: 100 $"
     - "<&4>Ilosc: 64 - Cena: 400 $"
     - "<&2>      Sprzedarz:        " 
     - "<&2>Ilosc: 16 - Cena: 70 $ "
     - "<&2>Ilosc: 64 - Cena: 280 $"

placekdyniowy:
    type: item
    material: "400"
    display name: "<&7>    Placek dyniowy"
    lore:
     - "<&4>        Kupno:          "
     - "<&4><&4>Ilosc: 16 - Cena: 240 $"
     - "<&4>Ilosc: 64 - Cena: 960 $"
     - "<&2>      Sprzedarz:        " 
     - "<&2>Ilosc: 16 - Cena: 168 $ "
     - "<&2>Ilosc: 64 - Cena: 672 $"

zupagrz:
    type: item
    material: "282"
    display name: "<&7>    Zupa grzybowa"
    lore:
     - "<&4>        Kupno:          "
     - "<&4><&4>Ilosc: 1 - Cena: 20 $"
     - "<&4>Ilosc: 9 - Cena: 180 $"
     - "<&2>      Sprzedarz:        " 
     - "<&2>Ilosc: 1 - Cena: 14 $ "
     - "<&2>Ilosc: 9 - Cena: 126 $"

zupazkro:
    type: item
    material: "413"
    display name: "<&7>    Zupa z  krolika"
    lore:
     - "<&4>        Kupno:          "
     - "<&4><&4>Ilosc: 1 - Cena: 30 $"
     - "<&4>Ilosc: 9 - Cena: 270 $"
     - "<&2>      Sprzedarz:        " 
     - "<&2>Ilosc: 1 - Cena: 20 $ "
     - "<&2>Ilosc: 9 - Cena: 180 $"


barszcz:
    type: item
    material: "436"
    display name: "<&7>    Barszcz"
    lore:
     - "<&4>        Kupno:          "
     - "<&4><&4>Ilosc: 1 - Cena: 30 $"
     - "<&4>Ilosc: 9 - Cena: 270 $"
     - "<&2>      Sprzedarz:        " 
     - "<&2>Ilosc: 1 - Cena: 20 $ "
     - "<&2>Ilosc: 9 - Cena: 180 $"


###################################### Kupno #################################################  

        on player right clicks chleb in piekarz_inv:
        - if <player.money> >= 320 {
            - money take qty:320
            - give i@297 qty:16
            } else {
            - narrate "<&5>[xLife]<&c> Masz za malo pieniedzy"    
            }

        on player shift_right clicks chleb in piekarz_inv:
        - if <player.money> >= 1280 {
            - money take qty:1280
            - give i@297 qty:64
            } else {
            - narrate "<&5>[xLife]<&c> Masz za malo pieniedzy"    
            }

        on player left clicks chleb in piekarz_inv:
        - if <player.inventory.contains[297].quantity[16]> {
            - money give qty:224
            - take i@297 qty:16
            - narrate "<&5>[xLife]<&a> Zarobiles 224$. Twoj stan konta wynosi: <player.money.round>$"
            } else {
            - narrate "<&5>[xLife]<&c> Nie masz tyle zywnosci"    
            }

        on player shift_left clicks chleb in piekarz_inv:
        - if <player.inventory.contains[297].quantity[64]> {
            - money give qty:896
            - take i@297 qty:64
            - narrate "<&5>[xLife]<&a> Zarobiles 896$. Twoj stan konta wynosi: <player.money.round>$"
            } else {
            - narrate "<&5>[xLife]<&c> Nie masz tyle zywnosci"    
            }



        on player right clicks ciasto in piekarz_inv:
        - if <player.money> >= 50 {
            - money take qty:50
            - give i@354 qty:1
            } else {
            - narrate "<&5>[xLife]<&c> Masz za malo pieniedzy"    
            }

        on player shift_right clicks ciasto in piekarz_inv:
        - if <player.money> >= 450 {
            - money take qty:450
            - give i@354 qty:9
            } else {
            - narrate "<&5>[xLife]<&c> Masz za malo pieniedzy"    
            }

        on player left clicks ciasto in piekarz_inv:
        - if <player.inventory.contains[354].quantity[1]> {
            - money give qty:35
            - take i@354 qty:1
            - narrate "<&5>[xLife]<&a> Zarobiles 35$. Twoj stan konta wynosi: <player.money.round>$"
            } else {
            - narrate "<&5>[xLife]<&c> Nie masz tyle zywnosci"    
            }

        on player shift_left clicks ciasto in piekarz_inv:
        - if <player.inventory.contains[354].quantity[9]> {
            - money give qty:315
            - take i@354 qty:9
            - narrate "<&5>[xLife]<&a> Zarobiles 315$. Twoj stan konta wynosi: <player.money.round>$"
            } else {
            - narrate "<&5>[xLife]<&c> Nie masz tyle zywnosci"    
            }

#############################################################################################  

        on player right clicks ciastka in piekarz_inv:
        - if <player.money> >= 100 {
            - money take qty:100
            - give i@357 qty:16
            } else {
            - narrate "<&5>[xLife]<&c> Masz za malo pieniedzy"    
            }

        on player shift_right clicks ciastka in piekarz_inv:
        - if <player.money> >= 400 {
            - money take qty:400
            - give i@357 qty:64
            } else {
            - narrate "<&5>[xLife]<&c> Masz za malo pieniedzy"    
            }

        on player left clicks ciastka in piekarz_inv:
        - if <player.inventory.contains[357].quantity[16]> {
            - money give qty:70
            - take i@357 qty:16
            - narrate "<&5>[xLife]<&a> Zarobiles 70$. Twoj stan konta wynosi: <player.money.round>$"
            } else {
            - narrate "<&5>[xLife]<&c> Nie masz tyle zywnosci"    
            }

        on player shift_left clicks ciastka in piekarz_inv:
        - if <player.inventory.contains[357].quantity[64]> {
            - money give qty:280
            - take i@357 qty:64
            - narrate "<&5>[xLife]<&a> Zarobiles 280$. Twoj stan konta wynosi: <player.money.round>$"
            } else {
            - narrate "<&5>[xLife]<&c> Nie masz tyle zywnosci"    
            }


#############################################################################################  

        on player right clicks placekdyniowy in piekarz_inv:
        - if <player.money> >= 240 {
            - money take qty:240
            - give i@400 qty:16
            } else {
            - narrate "<&5>[xLife]<&c> Masz za malo pieniedzy"    
            }

        on player shift_right clicks placekdyniowy in piekarz_inv:
        - if <player.money> >= 960 {
            - money take qty:960
            - give i@400 qty:64
            } else {
            - narrate "<&5>[xLife]<&c> Masz za malo pieniedzy"    
            }

        on player left clicks placekdyniowy in piekarz_inv:
        - if <player.inventory.contains[400].quantity[16]> {
            - money give qty:168
            - take i@400 qty:16
            - narrate "<&5>[xLife]<&a> Zarobiles 168$. Twoj stan konta wynosi: <player.money.round>$"
            } else {
            - narrate "<&5>[xLife]<&c> Nie masz tyle zywnosci"    
            }

        on player shift_left clicks placekdyniowy in piekarz_inv:
        - if <player.inventory.contains[400].quantity[64]> {
            - money give qty:672
            - take i@400 qty:64
            - narrate "<&5>[xLife]<&a> Zarobiles 672$. Twoj stan konta wynosi: <player.money.round>$"
            } else {
            - narrate "<&5>[xLife]<&c> Nie masz tyle zywnosci"    
            }


#############################################################################################  

        on player right clicks zupagrz in piekarz_inv:
        - if <player.money> >= 20 {
            - money take qty:20
            - give i@282 qty:1
            } else {
            - narrate "<&5>[xLife]<&c> Masz za malo pieniedzy"    
            }

        on player shift_right clicks zupagrz in piekarz_inv:
        - if <player.money> >= 180 {
            - money take qty:180
            - give i@282 qty:9
            } else {
            - narrate "<&5>[xLife]<&c> Masz za malo pieniedzy"    
            }

        on player left clicks zupagrz in piekarz_inv:
        - if <player.inventory.contains[282].quantity[1]> {
            - money give qty:14
            - take i@282 qty:1
            - narrate "<&5>[xLife]<&a> Zarobiles 14$. Twoj stan konta wynosi: <player.money.round>$"
            } else {
            - narrate "<&5>[xLife]<&c> Nie masz tyle zywnosci"    
            }

        on player shift_left clicks zupagrz in piekarz_inv:
        - if <player.inventory.contains[282].quantity[9]> {
            - money give qty:126
            - take i@282 qty:9
            - narrate "<&5>[xLife]<&a> Zarobiles 126$. Twoj stan konta wynosi: <player.money.round>$"
            } else {
            - narrate "<&5>[xLife]<&c> Nie masz tyle zywnosci"    
            }

#############################################################################################  

        on player right clicks zupazkro in piekarz_inv:
        - if <player.money> >= 30 {
            - money take qty:30
            - give i@413 qty:1
            } else {
            - narrate "<&5>[xLife]<&c> Masz za malo pieniedzy"    
            }

        on player shift_right clicks zupazkro in piekarz_inv:
        - if <player.money> >= 270 {
            - money take qty:270
            - give i@413 qty:9
            } else {
            - narrate "<&5>[xLife]<&c> Masz za malo pieniedzy"    
            }

        on player left clicks zupazkro in piekarz_inv:
        - if <player.inventory.contains[413].quantity[1]> {
            - money give qty:20
            - take i@413 qty:1
            - narrate "<&5>[xLife]<&a> Zarobiles 20$. Twoj stan konta wynosi: <player.money.round>$"
            } else {
            - narrate "<&5>[xLife]<&c> Nie masz tyle zywnosci"    
            }

        on player shift_left clicks zupazkro in piekarz_inv:
        - if <player.inventory.contains[413].quantity[9]> {
            - money give qty:180
            - take i@413 qty:9
            - narrate "<&5>[xLife]<&a> Zarobiles 180$. Twoj stan konta wynosi: <player.money.round>$"
            } else {
            - narrate "<&5>[xLife]<&c> Nie masz tyle zywnosci"    
            }        

#############################################################################################  

        on player right clicks barszcz in piekarz_inv:
        - if <player.money> >= 30 {
            - money take qty:30
            - give i@436 qty:1
            } else {
            - narrate "<&5>[xLife]<&c> Masz za malo pieniedzy"    
            }

        on player shift_right clicks barszcz in piekarz_inv:
        - if <player.money> >= 270 {
            - money take qty:270
            - give i@436 qty:9
            } else {
            - narrate "<&5>[xLife]<&c> Masz za malo pieniedzy"    
            }

        on player left clicks barszcz in piekarz_inv:
        - if <player.inventory.contains[436].quantity[1]> {
            - money give qty:20
            - take i@436 qty:1
            - narrate "<&5>[xLife]<&a> Zarobiles 20$. Twoj stan konta wynosi: <player.money.round>$"
            } else {
            - narrate "<&5>[xLife]<&c> Nie masz tyle zywnosci"    
            }

        on player shift_left clicks barszcz in piekarz_inv:
        - if <player.inventory.contains[436].quantity[9]> {
            - money give qty:180
            - take i@436 qty:9
            - narrate "<&5>[xLife]<&a> Zarobiles 180$. Twoj stan konta wynosi: <player.money.round>$"
            } else {
            - narrate "<&5>[xLife]<&c> Nie masz tyle zywnosci"    
            }  

#############################################################################################