Nottinghster
Tibia World RPG Developer
- Joined
- Oct 24, 2007
- Messages
- 1,623
- Solutions
- 6
- Reaction score
- 539
- Location
- Brazil - Rio de Janeiro
- GitHub
- Nottinghster
Hello Guys!
When I say 'time' to npcs, they don't answer.
I try using opentibia npc system and jiddo npc system.
What I have to do ?
OpenTibia NPC System
Jiddo NPC System
getTibiaTime() Function
or
Thanks!
When I say 'time' to npcs, they don't answer.
I try using opentibia npc system and jiddo npc system.
What I have to do ?
OpenTibia NPC System
Code:
<interact keywords="time">
<response>
<action name="script">
selfSay("It is about "..getTibiaTime()..". I am so sorry, I have no watches to sell. Do you want to buy something else?")
</action>
</response>
</interact>
Jiddo NPC System
Code:
if msgcontains(msg, 'time') then
npcHandler:say('It is about "..getTibiaTime()..". I am so sorry, I have no watches to sell. Do you want to buy something else?')
getTibiaTime() Function
Code:
function getTibiaTime()
local worldTime = getWorldTime()
return {hours = worldTime/60, minutes = worldTime - 60}
end
or
Code:
function getTibiaTime()
local minutes = getWorldTime()
local hours = 0
while (minutes > 60) do
hours = hours + 1
minutes = minutes - 60
end
return {hours = hours, minutes = minutes}
end
Thanks!