IceOLator™ GoldenAges
Bannato
Ultima modifica:
Salve a tutti, è con onore che vi presento il mio primo script, questo script è una specie di lotteria di nome Vinci&Cavalca (più numeri azzecchi e più livelli di cavallo vinci), ringrazio S4LV0DM per i suoi insegnamenti *.*
PHP:
function t ( )
say_title ( "Vinci&Cavalca by GanjaFile" )
end
function err ( )
say_title ( "ERRORE:" )
say ( "Il numero deve essere compreso tra 1 e 50!" )
pc . changegold ( 200000 )
return
end
local discorso = "Vinci&Cavalca by GanjaFile![ENTER]Vuoi giocare?[ENTER]Ti costerà 200.000 di yang"
local r1 = tonumber( number(1,50) )
local r2 = tonumber( number(1,50) )
local r3 = tonumber( number(1,50) )
local r4 = tonumber( number(1,50) )
local r5 = tonumber( number(1,50) )
local r6 = tonumber( number(1,50) )
if r1 == r2 or r1 == r3 or r1 == r4 or r1 == r5 or r1 == r6 or r2 == r3 or r2 == r4 or r2 == r5 or r2 == r6 or r3 == r4 or r3 == r5 or r3 == r6 or r4 == r5 or r4 == r6 or r5 == r6 then
t ( )
say ( "Ops... piccolo errore." )
say ( "clicca di nuovo nell' NPC" )
return
else
t ( )
say ( discorso )
local siono = select ( "Si","No" )
if siono == 2 then
return
elseif siono == 1 then
if pc . gold < 200000 then
t ( )
say ( "Non hai abbastanza yang!" )
else
pc . changegold ( -200000 )
t ( )
say ( "Scrivi il 1° numero" )
local n1 = tonumber(input())
if n1 < 1 or n1 > 50 then
err ( )
else
t ( )
say ( "Scrivi il 2° numero" )
local n2 = tonumber(input())
if n2 < 1 or n2 > 50 then
err ( )
else
t ( )
say ( "Scrivi il 3° numero" )
local n3 = tonumber(input())
if n3 < 1 or n3 > 50 then
err ( )
else
t ( )
say ( "Scrivi il 4° numero" )
local n4 = tonumber(input())
if n3 < 1 or n3 > 50 then
err ( )
else
t ( )
say ( "Scrivi il 5° numero" )
local n5 = tonumber(input())
if n5 < 1 or n5 > 50 then
err ( )
else
t ( )
say ( "Scrivi il 6° numero" )
local n6 = tonumber(input())
if n6 < 1 or n6 > 50 then
err ( )
return
else
if n1 == n2 or n1 == n3 or n1 == n4 or n1 == n5 or n1 == n6 or n2 == n3 or n2 == n4 or n2 == n5 or n2 == n6 or n3 == n4 or n3 == n5 or n3 == n6 or n4 == n5 or n4 == n6 or n5 == n6 then
t ( )
say ( "Mi vuoi prendere in giro??[ENTER]" .. delay(300) .. "Ci sono dei numeri uguali!" )
return
end
t ( )
say ( "Bravo![ENTER]" .. delay(200) .. "Numeri estratti:" )
say ( "" )
say ( r1 .. " " .. r2 .. " " .. r3 .. " " .. r4 .. " " .. r5 .. " " .. r6 )
wait ( )
t ( )
local totale = tonumber("0")
if r1 == n1 or r1 == n2 or r1 == n3 or r1 == n4 or r1 == n5 or r1 == n6 then
say ( "1° numero" .. delay(150) .. " SI!" )
totale = totale + 1
else
say ( "1° numero" .. delay(150) .. " NO!" )
end
if r2 == n1 or r2 == n2 or r2 == n3 or r2 == n4 or r2 == n5 or r2 == n6 then
say ( "2° numero" .. delay(150) .. " SI!" )
totale = totale + 1
else
say ( "2° numero" .. delay(150) .. " NO!" )
end
if r3 == n1 or r3 == n2 or r3 == n3 or r3 == n4 or r3 == n5 or r3 == n6 then
say ( "3° numero" .. delay(150) .. " SI!" )
totale = totale + 1
else
say ( "3° numero" .. delay(150) .. " NO!" )
end
if r4 == n1 or r4 == n2 or r4 == n3 or r4 == n4 or r4 == n5 or r4 == n6 then
say ( "4° numero" .. delay(150) .. " SI!" )
totale = totale + 1
else
say ( "4° numero" .. delay(150) .. " NO!" )
end
if r5 == n1 or r5 == n2 or r5 == n3 or r5 == n4 or r5 == n5 or r5 == n6 then
say ( "5° numero" .. delay(150) .. " SI!" )
totale = totale + 1
else
say ( "5° numero" .. delay(150) .. " NO!" )
end
if r6 == n1 or r6 == n2 or r6 == n3 or r6 == n4 or r6 == n5 or r6 == n6 then
say ( "6° numero" .. delay(150) .. " SI!" )
totale = totale + 1
else
say ( "6° numero" .. delay(150) .. " NO!" )
end
wait ( )
t ( )
if totale < 1 then
say ( "Mi dispiace non hai indovinato nessun numero." )
elseif totale == 1 then
say ( "Complimenti hai indovinato " .. totale .. " numeri!" )
say ( "Vinci un livello di cavallo!" )
horse . advance ( )
elseif totale == 2 then
say ( "Complimenti hai indovinato " .. totale .. " numeri!" )
say ( "Vinci un livello di cavallo!" )
horse . advance ( )
elseif totale == 3 then
say ( "Complimenti hai indovinato " .. totale .. " numeri!" )
say ( "Vinci un livello di cavallo!" )
horse . advance ( )
elseif totale == 4 then
say ( "Complimenti hai indovinato " .. totale .. " numeri!" )
say ( "Vinci un livello di cavallo!" )
horse . advance ( )
elseif totale == 5 then
say ( "Complimenti hai indovinato " .. totale .. " numeri!" )
say ( "Vinci un livello di cavallo!" )
horse . advance ( )
elseif totale == 6 then
say ( "Complimenti hai indovinato " .. totale .. " numeri!!" )
say ( "Vinci un livello di cavallo!" )
horse . advance ( )
end
end
end
end
end
end
end
end
end
end
Se dovete postarla da un' altra parte vi prego
di mettere i crediti....
di mettere i crediti....

