View difference between Paste ID: JEGWpFMc and wJyeRRss
SHOW: | | - or go back to the newest paste.
1
-- Avvio del programma
2
-- Includiamo le librerie fondamentali
3
shell.run("functions")
4
5
-- Ora facciamo un elenco delle tratte
6
tratte = {"kaway"}
7
8
tratta = tratte[1]
9
-- Ora carichiamo la mappa per la risorsa richiesta
10
while true do
11
  term.setBackgroundColor(colors.white)
12
  term.setTextColor(colors.black)
13
  term.clear()
14
  -- Abbiamo la tratta e allora prendiamo l'immagine
15
  local trattaImg = paintutils.loadImage(tratta)
16
  paintutils.drawImage(trattaImg, 1, 1)
17
  shell.run(tratta .. ".tratta")
18
  
19
  viewScambi()
20
  local event, key, x, y = os.pullEvent("mouse_click")
21-
  -- Non �A8 che abbiamo qualcosaa?
21+
  -- Non �A8 che abbiamo qualcosaa?
22
  getScambio = getScambioNameByPos(x, y)
23
  if getScambio ~= nil then
24
    setScambio(getScambio, true)
25
  end
26
  sleep(2)
27
end
28