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

TFS 1.X+ Attempt to call method 'onTradeRequest'

henkas

Well-Known Member
Joined
Jul 8, 2015
Messages
1,058
Solutions
5
Reaction score
62
Untitled.png

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Helmets Seller" script="default.lua" walkinterval="2000">
    <health now="100" max="100"/>
    <look type="453"/>
    <parameters>
        <parameter key="module_shop" value="1"/>
        <parameter key="message_greet" value="Hello |PLAYERNAME| {Trade}."/>
        <parameter key="shop_sellable" value="
            Magic Amulation,12630,100000;
            Knight Helmet,12631,350000;
            Magic Helmet,12632,4000000;
            Ninja Bandana,12634,10000
        "/>
    </parameters>
</npc>

default.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

npcHandler:addModule(FocusModule:new())
 
Still same really slow respond to "hi" and shows incorrect name of items
What is your test environment? Is the server local (is on the current pc or a vps) Are you running the default datapack & source or have you added or edited scripts or changed the sources?

I can't stress this enough!
When trying to find a solution to any given problem you have to give as much information as possible... Remember we are not sitting there with you.
 
What is your test environment? Is the server local (is on the current pc or a vps) Are you running the default datapack & source or have you added or edited scripts or changed the sources?

I can't stress this enough!
When trying to find a solution to any given problem you have to give as much information as possible... Remember we are not sitting there with you.
yes its on local so i have zero zero lag in game. Everything is default just now different npchandler
 
Did you try to change this in data/npc/lib/npcsystem/main.lua?
Code:
NPCHANDLER_TALKDELAY = TALKDELAY_ONTHINK

Change TALKDELAY_ONTHINK to TALKDELAY_NONE

You may need to change it the same way in npchandler.lua, not sure why it's twice.

It's NPC delay. The other problem you got, I have no idea.
 
Did you try to change this in data/npc/lib/npcsystem/main.lua?
Code:
NPCHANDLER_TALKDELAY = TALKDELAY_ONTHINK

Change TALKDELAY_ONTHINK to TALKDELAY_NONE

You may need to change it the same way in npchandler.lua, not sure why it's twice.

It's NPC delay. The other problem you got, I have no idea.
Amm i dont have main.lua, lmfao.
 
Back
Top