New OT Project: OTServBR - Global (10x outdated with sprites 12.15)

OP
EduardoDantas

EduardoDantas

Intermediate OT User
Joined
Sep 25, 2013
Messages
104
Best answers
2
Reaction score
51
Location
Brazil
Somebody could just upload it with the .exe compiled WORKING console within the .zip?
Is there a way to play it as old mysql servers with In-Game account makers and no need of xaamp or all that?
Just need quick fun with my friends :3
download the executable compiled in the appveyor, you find the link in the readme
there is no way to put it by acc manager, just site, but it has several good tutorials
 

Evil Puncker

I'd rather kiss a rattlesnake
Joined
May 30, 2009
Messages
5,630
Best answers
19
Reaction score
1,678
Location
160,54,7
I love the project, but its so sad that the 11 client doesn't have items name on market :(
 
OP
EduardoDantas

EduardoDantas

Intermediate OT User
Joined
Sep 25, 2013
Messages
104
Best answers
2
Reaction score
51
Location
Brazil
I love the project, but its so sad that the 11 client doesn't have items name on market :(
we are with protocol 12 under test by devs ... there are still some debugs and adjustments that need to be made, but soon we will release for all.
may be seeing more in show-off in our discord
 

Paco

Member
Joined
Jan 4, 2009
Messages
140
Best answers
0
Reaction score
23
Location
Zapotlán del Rey, Jalisco, México.
download the executable compiled in the appveyor, you find the link in the readme
there is no way to put it by acc manager, just site, but it has several good tutorials
Thanks for re-upload it wasn't there yesterday :')

EDIT:
DNS8
Malicious
ADMINUSLabs


:/
 
Last edited:

Paco

Member
Joined
Jan 4, 2009
Messages
140
Best answers
0
Reaction score
23
Location
Zapotlán del Rey, Jalisco, México.
download the executable compiled in the appveyor, you find the link in the readme
there is no way to put it by acc manager, just site, but it has several good tutorials
EDIT: Nevermind, I did it :) Thank you for everything.
PD: I'm at the office and says the computer ran out of memory, the map is too big, i'm gonna try at home
And one last thing, which Tibia Client version should I use?
DO I HAVE TO USE THE MODIFIED CLIENT FROM THE BR OFFICIAL SITE? :'s
 
Last edited:

pedrooo

New Member
Joined
Dec 6, 2009
Messages
2
Best answers
0
Reaction score
1
Hello, im following this server
and everything works great, site, server, client 10,

but when i try to log in with cliente 11 i get this Ilegal Value error and i cant find any error log.

Infos:
im using XAMPP (newest version)
using windows 10
i compiled the server with no problems

can someone help pls
 

Paco

Member
Joined
Jan 4, 2009
Messages
140
Best answers
0
Reaction score
23
Location
Zapotlán del Rey, Jalisco, México.
Hello, im following this server
and everything works great, site, server, client 10,

but when i try to log in with cliente 11 i get this Ilegal Value error and i cant find any error log.

Infos:
im using XAMPP (newest version)
using windows 10
i compiled the server with no problems

can someone help pls
I can't connect with client 10.
WTF is going on?
Which tibia client should I use?
What client version is the one are you exactly using?
 

rojberick

New Member
Joined
Apr 18, 2017
Messages
4
Best answers
0
Reaction score
3
I can't connect with client 10.
WTF is going on?
Which tibia client should I use?
What client version is the one are you exactly using?
As there is no IP changer anymore you would have to hex edit the client and make a madeup server name in your hosts file I'm sure there is a tutorial around somewhere I will post that when I would have more time
 

Paco

Member
Joined
Jan 4, 2009
Messages
140
Best answers
0
Reaction score
23
Location
Zapotlán del Rey, Jalisco, México.
As there is no IP changer anymore you would have to hex edit the client and make a madeup server name in your hosts file I'm sure there is a tutorial around somewhere I will post that when I would have more time
So, not even the client at the BR official site of the server works? :/
The otland ipchanger won't work?
 

Paco

Member
Joined
Jan 4, 2009
Messages
140
Best answers
0
Reaction score
23
Location
Zapotlán del Rey, Jalisco, México.
Otland IP changer work
Oh and one more thing...
Do you have the creatures.xml for the remere map editor? I'd like to remove some no-real tibia stuff from the map.

AND!

You know what? It would be great to adjust some details such as the players doesn't learn spells by npcs but automatic. I'd like old school, is there any real tibia spell teachers npcs codes around?
 

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,520
Best answers
9
Reaction score
218
Location
Chile
login.php for myacc (tibia 12)

can someone convert this file to make it compatible with Znote?
Code:
<?php

require_once('common.php');
require_once('config.php');
require_once('config.local.php');

require_once(SYSTEM . 'functions.php');
require_once(SYSTEM . 'init.php');
require_once(SYSTEM . 'status.php');

# error function
function sendError($msg){
    $ret = [];
    $ret["errorCode"] = 3;
    $ret["errorMessage"] = $msg;

    die(json_encode($ret));
}

