WaderoS
Advanced User
- Joined
- Apr 4, 2008
- Messages
- 219
- Reaction score
- 11
Chcia?bym tu zapoda? 2 skrypty ( widzia?em OBsidian knife, ale pod tibie 8.21 na tym forum ).
Te skrypty dosta?em od kolegi, ale je prze edytowa?em, wi?c nie podaj? autora.
Obsidian Knife (wklejamy skrypt do data\actions\scripts ... je?li ustawimy inn? nazw? pliku ni? "Obsidian_knife" to w tej linijce, kt?r? dopisujemy do actions.xml tak?e musimy zmieni?) ! :
Te skrypty dosta?em od kolegi, ale je prze edytowa?em, wi?c nie podaj? autora.
Obsidian Knife (wklejamy skrypt do data\actions\scripts ... je?li ustawimy inn? nazw? pliku ni? "Obsidian_knife" to w tej linijce, kt?r? dopisujemy do actions.xml tak?e musimy zmieni?) ! :
W data\actions\actions.xml wklejamy gdzie chcecie t? linijk? :local SKINS = {
-- Minotaurs
[2830] = {25000, 5878},
[2871] = {25000, 5878},
[2866] = {25000, 5878},
[2876] = {25000, 5878},
[3090] = {25000, 5878},
-- Lizards
[4259] = {25000, 5876},
[4262] = {25000, 5876},
[4256] = {25000, 5876},
-- Dragons
[3104] = {25000, 5877},
[2844] = {25000, 5877},
-- Dragon Lords
[2881] = {25000, 5948},
-- Behemoths
[2931] = {25000, 5930, 90000, 5893},
-- Bone Beasts
[3031] = {25000, 5925}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(getPlayerLevel(cid) <= 1) then
doPlayerSendCancel(cid, "You have to be at least Level 2 to use this tool.")
return TRUE
end
local skin = SKINS[itemEx.itemid]
if(skin == nil) then
doPlayerSendCancel(cid, "Sorry, not possible.")
return TRUE
end
local random = math.random(1, 100000)
if(random <= skin[1]) then
doSendMagicEffect(toPosition, CONST_ME_GROUNDSHAKER)
doPlayerAddItem(cid, skin[2], 1)
elseif(skin[3] and random >= skin[3]) then
doSendMagicEffect(toPosition, CONST_ME_GROUNDSHAKER)
doPlayerAddItem(cid, skin[4], 1)
else
doSendMagicEffect(toPosition, CONST_ME_POFF)
end
doTransformItem(itemEx.uid, itemEx.itemid + 1)
return TRUE
end
Wooden Blessed Stake (wklejamy skrypt do data\actions\scripts ... je?li ustawimy inn? nazw? pliku ni? "Blessed_Wooden_stake" to w tej linijce, kt?r? dopisujemy do actions.xml tak?e musimy zmieni?) ! :<action itemid="5908" script="obsidian_knife.lua"/>
W data\actions\actions.xml wklejamy gdzie chcecie t? linijk? :local DUSTS = {
-- Demons
[2956] = {25000, 5905},
-- Vampires
[2916] = {25000, 5906}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(getPlayerLevel(cid) <= 1) then
doPlayerSendCancel(cid, "You have to be at least Level 2 to use this tool.")
return TRUE
end
local dust = DUSTS[itemEx.itemid]
if(dust == nil) then
doPlayerSendCancel(cid, "Sorry, not possible.")
return TRUE
end
local random = math.random(1, 100000)
if(random <= dust[1]) then
doSendMagicEffect(toPosition, CONST_ME_GROUNDSHAKER)
doPlayerAddItem(cid, dust[2], 1)
elseif(dust[3] and random >= dust[3]) then
doSendMagicEffect(toPosition, CONST_ME_GROUNDSHAKER)
doPlayerAddItem(cid, dust[4], 1)
else
doSendMagicEffect(toPosition, CONST_ME_POFF)
end
doTransformItem(itemEx.uid, itemEx.itemid + 1)
return TRUE
end
<action itemid="5942" script="tools/blessed_wooden_stake.lua"/>