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

free players addons

Thorn

Spriting since 2013
Joined
Sep 24, 2012
Messages
2,203
Solutions
1
Reaction score
923
Location
Chile
>.< srry is me again, i want that addons are able to free players, plz how do i do that :<
PHP:
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  
  
npcHandler:setMessage(MESSAGE_GREET, "Greetings |PLAYERNAME|. Here you can purchase {addons} with the money you earn by killing other players.")  
  
  
function playerBuyAddonNPC(cid, message, keywords, parameters, node)  
    if(not npcHandler:isFocused(cid)) then  
        return false  
    end  
    if (parameters.confirm ~= true) and (parameters.decline ~= true) then  
        if(getPlayerPremiumDays(cid) == 0) and (parameters.premium == false) then  
            npcHandler:say('Sorry, but this addon is only for premium players!', cid)  
            npcHandler:resetNpc()  
            return true  
        end  
        if (getPlayerStorageValue(cid, parameters.storageID) ~= -1) then  
            npcHandler:say('You already have this addon!', cid)  
            npcHandler:resetNpc()  
            return true  
        end  
        local itemsTable = parameters.items  
        local items_list = ''  
        if table.maxn(itemsTable) > 0 then  
            for i = 1, table.maxn(itemsTable) do  
                local item = itemsTable[i]  
                items_list = items_list .. item[2] .. ' ' .. getItemNameById(item[1])  
                if i ~= table.maxn(itemsTable) then  
                    items_list = items_list .. ', '  
                end  
            end  
        end  
        local text = ''  
        if (parameters.cost > 0) and table.maxn(parameters.items) then  
            text = items_list .. ' and ' .. parameters.cost .. ' gp'  
        elseif (parameters.cost > 0) then  
            text = parameters.cost .. ' gp'  
        elseif table.maxn(parameters.items) then  
            text = items_list  
        end  
        npcHandler:say('Did you bring me ' .. text .. ' for ' .. keywords[1] .. '?', cid)  
        return true  
    elseif (parameters.confirm == true) then  
        local addonNode = node:getParent()  
        local addoninfo = addonNode:getParameters()  
        local items_number = 0  
        if table.maxn(addoninfo.items) > 0 then  
            for i = 1, table.maxn(addoninfo.items) do  
                local item = addoninfo.items[i]  
                if (getPlayerItemCount(cid,item[1]) >= item[2]) then  
                    items_number = items_number + 1  
                end  
            end  
        end  
        if(getPlayerMoney(cid) >= addoninfo.cost) and (items_number == table.maxn(addoninfo.items)) then  
            doPlayerRemoveMoney(cid, addoninfo.cost)  
            if table.maxn(addoninfo.items) > 0 then  
                for i = 1, table.maxn(addoninfo.items) do  
                    local item = addoninfo.items[i]  
                    doPlayerRemoveItem(cid,item[1],item[2])  
                end  
            end  
            doPlayerAddOutfit(cid, addoninfo.outfit_male, addoninfo.addon)  
            doPlayerAddOutfit(cid, addoninfo.outfit_female, addoninfo.addon)  
            setPlayerStorageValue(cid,addoninfo.storageID,1)  
            npcHandler:say('Here you are.', cid)  
        else  
            npcHandler:say('You do not have needed cash!', cid)  
        end  
        npcHandler:resetNpc()  
        return true  
    elseif (parameters.decline == true) then  
        npcHandler:say('Not interested? Maybe another addon?', cid)  
        npcHandler:resetNpc()  
        return true  
    end  
    return false  
