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

Multiple Message Greet

Lucas Durais

New Member
Joined
Jan 13, 2017
Messages
40
Reaction score
1
Hello guys

I'm trying to make my npc says more then one message using selfSay when I greet him...

I already succeeded in making him saying using npcHandler:say but it takes forever...

How can I do this with selfSay??

This is how I managed to do it with npcHandler:
Code:
    local function greetCallback(cid)
        npcHandler:setMessage(MESSAGE_GREET,{
                "Thank you. Luckily the damage my ship has taken looks more severe than it is, so I will only need a few wooden boards. ...",
                "I saw some lousy trolls running away with some parts of the ship. It might be a good idea to follow them and check if they have some more wood. ...",
                "We will need 30 pieces of wood, no more, no less. Did you understand everything?"
            }, cid)
    return true
end


My tfs is 1.2

Thanks!
 
Solution
maybe use an array with message and loop through it using selfsay?
Lua:
local messages = {"a", "b", "c"}

greetcallback(cid)
...
for i = 1, #messages do
    selfSay(messages[i])
end
i dont know the params of selfSay but thats what it should look like
maybe use an array with message and loop through it using selfsay?
Lua:
local messages = {"a", "b", "c"}

greetcallback(cid)
...
for i = 1, #messages do
    selfSay(messages[i])
end
i dont know the params of selfSay but thats what it should look like
 
Solution
Back
Top