$request = file_get_contents('php://input');
$result = json_decode($request);
$action = isset($result->type) ? $result->type : '';
switch ($action) {

    case 'cacheinfo':
        die(json_encode([
            'playersonline' => $status['players'],
            'twitchstreams' => 0,
            'twitchviewer' => 0,
            'gamingyoutubestreams' => 0,
            'gamingyoutubeviewer' => 0
        ]));
    break;

    case 'eventschedule':
        die(json_encode([
            'eventlist' => []
        ]));
    break;

    case 'boostedcreature':
        die(json_encode([
            'boostedcreature' => false,
        ]));
    break;

    case 'login':

        // check if cast is enable and accountname is cast
        $casting = $config['lua']['enableLiveCasting'] && $result->accountname == 'cast';
        if (!$casting && !$result->password) {
            sendError('Account name or password is not correct.');
        }

        $port = $config['lua']['gameProtocolPort'];
        // change port if is accountname is cast
        if ($casting) {
            $port = $config['lua']['liveCastPort'];
        }

        // default world info
        $world = [
            'id' => 0,
            'name' => $config['lua']['serverName'],
            'externaladdressprotected' => $config['lua']['ip'],
            'externalportprotected' => $port,
            'externaladdressunprotected' => $config['lua']['ip'],
            'externalportunprotected' => $port,
            'previewstate' => 0,
            'location' => 'BRA', // BRA, EUR, USA
            'anticheatprotection' => false,
            'pvptype' => array_search($config['lua']['worldType'], ['pvp', 'no-pvp', 'pvp-enforced']),
            'istournamentworld' => false,
            'restrictedstore' => false,
            'currenttournamentphase' => 2
        ];

        $characters = [];
        $account = null;

        // common columns
        $columns = 'name, level, sex, vocation, looktype, lookhead, lookbody, looklegs, lookfeet, lookaddons, deleted, lastlogin';
        if ($casting) {
            // get players casting
            $casters = $db->query("select {$columns} from live_casts inner join players  on player_id = id")->fetchAll();

            if (!count($casters)) {
                sendError('There is no live casts right now!');
            }

            foreach ($casters as $caster) {
                $characters[] = create_char($caster);
            }
        } else {
            $account = new OTS_Account();
            $account->find($result->accountname);

            $config_salt_enabled = fieldExist('salt', 'accounts');
            $current_password = encrypt(($config_salt_enabled ? $account->getCustomField('salt') : '') . $result->password);

            if (!$account->isLoaded() || $account->getPassword() != $current_password) {
                sendError('Account name or password is not correct.');
            }

            $players = $db->query("select {$columns} from players where account_id = " . $account->getId())->fetchAll();
            foreach ($players as $player) {
                $characters[] = create_char($player);
            }
        }

        $worlds = [$world];
        $playdata = compact('worlds', 'characters');
        $session = [
            'sessionkey' => "$result->accountname\n$result->password",
            'lastlogintime' => ($casting || !$account) ? 0 : $account->getLastLogin(),
            'ispremium' => ($casting || !$account) ? true : $account->isPremium(),
            'premiumuntil' => ($casting || !$account) ? 0 : (time() + ($account->getPremDays() * 86400)),
            'status' => 'active', // active, frozen or suspended
            'returnernotification' => false,
            'showrewardnews' => true,
            'isreturner' => true,
            'fpstracking' => false,
            'optiontracking' => false,
            'tournamentticketpurchasestate' => 0,
            'emailcoderequest' => false
        ];

        die(json_encode(compact('session', 'playdata')));
    break;

    default:
        sendError("Unrecognized event {$action}.");
    break;
}

function create_char($player) {
    global $config;
    return [
        'worldid' => 0,
        'name' => $player['name'],
        'ismale' => intval($player['sex']) === 1,
        'tutorial' => false, //intval($player['lastlogin']) === 0,
        'vocation' => $config['vocations'][$player['vocation']],
        'outfitid' => intval($player['looktype']),
        'headcolor' => intval($player['lookhead']),
        'torsocolor' => intval($player['lookbody']),
        'legscolor' => intval($player['looklegs']),
        'detailcolor' => intval($player['lookfeet']),
        'addonsflags' => intval($player['lookaddons']),
        'ishidden' => intval($player['deleted']) === 1,
        'istournamentparticipant' => false,
        'remainingdailytournamentplaytime' => 0
    ];
}
 

Paco

Member
Joined
Jan 4, 2009
Messages
140
Best answers
0
Reaction score
23
Location
Zapotlán del Rey, Jalisco, México.
Otland IP changer work
Alright, here's Elane NPC with spells:

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

local function creatureSayCallback(cid, type, msg)
    if not npcHandler:isFocused(cid) then
        return false
    end

    if msgcontains(msg,'spell') then
        if getPlayerVocation(cid) == 0 then
            npcHandler:say('Only adventurers who have a {vocation} can learn spells.', cid)
        else
            npcHandler:say('I have spells for level {8}, {10}, {13}, {17}, {20}, {25} and {35}.', cid)
        end
        return 1
    end

local node1 = keywordHandler:addKeyword({'find person'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn {Find Person} magic spell for 80 gold?'})
node1:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'find person', vocation = {1, 2, 3, 4, 5, 6, 7 ,8} , price = 80, level = 8})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = false})

local node2 = keywordHandler:addKeyword({'light'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn {Light} magic spell for free?'})
node2:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'light', vocation = {1, 2, 3, 4, 5, 6, 7, 8} , price = 0, level = 8})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = true})

local node3 = keywordHandler:addKeyword({'healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn Light {Healing} magic spell for free?'})
node3:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'light healing', vocation = {1, 2, 3, 4, 5, 6, 7 ,8} , price = 0, level = 8})
node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = true})

local node4 = keywordHandler:addKeyword({'cure poison'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn {Cure Poison} magic spell for 150 gold?'})
node4:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'cure poison', vocation = {1, 2, 3, 4, 5, 6, 7 ,8} , price = 150, level = 10})
node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = true})

local node5 = keywordHandler:addKeyword({'great'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn {Great} Light magic spell for 500 gold?'})
node5:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'great light', vocation = {1, 2, 3, 4, 5, 6, 7 ,8} , price = 500, level = 13})
node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = true})

local node6 = keywordHandler:addKeyword({'arrow'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn Conjure {Arrow} magic spell for 450 gold?'})
node6:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'conjure arrow', vocation = {3, 7} , price = 450, level = 13})
node6:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = true})

local node7 = keywordHandler:addKeyword({'destroy field'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn {Destroy Field} magic spell for 4000 gold?'})
node7:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'destroy field', vocation = {1, 2, 3, 5, 6, 7} , price = 700, level = 17})
node7:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = true})

local node8 = keywordHandler:addKeyword({'intense'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn {Intense} Healing magic spell for 350 gold?'})
node8:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'intense healing', vocation = {1, 2, 3, 5, 6, 7} , price = 350, level = 20})
node8:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = true})

local node9 = keywordHandler:addKeyword({'explosive'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn Conjure {Explosive} Arrow magic spell for 10000 gold?'})
node9:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'conjure explosive arrow', vocation = {3, 7} , price = 1000, level = 25})
node9:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = true})

local node10 = keywordHandler:addKeyword({'divine'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn {Divine} Healing magic spell for 3000 gold?'})
node10:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'divine healing', vocation = {3, 7} , price = 3000, level = 35})
node10:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = true})
 
    local player = Player(cid)
    if msgcontains(msg, "addon") or msgcontains(msg, "outfit") then
        if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) < 1 then
            npcHandler:say("Oh, my winged tiara? Those are traditionally awarded after having completed a difficult {task} for our guild, only to female aspirants though. Male warriors will receive a hooded cloak.", cid)
            npcHandler.topic[cid] = 1
        end
    elseif msgcontains(msg, "task") then
        if npcHandler.topic[cid] == 1 then
            npcHandler:say("So you are saying that you would like to prove that you deserve to wear such a hooded cloak?", cid)
            npcHandler.topic[cid] = 2
        end
    elseif msgcontains(msg, "crossbow") then
        if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) == 1 then
            npcHandler:say("I'm so excited! Have you really found my crossbow?", cid)
            npcHandler.topic[cid] = 4
        end
    elseif msgcontains(msg, "leather") then
        if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) == 2 then
            npcHandler:say("Did you bring me 100 pieces of lizard leather and 100 pieces of red dragon leather?", cid)
            npcHandler.topic[cid] = 5
        end
    elseif msgcontains(msg, "chicken wing") then
        if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) == 3 then
            npcHandler:say("Were you able to get hold of 5 enchanted chicken wings?", cid)
            npcHandler.topic[cid] = 6
        end
    elseif msgcontains(msg, "steel") then
        if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) == 4 then
            npcHandler:say("Ah, have you brought one piece of royal steel, draconian steel and hell steel each?", cid)
            npcHandler.topic[cid] = 7
        end
    elseif msgcontains(msg, "yes") then
        if npcHandler.topic[cid] == 2 then
            npcHandler:say({
                "Alright, I will give you a chance. Pay close attention to what I'm going to tell you now. ...",
                "Recently, one of our members moved to Liberty Bay out of nowhere, talking about some strange cult. That is not the problem, but he took my favourite crossbow with him. ...",
                "Please find my crossbow. It has my name engraved on it and is very special to me. ...",
                "Secondly, we need a lot of leather for new quivers. 100 pieces of lizard leather and 100 pieces of red dragon leather should suffice. ...",
                "Third, since we are giving out tiaras, we are always in need of enchanted chicken wings. Please bring me 5, that would help us tremendously. ...",
                "Lastly, for our arrow heads we need a lot of steel. Best would be one piece of royal steel, one piece of draconian steel and one piece of hell steel. ...",
                "Did you understand everything I told you and are willing to handle this task?"
            }, cid)
            npcHandler.topic[cid] = 3
        elseif npcHandler.topic[cid] == 3 then
            npcHandler:say("That's the spirit! I hope you will find my crossbow, |PLAYERNAME|!", cid)
            player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 1)
            player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) --this for default start of Outfit and Addon Quests
            npcHandler.topic[cid] = 0
        elseif npcHandler.topic[cid] == 4 then
            if player:removeItem(5947, 1) then
                npcHandler:say("Yeah! I could kiss you right here and there! Besides, you're a handsome one. <giggles> Please bring me 100 pieces of lizard leather and 100 pieces of red dragon leather now!", cid)
                player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 2)
                npcHandler.topic[cid] = 0
            else
                npcHandler:say("You don't have it...", cid)
            end
        elseif npcHandler.topic[cid] == 5 then
            if player:getItemCount(5876) >= 100 and player:getItemCount(5948) >= 100  then
                npcHandler:say("Good work, |PLAYERNAME|! That is enough leather for a lot of sturdy quivers. Now, please bring me 5 enchanted chicken wings.", cid)
                player:removeItem(5876, 100)
                player:removeItem(5948, 100)
                player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 3)
                npcHandler.topic[cid] = 0
            else
                npcHandler:say("You don't have it...", cid)
            end
        elseif npcHandler.topic[cid] == 6 then
            if player:removeItem(5891, 5) then
                npcHandler:say("Great! Now we can create a few more Tiaras. If only they weren't that expensive... Well anyway, please obtain one piece of royal steel, draconian steel and hell steel each.", cid)
                player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 4)
                npcHandler.topic[cid] = 0
            else
                npcHandler:say("You don't have it...", cid)
            end
        elseif npcHandler.topic[cid] == 7 then
            if player:getItemCount(5887) >= 1 and player:getItemCount(5888) >= 1 and player:getItemCount(5889) >= 1  then
                npcHandler:say("Wow, I'm impressed, |PLAYERNAME|. Your really are a valuable member of our paladin guild. I shall grant you your reward now. Wear it proudly!", cid)
                player:removeItem(5887, 1)
                player:removeItem(5888, 1)
                player:removeItem(5889, 1)
                player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 5)
                player:addOutfitAddon(129, 1)
                player:addOutfitAddon(137, 2)
                player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
                npcHandler.topic[cid] = 0
            else
                npcHandler:say("You don't have it...", cid)
            end
        end
    elseif msgcontains(msg, "no") then
        if npcHandler.topic[cid] > 1 then
            npcHandler:say("Then no.", cid)
            npcHandler.topic[cid] = 0
        end
    return true
    end
