Rafaell_br
New Member
It is certain that the forms of nukar otserver are several.
One of them and put a macro to be buying things with the capacity ignored.
Let's settle.
Tested in Tfs 1.3
Download Libs of npcs
lib.rar
Scan
Go on data/npc/lib/npcsystem/modules.lua
Search for
Swap for
Search for
Swap for
Search for
Swap for
Search for
Swap for
Search for
Swap for
Search for
Swap for
Go on data/npc/lib/npcsystem/npchandler
Search for
Swap for
Search for
Swap for
Search for
Swap for
Go on data/npc/lib/npc.lua
Search for
Swap for
Search for
Swap for
Search for
Swap for
Search for
Swap for
That way even the player who puts capacity to ignore will come the message that he has no capacity and will no longer fall to the ground.
One of them and put a macro to be buying things with the capacity ignored.
Let's settle.
Tested in Tfs 1.3
Download Libs of npcs
lib.rar
Scan
HTML:
https://www.virustotal.com/pt/file/88ee4c01687aa5b5997716060544901c9080e39d6eaa49dcc7fa55e04bba50e2/analysis/1498083109/
Go on data/npc/lib/npcsystem/modules.lua
Search for
Lua:
function ShopModule:callbackOnBuy(cid, itemid, subType, amount, ignoreCap, inBackpacks)
Swap for
Lua:
function ShopModule:callbackOnBuy(cid, itemid, subType, amount, inBackpacks)
Search for
Lua:
local a, b = doNpcSellItem(cid, itemid, amount, subType, ignoreCap, inBackpacks, backpack)
Swap for
Lua:
local a, b = doNpcSellItem(cid, itemid, amount, subType, inBackpacks, backpack)
Search for
Lua:
function(cid, itemid, subType, amount, ignoreCap, inBackpacks) module.npcHandler:onBuy(cid, itemid, subType, amount, ignoreCap, inBackpacks) end,
function(cid, itemid, subType, amount, ignoreCap, inBackpacks) module.npcHandler:onSell(cid, itemid, subType, amount, ignoreCap, inBackpacks) end)
Swap for
Lua:
function(cid, itemid, subType, amount, inBackpacks) module.npcHandler:onBuy(cid, itemid, subType, amount, inBackpacks) end,
function(cid, itemid, subType, amount, inBackpacks) module.npcHandler:onSell(cid, itemid, subType, amount, inBackpacks) end)
Search for
Lua:
function(cid, itemid, subType, amount, inBackpacks) module.npcHandler:onBuy(cid, itemid, subType, amount, ignoreCap, inBackpacks) end,
function(cid, itemid, subType, amount, inBackpacks) module.npcHandler:onSell(cid, itemid, subType, amount, ignoreCap, inBackpacks) end)
Swap for
Lua:
function(cid, itemid, subType, amount, inBackpacks) module.npcHandler:onBuy(cid, itemid, subType, amount, inBackpacks) end,
function(cid, itemid, subType, amount, inBackpacks) module.npcHandler:onSell(cid, itemid, subType, amount, inBackpacks) end)
Search for
Lua:
function ShopModule:callbackOnBuy(cid, itemid, subType, amount, ignoreCap, inBackpacks)
Swap for
Lua:
function ShopModule:callbackOnBuy(cid, itemid, subType, amount, inBackpacks)
Search for
Lua:
local a, b = doNpcSellItem(cid, itemid, amount, subType, ignoreCap, inBackpacks, backpack)
Swap for
Lua:
local a, b = doNpcSellItem(cid, itemid, amount, subType, inBackpacks, backpack)
Go on data/npc/lib/npcsystem/npchandler
Search for
Lua:
function NpcHandler:onBuy(creature, itemid, subType, amount, ignoreCap, inBackpacks)
Swap for
Lua:
function NpcHandler:onBuy(creature, itemid, subType, amount, inBackpacks)
Search for
Lua:
if callback == nil or callback(cid, itemid, subType, amount, ignoreCap, inBackpacks) then
if self:processModuleCallback(CALLBACK_ONBUY, cid, itemid, subType, amount, ignoreCap, inBackpacks) then
Swap for
Lua:
if callback == nil or callback(cid, itemid, subType, amount, inBackpacks) then
if self:processModuleCallback(CALLBACK_ONBUY, cid, itemid, subType, amount, inBackpacks) then
Search for
Lua:
function NpcHandler:onSell(creature, itemid, subType, amount, ignoreCap, inBackpacks)
local cid = creature.uid
local callback = self:getCallback(CALLBACK_ONSELL)
if callback == nil or callback(cid, itemid, subType, amount, ignoreCap, inBackpacks) then
if self:processModuleCallback(CALLBACK_ONSELL, cid, itemid, subType, amount, ignoreCap, inBackpacks) then
Swap for
Lua:
function NpcHandler:onSell(creature, itemid, subType, amount, inBackpacks)
local cid = creature.uid
local callback = self:getCallback(CALLBACK_ONSELL)
if callback == nil or callback(cid, itemid, subType, amount, inBackpacks) then
if self:processModuleCallback(CALLBACK_ONSELL, cid, itemid, subType, amount, inBackpacks) then
Go on data/npc/lib/npc.lua
Search for
Lua:
function doNpcSellItem(cid, itemId, amount, subType, ignoreCap, inBackpacks, backpack)
Swap for
Lua:
function doNpcSellItem(cid, itemId, amount, subType, inBackpacks, backpack)
Search for
Lua:
return player:addItemEx(stuff, ignoreCap) ~= RETURNVALUE_NOERROR and 0 or amount, 0
Swap for
Lua:
return player:addItemEx(stuff) ~= RETURNVALUE_NOERROR and 0 or amount, 0
Search for
Lua:
if player:addItemEx(container, ignoreCap) ~= RETURNVALUE_NOERROR then
Swap for
Lua:
if player:addItemEx(container) ~= RETURNVALUE_NOERROR then
Search for
Lua:
if player:addItemEx(item, ignoreCap) ~= RETURNVALUE_NOERROR then
Swap for
Lua:
if player:addItemEx(item) ~= RETURNVALUE_NOERROR then
That way even the player who puts capacity to ignore will come the message that he has no capacity and will no longer fall to the ground.
Last edited: