Sir Islam
Never Give Up
1 ) Max Level By Rebirth System ( my code won't work and no error )
2 ) C++ , i want change
this code
to like this i want show rebirth ( my rebirth sql ) not level
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"));