What's new

Enchenting

Status
Not open for further replies.

Zizi Knight

Advanced User
Joined
Jun 14, 2008
Messages
467
Reaction score
34
Szukam skryptu na enchenting. I czy mo?na go zrobi? tak ?eby do ka?dej broni dodawa? obra?enia od ?ywio?u w zale?no?ci od u?ytego kamienia ??
Je?li tak to jakie funkcje zastosowa? a je?li si? nie da to chc? zwyk?y skrypt.

Pozdrawiam ,
 

kokosik1221

Active User
Joined
Dec 22, 2009
Messages
148
Reaction score
5
Odp: Enchenting

Odazu m?wie ze skrypt nie m?j i nie wiem czy dzia?a
W Actions/Scripts robimy enchanted.lua i wklejamy to
Code:
function onUse(cid, item, frompos, item2, topos)
normal = {2445,2383,7383,7384,7406,7402,2429,2430,7389,7380 ,2454,2423,7415,2391,8905,7392}
fire = {7755,7744,7745,7746,7747,7748,7749,7750,7751,7752 ,7753,7754,7756,7758,8906,7757}
ice = {7774,7763,7764,7765,7766,7767,7768,7769,7770,7771 ,7772,7773,7775,7777,8907,7776}
earth = {7865,7854,7855,7856,7857,7857,7859,7860,7861,7862 ,7863,7864,7866,7868,8909,7867}
energy = {7880,7869,7870,7871,7872,7872,7874,7875,7876,7877 ,7878,7879,7881,7883,8908,7882}
if isInArray(normal, item2.itemid) == 1 then
for a = 1, table.getn(normal) do
if item2.itemid == normal[a] then
fogo = fire[a]
gelo = ice[a]
terra = earth[a]
energia = energy[a]
break
end
end
if item.itemid == 7760 then
doSendMagicEffect(topos,5)
doRemoveItem(item2.uid,1)
doPlayerAddItem(cid,fogo,1000)
doRemoveItem(item.uid,1)
elseif item.itemid == 7759 then
doSendMagicEffect(topos,43)
doRemoveItem(item2.uid,1)
doPlayerAddItem(cid,gelo,1000)
doRemoveItem(item.uid,1)
elseif item.itemid == 7761 then
doSendMagicEffect(topos,45)
doRemoveItem(item2.uid,1)
doPlayerAddItem(cid,terra,1000)
doRemoveItem(item.uid,1)
elseif item.itemid == 7762 then
doSendMagicEffect(topos,47)
doRemoveItem(item2.uid,1)
doPlayerAddItem(cid,energia,1000)
doRemoveItem(item.uid,1)
elseif item.itemid == 7759 then
doSendMagicEffect(topos,43)
doRemoveItem(item2.uid,1)
doPlayerAddItem(cid,gelo,1000)
doRemoveItem(item.uid,1)
end
return 1
end
end
Do actions.xml Dodajemy Linijki
Code:
<action itemid="7759" script="enchanted.lua" />
<action itemid="7760" script="enchanted.lua" />
<action itemid="7761" script="enchanted.lua" />
<action itemid="7762" script="enchanted.lua" />
 

Zizi Knight

Advanced User
Joined
Jun 14, 2008
Messages
467
Reaction score
34
Odp: Enchenting

Dzi?ki rep++
A wie kto? czy mo?na doda? ka?dej broni dodatkowe obra?enia bez ingerencji w items.xml
 
Status
Not open for further replies.
Top