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

Lua Talk Topic problem

Bill3000

New Member
Joined
Jul 26, 2010
Messages
106
Reaction score
1
Hello guys!
I'm having problem with this NPC. Actually, I don't know how to use talktopics, but I made this:

CODE REMOVED

Yes, It's KEVIN from POSTMAN QUEST. It's custom, It's not finished yet. Maybe when I finish I post the full NPC + configurations.

Well, what is the problem:

When I say "mission", he ALWAYS go to the first question, doesn't metter if I have the StorageIDs for the other Question.
When I say "yes", he ALWAYS reply with the first "yes" answer, doesn't matter with topic I'm.

Can someone help me?
 
Last edited:
You have to check for storage in the first mission too. Although you don't have to repeat the msgcontains(msg, "mission", you can also just only check for the storage.
For the talkstate use the talkUser: TopicState[talkUser]
 
Last edited:
Limos...

So, I need to change on the first "mission" I can put a CODE REMOVED

???

Maybe works. I will check then edit.

Edit:

Now it worked untill mission 2:

CODE REMOVED

But when I get to the Mission 3, Kevin give me the Mission 2, that I already did.

CODE REMOVED
 
Last edited:
Can you explain what this NPC should do? Why do you use so much different storages instead of values, are they connected with some other script?
If you want the NPC to remember if a player did a mission or said something, then you can use 1 storage with different values.
So like this:
Lua:
setPlayerStorageValue(cid, 22220, 1)

if getPlayerStorageValue(cid, 22220) == 1 then

setPlayerStorageValue(cid, 22220, 2)

if getPlayerStorageValue(cid, 22220) == 2 then
etc
Also, you don't have to check for storage with the yes, you can just use TopicState[talkUser].
 
Last edited:
It's the postman Quest like Real Tibia.

Yes, the NPC have connection with others events, like other NPCs and Actions - That's why I'm using so many Storages.
 
Ok, then best is to use an extra storage for the NPC to remember what the player said, check for that with values and for the quest storages.
And you only have to check 1x for if msgcontains(msg, "mission"), after that you can just make lines for storage checks, saves alot of place.
 
Done! Finally I complete - but custom - the Postman Quest, which all events around the map. Thx Limos.

I removed the Script on the First threat.

If somebody want my NPC Kevin script, I can post here.
 
Back
Top