bladeatblackd
New Member
- Joined
- Oct 19, 2010
- Messages
- 7
- Reaction score
- 0
Im not that good at lua and I have used bits and peices from other scripts to get what I have so far.
Problems:
1. Its not stacking worms
2. I would like to make it a chance thing so you dont get a worm EVERY time. Kinda like fishing script.
Also is there any tutorials on LUA? Im scripting out and mapping out a 100% Custom map server and I would like to make some scripts without asking for help on everyone.
Problems:
1. Its not stacking worms
2. I would like to make it a chance thing so you dont get a worm EVERY time. Kinda like fishing script.
Also is there any tutorials on LUA? Im scripting out and mapping out a 100% Custom map server and I would like to make some scripts without asking for help on everyone.
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerItemCount(cid, 3976) > 15 then ---This section searches the character for the items required for the outfit or addon 9971 needs to be replaced with the item needed and 15 with the amount needed--
return doPlayerSendCancel(cid, "You don't need that many worms! Its time to go fishing!"), doSendMagicEffect(getThingPos(cid), CONST_ME_POFF), false
end
local random, effect = math.random(1, 100000), CONST_ME_GROUNDSHAKER
if(random <= 3976) then
doPlayerAddItem(cid,3976, 1)
elseif(3973 and random >= 3976) then
doPlayerAddItem(cid, 3976, 1)
else
effect = CONST_ME_POFF
end
doSendMagicEffect(toPosition, effect)
return true
end
Last edited: