• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

NPC Real Tibia Djins by Szakal

Szakal

Frank Jaeger
Joined
Apr 16, 2008
Messages
1,338
Reaction score
6
Location
Poland, Lubań.
I dont find any real djins so i make my own and post it here.
Reports all bugs in thread.
Credits 100% by me.


Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Alesar" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0">
	<health now="100" max="100"/>
	<look type="51" head="0" body="0" legs="0" feet="0" addons="0"/>
	<parameters>
		<parameter key="module_shop" value="2"/>
		<parameter key="shop_buyable" value="Ice rapier,2396,5000;Serpent sword,2409,6000;Dark armor,2489,1500;Dark helmet,2490,1000;Ancient shield,2532,5000"/>
		<parameter key="shop_sellable" value="Dragon hammer,2434,2000;Giant sword,2393,17000;Knight axe,2430,2000;Poison dagger,2411,50;Scimitar,2419,150;Serpent sword,2409,900;Skull staff,2436,6000;Dark armor,2489,400;Knight armor,2476,5000;Dark helmet,2490,250;Mystic turban,2663,150;Strange helmet,2479,500;Warrior helmet,2475,5000;Knight legs,2477,5000;Ancient shield,2532,900;Black shield,2529,800;Tower shield,2528,8000;Vampire shield,2534,15000"/>
	</parameters>
</npc>

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Haroun" script="data/npc/scripts/djins.lua" walkinterval="2000" floorchange="0">
	<health now="100" max="100"/>
	<look type="80" head="0" body="0" legs="0" feet="0" addons="0"/>
	<parameters>
		<parameter key="module_shop" value="2"/>
		<parameter key="shop_buyable" value="Axe ring,2208,500;Club ring,2209,500;Power ring,2166,100;Stealth ring,2165,5000;Sword ring,2207,500;Bronze amulet,2172,100;Garlic necklace,2199,100;elven amulet,2198,500;Stone skin amulet,2197,5000;Magic Light Wand,2162,120"/>
		<parameter key="shop_sellable" value="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 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,7493,750"/>
	</parameters>
</npc>

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Yaman" script="data/npc/scripts/djins.lua" walkinterval="2000" floorchange="0">
	<health now="100" max="100"/>
	<look type="51" head="0" body="0" legs="0" feet="0" addons="0"/>
	<parameters>
		<parameter key="module_shop" value="2"/>
		<parameter key="shop_buyable" value="Dwarven ring,2213,2000;Energy ring,2167,2000;Life ring,2168,900;Might ring,2164,5000;Ring of healing,2214,2000;Time ring,2169,2000;Dragon necklace,2201,1000;Protection amulet,2200,700;Strange talisman,2161,100;Silver amulet,2170,100"/>
		<parameter key="shop_sellable" value="Dwarven ring,2213,100;Energy ring,2167,100;Life ring,2168,50;Might ring,2164,250;Ring of healing,2214,100;Time ring,2169,100;Dragon necklace,2201,100;Protection amulet,2200,100;Strange talisman,2161,30;Silver amulet,2170,50;Hailstorm rod,2183,3000;Moonlight rod,2186,200;Necrotic rod,2185,1000;Snakebite rod,2182,100;Terra rod,2181,2000;Springsprout Rod,8912,3600;Northwind Rod,8911,1500;Underworld Rod,8910,4400;Ankh,2327,100;Mysterious Fetish,2194,50"/>
	</parameters>
</npc>

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Nah'Bob" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0">
	<health now="100" max="100"/>
	<look type="80" head="0" body="0" legs="0" feet="0" addons="0"/>
	<parameters>
		<parameter key="module_shop" value="2"/>
		<parameter key="shop_buyable" value="Beholder shield,2518,7000;Noble armor,2486,8000;Spike sword,2383,8000;War hammer,2391,10000"/>
		<parameter key="shop_sellable" value="Beholder shield,2518,1200;Crown shield,2519,8000;Dragon shield,2516,4000;Guardian shield,2515,2000;Phoenix shield,2539,16000;Blue robe,2656,10000;Crown armor,2487,12000;Noble armor,2486,900;Boots of haste,2195,30000;Broad sword,2413,500;Dragon lance,2414,9000;Fire axe,2432,8000;Fire sword,2392,4000;Ice rapier,2396,1000;Obsidian lance,2425,500;Spike sword,2383,1000;War hammer,2391,1200;Crown helmet,2491,2500;Crusader helmet,2497,6000;Royal helmet,2498,30000;Crown legs,2488,12000"/>
	</parameters>
</npc>

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



function ChickenWing(cid, message, keywords, parameters, node)

    if(not npcHandler:isFocused(cid)) then
        return false
    end
    
    if getPlayerItemCount(cid,2195) >= 1 then
        if doPlayerRemoveItem(cid,2195,1) then
            npcHandler:say('A {Boots of haste}! Great. Here, take this enchanted chicken wing, I don\'t need it anyway.', cid)
            doPlayerAddItem(cid,5891,1)
        end
        else
            npcHandler:say('Are you trying to mess with me?!', cid)
        end
		end
		
function FightingSpirit(cid, message, keywords, parameters, node)

    if(not npcHandler:isFocused(cid)) then
        return false
    end
    
    if getPlayerItemCount(cid,2498) >= 2 then
        if doPlayerRemoveItem(cid,2498,1) then
            npcHandler:say('A {Royal Helmet}! Great. Here, take this fighting spirit, I don\'t need it anyway.', cid)
            doPlayerAddItem(cid,5884,1)
        end
        else
            npcHandler:say('Are you trying to mess with me?!', cid)
        end
        end

function MagicSulphur(cid, message, keywords, parameters, node)

    if(not npcHandler:isFocused(cid)) then
        return false
    end
    
    if getPlayerItemCount(cid,2392) >= 3 then
        if doPlayerRemoveItem(cid,2392,3) then
            npcHandler:say('A 3 {Fire Sword}! Great. Here, take this magic sulphur, I don\'t need it anyway.', cid)
            doPlayerAddItem(cid,5904,1)
        end
        else
            npcHandler:say('Are you trying to mess with me?!', cid)
        end
		end



function WarriorsSweat(cid, message, keywords, parameters, node)

    if(not npcHandler:isFocused(cid)) then
        return false
    end
    
    if getPlayerItemCount(cid,2475) >= 4 then
        if doPlayerRemoveItem(cid,2475,3) then
            npcHandler:say('A 4 {Warrior Helmets}! Great. Here, take this warrior\'s sweat, I don\'t need it anyway.', cid)
            doPlayerAddItem(cid,5904,1)
        end
        else
            npcHandler:say('Are you trying to mess with me?!', cid)
        end
	end







node1 = keywordHandler:addKeyword({'enchanted chicken wing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Have you found a {Boots of haste} for me?'})
node1:addChildKeyword({'yes'}, ChickenWing, {})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})

node2 = keywordHandler:addKeyword({'fighting spirit'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Have you found a 2 {Royal Helmets} for me?'})
node2:addChildKeyword({'yes'}, FightingSpirit, {})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})

node3 = keywordHandler:addKeyword({'magic sulphur'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Have you found 3 {fire swords} for me?'})
node3:addChildKeyword({'yes'}, MagicSulphur, {})
node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})

node4 = keywordHandler:addKeyword({'warrior\'s sweat'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Have you found a 4 {warrior helmets} for me?'})
node4:addChildKeyword({'yes'}, WarriorsSweat, {})
node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})


npcHandler:addModule(FocusModule:new())

If you like my djins pres REP++ button , thanks.
 
Nice one, most of the npc packs come without theese scripts :)
 
Back
Top