end

-- Sniper Gloves
keywordHandler:addKeyword({'sniper gloves'}, StdModule.say, {npcHandler = npcHandler, text = 'We are always looking for sniper gloves. They are supposed to raise accuracy. If you find a pair, bring them here. Maybe I can offer you a nice trade.'}, function(player) return player:getItemCount(5875) == 0 end)

local function addGloveKeyword(text, condition, action)
    local gloveKeyword = keywordHandler:addKeyword({'sniper gloves'}, StdModule.say, {npcHandler = npcHandler, text = text[1]}, condition)
        gloveKeyword:addChildKeyword({'yes'}, StdModule.say, {npcHandler = npcHandler, text = text[2], reset = true}, function(player) return player:getItemCount(5875) == 0 end)
        gloveKeyword:addChildKeyword({'yes'}, StdModule.say, {npcHandler = npcHandler, text = text[3], reset = true}, nil, action)
        gloveKeyword:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, text = text[2], reset = true})
end

-- Free Account
addGloveKeyword({
        'You found sniper gloves?! Incredible! I would love to grant you the sniper gloves accessory, but I can only do that for premium warriors. However, I would pay you 2000 gold pieces for them. How about it?',
        'Maybe another time.',
        'Alright! Here is your money, thank you very much.'
    }, function(player) return not player:isPremium() end, function(player) player:removeItem(5875, 1) player:addMoney(2000) end
)

-- Premium account with addon
addGloveKeyword({
        'Did you find sniper gloves AGAIN?! Incredible! I cannot grant you other accessories, but would you like to sell them to me for 2000 gold pieces?',
        'Maybe another time.',
        'Alright! Here is your money, thank you very much.'
    }, function(player) return player:getStorageValue(Storage.OutfitQuest.Hunter.AddonGlove) == 1 end, function(player) player:removeItem(5875, 1) player:addMoney(2000) end
)

-- If you don't have the addon
addGloveKeyword({
        'You found sniper gloves?! Incredible! Listen, if you give them to me, I will grant you the right to wear the sniper gloves accessory. How about it?',
        'No problem, maybe another time.',
        'Great! I hereby grant you the right to wear the sniper gloves as an accessory. Congratulations!'
    }, function(player) return player:getStorageValue(Storage.OutfitQuest.Hunter.AddonGlove) == -1 end, function(player) player:removeItem(5875, 1) player:setStorageValue(Storage.OutfitQuest.Hunter.AddonGlove, 1) player:addOutfitAddon(129, 2) player:addOutfitAddon(137, 1) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) end
)

