• 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 Wildcard talkaction/onSay creaturescript

jockzor

IDGAF
Joined
Jul 21, 2007
Messages
45
Reaction score
1
I want to trigger an event every time someone says something, how would I go about and do that on TFS 0.2?

At first I was thinking about trying to find some wildcard for talkactions, but that didn't go so well. Then I thought that maybe there was some undocumented creaturescript for this sort of thing, but unfortunately there isn't.

Sooo.... here I am, asking for help.
PS. Help! :(
 
just tell me exactly what you want..... you just say that you need talkaction "Onsay" but on creaturescript thats really don't make a sense if you can explain a bit more im gonna try to help...

Anyway if you are looking for the lua function for a player say something here is it...


doCreatureSay(cid,HERE YOU PUT YOUR TEXT,1)
If you want it to be yelled
doCreatureSay(cid,HERE YOU PUT YOUR TEXT,3)
 
He wants the NPC to respond to EVERYTHING if I'm getting it right. (Unfortunately - I'm just a beginner when it comes to LUA so couldn't help you out with this one, sorry).
 
In this case I want the server to save everything you say.
Meaning: I want to have a script that is triggered every time you say something, thus log it.
 
In this case I want the server to save everything you say.
Meaning: I want to have a script that is triggered every time you say something, thus log it.

go to global.lua on the data folder and add this on the top
This is auto save server by colandus....


it's will save automaticaly and print a msg on your console saying >>>>PLAYERS SAVED<<<< so you are sure thats the players have been saved...
PHP:
saveDelay = 59 * 60 * 1000 -- 10 minutes for each save. 
storageValue = 2342 

if (getGlobalStorageValue(storageValue) == -1) then 
    function save(saveDelay) 
        saveData() 
        debugPrint(">>>>PLAYERS SAVED<<<<") 
        addEvent(save, saveDelay, saveDelay) 
    end 
    addEvent(save, saveDelay, saveDelay) 
    setGlobalStorageValue(storageValue, 1) 
end

@Down
Afff didn read the whole post XD damn anyway you answer him already...
 
Last edited:
@up
ashausahuhau, you miss understood.. :p he want to save all what player says, not server save.

I tried something like this sometime ago, and.. its maybe usefull, but it takes to much cpu % if you'll want to save everythink what player say to file (In same moment). But maybe if you'll storage it, and save only in save server - it will be much faster. But, anyway, its really too much to save.. in every second there is something what player say.

Btw. possible only in sources, not lua.
 
Back
Top