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

Requests max level , show Rebirth

Sir Islam

Never Give Up
Joined
Jun 6, 2008
Messages
504
Solutions
1
Reaction score
116
Location
Suez , Egypt
1 ) Max Level By Rebirth System ( my code won't work and no error )

Code:
local message = "You have reached the max level please go make rebirth."

  local rebirth = {
  [300]  = {maxlevel = 717217},
  [400]  = {maxlevel = 1000000},
  [600]  = {maxlevel = 1500000},
  [800]  = {maxlevel = 2000000},
  [1000] = {maxlevel = 2500000}
   
  }
 function onAdvance(cid, skill, oldLevel, newLevel)  
  local v = rebirth[getPlayerRebirth(cid)]
  if (skill == SKILL__LEVEL) and (newLevel >= v.maxlevel)  and getPlayerRebirth(cid) <= v  then
 doPlayerSetRate(cid, SKILL__LEVEL, 0)
doPlayerSetRate(cid, SKILL__EXPERIENCE, 0)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE,message)   
  end
 
return true
end

2 ) C++ , i want change
this code
Code:
            msg->put<uint16_t>(speaker->getPlayerInfo(PLAYERINFO_LEVEL));

to like this i want show rebirth ( my rebirth sql ) not level
Code:
            msg->put<uint16_t>(result->getDataInt("rebirth"));
 
where can i put this script?
Code:
local message = "You have reached the max level please go make rebirth."



  local rebirth = {

  [300]  = {maxlevel = 717217},

  [400]  = {maxlevel = 1000000},

  [600]  = {maxlevel = 1500000},

  [800]  = {maxlevel = 2000000},

  [1000] = {maxlevel = 2500000}

 

  }

function onAdvance(cid, skill, oldLevel, newLevel)

  local v = rebirth[getPlayerRebirth(cid)]

  if (skill == SKILL__LEVEL) and (newLevel >= v.maxlevel)  and getPlayerRebirth(cid) <= v  then

doPlayerSetRate(cid, SKILL__LEVEL, 0)

doPlayerSetRate(cid, SKILL__EXPERIENCE, 0)

doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE,message) 

  end



return true

end
 
Last edited:
Back
Top