• 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!

Exp Stage & PVP Stage

Aradz

New Member
Joined
Sep 19, 2013
Messages
51
Reaction score
1
Anyone could help me how to setup Exp stage and PVP stage? So like 1,5k lvl cant attack 900lvl.
 
What exactly did you had in mind about the pvp stages, lvl 1.5k can't attack level 900, but level 900 can attack the level 1,5k or that they both can't attack eachother?
And you can change exp stages in data/XML/stages.xml. In config.lua you can just set the rateExperience to 1 and experienceStages to true.

Also, post which server you are using.
 
Go to your config.lua and search for

Code:
protectionLevel =
you can change the number (50) for the wanted level which can't be attacked.

Then go to your

Code:
Server\data\XML

Look for the XML Stages and edit it with notepad.

PHP:
<?xml version="1.0" encoding="UTF-8"?>
<stages>
    <config enabled="1"/>
    <stage minlevel="1" maxlevel="100" multiplier="150"/>
    <stage minlevel="101" maxlevel="125" multiplier="75"/>
    <stage minlevel="126" maxlevel="200" multiplier="25"/>
    <stage minlevel="201" maxlevel="250" multiplier="15"/>
    <stage minlevel="250" maxlevel="300" multiplier="5"/>
    <stage minlevel="300" multiplier="3"/>
</stages>


This is an example you can edit it on your own multiplier is the amount the EXP will be multiplied.
 
Yeah Daplaya. I know it but how do i make PVP Stage ?, i want stages like 150lvl can attack 200lvl and 200lvl can attack 150lvl, but when 149 try attack 200 it wont attack
 
You can do something like this.
creaturescripts.xml
Code:
<event type="combat" name="PVPstages" event="script" value="pvpstages.lua"/>

login.lua
Code:
registerCreatureEvent(cid, "PVPstages")

pvpstages.lua
Code:
local pvpstage = 1.5 -- difference between levels, for example 100 x 1.5 = 150, so lower than level 100 and higher than level 150 can't attack eachother.

function onCombat(cid, target)
   if(not isPlayer(target)) then
     return true
   end

   if(getPlayerLevel(cid) > (getPlayerLevel(target) * pvpstage) or (getPlayerLevel(cid) * pvpstage) < getPlayerLevel(target)) then
     doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You can not attack players with a to high level difference.")
     return false
   end
   return true
end

Or with exact amount of levels
Code:
local pvplevels = 50 -- level difference with amount of levels, so you can't attack someone with more then 50 levels higher or lower then you.

function onCombat(cid, target)
   if(not isPlayer(target)) then
     return true
   end

   if(getPlayerLevel(cid) > (getPlayerLevel(target) + pvplevels) or (getPlayerLevel(cid) + pvplevels) < getPlayerLevel(target)) then
     doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You can not attack players with a to high level difference.")
     return false
   end
   return true
end
 
I have a question, think is better to post here instead of opening a new thread. In case I apply this system, and 2 guilds start a war (war system), the players who has a level difference but belongs to a guild that is in the war will be able to attack?

If someone can do this, I'll be very gratefull!
 
Back
Top