Nie tylko o Tibii i OTS...
Zamieszcze tu opis jak zrobic dzialajacy obsidian knife i blessed wooden stake, a wiec:
w actions.xml dodajemy 2 linijki:
<action itemid="5942" script="blessed wooden stake.lua"/>
<action itemid="5908" script="obsidian_knife.lua"/>
skrypty:
w skryptach tworzymy
obsidian_knife.lua
teraz edytujemy plik i wklejamy:
--added dragon,dragon lord and system random by zorzin--
--added bone beast by ta4e--
function onUse(cid,item,frompos,item2,topos)
number = math.random(1,100)
chance = getConfigNumber("obsidian_knife_chance")
if chance > 100 or chance == 0 then
chance = 100
end
--minos--
if item2.itemid == 2830 or item2.itemid == 2871 or item2.itemid == 2876 or item2.itemid == 2866 then
if number <= chance then
doSendMagicEffect(topos,14)
doPlayerAddItem(cid,5878,1)
doTransformItem(item2.uid,item2.itemid+1)
else
doSendMagicEffect(topos,3)
doTransformItem(item2.uid,item2.itemid+1)
end
return 1
end
--lizard--
if item2.itemid == 4259 or item2.itemid == 4262 or item2.itemid == 4256 then
if number <= chance then
doSendMagicEffect(topos,14)
doPlayerAddItem(cid,5876,1)
doTransformItem(item2.uid,item2.itemid+1)
else
doSendMagicEffect(topos,3)
doTransformItem(item2.uid,item2.itemid+1)
end
return 1
end
--dragon
if item2.itemid == 3104 or item2.itemid == 2844 then
if number <= chance then
doSendMagicEffect(topos,14)
doPlayerAddItem(cid,5877,1)
doTransformItem(item2.uid,item2.itemid+1)
else
doSendMagicEffect(topos,3)
doTransformItem(item2.uid,item2.itemid+1)
end
return 1
end
--dragon lord
if item2.itemid == 2881 then
if number <= chance then
doSendMagicEffect(topos,14)
doPlayerAddItem(cid,5948,1)
doTransformItem(item2.uid,item2.itemid+1)
else
doSendMagicEffect(topos,3)
doTransformItem(item2.uid,item2.itemid+1)
end
return 1
end
if item2.itemid == 3031 then
if number <= chance then
doSendMagicEffect(topos,14)
doPlayerAddItem(cid,5925,1)
doTransformItem(item2.uid,item2.itemid+1)
else
doSendMagicEffect(topos,3)
doTransformItem(item2.uid,item2.itemid+1)
end
return 1
end
--behemoth
if item2.itemid == 2931 then
if number <= chance then
doSendMagicEffect(topos,14)
doPlayerAddItem(cid,5893,1)
doTransformItem(item2.uid,item2.itemid+1)
else
doSendMagicEffect(topos,3)
doTransformItem(item2.uid,item2.itemid+1)
end
return 1
end
--bone beast
if item2.itemid == 3031 then
if number <= chance then
doSendMagicEffect(topos,14)
doPlayerAddItem(cid,5925,1)
doTransformItem(item2.uid,item2.itemid+1)
else
doSendMagicEffect(topos,3)
doTransformItem(item2.uid,item2.itemid+1)
end
return 1
end
return 0
end
teraz w skryptach tworzymy blessed wooden stake.lua i wklejamy do pliku:
function onUse(cid,item,frompos,item2,topos)
number = math.random(1,100)
chance = getConfigNumber("blessed_wooden_chance")
if chance > 100 or chance == 0 then
chance = 100
end
--vampire--
if item2.itemid == 2916 then
if number <= chance then
doSendMagicEffect(topos,14)
doPlayerAddItem(cid,5906,1)
doTransformItem(item2.uid,item2.itemid+1)
else
doSendMagicEffect(topos,3)
doTransformItem(item2.uid,item2.itemid+1)
end
return 1
end
--demon--
if item2.itemid == 2956 then
if number <= chance then
doSendMagicEffect(topos,14)
doPlayerAddItem(cid,5905,1)
doTransformItem(item2.uid,item2.itemid+1)
else
doSendMagicEffect(topos,3)
doTransformItem(item2.uid,item2.itemid+1)
end
return 1
end
--end
return 0
end
i to by bylo na tyle
mysle, ze komus pomoglem
Ostatnio edytowany przez Burbon (2007-12-08 17:37:56)
Offline
o nice;]akurat do mojego otsa sie przyda gz
Offline