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

Problem in "Buy with backpacks"

TiuTalk

PHP Developer
Joined
Jan 7, 2009
Messages
89
Reaction score
0
Location
Rio de Janeiro - Brasil
Hi there..

I'm using TFS 0.2.4 and soon I will upgrade to TFS 0.2.5.

When i try to buy any item with "Buy with backpacks" [ON] the items came outside from bp...

They don't come INSIDE the bp..

There is an example: I bought 5 pots with backpack (the brown one)
semttulo2e.jpg


(Sry about my english)

What can I do? :/
 
change
Code:
doPlayerAddItem(uid, itemid)
to
Code:
getContainerItem(uid, slot)


rep?

if not works send me ur script =)
 
Well.. Here's my Al Dee:

Al Dee.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Al Dee" script="data\npc\scripts\Al Dee.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="129" head="97" body="77" legs="87" feet="115" addons="0"/>
   <parameters>
        <parameter key="message_greet" value="Hello, hello, |PLAYERNAME|! Please come in, look, and buy!" />
        <parameter key="message_sendtrade" value="Here, take a look and choose something nice for you!" />
        <parameter key="message_farewell" value="Bye, bye." />
        <parameter key="module_shop" value="1"/>
<parameter key="shop_buyable" value="backpack,1988,10;bag,1987,5;fishing rod,2580,150;rope,2120,50;scroll,1949,5;scythe,2550,12;shovel,2554,10;torch,2050,2;worm,3976,1" />
<parameter key="shop_sellable" value="fishing rod,2580,30;rope,2120,8;shovel,2554,2" />
    </parameters>
</npc>

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

function onCreatureAppear(cid)            npcHandler:onCreatureAppear(cid)        end
function onCreatureDisappear(cid)        npcHandler:onCreatureDisappear(cid)        end
function onCreatureSay(cid, type, msg)        npcHandler:onCreatureSay(cid, type, msg)    end
function onThink()                npcHandler:onThink()                end

function pick(cid, message, keywords, parameters, node)

    if(not npcHandler:isFocused(cid)) then
        return false
    end

        if getPlayerItemCount(cid,2559) >= 1 then
        if doPlayerRemoveItem(cid,2559,1) then
            npcHandler:say('Splendid! Here take your pickaxe.', cid)
            doPlayerAddItem(cid,2553,1)
        end
        else
            npcHandler:say('Sorry, I am looking for a SMALL axe.', cid)
        end
    end

local node1 = keywordHandler:addKeyword({'pick'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Picks are hard to come by. I trade them only in exchange for high quality small axes. Would you like to make that deal?'})
    node1:addChildKeyword({'yes'}, pick, {npcHandler = npcHandler, onlyFocus = true, reset = true})
    node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Well, then don\'t.', reset = true})

npcHandler:addModule(FocusModule:new())
 
In trade window exist a option "buy with backpack" where you pay +20gp and get the item inside a BP...

Example: Buy 20 blank runes with backpack will give you a backpack filled with blanks.

But when i use this "mode" of trade i just get the items like the normal way
 
Back
Top