• 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

carre

Advanced OT User
Joined
Apr 23, 2013
Messages
881
Solutions
1
Reaction score
158
Location
Sweden
when i make my char to get promotion and i say promotion npc say
King Tibianus: Do you want to be promoted in your vocation for 20000 gold?
Baxter: yes
King Tibianus: You need a premium account in order to get promoted
please help me repp++
 
Lua:
-- The Forgotten Server Config

    -- Account manager
    accountManager = true
    namelockManager = true
    newPlayerChooseVoc = true
    newPlayerSpawnPosX = 1
    newPlayerSpawnPosY = 1
    newPlayerSpawnPosZ = 7
    newPlayerTownId =  3
    newPlayerLevel = 8
    newPlayerMagicLevel = 0
    generateAccountNumber = false

    -- Banishments
    notationsToBan = 1
    warningsToFinalBan = 4
    warningsToDeletion = 5
    banLength = 1 * 24 * 60 * 60
    finalBanLength = 30 * 24 * 60 * 60
    ipBanishmentLength = 1 * 24 * 60 * 60
    killsToBan = 8
    maxViolationCommentSize = 200

    -- Battle
    worldType = "pvp"
    protectionLevel = 20
    pvpTileIgnoreLevelAndVocationProtection = true
    killsToRedSkull = 5
    pzLocked = 60 * 1000
    criticalHitChance = 7
    criticalHitMultiplier = 1
    displayCriticalHitNotify = false
    removeWeaponAmmunition = true
    removeWeaponCharges = false
    removeRuneCharges = false
    timeToDecreaseFrags = 24 * 60 * 60 * 1000
    whiteSkullTime = 15 * 60 * 1000
    noDamageToSameLookfeet = false
    experienceByKillingPlayers = false
    showHealingDamage = false
    showHealingDamageForMonsters = false

    -- Connection config
    ip = "127.0.0.1"
    port = 7171
    loginTries = 10
    retryTimeout = 5 * 1000
    loginTimeout = 60 * 1000
    maxPlayers = "1000"
    motd = "Welcome to The voteria!"
    displayOnOrOffAtCharlist = false
    onePlayerOnlinePerAccount = true
    allowClones = 0
    serverName = "voteria"
    loginMessage = "voteria"  
    statusTimeout = 5 * 60 * 1000
    replaceKickOnLogin = true

    -- Database
    -- NOTE: sqlFile is used only by sqlite database
    sqlType = "mysql"
    sqlHost = "localhost"
    sqlPort = 3306
    sqlUser = "root"
    sqlPass = "42405013"
    sqlDatabase = "oldschool760"
    sqlFile = "forgottenserver.s3db"
    passwordType = "plain"

    -- Deathlist
    deathListEnabled = true
    maxDeathRecords = 5

    -- Guilds
    inGameGuildManagement = true
    levelToFormGuild = 8
    guildNameMinLength = 4
    guildNameMaxLength = 20

    -- Highscores
    highscoreDisplayPlayers = 15
    updateHighscoresAfterMinutes = 60

    -- Houses
    buyableAndSellableHouses = true
    housesPerAccount = 0
    levelToBuyHouse = 1
    houseRentAsPrice = false
    housePriceAsRent = false
    housePriceEachSQM = 1000
    houseRentPeriod = "never"
    houseNeedPremiumAccount = true
    bedsRequirePremium = true

    -- Item usage
    timeBetweenActions = 200
    timeBetweenExActions = 1000

    -- Map
    mapName = "world"
    cleanProtectedZones = true

    -- Miscellaneous
    -- NOTE: defaultPriority works only on Windows
    dataDirectory = "data/"
    kickIdlePlayerAfterMinutes = 15
    allowChangeOutfit = true
    maxMessageBuffer = 4
    displayGamemastersWithOnlineCommand = false
    defaultPriority = "high"
    saveGlobalStorage = true
    bankSystem = true
    displaySkillLevelOnAdvance = false

    -- Premium account
    freePremium = true
    premiumForPromotion = true
    removePremiumOnInit = true

    -- Rates
    experienceStages = true
    rateExp = 35
    rateSkill = 60
    rateLoot = 4
    rateMagic = 17
    rateSpawn = 1

    -- Global save
    -- NOTE: globalSaveHour means like 03:00, not that it will save every 3 hours,
    -- if you want such a system use autoSaveEachMinutes. This save method
    -- may be unstable, we recommend using OTAdmin if you want real saves.
    globalSaveEnabled = false
    globalSaveHour = 8
    shutdownAtGlobalSave = true
    cleanMapAtGlobalSave = false

    -- Spawns
    deSpawnRange = 2
    deSpawnRadius = 50

    -- Summons
    maxPlayerSummons = 2

    -- Status
    ownerName = ""
    ownerEmail = "@otland.net"
    url = "[URL]http://otland.net/[/URL]"
    location = "Europe"
 
Last edited by a moderator:
XML:
?xml version="1.0" encoding="UTF-8"?>
<npc name="King Tibianus" script="data/npc/scripts/promotion.lua" walkinterval="1000" access="3" floorchange="0">
    <health now="100" max="100"/>
    <look type="130" head="21" body="87" legs="107" feet="95"/>
    <parameters>
     
        <parameter key="message_greet" value="I greet thee, my loyal subject."/>
        <parameter key="message_farewell" value="Good bye, |PLAYERNAME|!"/>

        <parameter key="module_keywords" value="1" />
        <parameter key="keywords" value="name;job;help,premium scroll;" />
        <parameter key="keyword_reply1" value="It's hard to believe that you don't know your own king!" />
        <parameter key="keyword_reply2" value="I am your sovereign, King Tibianus III, and it's my duty to provide justice and guidance for my subjects." />
        <parameter key="keyword_reply3" value="Visit Quentin, the monk, for help." />
        <parameter key="keyword_reply4" value="I buy your premium scroll for 50000 gold coins." />
        <parameter key="module_shop" value="1"/>
        <parameter key="shop_sellable" value="premium scroll,2345,50000;" />

    </parameters>
</npc>
 
Last edited by a moderator:
No men you paste your npc.xml <- i need the script
enter to
data/npc/scripts/promotion.lua
and paste promotion.lua

and your modules.lua in lib/npcsystem
 
Last edited:
here

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, 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())
 
Last edited by a moderator:
You want people to not need premium to be promoted? Post the promotion part of your modules (data/npc/lib/npcsystem/modules.lua).
 
i want to post modules.lua but my post say it too long it say The submitted message is too long to be processed. Please shorten it.
 
Add premium = false, like this:
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 = 'I can promote you for 20000 gold coins. Do you want me to promote you?'})
   node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, premium = false, level = 20, 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