function onSay(cid, words, param)
local bron = {
{id = 2383, energy = 7763, fire = 7744, earth = 7854, ice = 7869},
{id = 7384, energy = 7765, fire = 7746, earth = 7856, ice = 7871},
{id = 7406, energy = 7766, fire = 7747, earth = 7857, ice = 7872},
{id = 7402, energy = 7767, fire = 7748, earth = 7858, ice = 7873},
{id = 2429, energy = 7768, fire = 7749, earth = 7859, ice = 7874},
{id = 2430, energy = 7769, fire = 7750, earth = 7860, ice = 7875},
{id = 2435, energy = 7770, fire = 7751, earth = 7861, ice = 7876},
{id = 7380, energy = 7771, fire = 7752, earth = 7862, ice = 7877},
{id = 2454, energy = 7772, fire = 7753, earth = 7863, ice = 7878},
{id = 2423, energy = 7773, fire = 7754, earth = 7864, ice = 7879},
{id = 2445, energy = 7774, fire = 7755, earth = 7865, ice = 7880},
{id = 7415, energy = 7775, fire = 7756, earth = 7866, ice = 7881},
{id = 7392, energy = 7776, fire = 7757, earth = 7867, ice = 7882},
{id = 2391, energy = 7777, fire = 7758, earth = 7868, ice = 7883},
{id = 2544, energy = 7839, fire = 7840, earth = 7850, ice = 7838},
{id = 7383, energy = 7764, fire = 7745, earth = 7855, ice = 7870}
}
local lewy = getPlayerSlotItem(cid, CONST_SLOT_LEFT)
local prawy = getPlayerSlotItem(cid, CONST_SLOT_RIGHT)
local ilemany = 200
local soul = 3
local ilosc = 0
if ((param == "energy") or (param == "fire") or (param == "earth") or (param == "ice")) then
if (getPlayerMana(cid) >= ilemany) then
if (getPlayerSoul(cid) >=soul) then
for i=1, #bron do
if (lewy.itemid == bron[i].id) then
doPlayerAddSoul(cid,-soul)
doPlayerAddMana(cid,-ilemany)
if (param == "energy") then
doTransformItem(lewy.uid,bron[i].bron[i].energy)
elseif (param == "fire") then
doTransformItem(lewy.uid,bron[i].bron[i].fire)
elseif (param == "earth") then
doTransformItem(lewy.uid,bron[i].bron[i].earth)
elseif (param == "ice") then
doTransformItem(lewy.uid,bron[i].bron[i].ice)
end
ilosc = ilosc+1
elseif (prawy.itemid == bron[i].id) then
doPlayerAddSoul(cid,-soul)
doPlayerAddMana(cid,-ilemany)
if (param == "energy") then
doTransformItem(prawy.uid,bron[i].bron[i].energy)
elseif (param == "fire") then
doTransformItem(prawy.uid,bron[i].bron[i].fire)
elseif (param == "earth") then
doTransformItem(prawy.uid,bron[i].bron[i].earth)
elseif (param == "ice") then
doTransformItem(prawy.uid,bron[i].bron[i].ice)
end
ilosc = ilosc+1
end
end
if (ilosc == 0) then
doPlayerSendCancel(cid,"Bez broni nic nie zrobisz...")
end
else
doPlayerSendCancel(cid,"Bez souli nic nie zrobisz...")
end
doPlayerSendCancel(cid,"Bez many nic nie zrobisz...")
end
else
doPlayerSendCancel(cid,"Dostepne zywioly : Fire, Energy, Earth, Ice !")
end
end