Files
Leviathan/GameServer/AziaMafiaScriptsBackup/Funzone/shit/Change_skill_item.lua
T
2026-06-01 12:46:52 +02:00

226 lines
18 KiB
Lua

function skill_item_menu(page)
effect_id = {}
effect_name = {}
myjob = get_value( "job" )
-- berseker
effect_id[120] = {900471,900496,900499,900540,900602,900613,900610,900605,900606,900607,900608,900611,900614,900531,900532,900536,900537,900541,900542,900492,900493,900494,900495,900497,900500,900501,900515,900498,900632,900633,900639}
effect_name[120] = {50001082,50002046,50002055,50002655,50041101,50041121,50041112,50041107,50041108,50041109,50041110,50041119,50041124,50002631,50002635,50002641,50002642,50002656,50002661,50002041,50002043,50002044,50002045,50002052,50002056,50002058,50002082,50002053,50062009,50062010,50062501}
--Sentinelle
effect_id[121] = {900471,900613,900700,900704,900692,900695,900696,900697,900698,900694,900702,900703,900531,900532,900536,900537,900538,900663,900664,900665,900666,900674,900517,900518,900519,900520,900649,900650,900651,900652,900660,900661,900705,900706,900646}
effect_name[121] = {50001082,50041121,50041212,50041225,50041201,50041207,50041208,50041209,50041210,50041203,50041218,50041224,50002631,50002635,50002641,50002642,50002645,50002662,50002663,50002664,50002668,50002681,50002311,50002312,50002313,50002315,50002321,50002322,50002326,50002328,50002616,50002617,50062305,50062306,50063418}
--Archidruide
effect_id[122] = {900136,900174,900236,900251,900232,900234,900235,900237,900238,900240,900241,900242,900243,900244,900245,900247,900248,900249,900252,900250,900175,900181,900191,900194,900199,900173,900133,900134,900137,900145,900147,900148,900152,900157,900161,900162,900163,900135,900167,900168,900169,900170,900171,900172,900287,900300,900301,900302,900303,900313,900314,900318}
effect_name[122] = {50003024,50003430,50041308,50041332,50041301,50041303,50041306,50041309,50041310,50041312,50041315,50041316,50041317,50041318,50041319,50041321,50041329,50041330,50041333,50041331,50003431,50003472,50003751,50003754,50003901,50003429,50003021,50003022,50003025,50003151,50003181,50003183,50003188,50003209,50003220,50003222,50003224,50003023,50003423,50003424,50003425,50003426,50003427,50003428,50063015,50063419,50063420,50063421,50063422,50063441,50063442,50063602}
--[Kahuna]
effect_id[123] = {900136,900151,900174,900260,900268,900269,900266,900259,900253,900255,900256,900257,900258,900262,900263,900264,900265,900175,900192,900173,900133,900134,900137,900144,900162,900135,900167,900168,900169,900170,900171,900172,900288,900300,900301,900302,900303,900318}
effect_name[123] = {50003024,50003187,50003430,50041410,50041420,50041430,50041417,50041409,50041401,50041403,50041406,50041407,50041408,50041412,50041413,50041415,50041416,50003431,50003752,50003429,50003021,50003022,50003025,50003103,50003222,50003023,50003423,50003424,50003425,50003426,50003427,50003428,50063016,50063419,50063420,50063421,50063422,50063602}
--[Métamorphe]
effect_id[124] = {900427,900431,900417,900418,900419,900421,900422,900416,900426,900428,900429,900430,900423,900424,900380,900335,900110,900336,900327,900328,900329,900330,900632,900436,900447,900448,900449,900450,900451,900454,900456,900457,900458,900460,900467}
effect_name[124] = {50041523,50041529,50041506,50041507,50041510,50041512,50041513,50041503,50041522,50041526,50041527,50041528,50041517,50041520,50021501,50003622,50004003,50004012,50001821,50001831,50001832,50001851,50062009,50062012,50063423,50063424,50063425,50063426,50063427,50063443,50063604,50064001,50064002,50064202,50064801}
--[Templier]
effect_id[220] = {900553,900548,900549,900550,900551,900554,900556,900557,900558,900559,900560,900563,900564,900565,900566,900567,900552,900562,900545,900546,900547,900544,900543,900479,900480,900481,900482,900483,900484,900485,900486,900487,900504,900505,900506,900507,900524,900624,900625,900626,900627,900643,900644,900645}
effect_name[220] = {50021110,50021102,50021104,50021104,50021108,50021111,50021113,50021117,50021118,50021119,50021120,50021124,50021126,50021127,50021128,50021129,50021109,50021122,50003492,50003814,50003815,50003401,50003001,50002011,50002012,50002013,50002014,50002018,50002019,50002020,50002021,50002022,50002063,50002064,50002067,50002068,50002611,50062001,50062002,50062003,50062004,50063401,50063402,50063403}
--[Héros]
effect_id[221] = {900568,900579,900578,900570,900571,900572,900573,900574,900576,900577,900580,900582,900544,900543,900479,900480,900481,900482,900485,900486,900487,900503,900524,900626,900628,900629,900630,900631,900640,900641,900642,900643,900647}
effect_name[221] = {50021201,50021218,50021217,50021203,50021207,50021208,50021209,50021210,50021212,50021216,50021219,50021221,50003401,50003001,50002011,50002012,50002013,50002014,50002020,50002021,50002022,50002061,50002611,50062003,50062005,50062006,50062007,50062008,50063009,50063010,50063011,50063401,50063432}
--[Erudit]
effect_id[222] = {900353,900355,900357,900358,900359,900360,900361,900362,900363,900364,900349,900350,900351,900354,900352,900177,900122,900123,900124,900125,900142,900143,900153,900154,900155,900156,900158,900276,900277,900278,900279,900284,900285,900286,900294,900295,900296,900297,900299,900306,900317}
effect_name[222] = {50021308,50021310,50021312,50021316,50021317,50021318,50021319,50021320,50021321,50021321,50021301,50021302,50021303,50021303,50021304,50003454,50003002,50003003,50003004,50003005,50003037,50003040,50003202,50003203,50003204,50003205,50003210,50063001,50063002,50063003,50063004,50063012,50063013,50063014,50063404,50063405,50063406,50063407,50063409,50063433,50063601}
--[Oracle]
effect_id[223] = {900373,900374,900375,900377,900378,900376,900367,900379,900365,900368,900369,900370,900371,900352,900122,900123,900124,900125,900153,900154,900155,900156,900158,900276,900277,900278,900279,900291,900292,900293,900294,900295,900296,900297,900299,900307,900308,900309,900310,900317}
effect_name[223] = {50021412,50021417,50021418,50021421,50021421,50021419,50021403,50021427,50021401,50021407,50021408,50021409,50021410,50021304,50003002,50003003,50003004,50003005,50003202,50003203,50003204,50003205,50003210,50063001,50063002,50063003,50063004,50063204,50063205,50063206,50063404,50063405,50063406,50063407,50063409,50063434,50063435,50063436,50063437,50063601}
--[Bestiaire]
effect_id[224] = {900331,900338,900388,900390,900397,900398,900399,900396,900389,900380,900382,900383,900384,900385,900386,900391,900394,900395,900352,900110,900339,900341,900337,900328,900329,900330,900437,900438,900439,900440,900441,900442,900443,900444,900445,900446,900462,900463,900464,900465,900466}
effect_name[224] = {50001881,50004202,50021512,50021518,50021526,50021527,50021528,50021525,50021517,50021501,50021503,50021504,50021506,50021507,50021510,50021519,50021522,50021524,50021304,50004003,50004207,50004402,50004201,50001831,50001832,50001851,50063201,50063202,50063410,50063411,50063412,50063413,50063414,50063415,50063416,50063417,50064204,50064401,50064402,50064403,50064404}
--[Exécuteur]
effect_id[320] = {900516,900525,900589,900598,900597,900583,900585,900586,900587,900591,900592,900593,900594,900596,900588,900599,900600,900601,900526,900527,900528,900529,900530,900533,900534,900535,900539,900522,900488,900489,900490,900491,900502,900508,900509,900510,900511,900512,900513,900514,900623,900634}
effect_name[320] = {50002304,50002621,50031110,50031125,50031124,50031101,50031103,50031105,50031108,50031112,50031116,50031117,50031119,50031121,50031109,50031126,50031127,50031128,50002622,50002623,50002624,50002626,50002630,50002637,50002638,50002639,50002649,50002502,50002031,50002032,50002033,50002034,50002060,50002070,50002071,50002074,50002075,50002076,50002077,50002078,50061019,50062011}
--[Prédateur]
effect_id[321] = {900516,900523,900525,900673,900681,900689,900682,900684,900685,900686,900687,900690,900691,900680,900675,900677,900678,900679,900526,900527,900528,900529,900667,900668,900669,900670,900671,900662,900672,900648,900653,900654,900655,900656,900657,900658,900659,900635,900636,900637,900638,900707}
effect_name[321] = {50002304,50002503,50002621,50002679,50031209,50031221,50031210,50031212,50031217,50031218,50031219,50031227,50031228,50031208,50031201,50031203,50031204,50031207,50002622,50002623,50002624,50002626,50002671,50002672,50002673,50002676,50002677,50002620,50002678,50002303,50002331,50002332,50002333,50002334,50002337,50002339,50002340,50062301,50062302,50062303,50062304,50062307}
--[Magicien du Chaos]
effect_id[322] = {900196,900201,900203,900204,900205,900206,900207,900209,900210,900211,900212,900213,900214,900216,900217,900176,900178,900179,900180,900182,900183,900184,900185,900127,900128,900129,900130,900131,900132,900150,900138,900140,900146,900149,900159,900160,900165,900166,900119,900120,900280,900281,900282,900283,900289,900290,900304,900305,900319}
effect_name[322] = {50003806,50031301,50031303,50031308,50031309,50031310,50031311,50031313,50031314,50031315,50031319,50031320,50031323,50031325,50031329,50003435,50003458,50003460,50003461,50003601,50003602,50003603,50003607,50003012,50003013,50003014,50003015,50003016,50003017,50003186,50003027,50003033,50003156,50003185,50003211,50003212,50003411,50003412,50001411,50001451,50063005,50063006,50063007,50063008,50063017,50063203,50063428,50063429,50063605}
--[Nécromancien]
effect_id[323] = {900188,900226,900229,900228,900227,900218,900219,900220,900221,900222,900223,900224,900231,900210,900211,900176,900178,900182,900183,900184,900186,900189,900190,900193,900197,900198,900187,900195,900127,900128,900129,900130,900131,900132,900139,900141,900149,900159,900160,900165,900166,900119,900120,900280,900281,900282,900283,900290,900304,900305,900315,900316,900319,900320,900321}
effect_name[323] = {50003614,50031412,50031422,50031421,50031420,50031401,50031403,50031403,50031407,50031408,50031409,50031410,50031424,50031314,50031315,50003435,50003458,50003601,50003602,50003603,50003608,50003616,50003750,50003753,50003810,50003811,50003613,50003803,50003012,50003013,50003014,50003015,50003016,50003017,50003030,50003035,50003185,50003211,50003212,50003411,50003412,50001411,50001451,50063005,50063006,50063007,50063008,50063203,50063428,50063429,50063444,50063445,50063605,50063801,50063802}
--[Démoniste]
effect_id[324] = {900347,900403,900408,900409,900411,900412,900414,900407,900413,900402,900401,900404,900405,900380,900346,900110,900340,900342,900343,900344,900345,900348,900200,900121,900521,900432,900433,900452,900453,900459,900322,900323,900324,900468,900470,900325}
effect_name[324] = {50004801,50031505,50031518,50031520,50031522,50031524,50031535,50031513,50031526,50031504,50031503,50031508,50031511,50021501,50004614,50004003,50004211,50004412,50004413,50004612,50004613,50004802,50004901,50002051,50002501,50050201,50050202,50063430,50063431,50064201,50064405,50064406,50064407,50064802,50064804,50064805}
nbpage = (table.getn(effect_id[myjob]))%20
if page == nil then
page = 1
end
dlg_title( "Heph" )
dlg_text( "Je changerai le sort identifié sur tout votre équimement en celui selectionné" )
if page == 1 then
for i = 1 , 20 do
if effect_name[myjob][i] == nil then break end
name = tostring("@" .. effect_name[myjob][i])
dlg_menu( sconv(name ,"<size:9>" , " ") , 'change_item_skill('.. effect_id[myjob][i] ..')' )
end
end
if page == 2 then
for i = 20 , 40 do
if effect_name[myjob][i] == nil then break end
name = tostring("@" .. effect_name[myjob][i])
dlg_menu( sconv(name ,"<size:9>" , " ") , 'change_item_skill('.. effect_id[myjob][i] ..')' )
end
end
if page == 3 then
for i = 40 , 60 do
if effect_name[myjob][i] == nil then break end
name = tostring("@" .. effect_name[myjob][i])
dlg_menu( sconv(name ,"<size:9>" , " ") , 'change_item_skill('.. effect_id[myjob][i] ..')' )
end
end
if page == 4 then
for i = 60 , 80 do
if effect_name[myjob][i] == nil then break end
name = tostring("@" .. effect_name[myjob][i])
dlg_menu( sconv(name ,"<size:9>" , " ") , 'change_item_skill('.. effect_id[myjob][i] ..')' )
end
end
if page < nbpage then
dlg_menu( '<#CCFFCC>Suivant' , 'skill_item_menu('.. page +1 ..')' )
end
if page > 1 or page == nbpage then
dlg_menu( '<#CCFFCC>Precedent' , 'skill_item_menu('.. page - 1 ..')' )
end
dlg_show()
end
---------------------------------------------------------------------------- UP GEMS
function change_item_skill( skill_effect )
effect_id = {}
effect_name = {}
myjob = get_value( "job" )
-- berseker
effect_id = {900471,900496,900499,900540,900602,900613,900610,900605,900606,900607,900608,900611,900614,900531,900532,900536,900537,900541,900542,900492,900493,900494,900495,900497,900500,900501,900515,900498,900632,900633,900639
,900471,900613,900700,900704,900692,900695,900696,900697,900698,900694,900702,900703,900531,900532,900536,900537,900538,900663,900664,900665,900666,900674,900517,900518,900519,900520,900649,900650,900651,900652,900660,900661,900705,900706,900646
,900136,900174,900236,900251,900232,900234,900235,900237,900238,900240,900241,900242,900243,900244,900245,900247,900248,900249,900252,900250,900175,900181,900191,900194,900199,900173,900133,900134,900137,900145,900147,900148,900152,900157,900161,900162,900163,900135,900167,900168,900169,900170,900171,900172,900287,900300,900301,900302,900303,900313,900314,900318
,900136,900151,900174,900260,900268,900269,900266,900259,900253,900255,900256,900257,900258,900262,900263,900264,900265,900175,900192,900173,900133,900134,900137,900144,900162,900135,900167,900168,900169,900170,900171,900172,900288,900300,900301,900302,900303,900318
,900427,900431,900417,900418,900419,900421,900422,900416,900426,900428,900429,900430,900423,900424,900380,900335,900110,900336,900327,900328,900329,900330,900632,900436,900447,900448,900449,900450,900451,900454,900456,900457,900458,900460,900467
,900553,900548,900549,900550,900551,900554,900556,900557,900558,900559,900560,900563,900564,900565,900566,900567,900552,900562,900545,900546,900547,900544,900543,900479,900480,900481,900482,900483,900484,900485,900486,900487,900504,900505,900506,900507,900524,900624,900625,900626,900627,900643,900644,900645
,900568,900579,900578,900570,900571,900572,900573,900574,900576,900577,900580,900582,900544,900543,900479,900480,900481,900482,900485,900486,900487,900503,900524,900626,900628,900629,900630,900631,900640,900641,900642,900643,900647
,900353,900355,900357,900358,900359,900360,900361,900362,900363,900364,900349,900350,900351,900354,900352,900177,900122,900123,900124,900125,900142,900143,900153,900154,900155,900156,900158,900276,900277,900278,900279,900284,900285,900286,900294,900295,900296,900297,900299,900306,900317
,900373,900374,900375,900377,900378,900376,900367,900379,900365,900368,900369,900370,900371,900352,900122,900123,900124,900125,900153,900154,900155,900156,900158,900276,900277,900278,900279,900291,900292,900293,900294,900295,900296,900297,900299,900307,900308,900309,900310,900317
,900331,900338,900388,900390,900397,900398,900399,900396,900389,900380,900382,900383,900384,900385,900386,900391,900394,900395,900352,900110,900339,900341,900337,900328,900329,900330,900437,900438,900439,900440,900441,900442,900443,900444,900445,900446,900462,900463,900464,900465,900466
,900516,900525,900589,900598,900597,900583,900585,900586,900587,900591,900592,900593,900594,900596,900588,900599,900600,900601,900526,900527,900528,900529,900530,900533,900534,900535,900539,900522,900488,900489,900490,900491,900502,900508,900509,900510,900511,900512,900513,900514,900623,900634
,900516,900523,900525,900673,900681,900689,900682,900684,900685,900686,900687,900690,900691,900680,900675,900677,900678,900679,900526,900527,900528,900529,900667,900668,900669,900670,900671,900662,900672,900648,900653,900654,900655,900656,900657,900658,900659,900635,900636,900637,900638,900707
,900196,900201,900203,900204,900205,900206,900207,900209,900210,900211,900212,900213,900214,900216,900217,900176,900178,900179,900180,900182,900183,900184,900185,900127,900128,900129,900130,900131,900132,900150,900138,900140,900146,900149,900159,900160,900165,900166,900119,900120,900280,900281,900282,900283,900289,900290,900304,900305,900319
,900188,900226,900229,900228,900227,900218,900219,900220,900221,900222,900223,900224,900231,900210,900211,900176,900178,900182,900183,900184,900186,900189,900190,900193,900197,900198,900187,900195,900127,900128,900129,900130,900131,900132,900139,900141,900149,900159,900160,900165,900166,900119,900120,900280,900281,900282,900283,900290,900304,900305,900315,900316,900319,900320,900321
,900347,900403,900408,900409,900411,900412,900414,900407,900413,900402,900401,900404,900405,900380,900346,900110,900340,900342,900343,900344,900345,900348,900200,900121,900521,900432,900433,900452,900453,900459,900322,900323,900324,900468,900470,900325
}
for i = 0 , 8 do
handle = get_wear_item_handle(i)
if handle ~= nil and handle ~= '' and handle > 0 then
id = get_item_code (handle)
re_recheck = get_item_random_option(handle,1)
if re_recheck ~= 0 and re_recheck ~= nil then
option_exist = 0
--- Replace Option Per other Option
for b = 1 , 9 do
option = get_item_random_option(handle,b)
if option ~= 0 and option ~= nil then
if tonumber(option[1]) == 133 then
for c = 1 , table.getn(effect_id) do
if option[2] == effect_id[c] then
set_item_random_option(handle,b,133,skill_effect,0 )
option_exist = 1
message(txt("Skill ajouté sur = ") .. txt("@" .. get_item_name_id (id)) .. txt_end())
end
end
end
end
end
--- If Not Existe Add it
if option_exist == 0 then
affect_skill_not_exist( handle , skill_effect )
end
else
--cprint(txt("id =".. i .. " / nom = ") .. txt("@" .. get_item_name_id (id)) .. txt_end())
end
end
end
end
function affect_skill_not_exist( handle , skill_effect )
for b = 1 , 9 do
option = get_item_random_option(handle,b)
if option == 0 and option ~= nil then
set_item_random_option(handle,b,133,skill_effect,0 )
message(txt("Skill ajouté sur = ") .. txt("@" .. get_item_name_id (get_item_code(handle))) .. txt_end())
return
end
end
end