-- Basic
keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, text = "I am the leader of the Paladins. I help our members."})
keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, text = "I am the leader of the Paladins. I help our members."})
keywordHandler:addKeyword({'paladins'}, StdModule.say, {npcHandler = npcHandler, text = "Paladins are great warriors and magicians. Besides that we are excellent missile fighters. Many people in Tibia want to join us."})
keywordHandler:addKeyword({'warriors'}, StdModule.say, {npcHandler = npcHandler, text = "Of course, we aren't as strong as knights, but no druid or sorcerer will ever defeat a paladin with a sword."})
keywordHandler:addKeyword({'magicians'}, StdModule.say, {npcHandler = npcHandler, text = "There are many magic spells and runes paladins can use."})
keywordHandler:addKeyword({'missile'}, StdModule.say, {npcHandler = npcHandler, text = "Paladins are the best missile fighters in Tibia!"})
keywordHandler:addKeyword({'news'}, StdModule.say, {npcHandler = npcHandler, text = "I am a paladin, not a storyteller."})
keywordHandler:addKeyword({'members'}, StdModule.say, {npcHandler = npcHandler, text = "Every paladin profits from his vocation. It has many advantages to be a paladin."})
keywordHandler:addKeyword({'advantages'}, StdModule.say, {npcHandler = npcHandler, text = "We will help you to improve your skills. Besides I offer spells for paladins."})
keywordHandler:addKeyword({'general'}, StdModule.say, {npcHandler = npcHandler, text = "Harkath Bloodblade is the royal general."})
keywordHandler:addKeyword({'army'}, StdModule.say, {npcHandler = npcHandler, text = "Some paladins serve in the kings army."})
keywordHandler:addKeyword({'baxter'}, StdModule.say, {npcHandler = npcHandler, text = "He has some potential."})
keywordHandler:addKeyword({'bozo'}, StdModule.say, {npcHandler = npcHandler, text = "How spineless do you have to be to become a jester?"})
keywordHandler:addKeyword({'mcronald'}, StdModule.say, {npcHandler = npcHandler, text = "The McRonalds are simple farmers."})
keywordHandler:addKeyword({'eclesius'}, StdModule.say, {npcHandler = npcHandler, text = "He must have been skilled before he became the way he is now. Such a pity."})
keywordHandler:addKeyword({'elane'}, StdModule.say, {npcHandler = npcHandler, text = "Yes?"})
keywordHandler:addKeyword({'frodo'}, StdModule.say, {npcHandler = npcHandler, text = "The alcohol he sells shrouds the mind and the eye."})
keywordHandler:addKeyword({'galuna'}, StdModule.say, {npcHandler = npcHandler, text = "One of the most important members of our guild. She makes all the bows and arrows we need."})
keywordHandler:addKeyword({'gorn'}, StdModule.say, {npcHandler = npcHandler, text = "He sells a lot of useful equipment."})
keywordHandler:addKeyword({'gregor'}, StdModule.say, {npcHandler = npcHandler, text = "He and his guildfellows lack the grace of a true warrior."})
keywordHandler:addKeyword({'harkath bloodblade'}, StdModule.say, {npcHandler = npcHandler, text = "A fine warrior and a skilled general."})
keywordHandler:addKeyword({'king tibianus'}, StdModule.say, {npcHandler = npcHandler, text = "King Tibianus is a wise ruler."})
keywordHandler:addKeyword({'lugri'}, StdModule.say, {npcHandler = npcHandler, text = "A follower of evil that will get what he deserves one day."})
keywordHandler:addKeyword({'lynda'}, StdModule.say, {npcHandler = npcHandler, text = "Mhm, a little too nice for my taste. Still, it's amazing how she endures all those men stalking her, especially this creepy Oswald."})
keywordHandler:addKeyword({'marvik'}, StdModule.say, {npcHandler = npcHandler, text = "A skilled healer, that's for sure."})
keywordHandler:addKeyword({'muriel'}, StdModule.say, {npcHandler = npcHandler, text = "Just another arrogant sorcerer."})
keywordHandler:addKeyword({'oswald'}, StdModule.say, {npcHandler = npcHandler, text = "If there wouldn't be higher powers to protect him..."})
keywordHandler:addKeyword({'quentin'}, StdModule.say, {npcHandler = npcHandler, text = "A humble monk and a wise man."})
keywordHandler:addKeyword({'sam'}, StdModule.say, {npcHandler = npcHandler, text = "Strong man. But a little shy."})
keywordHandler:addKeyword({'8'}, StdModule.say, {npcHandler = npcHandler, text = "For level 8 I have {Find Person}, {Light} and Light {Healing}."})
keywordHandler:addKeyword({'10'}, StdModule.say, {npcHandler = npcHandler, text = "For level 10 I have {Cure Poison}."})
keywordHandler:addKeyword({'13'}, StdModule.say, {npcHandler = npcHandler, text = "For level 13 I have Conjure {Arrow}."})
keywordHandler:addKeyword({'17'}, StdModule.say, {npcHandler = npcHandler, text = "For level 17 I have {Destroy Field}."})
keywordHandler:addKeyword({'20'}, StdModule.say, {npcHandler = npcHandler, text = "For level 20 I have {Intense} Healing."})
keywordHandler:addKeyword({'25'}, StdModule.say, {npcHandler = npcHandler, text = "For level 25 I have Conjure {Explosive} Arrow."})
keywordHandler:addKeyword({'35'}, StdModule.say, {npcHandler = npcHandler, text = "For level 35 I have {Divine} Healing."})

npcHandler:setMessage(MESSAGE_GREET, "Welcome to the paladins' guild, |PLAYERNAME|! How can I help you?")
npcHandler:setMessage(MESSAGE_FAREWELL, "Bye, |PLAYERNAME|.")
npcHandler:setMessage(MESSAGE_WALKAWAY, "Bye, |PLAYERNAME|.")

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Should I continue? Do you like the idea?
 
Last edited:

StreamSide

Joseluis Gonzalez
Support Team
Joined
Aug 31, 2007
Messages
3,318
Best answers
33
Reaction score
830
Location
Arica - Chile
Alright, here's Elane NPC with spells:

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

local function creatureSayCallback(cid, type, msg)
    if not npcHandler:isFocused(cid) then
        return false
    end

    if msgcontains(msg,'spell') then
        if getPlayerVocation(cid) == 0 then
            npcHandler:say('Only adventurers who have a {vocation} can learn spells.', cid)
        else
            npcHandler:say('I have spells for level {8}, {10}, {13}, {17}, {20}, {25} and {35}.', cid)
        end
        return 1
    end

