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

2 Npcs Needed

koz

Gm Death
Joined
Feb 2, 2009
Messages
77
Reaction score
0
I need a soft boots re filler and a paladin shop guy if you has anyone one of these npcs please give them to me!
 
Version?
tfs ?

....

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Pally Seller" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
    <look type="142" head="59" body="54" legs="45" feet="76" addons="0"/>
    <parameters>
        <parameter key="module_shop" value="1"/>
        <parameter key="shop_buyable" value="Arrow,2544,8;Burst arrow,2546,18;Assassin star,7368,80;Bolt,2543,55;poison arrow,2545,50;"/>
    </parameters>
</npc>

Save it as pally seller.xml

..
 
Soft boots refiler:

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

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)

        if msgcontains(msg, 'specialised') then
            selfSay('Yes, my fathers was a great one blacksmith, it was a wise person , but when he decided to teach me he dies and i just learn about the lovely boots. So, did you bring me some boots? which one ?', cid)
        elseif msgcontains(msg, 'soft boots') or msgcontains(msg, 'worn soft boots') or msgcontains(msg, 'soft boot') or msgcontains(msg, 'worn soft boot') then
            selfSay('Should I fix your worn soft boots? It will cost 1 crystal coin.', cid)
            talk_state = 1
        elseif msgcontains(msg, 'firewalker boots') or msgcontains(msg, 'worn firewalker boots') or msgcontains(msg, 'firewalker boot') or msgcontains(msg, 'worn firewalker boot') then
            selfSay('Should I fix your worn firewalker boots? It will cost 5 crystal coins.', cid)
            talk_state = 2

        elseif msgcontains(msg, 'yes') and talk_state == 1 then
            if getPlayerItemCount(cid,6530) >= 1 and getPlayerItemCount(cid,2160) >= 1 then
                if doPlayerTakeItem(cid,6530,1) and doPlayerTakeItem(cid,2160,1) == 0 then
                selfSay('Here you are.', cid)
                    doPlayerAddItem(cid,2640,1)
                end
            else
                selfSay('Sorry, you don\'t have the item.', cid)
            end


        elseif msgcontains(msg, 'yes') and talk_state == 2 then
            if getPlayerItemCount(cid,9934) >= 1 and getPlayerItemCount(cid,2160) >= 1 then
                if doPlayerTakeItem(cid,9934,1) and doPlayerTakeItem(cid,2160,5) == 0 then
                selfSay('Here you are.', cid)
                    doPlayerAddItem(cid,9933,1)
                end
            else
                selfSay('Sorry, you don\'t have the item.', cid)
            end


        elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 5) then
            selfSay('Ok than.', cid)
            talk_state = 0
        end
    return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
Back
Top