• 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+ Strange console error

Lbtg

Intermediate OT User
Joined
Nov 22, 2008
Messages
2,306
Reaction score
129
Hello, so i added npc that buys items from players, like djin etc..


and in console this errors popped up

Lua:
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (dwarven shield)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (iron helmet)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (jacket)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (leather armor)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (leather boots)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (leather helmet)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (leather legs)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (legion helmet)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (plate armor)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (plate legs)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (plate shield)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (scale armor)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (small axe)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (soldier helmet)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (steel helmet)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (steel shield)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (studded armor)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (studded helmet)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (studded legs)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (studded shield)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (swampling club)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (viking helmet)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (viking shield)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (wooden shield)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (fire sword)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (spike sword)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (war hammer)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (castle shield)
[Warning : Sira'ns] NpcSystem: Sell price higher than buy price: (dreaded cleaver)


The funny thing is that npc doesnt sell anything and you cant buy a thing from it.... Only sell items, and this strange error came lol...

Any advice please ?

Npc file in case

Lua:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Sira'ns" script="default.lua" walkinterval="1500" speed="100" walkradius="2" floorchange="0" speechbubble="2">
    <health max="100" now="100"/>
    <look type="1424" head="44" body="44" legs="44" feet="44" addons="0" mount="0"/>
    <parameters>
        <parameter key="module_shop" value="1"/>
        <parameter key="shop_sellable" value="
            abyss hammer, 7414, 20000;
            amber staff, 7426, 8000;
            ancient amulet, 2142, 200;
            assassin dagger, 7404, 20000;
            bandana, 5917, 150;
            beastslayer axe, 3962, 1500;
            beetle necklace, 11374, 1500;
            berserker, 7403, 40000;
            blacksteel sword, 7406, 6000;
            blessed sceptre, 7429, 40000;
            bone shield, 2541, 80;
            bonelord helmet, 3972, 7500;
            brutetamer's staff, 7379, 1500;
            buckle, 20109, 7000;
            castle shield, 2535, 5000;
            chain bolter, 8850, 40000;
            chaos mace, 7427, 9000;
            cobra crown, 12630, 50000;
            coconut shoes, 9931, 500;
            composite hornbow, 8855, 25000;
            cranial basher, 7415, 30000;
            crocodile boots, 3982, 1000;
            crystal crossbow, 18453, 35000;
            crystal mace, 2445, 12000;
            crystal necklace, 2125, 400;
            crystal ring, 2124, 250;
            crystal sword, 7449, 600;
            crystalline armor, 8878, 16000;
            daramian mace, 2439, 110;
            daramian waraxe, 2440, 1000;
            dark shield, 2521, 400;
            death ring, 6300, 1000;
            demon shield, 2520, 30000;
            demonbone amulet, 2136, 32000;
            demonrage sword, 7382, 36000;
            devil helmet, 2462, 1000;
            diamond sceptre, 7387, 3000;
            divine plate, 8885, 55000;
            djinn blade, 2451, 15000;
            doll, 2110, 200;
            dragon scale mail, 2492, 40000;
            dragon slayer, 7402, 15000;
            dragonbone staff, 7430, 3000;
            dreaded cleaver, 7419, 10000;
            dwarven armor, 2503, 30000;
            earth cranial basher, 7866, 30000;
            earth dragon slayer, 7858, 15000;
            earth headchopper, 7862, 6000;
            earth heroic axe, 7861, 30000;
            earth mystic blade, 7856, 30000;
            earth orcish maul, 7867, 6000;
            earth relic sword, 7855, 25000;
            earth war axe, 7863, 12000;
            elvish bow, 7438, 2000;
            emerald bangle, 2127, 800;
            energy cranial basher, 7881, 30000;
            energy dragon slayer, 7873, 15000;
            energy headchopper, 7877, 6000;
            energy heroic axe, 7876, 30000;
            energy mystic blade, 7871, 30000;
            energy orcish maul, 7882, 6000;
            energy relic sword, 7870, 25000;
            energy war axe, 7878, 12000;
            epee, 2438, 8000;
            fiery cranial basher, 7756, 30000;
            fiery dragon slayer, 7748, 15000;
            fiery headchopper, 7752, 6000;
            fiery heroic axe, 7751, 30000;
            fiery mystic blade, 7746, 30000;
            fiery orcish maul, 7757, 6000;
            fiery relic sword, 7745, 25000;
            fiery war axe, 7753, 12000;
            flower dress, 9929, 1000;
            flower wreath, 9927, 500;
            fur boots, 7457, 2000;
            furry club, 7432, 1000;
            glacier amulet, 7888, 1500;
            glacier kilt, 7896, 11000;
            glacier mask, 7902, 2500;
            glacier robe, 7897, 11000;
            glacier shoes, 7892, 2500;
            gold ring, 2179, 8000;
            golden armor, 2466, 20000;
            golden legs, 2470, 30000;
            guardian halberd, 2427, 11000;
            hammer of wrath, 2444, 30000;
            headchopper, 7380, 6000;
            heavy mace, 2452, 50000;
            heavy machete, 2442, 90;
            heavy trident, 13838, 2000;
            helmet of the lost, 20132, 2000;
            heroic axe, 7389, 30000;
            hibiscus dress, 8873, 3000;
            icy blacksteel sword, 7766, 6000;
            icy cranial basher, 7775, 30000;
            icy dragon slayer, 7767, 15000;
            icy headchopper, 7771, 6000;
            icy heroic axe, 7770, 30000;
            icy mystic blade, 7765, 30000;
            icy orcish maul, 7776, 6000;
            icy relic sword, 7764, 25000;
            icy war axe, 7772, 12000;
            jade hammer, 7422, 25000;
            krimhorn helmet, 7461, 200;
            lavos armor, 8877, 16000;
            leaf legs, 9928, 500;
            leopard armor, 3968, 1000;
            leviathan's amulet, 10220, 3000;
            light shovel, 5710, 300;
            lightning boots, 7893, 2500;
            lightning headband, 7901, 2500;
            lightning legs, 7895, 11000;
            lightning pendant, 7889, 1500;
            lightning robe, 7898, 11000;
            lunar staff, 7424, 5000;
            magic plate armor, 2472, 90000;
            magma amulet, 7890, 1500;
            magma boots, 7891, 2500;
            magma coat, 7899, 11000;
            magma legs, 7894, 11000;
            magma monocle, 7900, 2500;
            mammoth fur cape, 7463, 6000;
            mammoth fur shorts, 7464, 850;
            mammoth whopper, 7381, 300;
            mastermind shield, 2514, 50000;
            medusa shield, 2536, 9000;
            mercenary sword, 7386, 12000;
            mycological bow, 18454, 35000;
            mystic blade, 7384, 30000;
            naginata, 2426, 2000;
            nightmare blade, 7418, 35000;
            noble axe, 7456, 10000;
            norse shield, 7460, 1500;
            orcish maul, 7392, 6000;
            pair of iron fists, 20108, 4000;
            paladin armor, 8891, 15000;
            patched boots, 2641, 2000;
            pharaoh sword, 2446, 23000;
            pirate boots, 5462, 3000;
            pirate hat, 6096, 1000;
            pirate knee breeches, 5918, 200;
            pirate shirt, 6095, 500;
            pirate voodoo doll, 5810, 500;
            platinum amulet, 2171, 2500;
            ragnir helmet, 7462, 400;
            relic sword, 7383, 25000;
            ring of the sky, 2123, 30000;
            royal axe, 7434, 40000;
            ruby necklace, 2133, 2000;
            ruthless axe, 6553, 45000;
            sacred tree amulet, 10219, 3000;
            sapphire hammer, 7437, 7000;
            scarab amulet, 2135, 200;
            scarab shield, 2540, 2000;
            shockwave amulet, 10221, 3000;
            silver brooch, 2134, 150;
            silver dagger, 2402, 500;
            skull helmet, 5741, 40000;
            skullcracker armor, 8889, 18000;
            spiked squelcher, 7452, 5000;
            steel boots, 2645, 30000;
            swamplair armor, 8880, 16000;
            taurus mace, 7425, 500;
            tempest shield, 2542, 35000;
            terra amulet, 7887, 1500;
            terra boots, 7886, 2500;
            terra hood, 7903, 2500;
            terra legs, 7885, 11000;
            terra mantle, 7884, 11000;
            the justice seeker, 7390, 40000;
            tortoise shield, 6131, 150;
            vile axe, 7388, 30000;
            voodoo doll, 2322, 400;
            war axe, 2454, 12000;
            war horn, 2079, 8000;
            witch hat, 10570, 5000;
            wyvern fang, 7408, 1500;
            axe,2386,7;
            battle axe,2378,80;
            battle hammer,2417,120;
            battle shield,2513,95;
            bone club,2449,5;
            bone sword,2450,20;
            brass armor,2465,150;
            brass helmet,2460,30;
            brass legs,2478,49;
            brass shield,2511,25;
            carlin sword,2395,118;
            chain armor,2464,70;
            chain helmet,2458,17;
            chain legs,2648,25;
            club,2382,1;
            coat,2651,1;
            copper shield,2530,50;
            crowbar,2416,50;
            dagger,2379,2;
            double axe,2387,260;
            doublet,2485,3;
            dwarven shield,2525,100;
            fire sword,2392,1000;
            halberd,2381,400;
            hand axe,2380,4;
            hatchet,2388,25;
            iron helmet,2459,150;
            jacket,2650,1;
            katana,2412,35;
            leather armor,2467,12;
            leather boots,2643,2;
            leather helmet,2461,4;
            leather legs,2649,9;
            legion helmet,2480,22;
            longsword,2397,51;
            mace,2398,30;
            morning star,2394,100;
            orcish axe,2428,350;
            plate armor,2463,400;
            plate legs,2647,115;
            plate shield,2510,45;
            rapier,2384,5;
            sabre,2385,12;
            scale armor,2483,75;
            short sword,2406,10;
            sickle,2405,3;
            small axe,2559,5;
            soldier helmet,2481,16;
            spike sword,2383,240;
            steel helmet,2457,293;
            steel shield,2509,80;
            studded armor,2484,25;
            studded club,2448,10;
            studded helmet,2482,20;
            studded legs,2468,15;
            studded shield,2526,16;
            swampling club,20104,40;
            sword,2376,25;
            throwing knife,2410,2;
            two handed sword,2377,450;
            viking helmet,2473,66;
            viking shield,2531,85;
            war hammer,2391,470;
            wooden shield,2512,5;
            Calopteryx Cape,15489,15000;
            Carapace Shield,15491,32000;
            Closed Trap,2578,75;
            Crowbar,2416,50;
            Deepling Axe,15404,40000;
            Deepling Squelcher,15647,7000;
            Deepling Staff,15400,4000;
            Depth Calcei,15410,25000;
            Depth Galea,15408,35000;
            Depth Lorica,15407,30000;
            Depth Ocrea,15409,16000;
            Depth Scutum,15411,36000;
            Fishing Rod,2580,40;
            Grasshopper Legs,15490,15000;
            Guardian Axe,15454,9000;
            Hive Bow,15643,28000;
            Hive Scythe,15492,17000;
            Machete,2420,6;
            Necklace of the Deep,15403,3000;
            Ornate Chestplate,15406,60000;
            Ornate Crossbow,15644,12000;
            Ornate Legs,15412,40000;
            Ornate Mace,15414,42000;
            Ornate Shield,15413,42000;
            Pick,2553,15;
            Rope,2120,15;
            Scythe,2550,10;
            Shovel,2554,8;
            Warrior's Axe,15451,11000;
            Warrior's Shield,15453,9000;
            Watch,2036,6;
            Wooden Hammer,2556,15;
            Axe,2386,7;
            Battle Axe,2378,80;
            Battle Hammer,2417,120;
            Bone Club,2449,5;
            Bone Sword,2450,20;
            Carlin Sword,2395,118;
            Club,2382,1;
            Crowbar,2416,50;
            Dagger,2379,2;
            Double Axe,2387,260;
            Fire Sword,2392,1000;
            Halberd,2381,400;
            Hand Axe,2380,4;
            Hatchet,2388,25;
            Katana,2412,35;
            Longsword,2397,51;
            Mace,2398,30;
            Morning Star,2394,100;
            Orcish Axe,2428,350;
            Rapier,2384,5;
            Sabre,2385,12;
            Short Sword,2406,10;
            Sickle,2405,3;
            Spike Sword,2383,240;
            Studded Club,2448,10;
            Sword,2376,25;
            Throwing Knife,2410,2;
            Two Handed Sword,2377,450;
            War Hammer,2391,470;
            Battle Shield,2513,95;
            Brass Armor,2465,150;
            Brass Helmet,2460,30;
            Brass Legs,2478,49;
            Brass Shield,2511,25;
            Chain Armor,2464,70;
            Chain Helmet,2458,17;
            Chain Legs,2648,25;
            Coat,2651,1;
            Copper Shield,2530,50;
            Doublet,2485,3;
            Dwarven Shield,2525,100;
            Iron Helmet,2459,150;
            Jacket,2650,1;
            Leather Armor,2467,12;
            Leather Boots,2643,2;
            Leather Helmet,2461,4;
            Leather Legs,2649,9;
            Legion Helmet,2480,22;
            Plate Armor,2463,400;
            Plate Legs,2647,115;
            Plate Shield,2510,45;
            Scale Armor,2483,75;
            Small Axe,2559,5;
            Soldier Helmet,2481,16;
            Steel Helmet,2457,293;
            Steel Shield,2509,80;
            Studded Armor,2484,25;
            Studded Helmet,2482,20;
            Studded Legs,2468,15;
            Studded Shield,2526,16;
            Swampling Club,20104,40;
            Viking Helmet,2473,66;
            Viking Shield,2531,85;
            Wooden Shield,2512,5;
            Bow,2456,100;
            Crossbow,2455,120;
            Spear,2389,3;
            Compound Eye,15486,150;
            Crawler Head Plating,15482,210;
            Deepling Breaktime Snack,15424,90;
            Deepling Claw,15455,430;
            Deepling Guard Belt Buckle,15423,230;
            Deepling Ridge,15452,360;
            Deepling Scales,15430,80;
            Deepling Warts,15425,180;
            Deeptags,15426,290;
            Dung Ball,15622,130;
            Eye of a Deepling,13870,150;
            Key to the Drowned Library,15422,330;
            Kollos Shell,15480,420;
            Spellsinger's Seal,15421,280;
            Spidris Mandible,15485,450;
            Spitter Nose,15481,340;
            Swarmer Antenna,15479,130;
            Waspoid Claw,15483,320;
            Waspoid Wing,15484,190;
            angelic axe, 7436, 5000;
            blue robe, 2656, 10000;
            bonelord shield, 2518, 1200;
            boots of haste, 2195, 30000;
            broadsword, 2413, 500;
            butcher's axe, 7412, 18000;
            crown armor, 2487, 12000;
            crown helmet, 2491, 2500;
            crown legs, 2488, 12000;
            crown shield, 2519, 8000;
            crusader helmet, 2497, 6000;
            dragon lance, 2414, 9000;
            dragon shield, 2516, 4000;
            earth spike sword, 7854, 1000;
            earth war hammer, 7868, 1200;
            energy spike sword, 7869, 1000;
            energy war hammer, 7883, 1200;
            fiery spike sword, 7744, 1000;
            fiery war hammer, 7758, 1200;
            fire axe, 2432, 8000;
            fire sword, 2392, 4000;
            glorious axe, 7454, 3000;
            guardian shield, 2515, 2000;
            ice rapier, 2396, 1000;
            icy spike sword, 7763, 1000;
            icy war hammer, 7777, 1200;
            noble armor, 2486, 900;
            obsidian lance, 2425, 500;
            phoenix shield, 2539, 16000;
            queen's sceptre, 7410, 20000;
            royal helmet, 2498, 30000;
            shadow sceptre, 7451, 10000;
            spike sword, 2383, 1000;
            thaian sword, 7391, 16000;
            war hammer, 2391, 1200;
                        axe ring, 2208, 100;
            club ring, 2209, 100;
            power ring, 2166, 50;
            stealth ring, 2165, 200;
            sword ring, 2207, 100;
            bronze amulet, 2172, 50;
            garlic necklace, 2199, 50;
            elven amulet, 2198, 100;
            stone skin amulet, 2197, 500;
            wand of cosmic energy, 2189, 2000;
            wand of decay, 2188, 1000;
            wand of defiance, 18390, 6500;
            wand of everblazing, 18409, 6000;
            wand of dragonbreath, 2191, 200;
            wand of inferno, 2187, 3000;
            wand of vortex, 2190, 100;
            wand of draconia, 8921, 1500;
            wand of starstorm, 8920, 3600;
            wand of voodoo, 8922, 4400;
            magic light wand, 2162, 35;
            life crystal, 4851, 50;
            mind stone, 2178, 100;
            orb, 2176, 750;
            ancient shield, 2535, 900;
            dark armor, 2489, 400;
            dark helmet, 2490, 250;
            serpent sword, 2409, 900;
            black shield, 2529, 800;
            bonebreaker, 7428, 10000;
            dragon hammer, 2434, 2000;
            dreaded cleaver, 7419, 15000;
            earth knight axe, 7860, 2000;
            energy knight axe, 7875, 2000;
            fiery knight axe, 7750, 2000;
            giant sword, 2393, 17000;
            haunted blade, 7407, 8000;
            icy knight axe, 7769, 2000;
            knight armor, 2476, 5000;
            knight axe, 2430, 2000;
            knight legs, 2477, 5000;
            mystic turban, 2663, 150;
            onyx flail, 7421, 22000;
            ornamented axe, 7411, 20000;
            poison dagger, 2411, 50;
            skull staff, 2436, 6000;
            strange helmet, 2479, 500;
            titan axe, 7413, 4000;
            tower shield, 2528, 8000;
            vampire shield, 2534, 15000;
            warrior helmet, 2475, 5000"/>
    </parameters>
</npc>
 
Solution
E
have you noticed that you have duplicated items in your list? for example: leather armor appears 2 times... and so forth
From the looks of it, it is only specific items in the list that are erroring, right?

If you put the price of those specific items to like 100000, does the error go away?

If yes, then there might be another npc in your files that has those items in their list as buyable.

You can go through the files manually and check, or you use something like notepad++ and search the directory for the itemid.

--

That's my best guess anyway.
 
From the looks of it, it is only specific items in the list that are erroring, right?

If you put the price of those specific items to like 100000, does the error go away?

If yes, then there might be another npc in your files that has those items in their list as buyable.

You can go through the files manually and check, or you use something like notepad++ and search the directory for the itemid.

--

That's my best guess anyway.
cheking
 
fwiw, putting the sell price higher to 100000 was backwards logic. xD
You'd want to put it as low as possible in this case. So put it at 1, instead of 100000. lol
 
From the looks of it, it is only specific items in the list that are erroring, right?

If you put the price of those specific items to like 100000, does the error go away?

If yes, then there might be another npc in your files that has those items in their list as buyable.

You can go through the files manually and check, or you use something like notepad++ and search the directory for the itemid.

--

That's my best guess anyway.
I do not have any other npc that buys or sells those items, i am using fresh tfs and building up new project got just few npcs.


Changed prices to 1000000, same errors anyway... Very strange
Post automatically merged:

fwiw, putting the sell price higher to 100000 was backwards logic. xD
You'd want to put it as low as possible in this case. So put it at 1, instead of 100000. lol
changed price to 1, but anyway same errors...
lame lol wtf
 
I do not have any other npc that buys or sells those items, i am using fresh tfs and building up new project got just few npcs.


Changed prices to 1000000, same errors anyway... Very strange
Post automatically merged:


changed price to 1, but anyway same errors...
lame lol wtf
Actually I see the issue now.

All of those items are in your list twice.

remove all the duplicate item entries and your problem will be solved. xD
 
have you noticed that you have duplicated items in your list? for example: leather armor appears 2 times... and so forth
Okey , problem found it was LAME ME :D Thanks for opening my eyes bro <3
Post automatically merged:

Actually I see the issue now.

All of those items are in your list twice.

remove all the duplicate item entries and your problem will be solved. xD
Thanks for your time to brother <3
 
Okey , problem found it was LAME ME :D Thanks for opening my eyes bro <3
Post automatically merged:


Thanks for your time to brother <3
There was some weird logic for finding duplicate itemids in the npc modules, so I've updated it to detect duplicate entries properly.

replace your modules with this new one.

data/npc/lib/npcsystem/modules.lua
 

Attachments

There was some weird logic for finding duplicate itemids in the npc modules, so I've updated it to detect duplicate entries properly.

replace your modules with this new one.

data/npc/lib/npcsystem/modules.lua
So this is the same 1.3 tfs 10.98 client npc modules, just you edited it ?
 
So this is the same 1.3 tfs 10.98 client npc modules, just you edited it ?
correct.

There's going to be a github push of this updated modules, so the main repo will eventually have the changes as well, whenever it's approved.
 
correct.

There's going to be a github push of this updated modules, so the main repo will eventually have the changes as well, whenever it's approved.
Oke, will add it later, and tell if anything bad will pop up. thanks
 
Back
Top