Eaii Galerinha, Hj Estou trazendo um código que pegei de outro furom, você pode colocar em uma área, e área vai dar mais exp se o jogador matar um monstro ... pode ser usado para a área VIP.
data/creaturescripts/scripts area_exp.lua
function onKill(cid, target)
local exp_area ={
{from = {x=1014,y=1016,z=7},to = {x=1017,y=1019,z=7}, exp = 0.5},
{from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}, exp = 0.25}
}
if isPlayer(cid) and isMonster(target) == true then
for _, var in ipairs(exp_area) do
if isInRange(getCreaturePosition(cid), var.from, var.to) then
local percent = var.exp
local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier)
local count = math.floor(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*percent))
doPlayerAddExperience(cid, count)
addEvent(doSendAnimatedText, 500, getCreaturePosition(cid), '+'..count, math.random(50,60))
end
end
end
return true
end
login.lua
registerCreatureEvent(cid, "area_exp")
creaturescript.xml
<event type="kill" name="area_exp" event="script" value="area_exp.lua"/>
Configuração
local exp_area ={
{from = {x=1014,y=1016,z=7},to = {x=1017,y=1019,z=7}, exp = 0.5},
{from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}, exp = 0.25}
}[/lua]
from = {x=1014,y=1016,z=7} -- beginning of the area(pos)
to = {x=1017,y=1019,z=7} -- final area (pos)
exp = 0.5 -- extra exp percent
0.5 = 50%
0.3 = 30%
0.25 = 25%
etc...
Créditos:
Critico 100% Script
AndreyLost 100% Topico e Tutorial