Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get latest message
#1
Is there any way to get the last message (not private) written in the chat?
Reply

#2
Yes.
getmessages() [table]: Get the last messages on the current active channel.
getnewmessages() [table]: Get the news received messages on the current active channel.

.time [string]
.sender [string]
.content [string]
.channel[string]
.fullcontent [string]
.type [number]
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Reply

#3
|Only Registered members can see download links. | Click here to buy subscription or here to register.
This works great most of the time but sometimes it returns nil even though im talking to an NPC, is there something im missing?
local str1 = getmessages().content
local str2 = getnewmessages().content
Both sometimes returns nothing.
Reply

#4
It returns a table with all messages or new messages. Each message is also a table. So it's a table with tables, not a single message. You should loop thru that table.
If you need any kind of Scripts -> Request then you should post on Scripts -> Requests with your main user.
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016