end  
  
  
local noNode = KeywordNode:new({'no'}, playerBuyAddonNPC, {decline = true})  
local yesNode = KeywordNode:new({'yes'}, playerBuyAddonNPC, {confirm = true})  
  
  
-- citizen (done)  
local outfit_node = keywordHandler:addKeyword({'first citizen addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, items = {}, outfit_female = 136, outfit_male = 128, addon = 1, storageID = 10001})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second citizen addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 136, outfit_male = 128, addon = 2, storageID = 10002})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
  
  
-- hunter (done)  
local outfit_node = keywordHandler:addKeyword({'first hunter addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 137, outfit_male = 129, addon = 1, storageID = 10003})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second hunter addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 137, outfit_male = 129, addon = 2, storageID = 10004})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
  
  
-- knight (done)  
local outfit_node = keywordHandler:addKeyword({'first knight addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 139, outfit_male = 131, addon = 1, storageID = 10005})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second knight addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 139, outfit_male = 131, addon = 2, storageID = 10006})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
  
  
-- mage (done)  
local outfit_node = keywordHandler:addKeyword({'first mage addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 138, outfit_male = 130, addon = 1, storageID = 10005})   
outfit_node:addChildKeywordNode(yesNode)   
outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second mage addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 138, outfit_male = 130, addon = 2, storageID = 10006})   
outfit_node:addChildKeywordNode(yesNode)   
outfit_node:addChildKeywordNode(noNode)   
  
  
  
  
-- summoner (done)  
local outfit_node = keywordHandler:addKeyword({'first summoner addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 141, outfit_male = 133, addon = 1, storageID = 10009})   
outfit_node:addChildKeywordNode(yesNode)   
outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second summoner addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 141, outfit_male = 133, addon = 2, storageID = 10010})   
outfit_node:addChildKeywordNode(yesNode)   
outfit_node:addChildKeywordNode(noNode)   
  
  
  
  
-- barbarian (done)  
local outfit_node = keywordHandler:addKeyword({'first barbarian addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 147, outfit_male = 143, addon = 1, storageID = 10011})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second barbarian addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 147, outfit_male = 143, addon = 2, storageID = 10012})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
  
  
-- druid (done)  
local outfit_node = keywordHandler:addKeyword({'first druid addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 148, outfit_male = 144, addon = 1, storageID = 10013})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second druid addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 148, outfit_male = 144, addon = 2, storageID = 10014})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
  
  
-- nobleman (done)  
local outfit_node = keywordHandler:addKeyword({'first nobleman addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, items = {}, outfit_female = 140, outfit_male = 132, addon = 1, storageID = 10015})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second nobleman addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, items = {}, outfit_female = 140, outfit_male = 132, addon = 2, storageID = 10016})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
  
  
-- oriental (done)  
local outfit_node = keywordHandler:addKeyword({'first oriental addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 150, outfit_male = 146, addon = 1, storageID = 10017})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second oriental addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 150, outfit_male = 146, addon = 2, storageID = 10018})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
  
  
-- warrior (done)  
local outfit_node = keywordHandler:addKeyword({'first warrior addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 142, outfit_male = 134, addon = 1, storageID = 10019})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second warrior addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 142, outfit_male = 134, addon = 2, storageID = 10020})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
  
  
-- wizard (done)  
local outfit_node = keywordHandler:addKeyword({'first wizard addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 149, outfit_male = 145, addon = 1, storageID = 10021})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second wizard addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 149, outfit_male = 145, addon = 2, storageID = 10022})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
  
  
-- assassin (done)  
local outfit_node = keywordHandler:addKeyword({'first assassin addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 156, outfit_male = 152, addon = 1, storageID = 10023})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second assassin addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 156, outfit_male = 152, addon = 2, storageID = 10024})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
  
  
-- beggar (done)  
local outfit_node = keywordHandler:addKeyword({'first beggar addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 157, outfit_male = 153, addon = 1, storageID = 10025})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second beggar addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 157, outfit_male = 153, addon = 2, storageID = 10026})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
  
  
-- pirate (done)  
local outfit_node = keywordHandler:addKeyword({'first pirate addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 155, outfit_male = 151, addon = 1, storageID = 10027})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second pirate addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 155, outfit_male = 151, addon = 2, storageID = 10028})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
  
  
-- shaman (done)  
local outfit_node = keywordHandler:addKeyword({'first shaman addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 158, outfit_male = 154, addon = 1, storageID = 10029})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second shaman addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 158, outfit_male = 154, addon = 2, storageID = 10030})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
  
  
-- norseman (done)  
local outfit_node = keywordHandler:addKeyword({'first norseman addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 252, outfit_male = 251, addon = 1, storageID = 10031})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second norseman addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 252, outfit_male = 251, addon = 2, storageID = 10032})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
  
  
-- jester (done)(custom)  
local outfit_node = keywordHandler:addKeyword({'first jester addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 270, outfit_male = 273, addon = 1, storageID = 10033})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second jester addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 270, outfit_male = 273, addon = 2, storageID = 10034})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
  
  
-- demonhunter (done)(custom)  
local outfit_node = keywordHandler:addKeyword({'first demonhunter addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 288, outfit_male = 289, addon = 1, storageID = 10035})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second demonhunter addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 288, outfit_male = 289, addon = 2, storageID = 10036})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
  
  
-- nightmare (done)(custom)  
local outfit_node = keywordHandler:addKeyword({'first nightmare addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 269, outfit_male = 268, addon = 1, storageID = 10037})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second nightmare addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 269, outfit_male = 268, addon = 2, storageID = 10038})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
  
  
-- brotherhood (done)(custom)  
local outfit_node = keywordHandler:addKeyword({'first brotherhood addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 279, outfit_male = 278, addon = 1, storageID = 10039})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second brotherhood addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 279, outfit_male = 278, addon = 2, storageID = 10040})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
  
  
-- yalaharian (done)(custom)  
local outfit_node = keywordHandler:addKeyword({'first yalaharian addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 324, outfit_male = 325, addon = 1, storageID = 10041})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second yalaharian addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 324, outfit_male = 325, addon = 2, storageID = 10042})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode) 
  
  
-- warmaster (done)(custom) 
local outfit_node = keywordHandler:addKeyword({'first warmaster addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 336, outfit_male = 335, addon = 1, storageID = 10043}) 
    outfit_node:addChildKeywordNode(yesNode) 
    outfit_node:addChildKeywordNode(noNode) 
local outfit_node = keywordHandler:addKeyword({'second warmaster addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 336, outfit_male = 335, addon = 2, storageID = 10044}) 
    outfit_node:addChildKeywordNode(yesNode) 
    outfit_node:addChildKeywordNode(noNode) 
  
-- wayfarer (done)(custom) 
local outfit_node = keywordHandler:addKeyword({'first wayfarer addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 366, outfit_male = 367, addon = 1, storageID = 10045}) 
    outfit_node:addChildKeywordNode(yesNode) 
    outfit_node:addChildKeywordNode(noNode) 
local outfit_node = keywordHandler:addKeyword({'second wayfarer addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 366, outfit_male = 367, addon = 2, storageID = 10046}) 
    outfit_node:addChildKeywordNode(yesNode) 
    outfit_node:addChildKeywordNode(noNode)     
  
  
keywordHandler:addKeyword({'addons'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can give you {citizen}, {hunter}, {knight}, {mage}, {nobleman}, {summoner}, {warrior}, {barbarian}, {druid}, {wizard}, {oriental}, {pirate}, {assassin}, {beggar}, {shaman}, {norseman}, {nightmare}, {jester}, {yalaharian}, {brotherhood}, {warmaster} and {wayfarer} addons.'}) 
keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To buy the first addon say \'first NAME addon\', for the second addon say \'second NAME addon\'.'}) 
  
  
npcHandler:addModule(FocusModule:new())

there is my npc
 
LUA:
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 
 
        if doPlayerRemoveMoney(cid, cost) == TRUE 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 
 
 
    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 250000 gold coins?'}) 
    node1:addChildKeyword({'yes'}, buyAddons, {addon = 1, cost = 2500000, premium = false}) 
    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 500000 gold coins?'}) 
    node2:addChildKeyword({'yes'}, buyAddons, {addon = 2, cost = 5000000, premium = false}) 
    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 25000 gold coins and the second addons set for 50000 gold coins.'}) 
 
 
npcHandler:addModule(FocusModule:new())
 
i don't have those in my lua :S look:
LUA:
-- The Forgotten Server Config

    -- Account manager
    accountManager = "yes"
    namelockManager = "yes"
    newPlayerChooseVoc = "yes"
    newPlayerSpawnPosX = 1000
    newPlayerSpawnPosY = 1000
    newPlayerSpawnPosZ = 7
    newPlayerTownId = 1
    newPlayerLevel = 8
    newPlayerMagicLevel = 0
    generateAccountNumber = "no"

    -- Unjustified kills
    -- NOTE: *Banishment and *BlackSkull variables are >summed up<
    -- (dailyFragsToRedSkull + dailyFragsToBanishment) with their
    -- *RedSkull equivalents.
    -- Auto banishing works only if useBlackSkull set to negative.
    -- advancedFragList is not advised if you use huge frags
    -- requirements.
    redSkullLength = 30 * 24 * 60 * 60
    blackSkullLength = 45 * 24 * 60 * 60
    dailyFragsToRedSkull = 4
    weeklyFragsToRedSkull = 6
    monthlyFragsToRedSkull = 10
    dailyFragsToBlackSkull = dailyFragsToRedSkull
    weeklyFragsToBlackSkull = weeklyFragsToRedSkull
    monthlyFragsToBlackSkull = monthlyFragsToRedSkull
    dailyFragsToBanishment = dailyFragsToRedSkull
    weeklyFragsToBanishment = weeklyFragsToRedSkull
    monthlyFragsToBanishment = monthlyFragsToRedSkull
    blackSkulledDeathHealth = 40
    blackSkulledDeathMana = 0
    useBlackSkull = true
    useFragHandler = true
    advancedFragList = false

    -- Banishments
    -- violationNameReportActionType 1 = just a report, 2 = name lock, 3 = player banishment
    -- killsBanLength works only if useBlackSkull option is disabled.
    notationsToBan = 3
    warningsToFinalBan = 4
    warningsToDeletion = 5
    banLength = 7 * 24 * 60 * 60
    killsBanLength = 7 * 24 * 60 * 60
    finalBanLength = 30 * 24 * 60 * 60
    ipBanishmentLength = 1 * 24 * 60 * 60
    broadcastBanishments = true
    maxViolationCommentSize = 200
    violationNameReportActionType = 2
    autoBanishUnknownBytes = false

    -- Battle
    -- NOTE: showHealingDamageForMonsters inheritates from showHealingDamage.
    -- loginProtectionPeriod is the famous Tibia anti-magebomb system.
    -- deathLostPercent set to nil enables manual mode.
    worldType = "pvp"
    protectionLevel = 50
    pvpTileIgnoreLevelAndVocationProtection = true
    pzLocked = 30 * 500
    huntingDuration = 60 * 1000
    criticalHitChance = 7
    criticalHitMultiplier = 1
    displayCriticalHitNotify = false
    removeWeaponAmmunition = true
    removeWeaponCharges = true
    removeRuneCharges = "no"
    whiteSkullTime = 15 * 60 * 1000
    noDamageToSameLookfeet = false
    showHealingDamage = true
    showHealingDamageForMonsters = true
    fieldOwnershipDuration = 5 * 1000
    stopAttackingAtExit = true
    oldConditionAccuracy = false
    loginProtectionPeriod = 10 * 1000
    deathLostPercent = 10
    stairhopDelay = 2 * 1000
    pushCreatureDelay = 2 * 1000
    deathContainerId = 1987
    gainExperienceColor = 215
    addManaSpentInPvPZone = true
    squareColor = 0
    allowFightback = true

    -- Connection config
    worldId = 0
    ip = "tibiacl.no-ip.org"
    bindOnlyConfiguredIpAddress = false
    loginPort = 7171
    gamePort = 7172
    adminPort = 7171
    statusPort = 7171
    loginTries = 50
    retryTimeout = 5 * 1000
    loginTimeout = 60 * 1000
    maxPlayers = 200
    motd = "Bienvenidos a Tibiacl ot server"
    displayOnOrOffAtCharlist = false
    onePlayerOnlinePerAccount = true
    allowClones = false
    serverName = ".::Tibiacl World::."
    loginMessage = "Bienvenidos A Tibiacl OT server"
    statusTimeout = 5 * 60 * 1000
    replaceKickOnLogin = true
    forceSlowConnectionsToDisconnect = false
    loginOnlyWithLoginServer = false
    premiumPlayerSkipWaitList = false

    -- Database
    -- NOTE: sqlFile is used only by sqlite database, and sqlKeepAlive by mysql database.
    -- To disable sqlKeepAlive such as mysqlReadTimeout use 0 value.
    sqlType = "sqlite"
    sqlHost = "localhost"
    sqlPort = 3306
    sqlUser = "root"
    sqlPass = "raulraul92r"
    sqlDatabase = "theforgottenserver"
    sqlFile = "kalima.s3db"
    sqlKeepAlive = 0
    mysqlReadTimeout = 10
    mysqlWriteTimeout = 10
    encryptionType = "plain"

    -- Deathlist
    deathListEnabled = true
    deathListRequiredTime = 1 * 60 * 1000
    deathAssistCount = 19
    maxDeathRecords = 5

    -- Guilds
    ingameGuildManagement = true
    levelToFormGuild = 50
    premiumDaysToFormGuild = 0
    guildNameMinLength = 4
    guildNameMaxLength = 20

    -- Highscores
    highscoreDisplayPlayers = 100
    updateHighscoresAfterMinutes = 2

    -- Houses
    buyableAndSellableHouses = true
    houseNeedPremium = false
    bedsRequirePremium = false
    levelToBuyHouse = 50
    housesPerAccount = 0
    houseRentAsPrice = false
    housePriceAsRent = false
    housePriceEachSquare = 1000
    houseRentPeriod = "never"
    houseCleanOld = 0
    guildHalls = false

    -- Item usage
    timeBetweenActions = 200
    timeBetweenExActions = 1000
    checkCorpseOwner = true
    hotkeyAimbotEnabled = true
    maximumDoorLevel = 500

    -- Map
    -- NOTE: storeTrash costs more memory, but will perform alot faster cleaning.
    -- useHouseDataStorage usage may be found at README.
    mapName = "kalima"
    mapAuthor = "God thorn"
    randomizeTiles = true
    useHouseDataStorage = false
    storeTrash = true
    cleanProtectedZones = true
    mailboxDisabledTowns = "-1"

    -- Startup
    -- NOTE: defaultPriority works only on Windows and niceLevel on *nix
    -- coresUsed are seperated by comma cores ids used by server process,
    -- default is -1, so it stays untouched (automaticaly assigned by OS).
    defaultPriority = "high"
    niceLevel = 5
    coresUsed = "-1"
    optimizeDatabaseAtStartup = true
    removePremiumOnInit = true
    confirmOutdatedVersion = false

    -- Muted buffer
    maxMessageBuffer = 100
    bufferMutedOnSpellFailure = false

    -- Miscellaneous
    -- NOTE: promptExceptionTracerErrorBox works only with precompiled support feature,
    -- called "exception tracer" (__EXCEPTION_TRACER__ flag).
    -- monsterLootMessage 0 to disable, 1 - only party, 2 - only player, 3 - party or player (like Tibia's)
    dataDirectory = "data/"
    allowChangeOutfit = true
    allowChangeColors = true
    allowChangeAddons = true
    disableOutfitsForPrivilegedPlayers = false
    bankSystem = true
    saveGlobalStorage = true
    displaySkillLevelOnAdvance = false
    spellNameInsteadOfWords = false
    emoteSpells = true
    promptExceptionTracerErrorBox = true
    storePlayerDirection = false
    monsterLootMessage = 3
    monsterLootMessageType = 25
    separateViplistPerCharacter = false

    -- Ghost mode
    ghostModeInvisibleEffect = false
    ghostModeSpellEffects = true

    -- Limits
    idleWarningTime = 14 * 60 * 1000
    idleKickTime = 15 * 60 * 1000
    expireReportsAfterReads = 1
    playerQueryDeepness = 2
    maxItemsPerPZTile = 0
    maxItemsPerHouseTile = 0

    -- Premium-related
    freePremium = false
    premiumForPromotion = false

    -- Blessings
    -- NOTE: blessingReduction* regards items/containers loss.
    -- eachBlessReduction is how much each bless reduces the experience/magic/skills loss.
    blessingOnlyPremium = true
    blessingReductionBase = 30
    blessingReductionDecreament = 5
    eachBlessReduction = 8

    -- Rates
    -- NOTE: experienceStages configuration is located in data/XML/stages.xml.
    -- rateExperienceFromPlayers 0 to disable.
    experienceStages = "true"
    rateExperience = 160
    rateExperienceFromPlayers = 1
    rateSkill = 40
    rateMagic = 25
    rateLoot = 5
    rateSpawn = 250.5

    -- Monster rates
    rateMonsterHealth = 1.0
    rateMonsterMana = 1.0
    rateMonsterAttack = 1.0
    rateMonsterDefense = 1.0

    -- Experience from players
    -- NOTE: min~Threshold* set to 0 will disable the minimum threshold:
    -- player will gain experience from every lower leveled player.
    -- max~Threshold* set to 0 will disable the maximum threshold:
    -- player will gain experience from every higher leveled player.
    minLevelThresholdForKilledPlayer = 0.9
    maxLevelThresholdForKilledPlayer = 1.1

    -- Stamina
    -- NOTE: Stamina is stored in miliseconds, so seconds are multiplied by 1000.
    -- rateStaminaHits multiplies every hit done a creature, which are later
    -- multiplied by player attack speed.
    -- rateStaminaGain is divider of every logged out second, eg:
    -- 60000 / 3 = 20000 milliseconds, what gives 20 stamina seconds for 1 minute being logged off.
    -- rateStaminaThresholdGain is divider for the premium stamina.
    -- staminaRatingLimit* is in minutes.
    rateStaminaLoss = 1
    rateStaminaGain = 3
    rateStaminaThresholdGain = 12
    staminaRatingLimitTop = 41 * 60
    staminaRatingLimitBottom = 14 * 60
    rateStaminaAboveNormal = 1.5
    rateStaminaUnderNormal = 0.5
    staminaThresholdOnlyPremium = true

    -- Party
    -- NOTE: experienceShareLevelDifference is float number.
    -- experienceShareLevelDifference is highestLevel * value
    experienceShareRadiusX = 30
    experienceShareRadiusY = 30
    experienceShareRadiusZ = 1
    experienceShareLevelDifference = 2 / 3
    extraPartyExperienceLimit = 20
    extraPartyExperiencePercent = 5
    experienceShareActivity = 2 * 60 * 1000

    -- Global save
    -- NOTE: globalSaveHour means like 03:00, not that it will save every 3 hours,
    -- if you want such a system please check out data/globalevents/globalevents.xml.
    globalSaveEnabled = false
    globalSaveHour = 8
    shutdownAtGlobalSave = true
    cleanMapAtGlobalSave = false

    -- Spawns
    deSpawnRange = 2
    deSpawnRadius = 50

    -- Summons
    maxPlayerSummons = 2
    teleportAllSummons = false
    teleportPlayerSummons = false

    -- Status
    ownerName = "ADMIN laciel"
    ownerEmail = "[email protected]"
    url = ""
    location = "Chile"
    displayGamemastersWithOnlineCommand = false

    -- Logs
    -- NOTE: This kind of logging does not work in GUI version.
    -- For such, please compile the software with __GUI_LOGS__ flag.
    adminLogsEnabled = false
    displayPlayersLogging = true
    prefixChannelLogs = ""
    runFile = ""
    outLogName = ""
    errorLogName = ""
    truncateLogsOnStartup = false
 
Last edited by a moderator:
TFS stands for The Forgotten Server, if you've got the sources then you could check the version in resources.h.
 
eeeh where is resources.h. :// can't find it

- - - Updated - - -

maybe is this? :S (console)
[10/11/2012 19:44:37] Alissow Server, version 0.4.1 (Alissow)
[10/11/2012 19:44:37] Compiled with: Comedinhasss & Fireelement.
[10/11/2012 19:44:37] A server developed by: Alissow & CiA.
[10/11/2012 19:44:37] Visit our forum for updates & support: http://sotserv.blogspot.com/.
 
Yes, that, Alissow isn't a good server, I recommend a official TFS, look at Distributions forum to get official and 100% working TFS versions.

Btw, I did some changes into your script, try now:

LUA:
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   
   
npcHandler:setMessage(MESSAGE_GREET, "Greetings |PLAYERNAME|. Here you can purchase {addons} with the money you earn by killing other players.")   
   
   
function playerBuyAddonNPC(cid, message, keywords, parameters, node)   
    if(not npcHandler:isFocused(cid)) then   
        return false   
    end   
    if (parameters.confirm ~= true) and (parameters.decline ~= true) then   
        if (getPlayerStorageValue(cid, parameters.storageID) ~= -1) then   
            npcHandler:say('You already have this addon!', cid)   
            npcHandler:resetNpc()   
            return true   
        end   
        local itemsTable = parameters.items   
        local items_list = ''   
        if table.maxn(itemsTable) > 0 then   
            for i = 1, table.maxn(itemsTable) do   
                local item = itemsTable[i]   
                items_list = items_list .. item[2] .. ' ' .. getItemNameById(item[1])   
                if i ~= table.maxn(itemsTable) then   
                    items_list = items_list .. ', '   
                end   
            end   
        end   
        local text = ''   
        if (parameters.cost > 0) and table.maxn(parameters.items) then   
            text = items_list .. ' and ' .. parameters.cost .. ' gp'   
        elseif (parameters.cost > 0) then   
            text = parameters.cost .. ' gp'   
        elseif table.maxn(parameters.items) then   
            text = items_list   
        end   
        npcHandler:say('Did you bring me ' .. text .. ' for ' .. keywords[1] .. '?', cid)   
        return true   
    elseif (parameters.confirm == true) then   
        local addonNode = node:getParent()   
        local addoninfo = addonNode:getParameters()   
        local items_number = 0   
        if table.maxn(addoninfo.items) > 0 then   
            for i = 1, table.maxn(addoninfo.items) do   
                local item = addoninfo.items[i]   
                if (getPlayerItemCount(cid,item[1]) >= item[2]) then   
                    items_number = items_number + 1   
                end   
            end   
        end   
        if(getPlayerMoney(cid) >= addoninfo.cost) and (items_number == table.maxn(addoninfo.items)) then   
            doPlayerRemoveMoney(cid, addoninfo.cost)   
            if table.maxn(addoninfo.items) > 0 then   
                for i = 1, table.maxn(addoninfo.items) do   
                    local item = addoninfo.items[i]   
                    doPlayerRemoveItem(cid,item[1],item[2])   
                end   
            end   
            doPlayerAddOutfit(cid, addoninfo.outfit_male, addoninfo.addon)   
            doPlayerAddOutfit(cid, addoninfo.outfit_female, addoninfo.addon)   
            setPlayerStorageValue(cid,addoninfo.storageID,1)   
            npcHandler:say('Here you are.', cid)   
        else   
            npcHandler:say('You do not have needed cash!', cid)   
        end   
        npcHandler:resetNpc()   
        return true   
    elseif (parameters.decline == true) then   
        npcHandler:say('Not interested? Maybe another addon?', cid)   
        npcHandler:resetNpc()   
        return true   
    end   
    return false   
end   
   
   
local noNode = KeywordNode:new({'no'}, playerBuyAddonNPC, {decline = true})   
local yesNode = KeywordNode:new({'yes'}, playerBuyAddonNPC, {confirm = true})   
   
   
-- citizen (done)   
local outfit_node = keywordHandler:addKeyword({'first citizen addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, items = {}, outfit_female = 136, outfit_male = 128, addon = 1, storageID = 10001})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second citizen addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 136, outfit_male = 128, addon = 2, storageID = 10002})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
   
   
-- hunter (done)   
local outfit_node = keywordHandler:addKeyword({'first hunter addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 137, outfit_male = 129, addon = 1, storageID = 10003})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second hunter addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 137, outfit_male = 129, addon = 2, storageID = 10004})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
   
   
-- knight (done)   
local outfit_node = keywordHandler:addKeyword({'first knight addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 139, outfit_male = 131, addon = 1, storageID = 10005})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second knight addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 139, outfit_male = 131, addon = 2, storageID = 10006})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
   
   
-- mage (done)   
local outfit_node = keywordHandler:addKeyword({'first mage addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 138, outfit_male = 130, addon = 1, storageID = 10005})    
outfit_node:addChildKeywordNode(yesNode)    
outfit_node:addChildKeywordNode(noNode)    
local outfit_node = keywordHandler:addKeyword({'second mage addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 138, outfit_male = 130, addon = 2, storageID = 10006})    
outfit_node:addChildKeywordNode(yesNode)    
outfit_node:addChildKeywordNode(noNode)    
   
   
   
   
-- summoner (done)   
local outfit_node = keywordHandler:addKeyword({'first summoner addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 141, outfit_male = 133, addon = 1, storageID = 10009})    
outfit_node:addChildKeywordNode(yesNode)    
outfit_node:addChildKeywordNode(noNode)    
local outfit_node = keywordHandler:addKeyword({'second summoner addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 141, outfit_male = 133, addon = 2, storageID = 10010})    
outfit_node:addChildKeywordNode(yesNode)    
outfit_node:addChildKeywordNode(noNode)    
   
   
   
   
-- barbarian (done)   
local outfit_node = keywordHandler:addKeyword({'first barbarian addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 147, outfit_male = 143, addon = 1, storageID = 10011})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second barbarian addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 147, outfit_male = 143, addon = 2, storageID = 10012})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
   
   
-- druid (done)   
local outfit_node = keywordHandler:addKeyword({'first druid addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 148, outfit_male = 144, addon = 1, storageID = 10013})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second druid addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 148, outfit_male = 144, addon = 2, storageID = 10014})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
   
   
-- nobleman (done)   
local outfit_node = keywordHandler:addKeyword({'first nobleman addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, items = {}, outfit_female = 140, outfit_male = 132, addon = 1, storageID = 10015})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second nobleman addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, items = {}, outfit_female = 140, outfit_male = 132, addon = 2, storageID = 10016})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
   
   
-- oriental (done)   
local outfit_node = keywordHandler:addKeyword({'first oriental addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 150, outfit_male = 146, addon = 1, storageID = 10017})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second oriental addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 150, outfit_male = 146, addon = 2, storageID = 10018})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
   
   
-- warrior (done)   
local outfit_node = keywordHandler:addKeyword({'first warrior addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 142, outfit_male = 134, addon = 1, storageID = 10019})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second warrior addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 142, outfit_male = 134, addon = 2, storageID = 10020})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
   
   
-- wizard (done)   
local outfit_node = keywordHandler:addKeyword({'first wizard addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 149, outfit_male = 145, addon = 1, storageID = 10021})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second wizard addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 149, outfit_male = 145, addon = 2, storageID = 10022})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
   
   
-- assassin (done)   
local outfit_node = keywordHandler:addKeyword({'first assassin addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 156, outfit_male = 152, addon = 1, storageID = 10023})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second assassin addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 156, outfit_male = 152, addon = 2, storageID = 10024})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
   
   
-- beggar (done)   
local outfit_node = keywordHandler:addKeyword({'first beggar addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 157, outfit_male = 153, addon = 1, storageID = 10025})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second beggar addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 157, outfit_male = 153, addon = 2, storageID = 10026})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
   
   
-- pirate (done)   
local outfit_node = keywordHandler:addKeyword({'first pirate addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 155, outfit_male = 151, addon = 1, storageID = 10027})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second pirate addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 155, outfit_male = 151, addon = 2, storageID = 10028})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
   
   
-- shaman (done)   
local outfit_node = keywordHandler:addKeyword({'first shaman addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 158, outfit_male = 154, addon = 1, storageID = 10029})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second shaman addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 158, outfit_male = 154, addon = 2, storageID = 10030})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
   
   
-- norseman (done)   
local outfit_node = keywordHandler:addKeyword({'first norseman addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 252, outfit_male = 251, addon = 1, storageID = 10031})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second norseman addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 252, outfit_male = 251, addon = 2, storageID = 10032})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
   
   
-- jester (done)(custom)   
local outfit_node = keywordHandler:addKeyword({'first jester addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 270, outfit_male = 273, addon = 1, storageID = 10033})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second jester addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 270, outfit_male = 273, addon = 2, storageID = 10034})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
   
   
-- demonhunter (done)(custom)   
local outfit_node = keywordHandler:addKeyword({'first demonhunter addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 288, outfit_male = 289, addon = 1, storageID = 10035})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second demonhunter addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 288, outfit_male = 289, addon = 2, storageID = 10036})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
   
   
-- nightmare (done)(custom)   
local outfit_node = keywordHandler:addKeyword({'first nightmare addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 269, outfit_male = 268, addon = 1, storageID = 10037})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second nightmare addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 269, outfit_male = 268, addon = 2, storageID = 10038})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
   
   
-- brotherhood (done)(custom)   
local outfit_node = keywordHandler:addKeyword({'first brotherhood addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 279, outfit_male = 278, addon = 1, storageID = 10039})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second brotherhood addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 279, outfit_male = 278, addon = 2, storageID = 10040})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
   
   
-- yalaharian (done)(custom)   
local outfit_node = keywordHandler:addKeyword({'first yalaharian addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 324, outfit_male = 325, addon = 1, storageID = 10041})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)   
local outfit_node = keywordHandler:addKeyword({'second yalaharian addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 324, outfit_male = 325, addon = 2, storageID = 10042})   
    outfit_node:addChildKeywordNode(yesNode)   
    outfit_node:addChildKeywordNode(noNode)  
   
   
-- warmaster (done)(custom)  
local outfit_node = keywordHandler:addKeyword({'first warmaster addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 336, outfit_male = 335, addon = 1, storageID = 10043})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second warmaster addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 336, outfit_male = 335, addon = 2, storageID = 10044})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
   
-- wayfarer (done)(custom)  
local outfit_node = keywordHandler:addKeyword({'first wayfarer addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 366, outfit_male = 367, addon = 1, storageID = 10045})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)  
local outfit_node = keywordHandler:addKeyword({'second wayfarer addon'}, playerBuyAddonNPC, {premium = false, cost = 10000, items = {}, outfit_female = 366, outfit_male = 367, addon = 2, storageID = 10046})  
    outfit_node:addChildKeywordNode(yesNode)  
    outfit_node:addChildKeywordNode(noNode)      
   
   
keywordHandler:addKeyword({'addons'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can give you {citizen}, {hunter}, {knight}, {mage}, {nobleman}, {summoner}, {warrior}, {barbarian}, {druid}, {wizard}, {oriental}, {pirate}, {assassin}, {beggar}, {shaman}, {norseman}, {nightmare}, {jester}, {yalaharian}, {brotherhood}, {warmaster} and {wayfarer} addons.'})  
keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To buy the first addon say \'first NAME addon\', for the second addon say \'second NAME addon\'.'})  
   
   
npcHandler:addModule(FocusModule:new())
 
Last edited:
:D thank you man i hope it works :) i'll let you know (my server is running i cannot do a reset now, players playing :S)
 
That script won't load since you removed this line.

LUA:
    if (parameters.confirm ~= true) and (parameters.decline ~= true) then

Edit: You can always reload npcs (/reload npcs)
 
Sorry, didn't see that, I edited my post and fixed the script, you don't need to do a restart, simply is a reload just like Ninja stated.
 
damn now the npc is gone! it dissapear from the map

- - - Updated - - -

oh!, now im trying with the new one :P

- - - Updated - - -

damn it disappear again :S and cannot summon it
 
yeah, this one :S
[11/11/2012 16:26:44] [Error - LuaScriptInterface::loadFile] data/npc/scripts/addons.lua:43: 'end' expected (to close 'function' at line 13) near 'elseif'
[11/11/2012 16:26:44] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/addons.lua
[11/11/2012 16:26:44] data/npc/scripts/addons.lua:43: 'end' expected (to close 'function' at line 13) near 'elseif'

- - - Updated - - -

D:?

- - - Updated - - -

so? :S my players are impacient >.<!!!

- - - Updated - - -

now if the try to change their outfits they get bug >:<

- - - Updated - - -

plzzzzzz :(

- - - Updated - - -

hello? D:
 
Back
Top