Files
Leviathan/GameServer/AziaMafiaScriptsBackup/Funzone/require/Mix Gs Script.lua
T
2026-06-01 12:46:52 +02:00

348 lines
9.7 KiB
Lua

function reawaken_log(handle)
cprint("reawaken_log")
aweken_type = { 1, 2, 4, 8,16,32,128,256,512,1024,2048,4096,8192,16384,32768,524288,1048576,268435456,65536, 147, 141, 142, 140, 143, 144, 145, 150, 151, 152, 153, 154, 155,2097152}
aweken_string = {70,71,73,72,74,75, 53, 54, 55, 56, 57, 58, 59, 60, 62, 61, 1253, 7152, 9775,7250,7251,7252,7253,7254,7255,7258,7139,7140,7141,7142,7143,7144,1748}
for i = 1 , 5 do
rdm_option = get_item_awaken_option(handle,i)
if rdm_option ~= 0 then
rdm_type = rdm_option[1]
rdm_value1 = rdm_option[2]
for a = 1 , table.getn(aweken_type) do
if aweken_type[a] == rdm_value1 then
if rdm_option[3] < 0 then
texte = sconv("<#B92C36><b><shadow> name : valeur" , "name" , "@" .. aweken_string[a] , "valeur" , math.floor(rdm_option[3]) )
cprint(texte)
else
texte = sconv("<#8DC63F><b><shadow> name : valeur", "name" , "@" .. aweken_string[a] , "valeur" , math.floor(rdm_option[3]) )
cprint(texte)
end
end
end
end
end
end
function MixWithLuaScript(handle , craftype )
boul = false
if craftype == 1 then --1 Re-Identification // Value
boul = spcraft_reid(handle)
elseif craftype == 2 then --2 Re-eveil new stuff T3 ++
boul = spcraft_reeveil(handle)
elseif craftype == 3 then --3 Re-eveil // Value T3 ++
boul = spcraft_reeveil_valn(handle)
elseif craftype == 4 then --4 Re-eveil // Value old stuff 1m
boul = spcraft_reeveil1(handle)
elseif craftype == 5 then --5 Re-eveil // Value old stuff 2m
boul = spcraft_reeveil2(handle)
elseif craftype == 6 then --5 Re-ID skill
boul = spcraft_reidskill(handle)
elseif craftype == 7 then --5 Cape FZ Re-Id
boul = spcraft_capereid(handle)
elseif craftype == 8 then --5 Cape FZ Upage
boul = spcraft_capeup(handle)
end
return boul
end
function spcraft_capereid(handle)
tab1 = {200,201,203,204,205,206,207,208}
tab2 = {16384,32768,524288,1048576}
tab3 = {1,4,8,16,32}
set_item_random_option(handle,1,133, tab1[math.random(1, table.getn(tab1) )] , 0 )
set_item_random_option(handle,2,96, tab2[math.random(1, table.getn(tab2) )] , math.random(1,200) )
set_item_random_option(handle,3,96, 2097152 , math.random(1,1500) )
--get_item_random_option (item_handle,effect_line)[array_item](1= effect_type,2 = opt_type,3 = opt_value)
option = get_item_random_option(handle,6)[3]
set_item_random_option(handle,6,98, tab3[math.random(1, table.getn(tab3) )] , option )
return true
end
function spcraft_capeup(handle)
option = {get_item_random_option(handle,4)[3] , get_item_random_option(handle,5)[3] , get_item_random_option(handle,6)[3] }
if option[1] == 25 and option[2] == 0.05 and option[3] == 0.1 then
private_notice("Upgrade Cape Max")
return false
end
if math.random(1,100) > 5 then
cprint("<#B92C36>FAIL")
return true
else
cprint("<#8DC63F>SUCCESS")
end
bol = false
while bol == false do -- tant que i reste inférieur ou égal à 20 ...
rmd = math.random(1,3)
if rmd == 1 then
if option[1] < 25 then
set_item_random_option(handle,4, get_item_random_option(handle,4)[1] , get_item_random_option(handle,4)[2] , get_item_random_option(handle,4)[3] + 1 )
bol = false
return true
end
end
if rmd == 2 then
if option[2] < 0.05 then
temp = math.floor( get_item_random_option(handle,5)[3]*100 + 1 ) / 100
set_item_random_option(handle,5, get_item_random_option(handle,5)[1] , get_item_random_option(handle,5)[2] , temp )
bol = false
return true
end
end
if rmd == 3 then
if option[3] < 0.1 then
temp = math.floor( get_item_random_option(handle,6)[3]*100 + 1 ) / 100
set_item_random_option(handle,6, get_item_random_option(handle,6)[1] , get_item_random_option(handle,6)[2] , temp )
bol = false
return true
end
end
end
return false
end
function spcraft_reid(handle)
tabtype = {}
tabtype[96] = {}
tabtype[96][0] = {512,1024,1,2,4,8,16,32,16384,32768,524288,1048576,128,256,2048,4096,65536,131072,262144,134217728,268435456,2097152,4194304}
tabtype[96][1] = {300,300,20,20,20,20,20,20,100,100,75,75,100,100,7,7,5,5,100,1,1,700,700}
tabtype[96][2] = {750,750,45,45,45,45,45,45,300,300,200,200,300,300,15,15,10,10,300,3,3,2000,2000}
tabtype[97] = {}
tabtype[97][0] = {268435456,512}
tabtype[97][1] = {7 , 2}
tabtype[97][2] = {15, 6}
for i = 2 , 10 do
rdm_option = get_item_random_option(handle,i)
if rdm_option ~= 0 then
rdm_type = rdm_option[1]
rdm_value1 = rdm_option[2]
for a = 1 , table.getn(tabtype[rdm_type][0]) do
if tabtype[rdm_type][0][a] == rdm_value1 then
mini = tabtype[rdm_type][1][a]
maxi = tabtype[rdm_type][2][a]
rdm = random(mini , maxi )
if rdm_option[3] >= rdm then
cprint("<#B92C36>".. rdm_option[3] .. " --> " .. rdm .. " [" .. tabtype[rdm_type][1][a] .. " / " .. tabtype[rdm_type][2][a] .."]" )
else
cprint("<#8DC63F>" .. rdm_option[3] .. " --> " .. rdm .. " [" .. tabtype[rdm_type][1][a] .. " / " .. tabtype[rdm_type][2][a] .."]" )
end
set_item_random_option(handle,i,rdm_type,rdm_value1, rdm )
end
end
end
end
return true
end
function spcraft_reeveil(handle)
code = get_item_code( handle )
tabtype = {1,2,4,8,16,32,128,256,512,1024,16384,32768,524288,1048576,2048,4096,8192,65536,268435456}
tabtypeval = {100,100,100,100,100,100,500,500,200,200,200,200,200,200,40,40,40,20,20}
--eveil 1 153-155 2-5
--eveil 2 150-152 2-5
--eveil 1 141 5-10
rmd1 = random(153,155)
rdm2 = random(150,152)
if tier_stuff(code) == 3 then
set_item_awaken_option(handle,1,rmd1 ,rmd1, random(2,5) )
elseif tier_stuff(code) == 4 then
set_item_awaken_option(handle,1,rmd1,rmd1, random(2,5) )
set_item_awaken_option(handle,2,rdm2,rdm2, random(2,5) )
elseif tier_stuff(code) == 5 then
set_item_awaken_option(handle,1,rmd1,rmd1, random(2,5) )
set_item_awaken_option(handle,2,rdm2,rdm2, random(2,5) )
--set_item_awaken_option(handle,3,141,141 , random(5,10) )
temx = random(1, table.getn(tabtype))
rdm_value1 = tabtype[temx]
if rdm_value1 == 268435456 then
rdm_type = 97
else
rdm_type = 96
end
mini = 1
maxi = tabtypeval[temx]
rdm = random(mini , maxi )
set_item_awaken_option(handle,3,rdm_type,rdm_value1, rdm )
end
if tier_stuff(code) >= 3 then
return true
end
end
function spcraft_reeveil_valn(handle)
code = get_item_code( handle )
tabtype = {1,2,4,8,16,32,128,256,512,1024,16384,32768,524288,1048576,2048,4096,8192,65536,268435456}
tabtypeval = {100,100,100,100,100,100,500,500,200,200,200,200,200,200,40,40,40,20,20}
--eveil 1 153-155 2-5
--eveil 2 150-152 2-5
--eveil 1 141 5-10
rmd1 = get_item_awaken_option(handle,1)
rdm2 = get_item_awaken_option(handle,2)
rdm3 = get_item_awaken_option(handle,3)
if tier_stuff(code) == 3 then
set_item_awaken_option(handle,1,rmd1[1] ,rmd1[1], random(2,5) )
elseif tier_stuff(code) == 4 then
set_item_awaken_option(handle,1,rmd1[1],rmd1[1], random(2,5) )
set_item_awaken_option(handle,2,rdm2[1],rdm2[1], random(2,5) )
elseif tier_stuff(code) == 5 then
set_item_awaken_option(handle,1,rmd1[1],rmd1[1], random(2,5) )
set_item_awaken_option(handle,2,rdm2[1],rdm2[1], random(2,5) )
--set_item_awaken_option(handle,3,141,141 , random(5,10) )
rdm_type = rdm3[1]
rdm_value1 = rdm3[2]
for a = 1 , table.getn(tabtype) do
if tabtype[a] == rdm_value1 then
mini = 1
maxi = tabtypeval[a]
rdm = random(mini , maxi )
set_item_awaken_option(handle,3,rdm_type,rdm_value1, rdm )
end
end
end
if tier_stuff(code) >= 3 then
return true
end
end
function spcraft_reeveil1(handle)
tabtype = {}
tabtype[96] = {}
tabtype[96][0] = {1,2,4,8,16,32,128,256,512,1024,16384,32768,524288,1048576,2048,4096,8192,65536}
tabtype[96][1] = {-50,-50,-50,-50,-50,-50,-250,-250,-100,-100,-100,-100,-100,-100,-20,-20,-20,-10}
tabtype[96][2] = {50,50,50,50,50,50,250,250,100,100,100,100,100,100,20,20,20,10}
tabtype[97] = {}
tabtype[97][0] = {268435456}
tabtype[97][1] = {-10}
tabtype[97][2] = {10}
for i = 1 , 10 do
rdm_option = get_item_awaken_option(handle,i)
if rdm_option ~= 0 then
rdm_type = rdm_option[1]
rdm_value1 = rdm_option[2]
for a = 1 , table.getn(tabtype[rdm_type][0]) do
if tabtype[rdm_type][0][a] == rdm_value1 then
mini = tabtype[rdm_type][1][a]
maxi = tabtype[rdm_type][2][a]
rdm = random(mini , maxi )
if rdm_option[3] >= rdm then
cprint("<#B92C36>".. rdm_option[3] .. " --> " .. rdm .. " [" .. tabtype[rdm_type][1][a] .. " / " .. tabtype[rdm_type][2][a] .."]" )
else
cprint("<#8DC63F>" .. rdm_option[3] .. " --> " .. rdm .. " [" .. tabtype[rdm_type][1][a] .. " / " .. tabtype[rdm_type][2][a] .."]" )
end
set_item_awaken_option(handle,i,rdm_type,rdm_value1, rdm )
end
end
end
end
return true
end
function spcraft_reeveil2(handle)
tabtype = {}
tabtype[96] = {}
tabtype[96][0] = {1,2,4,8,16,32,128,256,512,1024,16384,32768,524288,1048576,2048,4096,8192,65536}
tabtype[96][1] = {-100,-100,-100,-100,-100,-100,-500,-500,-200,-200,-200,-200,-200,-200,-40,-40,-40,-20}
tabtype[96][2] = {100,100,100,100,100,100,500,500,200,200,200,200,200,200,40,40,40,20}
tabtype[97] = {}
tabtype[97][0] = {268435456}
tabtype[97][1] = {-20}
tabtype[97][2] = {20}
for i = 1 , 10 do
rdm_option = get_item_awaken_option(handle,i)
if rdm_option ~= 0 then
rdm_type = rdm_option[1]
rdm_value1 = rdm_option[2]
for a = 1 , table.getn(tabtype[rdm_type][0]) do
if tabtype[rdm_type][0][a] == rdm_value1 then
mini = tabtype[rdm_type][1][a]
maxi = tabtype[rdm_type][2][a]
rdm = random(mini , maxi )
if rdm_option[3] >= rdm then
cprint("<#B92C36>".. rdm_option[3] .. " --> " .. rdm .. " [" .. tabtype[rdm_type][1][a] .. " / " .. tabtype[rdm_type][2][a] .."]" )
else
cprint("<#8DC63F>" .. rdm_option[3] .. " --> " .. rdm .. " [" .. tabtype[rdm_type][1][a] .. " / " .. tabtype[rdm_type][2][a] .."]" )
end
set_item_awaken_option(handle,i,rdm_type,rdm_value1, rdm )
end
end
end
end
return true
end