.-first open folder of you ot, and search this lines
2.-experienceStages change to false
rateExperience change to 0
3.-
open creaturescripts/scripts and create a file lua with name exphit.lua and paste this code
open login from your folder creaturescripts/scripts/
and paste this
now go to creaturescripts.xml and paste this
to edit exp rate from hit open config.lua and past this
enjoy
PDT: nice script for ot war xd bye
experienceStages = false
rateExperience = 50
2.-experienceStages change to false
rateExperience change to 0
experienceStages = false
rateExperience = 0
3.-
open creaturescripts/scripts and create a file lua with name exphit.lua and paste this code
function CalculeExp(monsterhp, exptotal, hit)
local x = hit <= monsterhp and math.ceil(exptotal * hit / monsterhp) or 0
local x2 = x - 20 + math.random(20)
return x2 > 0 and x2 or 0
end
function isSummon(uid)
return uid ~= getCreatureMaster(uid) or false
end
function onStatsChange(cid, attacker, type, combat, value)
if type == STATSCHANGE_HEALTHLOSS then
if isMonster(cid) then
if isCreature(attacker) then
local sid = isSummon(attacker) == true and getCreatureMaster(attacker) or attacker
if isPlayer(sid) then
local expg = CalculeExp(getCreatureMaxHealth(cid), getMonsterInfo(getCreatureName(cid)).experience * rateExp, value)
doPlayerSendTextMessage(sid, 23, "You gain "..expg.." exp.")
doPlayerAddExp(sid, expg)
end
end
end
elseif type == STATSCHANGE_HEALTHGAIN then
return false
end
return true
end
function onCombat(cid, target)
if isMonster(target) and not isSummon(target) and not isPlayer(target) then
registerCreatureEvent(target, "ExpGain")
end
return true
end
open login from your folder creaturescripts/scripts/
and paste this
registerCreatureEvent(cid, "ExpHit")
now go to creaturescripts.xml and paste this
<event type="statschange" name="ExpGain" event="script" value="exphit.lua"/>
<event type="combat" name="ExpHit" event="script" value="exphit.lua"/>
to edit exp rate from hit open config.lua and past this
rateExp = 50
enjoy
PDT: nice script for ot war xd bye