Requests max level , show Rebirth

Sir Islam

Never Give Up
Joined
Jun 6, 2008
Messages
504
Reaction score
118
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"));
 

willy231

New Member
Joined
May 14, 2016
Messages
5
Reaction score
0
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:
Top