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

Promotion not working![SOLVED]

Status
Not open for further replies.

Poison Black

New Member
Joined
Jul 12, 2008
Messages
70
Reaction score
0
Well, i thought it was my promotion.lua file, it wasnt. I've tried 6 different promotion lua's from other people and none of them worked, it will get to :

12:05 Kotku [154]: hi
12:05 The Forgotten King: Welcome, Kotku! I have been expecting you.
12:05 Kotku [154]: promotion
12:05 The Forgotten King: I can promote you for 20000 gold coins. Do you want me to promote you?
12:05 Kotku [154]: yes
12:05 Kotku [154]: no
12:05 The Forgotten King: Alright then, come back when you are ready.
12:05 Kotku [154]: bye
12:05 The Forgotten King: Good bye, Kotku!

He will not answer to yes. I've also replaced my vocations file, just in case that was interfering with it. There are no errors in my servers GUI, so im stuck. I don't know what else i can do..

Thanks in advance.
 
Last edited:
I figured you might want them, but i tried many different ones.. I'll post them..<_<

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

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, cost = 20000, level = 20, text = 'Congratulations! You are now promoted.'})
	node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})

npcHandler:addModule(FocusModule:new())

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

local node1 = keywordHandler:addKeyword({'promot', 'promotion'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can see that you are ready to get promoted, I will take a fee of 20.000 gold coins aswell, are you absolutely sure?'})
	node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, text = 'Auhmm... Auhmm... Auhmm... Ahh... You are now ready.'})
	node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you are ready.', reset = true})

npcHandler:addModule(FocusModule:new())
Also, i'm using TFS - Version 0.2 (Mystic Spirit). They are both practically the same ones, but i tried different ones just to see.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="The Forgotten King" script="data/npc/scripts/promotion.lua" walkinterval="2000" floorchange="0">
	<health now="100" max="100"/>
	<look type="133" head="20" body="39" legs="45" feet="7" addons="0"/>
</npc>
 
Check your StdModule.promotePlayer at data/npc/lib/npcsystem/modules.lua
 
Could you repost of how you solved this.. i went into that folder but imm nit using thwe isle of the kings.xml just the promotion npc is tfs2.0
 
Status
Not open for further replies.

Similar threads

Back
Top