Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-04-2007, 01:34 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
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!
__________________
Reply With Quote
  #2  
Old 07-04-2007, 01:35 AM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
set the chat serverside and it stays longer for some reason.
__________________

Coming soon (Hopefully:P)
Reply With Quote
  #3  
Old 07-04-2007, 01:43 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by JkWhoSaysNi View Post
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.
__________________
Reply With Quote
  #4  
Old 07-04-2007, 02:00 AM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
it should be easy to fix:

try this:

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

__________________

Coming soon (Hopefully:P)
Reply With Quote
  #5  
Old 07-04-2007, 02:04 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by JkWhoSaysNi View Post
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
__________________

Last edited by cbk1994; 07-04-2007 at 02:16 AM..
Reply With Quote
  #6  
Old 07-04-2007, 02:23 AM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
try setting it only on the server, not the client.
__________________

Coming soon (Hopefully:P)
Reply With Quote
  #7  
Old 07-04-2007, 02:36 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
You can always make a custom chat system using a gani or something. Not very hard to do.
Reply With Quote
  #8  
Old 07-04-2007, 03:26 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Maybe schedule an event after the player chats to set the player.chat=player.chat
Reply With Quote
  #9  
Old 07-04-2007, 03:32 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
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
__________________
Reply With Quote
  #10  
Old 07-04-2007, 10:22 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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.
Reply With Quote
  #11  
Old 07-05-2007, 07:50 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Can you possibly help me fix this, or make this not the case on the server I'm on?
__________________
Reply With Quote
  #12  
Old 07-07-2007, 10:42 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
11111111111111111111111111111000111100111111111111111110001111111111
10000000000000111001111111111000110000111111111111111000000001111111
00000000000000010000111111110000110000111111111110001000000000011111
00100011110000010000111111110000110000111111111100001100000000001111
11000011111000010000111111100001110000111111111000001100001000000111
10000011100000110000111111100001110000011111100000001100001110000011
10000110000011110000111111100001100000011111000000011100001111000011
10000000001111110000111111000011100000001100000000011100011111000011
00000001111111110000111111000011100000000000011000111000011111000011
00000001111111110000111110000111100010000000111000111000011110000111
00000000000111110000111110000111100011100011110000111000111000000111
10001000000001110000111100000111100011111111110001111000000000011111
10001111100000111000011000000111100011111111110001110000000111111111
10001111000000111000000000001111000011111111110001100001111111111111
10000000000000111100000010000111000111111111100011110001111111111111
00000000000111111110001110000111000111111111100111110000111111111111
00000001111111111111111111111111111111111111111111110000111111111111
10011111111111111111111111111111111111111111111111110001111111111111
__________________
Reply With Quote
  #13  
Old 07-08-2007, 01:18 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
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).
__________________
Do it with a DON!
Reply With Quote
  #14  
Old 07-08-2007, 02:55 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by zokemon View Post
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.
__________________
Reply With Quote
  #15  
Old 07-09-2007, 02:15 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by cbkbud View Post
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
__________________
Do it with a DON!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:02 AM.


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