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

Lua [Problem]People getting random voc and high skills!

Zt0ffe

New Member
Joined
Sep 26, 2008
Messages
341
Reaction score
4
Location
Sweden
Hello Otlanders!

Im having an issue with my server, when people buy promotion they can get like from sorc -> Royal paladin or just random vocs or none voc at all. And when they standing and train at trainers after a few hours they can get like 30k-130k skill for some reason..
Iv been looking into many of my scripts now but can't figure this out. If anyone has any idea what the problem might be?

Then when server saves when someone got that kinda skill or no vocaton server save then freezes...

Yes Iv used the promotion script before that the king is using, I also got !promotion fully working, never ever had this trouble before.

Thank you for your time!
 
Last edited:
The promotion scripts that make vocations into other vocations.

@Zt0ffe
Is the promotion function in modules the same as this?
Code:
  function StdModule.promotePlayer(cid, message, keywords, parameters, node)
     local npcHandler = parameters.npcHandler
     if(npcHandler == nil) then
       error('StdModule.promotePlayer called without any npcHandler instance.')
     end

     if(not npcHandler:isFocused(cid)) then
       return false
     end

     if(isPlayerPremiumCallback(cid) or not getBooleanFromString(getConfigValue('premiumForPromotion')) or not(parameters.premium)) then
       if(getPlayerPromotionLevel(cid) >= parameters.promotion) then
         npcHandler:say('You are already promoted!', cid)
       elseif(getPlayerLevel(cid) < parameters.level) then
         npcHandler:say('I am sorry, but I can only promote you once you have reached level ' .. parameters.level .. '.', cid)
       elseif(not doPlayerRemoveMoney(cid, parameters.cost)) then
         npcHandler:say('You do not have enough money!', cid)
       else
         setPlayerPromotionLevel(cid, parameters.promotion)
         npcHandler:say(parameters.text, cid)
       end
     else
       npcHandler:say("You need a premium account in order to get promoted.", cid)
     end

     npcHandler:resetNpc()
     return true
   end
 
Last edited:
Aight!

Here you go(my king script)
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)            npcHandler:onCreatureAppear(cid)            end
function onCreatureDisappear(cid)        npcHandler:onCreatureDisappear(cid)            end
function onCreatureSay(cid, type, msg)        npcHandler:onCreatureSay(cid, type, msg)        end
function onThink()                npcHandler:onThink()                    end

local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to be promoted in your vocation for 20000 gold?'})
    node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'})
    node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})


npcHandler:addModule(FocusModule:new())
 
Back
Top