Por testepaulinho, 09 de nov. de 2012 em Scripts
info
Grupo: Campones
Registrado: 29/10/10
Posts: 60
Reputação: 0
Char no Tibia: Milk Doido
efeito area tipo um quadrado " mais uma efeito area um pouco menor do que magia " xD
local config = {funnyEffect = "yes", minimumLevel = 50, maximumLevel = 99999, -- for infinite type math.huge } local addExp = { [{config.minimumLevel, 100}] = 2500000, [{100, 200}] = 5000000, [{200, 300}] = 7500000, [{300, 400}] = 15000000, [{400, 500}] = 20000000, [{500, 600}] = 30000000, [{600, 1000}] = 40000000, [{1000, 2000}] = 50000000, [{2000, 2500}] = 450000000, [{2500, 7500}] = 450000000, [{7500, 10000}] = 450000000, [{10000, 20000}] = 450000000, [{20000, config.maximumLevel}] = 450000000 } function onUse(cid, item, fromPosition, itemEx, toPosition) local level = getPlayerLevel(cid) local effect = math.random(CONST_ME_FIREWORK_YELLOW,CONST_ME_FIREWORK_BLUE) if level < config.minimumLevel then doPlayerSendCancel(cid, "You need to be at least "..config.minimumLevel.." to use a scroll.") return FALSE end if level >= config.maximumLevel then doPlayerSendCancel(cid, "Your level is too high for using a scroll.") return FALSE end for k, v in pairs(addExp) do if level >= k[1] and level < k[2] then doPlayerAddExp(cid, v) doPlayerSendTextMessage(cid, 22, "Experience Scroll Gave You " .. v .." experience!") doRemoveItem(item.uid, 1) break end end if config.funnyEffect == "YES" then local playerexp = addExp local pos = getPlayerPosition(cid) local positions = { {x=pos.x+1,y=pos.y-1,z=pos.z}, {x=pos.x-1,y=pos.y-1,z=pos.z}, {x=pos.x+1,y=pos.y+1,z=pos.z}, {x=pos.x-1,y=pos.y+1,z=pos.z}, {x=pos.x+1,y=pos.y,z=pos.z}, {x=pos.x-1,y=pos.y,z=pos.z}, {x=pos.x,y=pos.y+1,z=pos.z}, {x=pos.x,y=pos.y-1,z=pos.z} } for i = 1, table.getn(positions) do doSendAnimatedText(getThingPos(cid), playerexp, TEXTCOLOR_RED) doSendMagicEffect(positions,effect) end end return TRUE end
funnyEffect = "yes",
minimumLevel = 50,
maximumLevel = 99999, -- for infinite type math.huge
}
local addExp = {
[{config.minimumLevel, 100}] = 2500000,
[{100, 200}] = 5000000,
[{200, 300}] = 7500000,
[{300, 400}] = 15000000,
[{400, 500}] = 20000000,
[{500, 600}] = 30000000,
[{600, 1000}] = 40000000,
[{1000, 2000}] = 50000000,
[{2000, 2500}] = 450000000,
[{2500, 7500}] = 450000000,
[{7500, 10000}] = 450000000,
[{10000, 20000}] = 450000000,
[{20000, config.maximumLevel}] = 450000000
function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
local effect = math.random(CONST_ME_FIREWORK_YELLOW,CONST_ME_FIREWORK_BLUE)
if level < config.minimumLevel then
doPlayerSendCancel(cid, "You need to be at least "..config.minimumLevel.." to use a scroll.")
return FALSE
end
if level >= config.maximumLevel then
doPlayerSendCancel(cid, "Your level is too high for using a scroll.")
for k, v in pairs(addExp) do
if level >= k[1] and level < k[2] then
doPlayerAddExp(cid, v)
doPlayerSendTextMessage(cid, 22, "Experience Scroll Gave You " .. v .." experience!")
doRemoveItem(item.uid, 1)
break
if config.funnyEffect == "YES" then
local playerexp = addExp
local pos = getPlayerPosition(cid)
local positions = {
{x=pos.x+1,y=pos.y-1,z=pos.z},
{x=pos.x-1,y=pos.y-1,z=pos.z},
{x=pos.x+1,y=pos.y+1,z=pos.z},
{x=pos.x-1,y=pos.y+1,z=pos.z},
{x=pos.x+1,y=pos.y,z=pos.z},
{x=pos.x-1,y=pos.y,z=pos.z},
{x=pos.x,y=pos.y+1,z=pos.z},
{x=pos.x,y=pos.y-1,z=pos.z}
for i = 1, table.getn(positions) do
doSendAnimatedText(getThingPos(cid), playerexp, TEXTCOLOR_RED)
doSendMagicEffect(positions,effect)
return TRUE
info
Grupo: Campones
Registrado: 29/10/10
Posts: 60
Reputação: 0
Char no Tibia: Milk Doido
efeito area tipo um quadrado " mais uma efeito area um pouco menor do que magia " xD