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

Solved Promotion Problem,King tibianus

Mr Osama

Glorious-Ot
Joined
Mar 27, 2015
Messages
538
Reaction score
44
My title explains it all when i try to get promotion like this


14:07 King Tibianus: I greet thee, my loyal subject Mr Osama.
14:07 Mr Osama [20]: promotion
14:07 King Tibianus: I can promote you for 20000 gold coins. Do you want me to promote you?
14:07 Mr Osama [20]: yes
14:07 King Tibianus: Congratulations! You are now promoted.

King Tibianus takes 2 cc but
14:13 You see yourself. You are a paladin.

there is King Tibianus Script

Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)       npcHandler:eek:nCreatureAppear(cid)       end
function onCreatureDisappear(cid)     npcHandler:eek:nCreatureDisappear(cid)       end
function onCreatureSay(cid, type, msg)     npcHandler:eek:nCreatureSay(cid, type, msg)     end
function onThink()         npcHandler:eek:nThink()           end

local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'})
   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})
--[[
local node2 = keywordHandler:addKeyword({'epic'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can epicize you for 200000 gold coins. Do you want me to epicize you?'})
   node2:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 200000, level = 120, promotion = 2, text = 'Congratulations! You are now epicized.'})
   node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
]]--

npcHandler:addModule(FocusModule:new())
 
Im using tfs 0.4


Code:
function StdModule.promotePlayer(cid, message, keywords, parameters, node)
        local npcHandler = parameters.npcHandler
        if(npcHandler == nil) then
            print('StdModule.promotePlayer called without any npcHandler instance.')
            return false
        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
 
That will afford source edits why dont you give free premium to everyone instead
actually it's like a system in my server to get premium is hard in my server so i don't want it to require a premium to get promoted i want it to be free!

In my site it says that it's Royal paladin but in game im just paladin
weird!!
 
Back
Top