Hello guys so finally I fixed my growth rune, but still can't figure out how to fix machete.. and still fighting with the blessings.. can anyone tell me or give me a properly machete lua function or anything? thanks!
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(isInArray(JUNGLE_GRASS, itemEx.itemid)) then
doTransformItem(itemEx.uid, itemEx.itemid - 1)
doDecayItem(itemEx.uid)
return true
end
if(isInArray(SPIDER_WEB, itemEx.itemid)) then
doTransformItem(itemEx.uid, (itemEx.itemid + 6))
doDecayItem(itemEx.uid)
return true
end
if(isInArray(WILD_GROWTH, itemEx.itemid)) then
doSendMagicEffect(toPosition, CONST_ME_POFF)
doRemoveItem(itemEx.uid)
return true
end
return destroyItem(cid, itemEx, toPosition)
end
<action itemid="2420" event="script" value="tools/machete.lua"/>
<action itemid="2442" event="script" value="tools/machete.lua"/>
its like thisblessings = true
blessingOnlyPremium = false
blessingReductionBase = 30
blessingReductionDecrement = 5
eachBlessReduction = 8
function onSay(cid, words, param)
for i = 1,5 do
if(getPlayerBlessing(cid, i)) then
doPlayerSendCancel(cid, "You already have all of the blessings.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return true
end
end
if doPlayerRemoveMoney(cid, 50000) == TRUE then
for i = 1,5 do
doPlayerAddBlessing(cid, i)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have pruchased all the blessings!")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA)
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need 50,000 gp in backpack for blessings.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
return TRUE
end