Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Chat Dissapears (https://forums.graalonline.com/forums/showthread.php?t=75087)

cbk1994 07-04-2007 01:34 AM

Chat Dissapears
 
We have a custom chat bar, and when we hit enter everything works ... except after like three seconds the chat disapears! NPCs have always done this as far as I know, but we really need a way past it. All help is appreciated!

Thanks!

JkWhoSaysNi 07-04-2007 01:35 AM

set the chat serverside and it stays longer for some reason.

cbk1994 07-04-2007 01:43 AM

Quote:

Originally Posted by JkWhoSaysNi (Post 1325540)
set the chat serverside and it stays longer for some reason.

Hmm ... that's a bit of a problem ...

We need to set the chat clientside.

JkWhoSaysNi 07-04-2007 02:00 AM

it should be easy to fix:

try this:

PHP Code:

// in the weapon serverside
function onPlayerChats() {
player.chat player.chat;



cbk1994 07-04-2007 02:04 AM

Quote:

Originally Posted by JkWhoSaysNi (Post 1325549)
it should be easy to fix:

try this:

PHP Code:

// in the weapon serverside
function onPlayerChats() {
player.chat player.chat;



Didnt work :(

I'm going to try to do a trigger once enter is hit, hopefully it can get to server fast enough.

Update: Chat doesnt last any longer on server :C

Help please :(

JkWhoSaysNi 07-04-2007 02:23 AM

try setting it only on the server, not the client.

Gambet 07-04-2007 02:36 AM

You can always make a custom chat system using a gani or something. Not very hard to do.

DustyPorViva 07-04-2007 03:26 AM

Maybe schedule an event after the player chats to set the player.chat=player.chat

cbk1994 07-04-2007 03:32 AM

At default, the chat should stay forever unless you move. Maybe I'll just add a system that constantly resets it if it doesnt detect any movement.

BTW Stefan this would be a great time to get on here and tell me how to do it ;)

Admins 07-04-2007 10:22 PM

The system is made so that chat set by client-side scripts is automatically disappearing, except when set by the chat script (a script on the login server) or set by serverside.

cbk1994 07-05-2007 07:50 PM

Can you possibly help me fix this, or make this not the case on the server I'm on?

cbk1994 07-07-2007 10:42 PM

11111111111111111111111111111000111100111111111111111110001111111111
10000000000000111001111111111000110000111111111111111000000001111111
00000000000000010000111111110000110000111111111110001000000000011111
00100011110000010000111111110000110000111111111100001100000000001111
11000011111000010000111111100001110000111111111000001100001000000111
10000011100000110000111111100001110000011111100000001100001110000011
10000110000011110000111111100001100000011111000000011100001111000011
10000000001111110000111111000011100000001100000000011100011111000011
00000001111111110000111111000011100000000000011000111000011111000011
00000001111111110000111110000111100010000000111000111000011110000111
00000000000111110000111110000111100011100011110000111000111000000111
10001000000001110000111100000111100011111111110001111000000000011111
10001111100000111000011000000111100011111111110001110000000111111111
10001111000000111000000000001111000011111111110001100001111111111111
10000000000000111100000010000111000111111111100011110001111111111111
00000000000111111110001110000111000111111111100111110000111111111111
00000001111111111111111111111111111111111111111111110000111111111111
10011111111111111111111111111111111111111111111111110001111111111111

zokemon 07-08-2007 01:18 PM

I just suggest making your own chat system. Default chat is ugly :[

And about using ganis to do it: That is nice and all but I have found gani scripts do horrible things when player.zoom is altered. Best way to do it in my opinion (way I am doing it now) is to just have a for (temp.p : players) loop going (in a timeout) that does the script like so.

I know this may cause just the slightest extra lag (if anything...only difference is a variable change) but I think it's worth it since gani scripts are not always reliable (not to mention it is much easier to update a WNPC then a .gani).

cbk1994 07-08-2007 02:55 PM

Quote:

Originally Posted by zokemon (Post 1326842)
I just suggest making your own chat system. Default chat is ugly :[

And about using ganis to do it: That is nice and all but I have found gani scripts do horrible things when player.zoom is altered. Best way to do it in my opinion (way I am doing it now) is to just have a for (temp.p : players) loop going (in a timeout) that does the script like so.

I know this may cause just the slightest extra lag (if anything...only difference is a variable change) but I think it's worth it since gani scripts are not always reliable (not to mention it is much easier to update a WNPC then a .gani).

Yah, that's what we did last time, only we used player.chat so we wouldn't have to make a brand new chat system. Problem with this is we run into chat going off the screen, chat not splitting onto two lines, etc.

zokemon 07-09-2007 02:15 AM

Quote:

Originally Posted by cbkbud (Post 1326852)
Yah, that's what we did last time, only we used player.chat so we wouldn't have to make a brand new chat system. Problem with this is we run into chat going off the screen, chat not splitting onto two lines, etc.

Player.chat is perfectly acceptable and should be used with chat display systems and such. If you are experiencing the whole going off the screen thing just use:
wraptext(int, str, str) - returns object
wraptext2(int, float, str, str) - returns object


All times are GMT +2. The time now is 09:41 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.