TFS 0.X SubType missing for parameter item:

zexus

Member
Joined
Oct 1, 2016
Messages
93
Best answers
0
Reaction score
16
It shows everytime i open my server
Code:
[Warning] NpcSystem:
SubType missing for parameter item:
blank rune,2260,10
[Warning] NpcSystem:
SubType missing for parameter item:
blank rune,2260,10
[Warning] NpcSystem:
SubType missing for parameter item:
blank rune,2260,10
[Warning] NpcSystem:
SubType missing for parameter item:
antidote rune,2266,60
What the hell this means?

Idk when it starts, maybe when i add some npcs, i have no idea
should i add another parameter where have blank rune,2260,10 and antidote rune,2266,60?
what kinda?

if it is the problem how to search linux cmd to name files who have
antidote rune,2266,60
and
blank rune,2260,10
inside?
 

M0ustafa

Î Àm ŁĕğẹňĎ
Support Team
Joined
Mar 4, 2017
Messages
1,188
Best answers
142
Reaction score
431
Location
Egypt
It should be
Item name,ID,Price,Count;
So you should change all similar console errors like this example:
blank rune,2260,10,50;
"50" is the price in gold.
About searching in text files try this
and maybe just look in your Runes-NPC.xml it should be there.
 
OP
zexus

zexus

Member
Joined
Oct 1, 2016
Messages
93
Best answers
0
Reaction score
16
It should be
Item name,ID,Price,Count;
So you should change all similar console errors like this example:
blank rune,2260,10,50;
"50" is the price in gold.
About searching in text files try this
and maybe just look in your Runes-NPC.xml it should be there.
i tried as u said
Code:
blank rune,2260,10,1
no errors on console, but when i try to buy, if i have 10 gps, its okey, it buy only one (price shows 10gp)

but if i try to buy with more then 20 gps on bp it buy 2
even i'm selecting one
it buy 2 with 20 gps

if i have 100 gp on bp, try to buy 5, it buy 10
everytime 2x

there is something wrong in my data/npc/lib/npcsystem/modules.lua ?

Idk how it become to happen, maybe in the this commit the source owner made:
 

M0ustafa

Î Àm ŁĕğẹňĎ
Support Team
Joined
Mar 4, 2017
Messages
1,188
Best answers
142
Reaction score
431
Location
Egypt
Post your runes NPC .xml and .Lua scripts
 
OP
zexus

zexus

Member
Joined
Oct 1, 2016
Messages
93
Best answers
0
Reaction score
16
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Hyancith" script="data/npc/scripts/potshop.lua" skull="green" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="130" head="19" body="86" legs="87" feet="95" addons="0" />
    <parameters>
           <parameter key="message_greet" value="Hello |PLAYERNAME|. I do sell potions/wands/rods for gold coins by {trade} and I also have {offers} for event coins. {Some advices}: buy runes from players (Trade Channel/Market) or make yourself(maybe with makers) potions health regen are based on player level, runes health regen are based on player magic level"/>

        <parameter key="message_farewell" value="Good bye."/>
        <parameter key="message_walkaway" value="Farewell then.." />
      
        <parameter key="module_shop" value="1"/>
        <parameter key="shop_buyable" value="mana potion,7620,100;strong mana potion,7618,250;great mana potion,7618,500;health potion,7618,50;strong health potion,7618,100;great health potion,7618,250;ultimate health potion,7618,500;great spirit potion,8472,500;wand of vortex,2190,500;snakebite rod,2182,500;blank rune,2260,10,1"/>
        <parameter key="shop_sellable" value="empty vial,7636,5;blue book,1963,100"/>
    </parameters>
</npc>
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local Topic = {}
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
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 greetCallback(cid)
    Topic[cid] = nil
    return true
end
function creatureSayCallback(cid, type, msg)
   if (not npcHandler:isFocused(cid)) then return false end
    if(msgcontains(msg, 'offers')) then
       npcHandler:say('For event coins i upgrade your: {celestial staff} and {magic bow}', cid)
    elseif(msgcontains(msg, 'celestial staff')) then
       npcHandler:say('It will incresed the range and will add the option to select the staff element insted use only holy', cid)
       npcHandler:say('Do you want to upgrade your celestial for 30 event points?', cid)
       Topic[cid] = 1
    elseif(msgcontains(msg, 'magic bow')) then
       npcHandler:say('It will incresed the range and incressed the magic level bonus too', cid)
       npcHandler:say('Do you want to buy a horned star for 30 event points?', cid)
       Topic[cid] = 2
   elseif(msgcontains(msg, 'yes') and Topic[cid] > 0) then
           local EC = 6527
           local prevItemID = 0
           local newItemID = 0
           local quantidade = 0
           if(Topic[cid] == 1) then -- celestial staff
            quantidade = 30
            prevItemID = 2184
            newItemID = 12327
           elseif(Topic[cid] == 2) then -- magic bow
            quantidade = 30
            prevItemID = 8856
            newItemID = 8857
        end
        if getPlayerItemCount(cid, EC) < quantidade then
            selfSay('Sorry, you don\'t have enough Event Coins.', cid)
            return 1
        end
        doPlayerRemoveItem(cid, EC, quantidade)
        doPlayerRemoveItem(cid, prevItemID, 1)
        doPlayerAddItem(cid, newItemID, 1)
        selfSay('Here you are.', cid)
        talkState[talkUser] = 0
    end
    return true
end
   
npcHandler:setMessage(MESSAGE_SENDTRADE, "That are the items I sell for gold coins. I also have some {offers} for event coins.")
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
Last edited:
Top