Dr_Cox1911 Posted May 10, 2014 Share Posted May 10, 2014 Hey all! Hope you can throw me in the right direction, because I really don´t know were to look. Searched the lua-files for the local chat, but couldn´t find anything, only how the chat-window is drawn. So where do I find the code for local chat? Or is this purely done in Java and not accessible through lua? Link to comment Share on other sites More sharing options...
turbotutone Posted May 10, 2014 Share Posted May 10, 2014 eya doc, while i havent looked into how chat works much, did came across some stuff that might be useful. There's a lua event: sendWorldMessage(String message ) void That appears to send a chatmessage, additionally there's a event "OnWorldMessage". Also,zombie/network/GameClient.javahas methods relating to chat. Hope its helpful,Turbo Link to comment Share on other sites More sharing options...
JonSyn Posted May 10, 2014 Share Posted May 10, 2014 for a mod? its getPlayer():Say("text here"); Link to comment Share on other sites More sharing options...
Dr_Cox1911 Posted May 10, 2014 Author Share Posted May 10, 2014 Thanks turbotutone and JonSyn! But I ment more like how they do the rangedistribution for the local chat to decide which player sees the message. Will look into GameClient.java and see what I can dig up. Link to comment Share on other sites More sharing options...
turbotutone Posted May 10, 2014 Share Posted May 10, 2014 Didnt read properly btw and misread you were looking for LOCAL By the reference JonSyn gave, the :Say() method can be found in IsoGameCharacter:As seen uses sendChat in GameClient. However i wasnt able to quickly spot the part that handles reception of these messages, i.e. theres no receiveChat() so probably handled somewhere inside a method. EDIT:private void mainLoopDealWithNetData(ZomboidNetData d) Chat() Regards,Turbo Dr_Cox1911 1 Link to comment Share on other sites More sharing options...
Dr_Cox1911 Posted May 10, 2014 Author Share Posted May 10, 2014 Thanks turbotutone! I just hate my bad Lua skills I´m trying to get the coords and usernames of all mp-players around the player. Obivously in a defined radius, that´s why I wanted to look at the local chat to see how it´s done there. Link to comment Share on other sites More sharing options...
RAINBOW Posted May 11, 2014 Share Posted May 11, 2014 Turbo, there's no Event for: "OnWorldMessage" I, likewise, wanted to create some server specific commands relating to the chat. I discovered only lua relating to drawing UI although there was some methods in the "media/lua/Chat/" folder that would fire a "Command" like the method you mentioned, the sendWorldMessage stuff. Good link for the java class tho Link to comment Share on other sites More sharing options...
turbotutone Posted May 11, 2014 Share Posted May 11, 2014 Turbo, there's no Event for: "OnWorldMessage" There should be, im not in a position to test atm but what build do you have installed? Perhaps it wasnt added yet in a older build. It certainly is in Build26 as thats where the screens are taken in. Link to comment Share on other sites More sharing options...
JonSyn Posted May 11, 2014 Share Posted May 11, 2014 try media/lua/client/ISUI/ISChat.lua :cool:i have a admin tag and a radio tag with no user name right now. Link to comment Share on other sites More sharing options...
RAINBOW Posted May 12, 2014 Share Posted May 12, 2014 Holy smokes. You are quite right, I do apologise. There's an event in there: Events.OnWorldMessage.Add(ISChat.addLineInChat); I use this website HERE to look up my events. Is there a more (regularly) updated one I can check out, out there? Link to comment Share on other sites More sharing options...
JonSyn Posted May 12, 2014 Share Posted May 12, 2014 i havnt found one but if you do let me know lol Link to comment Share on other sites More sharing options...
Aricane Posted May 12, 2014 Share Posted May 12, 2014 I'll update that list when build 26 goes public. Which apparently it is now. Aaaand its updated. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now