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

npc error and outfits

jwthbb

New Member
Joined
Apr 22, 2013
Messages
37
Reaction score
0
i have a problem when i want to buy addons at varkhall.

my money dissapears but i dont get any addon.

and my god char. has all outfits even the new ones.

but my normal char has only the old outfits. not even the demon hunter etc.

can anyone help me out. i have looked for any threat of this but cant find any.



and maybe if its not to many to ask.

anybody have a good script of a mount seller that sells mounts for crystal coins.

kind regards.

jwthbb a.k.a teletubbie paars ingame
 
if you could bother posting the script for varkhal so someone could try fixing your error, it would make it much easier
 
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

function buyAddons(cid, message, keywords, parameters, node)
    --TODO: buyAddons function in modules.lua
    if(not npcHandler:isFocused(cid)) then
        return false
    end

    local addon = parameters.addon
    local cost = parameters.cost
    local premium = (parameters.premium ~= nil and parameters.premium)

    if isPlayerPremiumCallback == nil or (isPlayerPremiumCallback(cid) and premium) then
        if doPlayerRemoveMoney(cid, cost) then
            doPlayerAddAddons(cid, addon)
            npcHandler:say('There, you are now able to use all addons!', cid)
        else
            npcHandler:say('Sorry, you do not have enough money.', cid)
        end
    else
        npcHandler:say('I only serve customers with premium accounts.', cid)
    end

    keywordHandler:moveUp(1)
    return true
end

local node1 = keywordHandler:addKeyword({'first addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the first addons set for 5000 gold coins?'})
    node1:addChildKeyword({'yes'}, buyAddons, {addon = 1, cost = 5000, premium = true})
    node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Too expensive, eh?'})

local node2 = keywordHandler:addKeyword({'second addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to buy the second addons set for 10000 gold coins?'})
    node2:addChildKeyword({'yes'}, buyAddons, {addon = 2, cost = 10000, premium = true})
    node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Too expensive, eh?'})

keywordHandler:addKeyword({'addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell the first addons set for 5000 gold coins and the second addons set for 10000 gold coins.'})

npcHandler:addModule(FocusModule:new())
 
but my normal char has only the old outfits. not even the demon hunter etc.
Becouse this is how it works?
Changes can be made in data/XML/outfits.xml

can anyone help me out. i have looked for any threat of this but cant find any.
No you didnt, or without succession. I put this in google and I got only 3 results, where first one was your topic and 3rd is the solution.

2eQtHth.png


Atm, your varkhall works like this - if you buy first addon you should get first addon to every outfit.

and my god char. has all outfits even the new ones.
Gods always have all outfits and all addons.

If you have issues with your code, that means you are using it with different engine then it was wroten for. I recommend to update your npc script, becouse you are using code wroten for very old tfs and you dont have npc libs for it.

11th line:
--TODO: buyAddons function in modules.lua
 
Last edited:
Back
Top