hello its pretty easy scripts but the idea i thinking is pretty good for rpg servers
piggybank.lua
soul orb.lua
i hope us like it and wont forget to rep me
Tested on 0.2.5 and 0.3.5
piggybank.lua
Lua:
local coin = {2148}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local count = 1
if item.itemid == 2114 then
local randomChance = math.random(1)
if randomChance == 1 then
count = math.random(1,100)
elseif randomChance == 2 then
count = 3
end
doPlayerAddItem(cid, coin[randomChance], count)
end
doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
doTransformItem(item.uid, 2115)
return TRUE
end
soul orb.lua
Lua:
local coin = {2148}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local count = 1
if item.itemid == 5944 then
local randomChance = math.random(1)
if randomChance == 1 then
count = math.random(1,100)
elseif randomChance == 2 then
count = 3
end
doPlayerAddItem(cid, coin[randomChance], count)
end
doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
doRemoveItem(item.uid, 1)
return TRUE
end
i hope us like it and wont forget to rep me
Tested on 0.2.5 and 0.3.5