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

Quentin healer script and beggning of DHQ

yrre

New Member
Joined
Jul 7, 2009
Messages
20
Reaction score
0
Hello, im searching for a script that Quentin uses in thais temple and in every other temple. For example if you're on low HP then you say hi, heal and then you get healed or your poision or fire removes.

Im also searching for a script that removes 3 stones if two players stands at one switch.
The script is for Demon Helmet quest. You know when you enter DHQ, there is 2 people wich needs to stay in the place where the 2 switches is, then the wall will be opened.
That script am i in need of.
Yours
Keyvan

PS: Sry for my english.
 
NPC:
Lua:
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() if #npcHandler.focuses == 0 then selfTurn(SOUTH) end npcHandler:onThink() end

function creatureSayCallback(cid, type, msg)
    if(not npcHandler:isFocused(cid)) then
        return false
    end

    local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_PRIVATE and 0 or cid

    if msgcontains(msg, 'heal') then
		npcHandler:say('Do you want to heal your wounds ?', cid)
		talkState[talkUser] = 1


    elseif talkState[talkUser] == 1 then
        if msgcontains(msg, 'yes') then
	if getCreatureHealth(cid) <= 100 then
                doCreatureAddHealth(cid, 300)
                talkState[talkUser] = 3
                else
                npcHandler:say('You are looking good. I cant help you...', cid)
            end
end
end
    return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

After doCreatureAddHealth you can add the elements curses condition to remove.
 
Nope dont works, when i run the server i get alot of error messages wich say:
data/npc/scripts/templehealer.lua:9: attempt to get length of field "focuses" nil value>
Stack traceback:
and so on.

And when i logg on the serv and say hi to quentin etc, then he says nothing, but he looks at me.
When i say bye, he say nothing and he moving away.
 
I replaced yours: function onThink() if #npcHandler.focuses == 0 then selfTurn(SOUTH) end npcHandler:eek:nThink() end
With my: function onThink() npcHandler:eek:nThink() end

Then i could only say hi and bye, but not help or anything like that.
 
Instead of typing that you mabye could take your time and help me?
It is an lua script and this topic says mods and lua functions.
So i the script is a lua function wich i need to get fixxed.
Well, i can post in support also then.
 
Back
Top