What's new

potrzebuje NPC Djin

Status
Not open for further replies.

Nikke

Active User
Joined
Jul 25, 2008
Messages
99
Reaction score
1
potrzebuje NPC Djin kt?ry kupuje wszystko !!! .Mam silnik TFS 0.3.4 Tibia 8.42.
?eby ceny by?y jak na RL Tibi
 

Sassin

Forum friend
Joined
Jun 13, 2009
Messages
1,281
Reaction score
107
Odp: potrzebuje NPC Djin

<npc name="Nah'bob" script="data/npc/scripts/vip loot.lua" walkinterval="25" floorchange="0" access="3" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="80" head="114" body="94" legs="19" feet="0" addons="3" corpse="2212"/>

<parameters>

<parameter key="module_shop" value="1" />
<parameter key="message_greet" value="Hello |PLAYERNAME|. I buy swords, axes, clubs, armors, helmets, legs, boots, shields, wands and rods" />
<parameter key="shop_sellable" value="dragon hammer,2434,6000;mastermind shield,2514,300000;magic plate armor,2472,500000;golden legs,2470,300000;demon helmet,2493,300000;giant sword,2393,60000;knight axe,2430,5000;poison dagger,2411,50;scimitar,2419,150;serpent sword,2409,900;skull staff,2436,10000;dragon lance,2414,85000;fire axe,2432,40000;fire sword,2392,18000;war hammer,2391,1200;spike sword,2383,1000;ice rapier,2396,1000;broad sword,2413,500;obsidian lance,2425,500;dragon slayer,7402,15000;war axe,2454,9000;amber staff,7426,8000;sapphire hammer,7437,2000;lunar staff,7424,5000;diamond sceptre,7387,3000;dragonbone staff,7430,6000;beastslayer axe,3962,1500;brutetamer's staff,7379,1500;wyvern fang,7408,1500;daramanian waraxe,2440,1000;furry club,27432,1000;crystal sword,7449,600;taurus mace,7425,500;silver dagger,2402,500;mammoth whopper,7381,300;daramanian mace,2439,110;heavy machete,2442,90;crown armor,2487,20000;blue robe,2656,47000;noble armor,2486,900;dark armor,2489,400;knight armor,2476,20000;dragon scale mail,2492,230000;golden armor,2466,130000;mammoth fur cape,7463,6000;leopard armor,3968,1000;pirate shirt,605,500;royal helmet,2498,80000;crusader helmet,2497,6000;crown helmet,2491,5000;dark helmet,2490,250;mystic turban,2663,150;strange helmet,2479,500;warrior helmet,2475,5000;skull helmet,5741,80000;beholder helmet,3972,7500;devil helmet,2462,1000;pirate hat,6096,1000;ragnir helmet,7462,400;krimhorn helmet,7461,200;crown legs,2488,18008;boots of haste,2195,80000;knight legs,2477,20000;steel boots,2645,100000;pirate boots,5462,2000;fur boots,7457,2000;crocodile boots,3982,1000;pirate knee breeches,5918,200;phoenix shield,2539,16000;crown shield,2519,20000;dragon shield,2516,10000;guardian shield,2515,2000;beholder shield,2518,1200;ancient shield,2532,900;black shield,2529,800;tower shield,2528,18000;vampire shield,2534,55000;demon shield,2520,100000;medusa shield,2536,18000;castle shield,2535,5000;scarab shield,2540,2000;dark shield,2521,400;tortoise shield,6131,150;bone shield,2541,80;magic lightwand,2162,30;wand of vortex,2190,100;wand of dragonbreath,2191,200;wand of plague,2188,1000;wand of cosmic energy,2189,2000;wand of inferno,2187,3000;tempest rod,2183,3000;moonlight rod,2186,200;snakebite rod,2182,100;volcanic rod,2185,1000;quarmire rod,2181,2000;war hammer,2391,10000;spike sword,2383,8000;noble armor,2486,8000;beholder shield,2518,7000;ice rapier,2396,5000;serpent sword,2409,6000;dark armor,2489,1500;dark helmet,2490,1000;ancient shield,2532,5000;" />"
</parameters>

</npc>
i
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandler:eek:nCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:eek:nCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:eek:nCreatureSay(cid, type, msg) end
function onThink() npcHandler:eek:nThink() end
-- OTServ event handling functions end

-- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!
keywordHandler:addKeyword({'clubs'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy dragon hammers(2k), skull staffs(6k), war hammers(1.2k), dragonbone staffs(3k) and daramanian maces(110gp). I also buy amber staffs(8k), sapphire hammers(2k), brutetamer\s staff(1.5k), furry clubs(1k), taurus maces(500gp), lunar staffs(5k), mammoth whoppers(300gp) and diamond sceptres(3k).'})
keywordHandler:addKeyword({'axes'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy knight axes(2k), dragon lances(9k), fira axes (8k), obsidian lances(500gp), war axes(9k) and daramanian waraxes (1k). I also buy beastslayer axe(1.5k).'})
keywordHandler:addKeyword({'swords'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy giant swords (17k), poison daggers (50gp), scimiteras (150gp), serpent sword (900gp), fire sword (4k), spike swords(1k), ice rapiers(1k), broad swords(500gp), dragon slayers(15k), wyvern fang(1.5k), silver dagger(500gp) and heavy machetes(90gp).'})
keywordHandler:addKeyword({'wands'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy magic lightwands(30gp), wand of vortexes(100gp), wand of dragonbreaths(200gp), wand of plagues(1k), wand of cosmic energys(2k) and wand if infernoes(3k).'})
keywordHandler:addKeyword({'rods'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy snakebite rods(100gp), moonlight rods(200gp), volcanic rods(1k), quarmire rods(2k) and tempest rods(3k).'})
keywordHandler:addKeyword({'boots'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy boots of hastes(30k), steel boots(30k), pirate boots(2k) and crocodile boots(1k). I also buy fur boots(2k).'})
keywordHandler:addKeyword({'armors'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy crown armors(12k), blue robes(10k), noble armors(900gp), dark armors(400gp), knight armors(5k), dragon scale mails(40k), golden armors(20k) and pirate scirts(500gp). I also buy mammoth fur capes(6k), leopard armors(1k).'})
keywordHandler:addKeyword({'legs'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy crown legs(12k), knight legs(5k) and pirate knee breeches(200gp).'})
keywordHandler:addKeyword({'shields'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy phoenix shields(16k), crown shields(8k), dragon shields(4k), guardian shields(2k), beholder shields(1.2k), ancient shields(900gp), black shields, tower shields(8k), vampire shields(15k), demon shields(30k), medusa shields(9k), castle shields(5k), scarab shields(2k), dark shields(400gp), tortoise shields(150gp) and bone shields(80gp).'})
keywordHandler:addKeyword({'helmets'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy royal(30k), crusader(6k), crown(2.5k), dark(250gp), strange(500gp), warrior(5k), skull(40k), beholder(7.5k), devil(1k), ragnir(400gp) and krimhorn(200gp). I also buy mystic turbans(150gp) and pirate hats(1k).'})

-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())
My?l? ?e jak kto? prosi o npc to wie jak go doda? wiec masz i powodzenia :D
 

Nikke

Active User
Joined
Jul 25, 2008
Messages
99
Reaction score
1
Odp: potrzebuje NPC Djin

Ten NPC nie dzia?a mi wychodzi b??d w konsoli
[03/07/2009 12:03:11] data/npc/scripts/vip loot.lua:9: attempt to call global 'npcHandlernThink' (a nil value)
[03/07/2009 12:03:11] stack traceback:
[03/07/2009 12:03:11] data/npc/scripts/vip loot.lua:9: in function <data/npc/scripts/vip loot.lua:9>
 
Last edited:

Nikke

Active User
Joined
Jul 25, 2008
Messages
99
Reaction score
1
Odp: potrzebuje NPC Djin

~~~~od?wie?am~~~~
 

Viper xD

Senior User
Joined
Jun 22, 2009
Messages
693
Reaction score
110
Odp: potrzebuje NPC Djin

Data/npc/Djinn.xml

<npc name="Djinn Item Buyer" script="data/npc/scripts/djinn.lua" walkinterval="25" floorchange="0" access="5" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="80" head="114" body="94" legs="19" feet="0" addons="3" corpse="2212"/>
<parameters>
<parameter key="module_shop" value="1" />
<parameter key="shop_buyable" value="fire sword,2392,5000;crossbow,2455,360;bow,2456,200;ancient amulet,2142,500;demonbone amulet,2136,1000;dragon necklace,2201,900;elven amulet,2198,700;golden amulet,2130,6600;paw amulet,2218,1000;platinum amulet,2171,2000;protection amulet,2200,800;scarab amulet,2135,1100;scarf,2661,300;silver amulet,2170,500;stone skin amulet,2197,350;strange talisman,2161,700;terra amulet,7887,600;wolf tooth chain,2129,100;axe ring,2208,150;club ring,2209,150;crystal ring,2124,500;death ring,6300,100;dwarven ring,2213,1000;energy ring,2167,180;gold ring,2179,500;life ring,2168,200;might ring,2164,170;power ring,2166,150;ring of the sky,2123,100;ring of healing,2214,200;stealth ring,2165,200;sword ring,2207,150;time ring,2169,300;wedding ring,2121,1000;party cake,6280,50;blueberry,2677,1;cherry,2679,3;strawberry,2680,4;candy cane,2688,4;cookie,2687,2;shrimp,2670,4;red mushroom,2788,4;mango,5097,4;green mushroom,2796,4;carrot,2684,4;roll,2690,5;tomato,2685,5;egg,2695,5;brown bread,2691,5;banana,2676,4;cheese,2696,3;grapes,2681,4;salmon,2668,5;cake,6278,10;bread,2689,5;valentine's,6393,30;fish,2667,4;orange,2675,4;decorated,6279,20;meat,2666,4;cream,6394,10;pumpkin,2683,10;melon,2682,5;brown mushroom,2789,6;dragon ham,2672,10;fire mushroom,2795,20;post officers hat,2665,100;bandana,5917,50;santa hat,6531,3000;magician hat,2323,1000;mystic turban,2663,15000;leather helmet,2461,10;party hat,6578,1000;helmet of the deep,5461,5000;dark helmet,2490,400;amazon helmet,2499,60000;devil helmet,2462,600;crown helmet,2491,2000;warrior helmet,2475,4000;skull helmet,5741,5000;royal helmet,2498,40000;horned helmet,2496,100000;terra legs,7885,100;pirate knee breeches,5918,10;brass legs,2478,200;plate legs,2647,500;blue legs,7730,1500;lightning legs,7895,2000;crown legs,2488,2000;knight legs,2477,5000;magma legs,7894,5000;golden legs,2470,80000;sandals,2642,10;boots of haste,2195,30000;crocodile boots,3982,200;terra boots,7886,1000;lightning boots,7893,1000;magma boots,7891,1000;fur boots,7457,1000;steel boots,2645,40000;dwarven armor,2503,3000;noble armor,2486,2000;blue robe,2656,10000;magma coat,7899,10000;lightning robe,7898,10000;knight armor,2476,5000;amazon armor,2500,7000;crown armor,2487,20000;golden armor,2466,30000;dragon scale mail,2492,60000;magic plate armor,2472,100000;snakebite rod,2182,500;moonlight rod,2186,1000;necrotic rod,2185,5000;hailstorm rod,2183,15000;wand of vortex,2190,500;wand of dragonbreath,2191,1000;wand of decay,2188,5000;wand of cosmic energy,2189,10000;wand of inferno,2187,15000;sniper arrow,7364,7;infernal bolt,6529,100000;bow,2456,400;onyx arrow,7365,10;shiver arrow,7839,10;flaming arrow,7840,10;flash arrow,7838,10;power bolt,2547,6;earth arrow,7850,15;crossbow,2455,360;burst arrow,2546,15;poison arrow,2545,10;bolt,2543,3;throwing knife,2410,25;viper star,7366,45;throwing star,2399,50;hunting spear,3965,50;royal spear,7378,35;enchanted spear,7367,50;assassin star,7368,100000;dragon shield,2516,1000;amazon shield,2537,3000;crown shield,2519,5000;tower shield,2528,5000;medusa shield,2536,5000;vampire shield,2534,15000;phoenix shield,2539,16000;demon shield,2520,40000;mastermind shield,2514,80000;serpent sword,2409,2000;crimson sword,7385,2500;wyvern fang,7408,3000;bright sword,2407,20000;demonrage sword,7382,40000;djinn blade,2451,30000;relic sword,7383,50000;giant sword,2393,10000;shenlong sword,7405,90000;ice rapier,2396,5000000;knight axe,2430,5000;obsidian lance,2425,3000;halberd,2381,800;double axe,2387,800;fire axe,2432,10000;dreaded cleaver,7419,11000;vile axe,7388,13000;heroic axe,7389,20000;royal axe,7434,50000;dragon lance,2414,10000;war axe,2454,20000;clerical mace,2423,1000;dragon hammer,2434,4000;dragonbone staff,7430,3000;skull staff,2436,6000;crystal mace,2445,60000;lich staff,3961,80000;war hammer,2391,5000;golden mace,2437,170000;hammer of wrath,2444,40000;chaos mace,7427,25000;white pearl,2143,200;orchidalcum pearl,5022,300;black pearl,2144,350;small diamond,2145,150;small sapphire,2146,150;small ruby,2147,300;small emerald,2149,150;small amethyst,2150,150;talon,2151,40;" />
</parameters>
</npc>


Data/npc/scripts/djinn.lua

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandler:eek:nCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:eek:nCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:eek:nCreatureSay(cid, type, msg) end
function onThink() npcHandler:eek:nThink() end
-- OTServ event handling functions end
npcHandler:addModule(FocusModule:new())

Powinno zadzialac.Napisz czy zadzialalo jak skonczysz
 
Last edited:

Ovner

Senior User
Joined
Jun 21, 2009
Messages
528
Reaction score
54
Age
31
Odp: potrzebuje NPC Djin

Nikke <^ Napisz mo?e jakie b??dy Ci skacz? to zapewne postaram Ci si? pom?c ;).
 

Nikke

Active User
Joined
Jul 25, 2008
Messages
99
Reaction score
1
Odp: potrzebuje NPC Djin

To jest pierwszy b??d jak si? uruchamia silnik:
[Notice - Npc::Npc] NPC Name: Djinn - autowalk has been deprecated, use walkinterval.

A to wychodzi p??niej i wyskakuje ca?y czas:
[05/07/2009 10:19:37] data/npc/scripts/Djinn.lua:8: attempt to call global 'npcHandlernThink' (a nil value)
[05/07/2009 10:19:37] stack traceback:
[05/07/2009 10:19:37] data/npc/scripts/Djinn.lua:8: in function <data/npc/scripts/Djinn.lua:8>
 

Nikke

Active User
Joined
Jul 25, 2008
Messages
99
Reaction score
1
Odp: potrzebuje NPC Djin

~~~~od?wie?am~~~~
 

Ovner

Senior User
Joined
Jun 21, 2009
Messages
528
Reaction score
54
Age
31
Odp: potrzebuje NPC Djin

Kt?rego u?ywasz z tych npck?w.
Pierwszy czy ten drugi co poda? Ci Viper xD ?
Napisz, a pomog?.
 

Nikke

Active User
Joined
Jul 25, 2008
Messages
99
Reaction score
1
Odp: potrzebuje NPC Djin

Ten drugi co poda? Viper xD
 

Viper xD

Senior User
Joined
Jun 22, 2009
Messages
693
Reaction score
110
Odp: potrzebuje NPC Djin

(chyba) naprawilem pierwszy problem,skopiuj to co jest teraz na gorze ode mnie i pierwszy blad powinien zniknac.Reszte ci poprawi ovner bo to skrypter;p a ja sie nie znam;/
 

Ovner

Senior User
Joined
Jun 21, 2009
Messages
528
Reaction score
54
Age
31
Odp: potrzebuje NPC Djin

Masz spr?buj to -

Tu skrypt .lua -
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Rashid" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0">
	<health now="100" max="100"/>
	<look type="146" head="12" body="101" legs="122" feet="115" addons="2"/>
	<parameters>
		<parameter key="module_shop" value="1"/>
		<parameter key="shop_sellable" value="fire sword,2392,5000;crossbow,2455,360;bow,2456,200;anc ient amulet,2142,500;demonbone amulet,2136,1000;dragon necklace,2201,900;elven amulet,2198,700;golden amulet,2130,6600;paw amulet,2218,1000;platinum amulet,2171,2000;protection amulet,2200,800;scarab amulet,2135,1100;scarf,2661,300;silver amulet,2170,500;stone skin amulet,2197,350;strange talisman,2161,700;terra amulet,7887,600;wolf tooth chain,2129,100;axe ring,2208,150;club ring,2209,150;crystal ring,2124,500;death ring,6300,100;dwarven ring,2213,1000;energy ring,2167,180;gold ring,2179,500;life ring,2168,200;might ring,2164,170;power ring,2166,150;ring of the sky,2123,100;ring of healing,2214,200;stealth ring,2165,200;sword ring,2207,150;time ring,2169,300;wedding ring,2121,1000;party cake,6280,50;blueberry,2677,1;cherry,2679,3;strawb erry,2680,4;candy cane,2688,4;cookie,2687,2;shrimp,2670,4;red mushroom,2788,4;mango,5097,4;green mushroom,2796,4;carrot,2684,4;roll,2690,5;tomato,2 685,5;egg,2695,5;brown bread,2691,5;banana,2676,4;cheese,2696,3;grapes,26 81,4;salmon,2668,5;cake,6278,10;bread,2689,5;valen tine's,6393,30;fish,2667,4;orange,2675,4;decorated ,6279,20;meat,2666,4;cream,6394,10;pumpkin,2683,10 ;melon,2682,5;brown mushroom,2789,6;dragon ham,2672,10;fire mushroom,2795,20;post officers hat,2665,100;bandana,5917,50;santa hat,6531,3000;magician hat,2323,1000;mystic turban,2663,15000;leather helmet,2461,10;party hat,6578,1000;helmet of the deep,5461,5000;dark helmet,2490,400;amazon helmet,2499,60000;devil helmet,2462,600;crown helmet,2491,2000;warrior helmet,2475,4000;skull helmet,5741,5000;royal helmet,2498,40000;horned helmet,2496,100000;terra legs,7885,100;pirate knee breeches,5918,10;brass legs,2478,200;plate legs,2647,500;blue legs,7730,1500;lightning legs,7895,2000;crown legs,2488,2000;knight legs,2477,5000;magma legs,7894,5000;golden legs,2470,80000;sandals,2642,10;boots of haste,2195,30000;crocodile boots,3982,200;terra boots,7886,1000;lightning boots,7893,1000;magma boots,7891,1000;fur boots,7457,1000;steel boots,2645,40000;dwarven armor,2503,3000;noble armor,2486,2000;blue robe,2656,10000;magma coat,7899,10000;lightning robe,7898,10000;knight armor,2476,5000;amazon armor,2500,7000;crown armor,2487,20000;golden armor,2466,30000;dragon scale mail,2492,60000;magic plate armor,2472,100000;snakebite rod,2182,500;moonlight rod,2186,1000;necrotic rod,2185,5000;hailstorm rod,2183,15000;wand of vortex,2190,500;wand of dragonbreath,2191,1000;wand of decay,2188,5000;wand of cosmic energy,2189,10000;wand of inferno,2187,15000;sniper arrow,7364,7;infernal bolt,6529,100000;bow,2456,400;onyx arrow,7365,10;shiver arrow,7839,10;flaming arrow,7840,10;flash arrow,7838,10;power bolt,2547,6;earth arrow,7850,15;crossbow,2455,360;burst arrow,2546,15;poison arrow,2545,10;bolt,2543,3;throwing knife,2410,25;viper star,7366,45;throwing star,2399,50;hunting spear,3965,50;royal spear,7378,35;enchanted spear,7367,50;assassin star,7368,100000;dragon shield,2516,1000;amazon shield,2537,3000;crown shield,2519,5000;tower shield,2528,5000;medusa shield,2536,5000;vampire shield,2534,15000;phoenix shield,2539,16000;demon shield,2520,40000;mastermind shield,2514,80000;serpent sword,2409,2000;crimson sword,7385,2500;wyvern fang,7408,3000;bright sword,2407,20000;demonrage sword,7382,40000;djinn blade,2451,30000;relic sword,7383,50000;giant sword,2393,10000;shenlong sword,7405,90000;ice rapier,2396,5000000;knight axe,2430,5000;obsidian lance,2425,3000;halberd,2381,800;double axe,2387,800;fire axe,2432,10000;dreaded cleaver,7419,11000;vile axe,7388,13000;heroic axe,7389,20000;royal axe,7434,50000;dragon lance,2414,10000;war axe,2454,20000;clerical mace,2423,1000;dragon hammer,2434,4000;dragonbone staff,7430,3000;skull staff,2436,6000;crystal mace,2445,60000;lich staff,3961,80000;war hammer,2391,5000;golden mace,2437,170000;hammer of wrath,2444,40000;chaos mace,7427,25000;white pearl,2143,200;orchidalcum pearl,5022,300;black pearl,2144,350;small diamond,2145,150;small sapphire,2146,150;small ruby,2147,300;small emerald,2149,150;small amethyst,2150,150;talon,2151,40;"/>
		<parameter key="shop_buyable" value=""/>
	</parameters>
</npc>

Tu .xml -
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())
 

Nikke

Active User
Joined
Jul 25, 2008
Messages
99
Reaction score
1
Odp: potrzebuje NPC Djin

ok dzia?a dzi?ki,leci reput ;d
 
Status
Not open for further replies.
Top