• 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!

Problem with NPC's

Aqell

New Member
Joined
Jul 3, 2008
Messages
9
Reaction score
0
1. How to make good NPC Guild master in TFS 0.2.13 for tibia 8.11? I copyed guild master.lua and guild.lua from b-fox, but it doesn't operate :(
2. How to make good NPC Johnny in TFS 0.2.13 [NPC who is selling premium and promotion]. I copyed johnny.lua and promote.lua from b-fox, but it doesn't operate :(
3. How to make good NPC Varkal - for addons and outfits? Default Varkhal is selling all addons on the one time [hi/first addon/yes, hi/second addon/yes]. I want NPC, who sells addons like in RL tibia [I must bring leathers, bat wings etc. etc.~]
4. How to make to npc doesn't walk on the all map - I want to he walk only 2-3 squares from respawn place

Help me please :( I was looking for help in many forum's, but noone helped me :(

----------------------
polish version:
1. W TFS 0.2.13 nie było guild mastera, więc skopiowałem z b-foxa plik guild master.lua do npc i guild.lua do npc/scripts. Postawiłem go na mapie. Zagaduję hi, to on odpowiada. Ale jak napisze "found", to juz nic nie odpowie ;/ Jak go naprawic?
2. Chcialem zrobic w tfs 0.2.13 npc, ktory by sprzedawal premium za gp, jak np. na evo. skopiowałem z b-foxa Johnny.lua do npc i promote.lua do npc/scripts. Pisze do niego "hi", to odpowiada. Pisze "premium", to pyta czy chce kupic. Ale jak wtedy napisze "yes" to juz nie pisze nic a pacca nie daje ;/
3. NPC od addonów byl juz na tfs, ale taki, ktory od razu daje wszystkie addony (hi/first addon/yes second addon/yes). Zamienilem wiec varkhala z tfsa na varkhala z b-foxa. Kiedy chce kupic addon, to uzbierane na addon itemki zabiera, ale addonu nie daje!
4. Jak ustawic, aby npc lazil tylko na 2-3 kratki od spawnu a nie sie rozlazil po mapie?

z gory dzieki, pozdrawiam ;>
 
1. You can't make a guild master for TFS.
2. http://otland.net/showthread.php?t=1039
3. Haven't been released a working one yet. At least not here.
4. Can't change that, you can only change so that he stands still, or the interval between his moves.
 
1. I can't make guild in my ots? ;// Is it immposible?
2. data\npc\King.xml: - does he sell premium?
3. Oh my GOOD ;/// Addons sux :(
 
1. No, you say !createguild name in-game.
2.
Mokerhamer said:
data\npc\King.xml:
Code:
     <npc name="The King" script="data/npc/scripts/promotion.lua" autowalk="0" floorchange="0" access="5" level="1" maglevel="1">
    <health now="150" max="150"/>
    <look type="137" head="140" body="64" legs="121" feet="76" corpse="2212"/>
    <parameters>
        <parameter key="message_farewell" value="Farewell |PLAYERNAME|!" />
    </parameters>
</npc>
data\npc\script\promotion.lua:

Code:
     local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
 
 
 
-- OTServ event handling functions start
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
-- OTServ event handling functions end
 
local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'})
    node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, promotions = {[1] = 5, [2] = 6, [3] = 7, [4] = 8}, cost = 20000, level = 20, text = 'Congratulations! You are now promoted.'})
    node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Allright then. Come back when you are ready.', reset = true})
npcHandler:addModule(FocusModule:new())
 
But does king sell premium and promotion both, or only promotion?
 
Just promotion, you buy premium by saying !buypremium.
 
1. You can't make a guild master for TFS.
2. http://otland.net/showthread.php?t=1039
3. Haven't been released a working one yet. At least not here.
4. Can't change that, you can only change so that he stands still, or the interval between his moves.

NPCs placed by map editor walks only on the respawn area (the red one).

And btw, Guild Master for TFS can be done with LuaSQL, doesnt it? ^^
 
Okay, it can. But it would be a waste of time since there's the !createguild command, and the luasql is a little overkill for something like that, isn't it? And also, you'd have to be logged out while joining\creating a guild, otherwise it would overwrite the guildID etc. when you log out, wouldn't it? ;)
 
last i heard LUASql is being removed anyways, cause it makes crashing database easy
 
Back
Top