Elda Swok
Searching New Project
Hello, I have recently came into quite a bit of free time and I would like to start creating a datapack for a 9.6 real tibia server. I know it seems a bit weird, but if everyone is going to have a real map, I would like them to not suck as bad as they do so I want to help everyone make their servers better. I am able to do a bit myself, but I can't figure out all the parameters for the NPCs to say everything I need them to say with 9.6 This is what I have so far.
Please help me, this NPC will help me do it all.
Al Dee - TibiaWiki - Quests, Items, Spells, and more
If someone could help me make that script, I will start working and release them by the town.
Please help me, this NPC will help me do it all.
Al Dee - TibiaWiki - Quests, Items, Spells, and more
If someone could help me make that script, I will start working and release them by the town.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Al Dee" script="data/npc/scripts/Al Dee.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="129" head="97" body="77" legs="87" feet="115" addons="0"/>
<parameters>
<parameter key="message_greet" value=" Hello, hello, |PLAYERNAME|! Please come in, look, and buy! I'm a specialist for all sorts of tools. Just ask me for a trade to see my offers! You can also ask me for general hints about the game."/>
<parameter key="message_decline" value="Is |TOTALCOST| gold coins too much for you? Get out of here!"/>
</parameters>
</npc>
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
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 onPlayerEndTrade(cid) npcHandler:onPlayerEndTrade(cid) end
function onPlayerCloseChannel(cid) npcHandler:onPlayerCloseChannel(cid) end
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
shopModule:addBuyableItem({'backpack'}, 1988, 10, 'backpack')
shopModule:addBuyableItem({'bag'}, 1987, 4, 'bag')
shopModule:addBuyableItem({'fishing rod'}, 2580, 150, 'fishing rod')
shopModule:addBuyableItem({'rope'}, 2120, 50, 'rope')
shopModule:addBuyableItem({'scroll'}, 1949, 5, 'scroll')
shopModule:addBuyableItem({'scythe'}, 2550, 12, 'scythe')
shopModule:addBuyableItem({'shovel'}, 2554, 10, 'shovel')
shopModule:addBuyableItem({'torch'}, 2050, 2, 'torch')
shopModule:addBuyableItem({'worm'}, 3976, 1, 'worm')
shopModule:addSellableItem({'fishing rod'}, 2580, 30, 'fishing rod')
shopModule:addSellableItem({'rope'}, 2120, 8, 'rope')
shopModule:addSellableItem({'shovel'}, 2554, 2, 'shovel')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())