• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Promotion

vagnerkuntz

New Member
Joined
Jun 1, 2012
Messages
45
Reaction score
0
Hello good morning staff
I have a problem to buy the second promotion the player buys everything right but he loses the relog use tfs 0.3.6 with site
here's vocations.xml
Code:
<vocation id="9" name="Epic Master Sorcerer" description="an epic master sorcerer" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="50">
     <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
     <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
   </vocation>
 
You mean, when he buys the promotion to "Epic Master Sorcerer" he got it perfectly, but if he get out from the game, he returns to the old vocation?
If im right, you have to put the script of the npc, talkaction, action, movement, etc. who gives you the promotion, because without it we cant do anything.
 
Code:
local config = {
   loginMessage = getConfigValue('loginMessage'),
   useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
   local loss = getConfigValue('deathLostPercent')
   if(loss ~= nil) then
     doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
   end

   local accountManager = getPlayerAccountManager(cid)
   if(accountManager == MANAGER_NONE) then
     local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
     if(lastLogin > 0) then
       doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
       str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
     else
       str = str .. " Please choose your outfit."
       doPlayerSendOutfitWindow(cid)
     end

     doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
   elseif(accountManager == MANAGER_NAMELOCK) then
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
   elseif(accountManager == MANAGER_ACCOUNT) then
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
   else
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
   end

   if(not isPlayerGhost(cid)) then
     doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
   end

   registerCreatureEvent(cid, "Mail")
   registerCreatureEvent(cid, "GuildMotd")

   registerCreatureEvent(cid, "Idle")
   if(config.useFragHandler) then
     registerCreatureEvent(cid, "SkullCheck")
   end

   registerCreatureEvent(cid, "ReportBug")
   registerCreatureEvent(cid, "AdvanceSave")
   return true
end
sorry for the delay
 
Back
Top