Scripts de natal
do christmas bundle
Xikeots 0.6.2 ou svn 17/12 +
o q faz
qdo vc da use neles
eles dão presentes de natal com random
scripts
add em actions/scripts
blue christmas.lua
--function by ta4e--function onUse(cid, item, frompos, item2, topos)
sorte = math.random(1,4)
pos = getPlayerPosition(cid)
if item.itemid == 6508 then
if sorte == 1 then
doSendMagicEffect(pos,18)
doPlayerAddItem(cid,6503,1)
doPlayerAddItem(cid,6511,1)
doRemoveItem(item.uid,1)
elseif sorte == 2 then
doSendMagicEffect(pos,18)
doPlayerAddItem(cid,6503,1)
doPlayerAddItem(cid,6511,1)
doPlayerAddItem(cid,6502,1)
doRemoveItem(item.uid,1)
elseif sorte == 3 then
doSendMagicEffect(pos,18)
doPlayerAddItem(cid,6502,1)
doPlayerAddItem(cid,6388,1)
doRemoveItem(item.uid,1)
elseif sorte == 4 then
doSendMagicEffect(pos,18)
doPlayerAddItem(cid,6503,1)
doPlayerAddItem(cid,6504,1)
doRemoveItem(item.uid,1)
else
end
end
return 1
end
green christmas.lua
--function by ta4e--function onUse(cid, item, frompos, item2, topos)
sorte = math.random(1,4)
pos = getPlayerPosition(cid)
if item.itemid == 6509 then
if sorte == 1 then
doSendMagicEffect(pos,18)
doPlayerAddItem(cid,6503,1)
doPlayerAddItem(cid,6510,1)
doPlayerAddItem(cid,6388,1)
doRemoveItem(item.uid,1)
elseif sorte == 2 then
doSendMagicEffect(pos,18)
doPlayerAddItem(cid,6503,1)
doPlayerAddItem(cid,6510,1)
doPlayerAddItem(cid,6502,1)
doRemoveItem(item.uid,1)
elseif sorte == 3 then
doSendMagicEffect(pos,18)
doPlayerAddItem(cid,6502,1)
doPlayerAddItem(cid,6388,1)
doRemoveItem(item.uid,1)
elseif sorte == 4 then
doSendMagicEffect(pos,18)
doPlayerAddItem(cid,6510,1)
doPlayerAddItem(cid,6504,1)
doPlayerAddItem(cid,6388,1)
doRemoveItem(item.uid,1)
else
end
end
return 1
end
red christmas.lua
--function by ta4e--function onUse(cid, item, frompos, item2, topos)
sorte = math.random(1,4)
pos = getPlayerPosition(cid)
if item.itemid == 6507 then
if sorte == 1 then
doSendMagicEffect(pos,19)
doPlayerAddItem(cid,6503,1)
doPlayerAddItem(cid,6506,1)
doRemoveItem(item.uid,1)
elseif sorte == 2 then
doSendMagicEffect(pos,19)
doPlayerAddItem(cid,6503,1)
doPlayerAddItem(cid,6506,1)
doPlayerAddItem(cid,6502,1)
doRemoveItem(item.uid,1)
elseif sorte == 3 then
doSendMagicEffect(pos,19)
doPlayerAddItem(cid,6502,1)
doPlayerAddItem(cid,6388,1)
doRemoveItem(item.uid,1)
elseif sorte == 4 then
doSendMagicEffect(pos,19)
doPlayerAddItem(cid,6506,1)
doPlayerAddItem(cid,6504,1)
doPlayerAddItem(cid,6388,1)
doRemoveItem(item.uid,1)
else
end
end
return 1
end
e em actions.xml
<action itemid="6507" script="red christmas.lua"/><action itemid="6508" script="blue christmas.lua"/>
<action itemid="6509" script="green christmas.lua"/>
comentem
flws