What's new
  • logo_cipsoft
    Latest servers:
    New servers will open on: 19th Feb 2025:
    Noctalia (Open PvP) Ignitera (Open PvP) us_logo Xybra (Open PvP)

Enchatowanie broni [8.1][Inne]

Status
Not open for further replies.

Makaveli

New User
Joined
Apr 6, 2008
Messages
0
Reaction score
1
Witam :]
Odrazu m?wi? skrypt by Makaveli xD...


Wchodzimy w teleport (actionid pod?ogi: ice-7801, earth-7802, fire-7803, energy-7804).
Pojawiamy si? przy o?tarzu (jednak najpierw musimy go zrobi? w ME).
U?ywamy odpowiedniego small gemu na o?tarzu. Kosztem 300 many i 2 souli zamienia si? on w encha... magiczny.
U?ywamy go na broni (spis). Zamienia si? ona w sw?j odpowiednik danego ?ywio?u.​

actions/scripts enchantowanie.lua

Kod:
function onUse(cid, item, frompos, item2, topos)

local gems = {2146, 2147, 2149, 2150}
local egems = {7759, 7760, 7761, 7762}
local altars = {{7508, 7509, 7510, 7511}, {7504, 7505, 7506, 7507}, {7516, 7517, 7518, 7519}, {7512, 7513, 7514, 7515}}
local weapons = {2383, 7384, 7406, 7402, 2429, 2430, 2435, 7380, 2454, 2423, 2445, 7415, 7392, 2391, 2544}
local eweapons = {{7763, 7744, 7854, 7869}, {7765, 7746, 7856, 7871}, {7766, 7747, 7857, 7872}, {7767, 7748, 7858, 7873}, {7768, 7749, 7859, 7874}, {7769, 7750, 7860, 7875}, {7770, 7751, 7861, 7876}, {7771, 7752, 7862, 7877}, {7772, 7753, 7863, 7878}, {7773, 7754, 7864, 7879}, {7774, 7755, 7865, 7880}, {7775, 7756, 7866, 7881}, {7776, 7757, 7867, 7882}, {7777, 7758, 7868, 7883}, {7839, 7840, 7838, 7850}}

local type = item.type
if type == 0 then
type = 1
end

local mana = 300 * type
local soul = 2 * type

if isInArray(gems, item.itemid)== TRUE then
for aa=1, #gems do
if item.itemid == gems[aa] then
a=aa
end
end
if isInArray(altars[a], item2.itemid)== TRUE then
if getPlayerMana(cid) >= mana and getPlayerSoul(cid) >= soul then
doTransformItem(item.uid,egems[a])
doPlayerAddMana(cid,-mana)
doPlayerAddSoul(cid,-soul)
doSendMagicEffect(frompos,39)
else
doPlayerSendCancel(cid,"You dont have mana or soul points.")
end
else
return 2
end

elseif isInArray(egems, item.itemid)== TRUE then
for bb=1, #egems do
if item.itemid == egems[bb] then
b=bb
end
end
if isInArray(weapons, item2.itemid)== TRUE then
for cc=1, #weapons do
if item2.itemid == weapons[cc] then
c=cc
end
end
doTransformItem(item2.uid,eweapons[c])
doSendMagicEffect(frompos,39)
doRemoveItem(item.uid,1)
else
doPlayerSendCancel(cid,"You can't enchanted this.")
end
else
return 0
end
return 1
end



Do actions.xml

Kod:
<action itemid="2146" script="enchantowanie.lua" />
<action itemid="2147" script="enchantowanie.lua" />
<action itemid="2150" script="enchantowanie.lua" />
<action itemid="2149" script="enchantowanie.lua" />
<action itemid="7759" script="enchantowanie.lua" />
<action itemid="7760" script="enchantowanie.lua" />
<action itemid="7761" script="enchantowanie.lua" />
<action itemid="7762" script="enchantowanie.lua" />

Pomoglem daj reputa nie bodz h.j

:D:D:D:D
:):):):)
:mad::mad::mad::mad:
 

De Javu

Advanced User
Joined
Apr 4, 2008
Messages
150
Reaction score
20
h.j si? pisze przez ch to po pierwsze, po drugie daj to w code bedzie estetyczniej wygl?da?:)
 

Medann

New User
Joined
Apr 5, 2008
Messages
7
Reaction score
0
Wida? na pierwszy rzut oka, ?e to jest kopiowane i przynajmniej by? nie k?ama? ?e to tw?j!! :mad:
 

Kelo

Active User
Joined
Apr 4, 2008
Messages
90
Reaction score
10
Age
31
po pierwsze, po co tu wstawi?e? jak enchantowanie jest ju? na forum? Po drugie, jest to tak przejrzyste ?e nawet mucha nie siada... Po trzecie, temat do kosza.

@Edit
3. Zabronione jest wstawianie w podpisy oraz posty pr??b o punkty reputacji - je?eli kto? b?dzie chcia? da? Ci reputa, zrobi to dobrowolnie. Ka?de podpisy oraz posty z takow? pro?b?, b?d? usuwane, a u?ytkownik pisz?cy to, odpowiednio nagradzany.
-.-
 
Status
Not open for further replies.
Top