local node1 = keywordHandler:addKeyword({'find person'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn {Find Person} magic spell for 80 gold?'})
node1:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'find person', vocation = {1, 2, 3, 4, 5, 6, 7 ,8} , price = 80, level = 8})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = false})

local node2 = keywordHandler:addKeyword({'light'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn {Light} magic spell for free?'})
node2:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'light', vocation = {1, 2, 3, 4, 5, 6, 7, 8} , price = 0, level = 8})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = true})

local node3 = keywordHandler:addKeyword({'healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn Light {Healing} magic spell for free?'})
node3:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'light healing', vocation = {1, 2, 3, 4, 5, 6, 7 ,8} , price = 0, level = 8})
node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = true})

local node4 = keywordHandler:addKeyword({'cure poison'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn {Cure Poison} magic spell for 150 gold?'})
node4:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'cure poison', vocation = {1, 2, 3, 4, 5, 6, 7 ,8} , price = 150, level = 10})
node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = true})

local node5 = keywordHandler:addKeyword({'great'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn {Great} Light magic spell for 500 gold?'})
node5:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'great light', vocation = {1, 2, 3, 4, 5, 6, 7 ,8} , price = 500, level = 13})
node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = true})

local node6 = keywordHandler:addKeyword({'arrow'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn Conjure {Arrow} magic spell for 450 gold?'})
node6:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'conjure arrow', vocation = {3, 7} , price = 450, level = 13})
node6:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = true})

local node7 = keywordHandler:addKeyword({'destroy field'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn {Destroy Field} magic spell for 4000 gold?'})
node7:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'destroy field', vocation = {1, 2, 3, 5, 6, 7} , price = 700, level = 17})
node7:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = true})

local node8 = keywordHandler:addKeyword({'intense'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn {Intense} Healing magic spell for 350 gold?'})
node8:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'intense healing', vocation = {1, 2, 3, 5, 6, 7} , price = 350, level = 20})
node8:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = true})

local node9 = keywordHandler:addKeyword({'explosive'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn Conjure {Explosive} Arrow magic spell for 10000 gold?'})
node9:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'conjure explosive arrow', vocation = {3, 7} , price = 1000, level = 25})
node9:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = true})

local node10 = keywordHandler:addKeyword({'divine'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn {Divine} Healing magic spell for 3000 gold?'})
node10:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'divine healing', vocation = {3, 7} , price = 3000, level = 35})
node10:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'As you wish.', reset = true})

    local player = Player(cid)
    if msgcontains(msg, "addon") or msgcontains(msg, "outfit") then
        if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) < 1 then
            npcHandler:say("Oh, my winged tiara? Those are traditionally awarded after having completed a difficult {task} for our guild, only to female aspirants though. Male warriors will receive a hooded cloak.", cid)
            npcHandler.topic[cid] = 1
        end
    elseif msgcontains(msg, "task") then
        if npcHandler.topic[cid] == 1 then
            npcHandler:say("So you are saying that you would like to prove that you deserve to wear such a hooded cloak?", cid)
            npcHandler.topic[cid] = 2
        end
    elseif msgcontains(msg, "crossbow") then
        if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) == 1 then
            npcHandler:say("I'm so excited! Have you really found my crossbow?", cid)
            npcHandler.topic[cid] = 4
        end
    elseif msgcontains(msg, "leather") then
        if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) == 2 then
            npcHandler:say("Did you bring me 100 pieces of lizard leather and 100 pieces of red dragon leather?", cid)
            npcHandler.topic[cid] = 5
        end
    elseif msgcontains(msg, "chicken wing") then
        if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) == 3 then
            npcHandler:say("Were you able to get hold of 5 enchanted chicken wings?", cid)
            npcHandler.topic[cid] = 6
        end
    elseif msgcontains(msg, "steel") then
        if player:getStorageValue(Storage.OutfitQuest.HunterHatAddon) == 4 then
            npcHandler:say("Ah, have you brought one piece of royal steel, draconian steel and hell steel each?", cid)
            npcHandler.topic[cid] = 7
        end
    elseif msgcontains(msg, "yes") then
        if npcHandler.topic[cid] == 2 then
            npcHandler:say({
                "Alright, I will give you a chance. Pay close attention to what I'm going to tell you now. ...",
                "Recently, one of our members moved to Liberty Bay out of nowhere, talking about some strange cult. That is not the problem, but he took my favourite crossbow with him. ...",
                "Please find my crossbow. It has my name engraved on it and is very special to me. ...",
                "Secondly, we need a lot of leather for new quivers. 100 pieces of lizard leather and 100 pieces of red dragon leather should suffice. ...",
                "Third, since we are giving out tiaras, we are always in need of enchanted chicken wings. Please bring me 5, that would help us tremendously. ...",
                "Lastly, for our arrow heads we need a lot of steel. Best would be one piece of royal steel, one piece of draconian steel and one piece of hell steel. ...",
                "Did you understand everything I told you and are willing to handle this task?"
            }, cid)
            npcHandler.topic[cid] = 3
        elseif npcHandler.topic[cid] == 3 then
            npcHandler:say("That's the spirit! I hope you will find my crossbow, |PLAYERNAME|!", cid)
            player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 1)
            player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) --this for default start of Outfit and Addon Quests
            npcHandler.topic[cid] = 0
        elseif npcHandler.topic[cid] == 4 then
            if player:removeItem(5947, 1) then
                npcHandler:say("Yeah! I could kiss you right here and there! Besides, you're a handsome one. <giggles> Please bring me 100 pieces of lizard leather and 100 pieces of red dragon leather now!", cid)
                player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 2)
                npcHandler.topic[cid] = 0
            else
                npcHandler:say("You don't have it...", cid)
            end
        elseif npcHandler.topic[cid] == 5 then
            if player:getItemCount(5876) >= 100 and player:getItemCount(5948) >= 100  then
                npcHandler:say("Good work, |PLAYERNAME|! That is enough leather for a lot of sturdy quivers. Now, please bring me 5 enchanted chicken wings.", cid)
                player:removeItem(5876, 100)
                player:removeItem(5948, 100)
                player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 3)
                npcHandler.topic[cid] = 0
            else
                npcHandler:say("You don't have it...", cid)
            end
        elseif npcHandler.topic[cid] == 6 then
            if player:removeItem(5891, 5) then
                npcHandler:say("Great! Now we can create a few more Tiaras. If only they weren't that expensive... Well anyway, please obtain one piece of royal steel, draconian steel and hell steel each.", cid)
                player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 4)
                npcHandler.topic[cid] = 0
            else
                npcHandler:say("You don't have it...", cid)
            end
        elseif npcHandler.topic[cid] == 7 then
            if player:getItemCount(5887) >= 1 and player:getItemCount(5888) >= 1 and player:getItemCount(5889) >= 1  then
                npcHandler:say("Wow, I'm impressed, |PLAYERNAME|. Your really are a valuable member of our paladin guild. I shall grant you your reward now. Wear it proudly!", cid)
                player:removeItem(5887, 1)
                player:removeItem(5888, 1)
                player:removeItem(5889, 1)
                player:setStorageValue(Storage.OutfitQuest.HunterHatAddon, 5)
                player:addOutfitAddon(129, 1)
                player:addOutfitAddon(137, 2)
                player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
                npcHandler.topic[cid] = 0
            else
                npcHandler:say("You don't have it...", cid)
            end
        end
    elseif msgcontains(msg, "no") then
        if npcHandler.topic[cid] > 1 then
            npcHandler:say("Then no.", cid)
            npcHandler.topic[cid] = 0
        end
    return true
    end
