Hello Everyone,
I am developing a software to conversion the Cipsoft NPC Files, but remember it is specific to the tibia old version.
However, the code still need some features to fix, but it's already creating the xml and lua files respectivelly.
Project Link: https://github.com/raphaelsc/NPC-Converter-System
The project is open, if you're available to help or contribute with suggestions or new piece codes, contact me by e-mail: [email protected]
Tibia NPC File:
Files generated by the software:
Regards, Utroz.
I am developing a software to conversion the Cipsoft NPC Files, but remember it is specific to the tibia old version.
However, the code still need some features to fix, but it's already creating the xml and lua files respectivelly.
Project Link: https://github.com/raphaelsc/NPC-Converter-System
The project is open, if you're available to help or contribute with suggestions or new piece codes, contact me by e-mail: [email protected]
Tibia NPC File:
Code:
*Removed Cipsoft NPC File*
Files generated by the software:
Code:
<!-- NPC Converter System - developed by Utroz <[email protected]> -->
<npc name="Aldo" script="data/npc/scripts/Aldo.lua" autowalk="25" floorchange="0" access="5" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="128" head="40" body="37" legs="116" feet="76" corpse="2212"/>
<parameters>
<parameter key="module_shop" value="1" />
<parameter key="message_greet" value="Just great, another ... 'customer'. Hello, |PLAYERNAME|." />
<parameter key="message_farewell" value="That's music in my ears." />
<parameter key="message_walkaway" value="Yeah, get lost." />
<parameter key="message_placedinqueue" value="Yes, yes, I can only talk to one after the other! You will have to wait, |PLAYERNAME|." />
</parameters>
</npc>
Code:
<spawn centerx="32953" centery="32110" centerz="6" radius="2">
<npc name="Aldo" x="0" y="0" z="0" spawntime="60"/>
</spawn>
Code:
-- NPC Converter System - developed by Utroz <[email protected]>
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
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
keywordHandler:addKeyword({'name'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I\'m Aldo. No one calls me \'lucky Aldo\' though, guess why!'})
keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I am a salesman, I sell headgear ... uhm ... oh well, and shoes.'})
keywordHandler:addKeyword({'time'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Is it time for lunch already? Hey, stop making fun of me!'})
keywordHandler:addKeyword({'king'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'One day I will sell the king a pair of shoes made by me and will get out of that stinky hole I live in and my family will never find me. HE, HE!'})
keywordHandler:addKeyword({'army'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'So many feet ... so many ... a nightmare!'})
keywordHandler:addKeyword({'ferumbras'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Can\'t be worse than my wife.'})
keywordHandler:addKeyword({'wife'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Leave me alone with her while I am working at least. My only pleasure around here!'})
keywordHandler:addKeyword({'excalibug'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I have other stuff to worry about, like paying my bills.'})
keywordHandler:addKeyword({'bill'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Yes, I have to pay o lot of bills, and some georges, and a john, and several steves.'})
keywordHandler:addKeyword({'thais'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I will never in my life make it there.'})
keywordHandler:addKeyword({'tibia'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I doubt I will ever see much of it. It\'s like i am cursed to haunt this site here for the rest of my life.'})
keywordHandler:addKeyword({'carlin'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'A city ruled by women!? Could anything be worse?'})
keywordHandler:addKeyword({'amazon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I heard that chicks wear some revealing pieces of armor!'})
keywordHandler:addKeyword({'news'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Hey, I am a man. Look for some women to share gossip.'})
keywordHandler:addKeyword({'hugo'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'My boss, an evil slaver of good people like me.'})
keywordHandler:addKeyword({'offer'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I am damned to sell headgear, trousers, and shoes for the rest of my life.'})
keywordHandler:addKeyword({'headgear'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'We have leather helmets and studded helmets.'})
keywordHandler:addKeyword({'shoes'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = '<sigh> We sell leather boots and sandals.'})
keywordHandler:addKeyword({'trouser'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'We offer leather legs and studded legs.'})
shopModule:addBuyableItem({'leather helmet'}, 2461, 12, 1, 'leather helmet')
shopModule:addBuyableItem({'studded helmet'}, 2482, 63, 1, 'studded helmet')
shopModule:addBuyableItem({'sandals'}, 2642, 2, 1, 'sandals')
shopModule:addBuyableItem({'leather boot'}, 2643, 2, 1, 'leather boot')
shopModule:addBuyableItem({'leather legs'}, 0, 10, 1, 'leather legs')
shopModule:addBuyableItem({'studded legs'}, 2468, 60, 1, 'studded legs')
npcHandler:addModule(FocusModule:new())
Regards, Utroz.
Last edited by a moderator: