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

Solved Npc will not talk

SoloQ

Hard With Style
Joined
Mar 12, 2009
Messages
557
Reaction score
21
Location
Netherlands ;3
Hello,

I am running a 0.3.7 crying damson server and am trying to get my npc zalamon to work regarding the wrath of the emperor.
When I ask him for a mission this is his response:
Code:
19:20 Zalamon: Welcome, Snoeihard! I have been expecting you.
19:20 Snoeihard [128]: mission
19:20 Zalamon:
19:20 Snoeihard [128]: yes
19:20 Snoeihard [128]: yes
19:20 Snoeihard [128]: crate
19:20 Snoeihard [128]: bye
19:20 Zalamon: Good bye, Snoeihard!
19:20 Snoeihard [128]: hi
19:20 Zalamon: Welcome, Snoeihard! I have been expecting you.
19:20 Snoeihard [128]: mission
19:21 Zalamon: Good bye, Snoeihard!
I get no error in my console and other npcs seem to function with this one being an exception.

This is the code I am using (Zalamon.lua):
http://pastebin.com/wKQzQM2Z

Since my other npcs are functioning fine i do not understand why this one is not working.
Any help would be appreciated.

-SoloQ
 
Hey you said i cannot use npcHandler:say but why can does it work on others npcs? For instance Uzgod uses the same npcHandler:say function but this does not stop him from not talking to me.

21:58 Uzgod: Hiho Snoeihard! Wanna weapon, eh?
21:58 Snoeihard [128]: piece of draconian steel
21:58 Uzgod: You bringing me draconian steel and obsidian lance in exchange for obsidian knife?
21:58 Snoeihard [128]: yes
21:58 Uzgod: Here you have it.
21:59 Snoeihard [128]: piece of draconian steel
21:59 Uzgod: Sorry no more trade with you.
*note that he did give a obsidian knife

This is with using the same npcHandler:say so your statement must be false that that is my problem.
(uzgod.lua incase you want to see it yourself http://pastebin.com/6Kff1eJ9 )
 
Code:
if (storage ~= 1) then
                npcHandler:say({'Zzo you are offering your help to a lizzard? Hmm, unuzzual. I don\'t know if I can fully truzzt you yet. ...', 'You\'ll have to work to earn my truzzt.'}, cid)
                setPlayerStorageValue(cid, 93800, 1)
            elseif (storagee == 1) then
                npcHandler:say('What newzz do you bring? Did you find any cluezz about zzeir whereaboutzz?', cid)
                talkState[cid] = 3   
            elseif (storagee == 5) then
Storage with an extra e.. wtf were you thinking. :p
Confused me to no end for about 4 minutes
try removing the {}
Code:
npcHandler:say('Zzo you are offering your help to a lizzard? Hmm, unuzzual. I don\'t know if I can fully truzzt you yet. ...', 'You\'ll have to work to earn my truzzt.', cid)
 
Hey Xikini,

It wasnt my script so I must admit it is really confusing xD.
On the other hand I have retried by removing the { and } which does not do anything to my knowledge. No console error, still no response in-game.
 
Last edited:
these { are used when a npc is supposed to say more than one msg e.g 'Zzo you are offering your help to a lizzard? Hmm, unuzzual. I don\'t know if I can fully truzzt you yet. ...' 'You\'ll have to work to earn my truzzt.'
 
Ah oke thanks Tokenzz but having the { / } in the script or not doesnt seem to make a difference, could this problem be rooted in my npc lib by any chance?
 
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Zalamon" script="data/npc/scripts/Zalamon.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="115" head="0" body="0" legs="0" feet="0" addons="0"/>
</npc>
Dont know what u want with my zalamon.xml but oke o.o
 
Sorry, yeah.
I missed this completely the first time.
Add
Code:
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
under
Code:
if(not npcHandler:isFocused(cid)) then
    return false
end
 
Only other thing I can suggest is to start adding prints to see how far the script is reading.
Code:
print(1)
print(2)
print(3)
Once you've determined where the script is getting stuck you can start checking/printing storage values, or simply check that part of the script..
Right now we are checking blindly for an issue.
 
Just add in a print on line 15 (line 15 in the pastebin..) anywhere around there before the if statements.
Does it print into console when you speak to him?

On an unrelated note.. here .. I had an issue with an NPC not talking to me, and my only solution.. after like 2 hours of wracking my brain, even copy pasting an entire other npc over-top of the npc file, and it still not working, was to delete the file, and re-script it from scratch.
I still have no idea why it wouldn't talk to me. :(
 
I added a print on line 15, inserted at 33 under setPlayerStorageValue(cid, 93800, 1) and 53 to confirm it does try to speak. I get print 1 and 3 back in the console.
So when I say mission it does not seem to fully register what I am saying I think.

-edit
(pastebin to see prints http://pastebin.com/yFdQTPJP)
 
Alright, so that means the character your testing on has already started the mission.
Where do players get this storage?
Code:
local storagee = getPlayerStorageValue(cid, 93802)

-- edit

Pretty much what is happening, is none of the checks are coming through as 'true', so the script thinks it's finished it's job and simply says nothing back to you.
 
The local storage and storagee are coming from the script itself.

Code:
if msgcontains(msg, 'mission') then
            print(storage)
            if (storage ~= 1) then
                npcHandler:say({'Zzo you are offering your help to a lizzard? Hmm, unuzzual. I don\'t know if I can fully truzzt you yet. ...', 'You\'ll have to work to earn my truzzt.'}, cid)
                setPlayerStorageValue(cid, 93800, 1)
                print(2)
and later near the elseif storagee==5 they set the 93802 to 7 and later to 5.
I did not myself create this script so I do not fully understand what is going on truthfully

I am just trying to get Children of the Revolution and Wrath of the Emperor working xD
 
Back
Top