end

-- Sniper Gloves
keywordHandler:addKeyword({'sniper gloves'}, StdModule.say, {npcHandler = npcHandler, text = 'We are always looking for sniper gloves. They are supposed to raise accuracy. If you find a pair, bring them here. Maybe I can offer you a nice trade.'}, function(player) return player:getItemCount(5875) == 0 end)

local function addGloveKeyword(text, condition, action)
    local gloveKeyword = keywordHandler:addKeyword({'sniper gloves'}, StdModule.say, {npcHandler = npcHandler, text = text[1]}, condition)
        gloveKeyword:addChildKeyword({'yes'}, StdModule.say, {npcHandler = npcHandler, text = text[2], reset = true}, function(player) return player:getItemCount(5875) == 0 end)
        gloveKeyword:addChildKeyword({'yes'}, StdModule.say, {npcHandler = npcHandler, text = text[3], reset = true}, nil, action)
        gloveKeyword:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, text = text[2], reset = true})
end

-- Free Account
addGloveKeyword({
        'You found sniper gloves?! Incredible! I would love to grant you the sniper gloves accessory, but I can only do that for premium warriors. However, I would pay you 2000 gold pieces for them. How about it?',
        'Maybe another time.',
        'Alright! Here is your money, thank you very much.'
    }, function(player) return not player:isPremium() end, function(player) player:removeItem(5875, 1) player:addMoney(2000) end
)

-- Premium account with addon
addGloveKeyword({
        'Did you find sniper gloves AGAIN?! Incredible! I cannot grant you other accessories, but would you like to sell them to me for 2000 gold pieces?',
        'Maybe another time.',
        'Alright! Here is your money, thank you very much.'
    }, function(player) return player:getStorageValue(Storage.OutfitQuest.Hunter.AddonGlove) == 1 end, function(player) player:removeItem(5875, 1) player:addMoney(2000) end
)

-- If you don't have the addon
addGloveKeyword({
        'You found sniper gloves?! Incredible! Listen, if you give them to me, I will grant you the right to wear the sniper gloves accessory. How about it?',
        'No problem, maybe another time.',
        'Great! I hereby grant you the right to wear the sniper gloves as an accessory. Congratulations!'
    }, function(player) return player:getStorageValue(Storage.OutfitQuest.Hunter.AddonGlove) == -1 end, function(player) player:removeItem(5875, 1) player:setStorageValue(Storage.OutfitQuest.Hunter.AddonGlove, 1) player:addOutfitAddon(129, 2) player:addOutfitAddon(137, 1) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) end
)

