• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Experience from lower levels.

SonekaBR

New Member
Joined
Nov 8, 2008
Messages
127
Reaction score
0
Just this a script to get experience of lower levels than yours.

For example:

A lvl 200 player killed a lvl 100 player and get experience

A lvl 140 that killed a lvl 90 player and get experience too


Ah for Avesta 7.6
 
7.6 Avesta is missing a wholeee bunch of useful functions for this kind of thing.
Like returning players IP's and total experience!
This is my attempt, I hope it works!
The exp gained is currently worked on targets level multiplied multiplied by targets level.
E.G. Level 200 kills a level 100
THEREFORE exp gained is 100*100= 10,000 EXP
you can modify how this works with the multiplierOne/Two lines!

Code:
function onKill(cid, target)

local multiplierOne = getPlayerLevel(target)
local multiplierTwo = getPlayerLevel(target)

if(isPlayer(cid) and isPlayer(target)) then
doPlayerAddExp(cid (mutliplierOne * multiplierTwo) )
return 1
end
 
Sorry for the late reply, was away for a few days!
Okay so that will be a creaturescript. Call it whatever you like and place it in your data/creaturescripts/scripts folder.

in data/creaturescripts/creaturescripts.xml
add the following line (pointing to the script file)
Code:
<event type="kill" name="ScriptName" script="scriptname.lua" />
 
Back
Top