function onKill(cid, target)
local multiplier = 1 -- multiplier (exp that you get * "number") higher number here = more exp
-- Don't touch --------------------------------------
local exp = (lv_t * 100 - lv * 100) * multiplier
local lv = getPlayerLevel(cid)
local lv_t = getPlayerLevel(target)
local voc = getPlayerVocation(cid)
local voc_t = getPlayerVocation(target)
------------------------------------------------------
if voc == 1 or voc == 2 or voc == 3 or voc == 4 then
if voc_t == 5 or voc_t == 6 or voc_t == 7 or voc_t == 8 then
doPlayerAddExp(cid, exp)
end
elseif voc == 5 or voc == 6 or voc == 7 or voc == 8 then
if voc_t == 1 or voc_t == 2 or voc_t == 3 or voc_t == 4 then
doPlayerAddExp(cid, exp)
end
end
return TRUE
end
Thanke you bro!! I'll test that out!
BTW there is a way to random the exp you get (the higher level you kill the higher exp you get)
<event type="kill" name="warScript" event="script" value="war_script.lua"/>
registerCreatureEvent(cid, "warScript")
function onKill(cid, target)
local multiplier = 1 -- multiplier (exp that you get * "number") higher number here = more exp
-- Don't touch --------------------------------------
local exp = (getPlayerLevel(target) * 100 - getPlayerLevel(cid) * 100) * multiplier
------------------------------------------------------
if (isInArray({1,2,3,4}, getPlayerVocation(cid)) == TRUE) and (isInArray({5,6,7,8}, getPlayerVocation(target)) == TRUE) then
doPlayerAddExp(cid, exp)
elseif (isInArray({5,6,7,8}, getPlayerVocation(cid)) == TRUE) and (isInArray({1,2,3,4}, getPlayerVocation(target)) == TRUE) then
doPlayerAddExp(cid, exp)
end
return TRUE
end
function onKill(cid, target)
local multiplier = 1 -- multiplier (exp that you get * "number") higher number here = more exp
-- Don't touch --------------------------------------
local exp = (getPlayerLevel(target) * 100 - getPlayerLevel(cid) * 100) * multiplier
------------------------------------------------------
if (isInArray({1,2,3,4}, getPlayerVocation(cid)) == TRUE) and (isInArray({5,6,7,8}, getPlayerVocation(target)) == TRUE) then
doPlayerAddExp(cid, exp)
elseif (isInArray({5,6,7,8}, getPlayerVocation(cid)) == TRUE) and (isInArray({1,2,3,4}, getPlayerVocation(target)) == TRUE) then
doPlayerAddExp(cid, exp)
end
return TRUE
end