-- Basic
keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, text = "I am the leader of the Paladins. I help our members."})
keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, text = "I am the leader of the Paladins. I help our members."})
keywordHandler:addKeyword({'paladins'}, StdModule.say, {npcHandler = npcHandler, text = "Paladins are great warriors and magicians. Besides that we are excellent missile fighters. Many people in Tibia want to join us."})
keywordHandler:addKeyword({'warriors'}, StdModule.say, {npcHandler = npcHandler, text = "Of course, we aren't as strong as knights, but no druid or sorcerer will ever defeat a paladin with a sword."})
keywordHandler:addKeyword({'magicians'}, StdModule.say, {npcHandler = npcHandler, text = "There are many magic spells and runes paladins can use."})
keywordHandler:addKeyword({'missile'}, StdModule.say, {npcHandler = npcHandler, text = "Paladins are the best missile fighters in Tibia!"})
keywordHandler:addKeyword({'news'}, StdModule.say, {npcHandler = npcHandler, text = "I am a paladin, not a storyteller."})
keywordHandler:addKeyword({'members'}, StdModule.say, {npcHandler = npcHandler, text = "Every paladin profits from his vocation. It has many advantages to be a paladin."})
keywordHandler:addKeyword({'advantages'}, StdModule.say, {npcHandler = npcHandler, text = "We will help you to improve your skills. Besides I offer spells for paladins."})
keywordHandler:addKeyword({'general'}, StdModule.say, {npcHandler = npcHandler, text = "Harkath Bloodblade is the royal general."})
keywordHandler:addKeyword({'army'}, StdModule.say, {npcHandler = npcHandler, text = "Some paladins serve in the kings army."})
keywordHandler:addKeyword({'baxter'}, StdModule.say, {npcHandler = npcHandler, text = "He has some potential."})
keywordHandler:addKeyword({'bozo'}, StdModule.say, {npcHandler = npcHandler, text = "How spineless do you have to be to become a jester?"})
keywordHandler:addKeyword({'mcronald'}, StdModule.say, {npcHandler = npcHandler, text = "The McRonalds are simple farmers."})
keywordHandler:addKeyword({'eclesius'}, StdModule.say, {npcHandler = npcHandler, text = "He must have been skilled before he became the way he is now. Such a pity."})
keywordHandler:addKeyword({'elane'}, StdModule.say, {npcHandler = npcHandler, text = "Yes?"})
keywordHandler:addKeyword({'frodo'}, StdModule.say, {npcHandler = npcHandler, text = "The alcohol he sells shrouds the mind and the eye."})
keywordHandler:addKeyword({'galuna'}, StdModule.say, {npcHandler = npcHandler, text = "One of the most important members of our guild. She makes all the bows and arrows we need."})
keywordHandler:addKeyword({'gorn'}, StdModule.say, {npcHandler = npcHandler, text = "He sells a lot of useful equipment."})
keywordHandler:addKeyword({'gregor'}, StdModule.say, {npcHandler = npcHandler, text = "He and his guildfellows lack the grace of a true warrior."})
keywordHandler:addKeyword({'harkath bloodblade'}, StdModule.say, {npcHandler = npcHandler, text = "A fine warrior and a skilled general."})
keywordHandler:addKeyword({'king tibianus'}, StdModule.say, {npcHandler = npcHandler, text = "King Tibianus is a wise ruler."})
keywordHandler:addKeyword({'lugri'}, StdModule.say, {npcHandler = npcHandler, text = "A follower of evil that will get what he deserves one day."})
keywordHandler:addKeyword({'lynda'}, StdModule.say, {npcHandler = npcHandler, text = "Mhm, a little too nice for my taste. Still, it's amazing how she endures all those men stalking her, especially this creepy Oswald."})
keywordHandler:addKeyword({'marvik'}, StdModule.say, {npcHandler = npcHandler, text = "A skilled healer, that's for sure."})
keywordHandler:addKeyword({'muriel'}, StdModule.say, {npcHandler = npcHandler, text = "Just another arrogant sorcerer."})
keywordHandler:addKeyword({'oswald'}, StdModule.say, {npcHandler = npcHandler, text = "If there wouldn't be higher powers to protect him..."})
keywordHandler:addKeyword({'quentin'}, StdModule.say, {npcHandler = npcHandler, text = "A humble monk and a wise man."})
keywordHandler:addKeyword({'sam'}, StdModule.say, {npcHandler = npcHandler, text = "Strong man. But a little shy."})
keywordHandler:addKeyword({'8'}, StdModule.say, {npcHandler = npcHandler, text = "For level 8 I have {Find Person}, {Light} and Light {Healing}."})
keywordHandler:addKeyword({'10'}, StdModule.say, {npcHandler = npcHandler, text = "For level 10 I have {Cure Poison}."})
keywordHandler:addKeyword({'13'}, StdModule.say, {npcHandler = npcHandler, text = "For level 13 I have Conjure {Arrow}."})
keywordHandler:addKeyword({'17'}, StdModule.say, {npcHandler = npcHandler, text = "For level 17 I have {Destroy Field}."})
keywordHandler:addKeyword({'20'}, StdModule.say, {npcHandler = npcHandler, text = "For level 20 I have {Intense} Healing."})
keywordHandler:addKeyword({'25'}, StdModule.say, {npcHandler = npcHandler, text = "For level 25 I have Conjure {Explosive} Arrow."})
keywordHandler:addKeyword({'35'}, StdModule.say, {npcHandler = npcHandler, text = "For level 35 I have {Divine} Healing."})

npcHandler:setMessage(MESSAGE_GREET, "Welcome to the paladins' guild, |PLAYERNAME|! How can I help you?")
npcHandler:setMessage(MESSAGE_FAREWELL, "Bye, |PLAYERNAME|.")
npcHandler:setMessage(MESSAGE_WALKAWAY, "Bye, |PLAYERNAME|.")

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Should I continue? Do you like the idea?
I like it a lot no matters if I'm going to use it or nay :(
 
Top