Nightimarez
New Member
- Joined
- Jul 24, 2008
- Messages
- 287
- Reaction score
- 2
I would like players to dig up ancient scarabs, larvas, and scarabs. Possible pearls too.
If possible, make this fishing script summon water elementals like the shovel summons scarabs ;P
Code:
local holes = {468, 481, 483}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isInArray(holes, itemEx.itemid) == TRUE then
doTransformItem(itemEx.uid, itemEx.itemid + 1)
doDecayItem(itemEx.uid)
elseif itemEx.itemid == 231 then
local rand = math.random(1, 100)
if rand == 1 then
doCreateItem(2159, 1, toPosition)
elseif rand > 95 then
doSummonCreature("Scarab", toPosition)
end
doSendMagicEffect(toPosition, CONST_ME_POFF)
else
return FALSE
end
return TRUE
end
If possible, make this fishing script summon water elementals like the shovel summons scarabs ;P
Code:
local useWorms = FALSE
local waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isInArray(waterIds, itemEx.itemid) == TRUE then
if itemEx.itemid ~= 405 and getTilePzInfo(getThingPos(cid)) == FALSE then
if useWorms == FALSE or useWorms == TRUE and doPlayerRemoveItem(cid, ITEM_WORM, 1) == TRUE then
if math.random(1, (100 + (getPlayerSkill(cid, SKILL_FISHING) / 10))) <= getPlayerSkill(cid, SKILL_FISHING) then
doPlayerAddItem(cid, 2667, math.random(1, 5))
end
doPlayerAddSkillTry(cid, SKILL_FISHING, 1)
end
end
doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY)
return TRUE
end
return FALSE
end
Last edited: