Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-19-2011, 07:00 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Type Writer

Someone asked me to make it, alot of people like it on Bravo so I thought I'd post it

HTML Code:
//#CLIENTSIDE
function ChatBar.onTextChanged(txt) {
  if (this.on == false) return;
  if (txt.starts("warpto")) return;
  if (txt.starts("/")) return;

  if (txt != null)  player.chat = txt;
}

function onPlayerChats() {
  if (player.chat == "/typeon") this.on = true;
  if (player.chat == "/typeoff") this.on = false;
}
Just say /typeon or /typeoff
__________________
Reply With Quote
  #2  
Old 04-19-2011, 07:07 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
like it on bravo?
__________________
Reply With Quote
  #3  
Old 04-19-2011, 07:08 PM
Devil_Lord2 Devil_Lord2 is offline
David K?
Devil_Lord2's Avatar
Join Date: Apr 2011
Location: PA, MD.
Posts: 643
Devil_Lord2 can only hope to improve
That is pretty cool, I've seen one on UN that I thought was neat. :]
Since you know how to do this, do you know of any links that talk about the text a little more? I'm told I will have to reprogram my own chat system to make the chat farther above the players heads... Perhaps you know what I should specifically look up on Bible, or any tutorial like instructions that may have helped you?
__________________

Digital Media Artist - David K? </3 (UnLoved)
www.davidkrout.com
www.twitch.com/DavidKkz



Reply With Quote
  #4  
Old 04-19-2011, 09:57 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
Should probably use shared.chat(text) instead of setting the player's chat directly so it sticks on the player.
__________________
Reply With Quote
  #5  
Old 04-19-2011, 10:34 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
HTML Code:
player.chatoffset = {0,-10}; //x, y
I suggested this awhile ago, and Stefan added it recently

Quote:
Originally Posted by cbk1994 View Post
Should probably use shared.chat(text) instead of setting the player's chat directly so it sticks on the player.
Whats shared.chat o_O
__________________
Reply With Quote
  #6  
Old 04-19-2011, 10:45 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 xAndrewx View Post
Whats shared.chat o_O
Quote:
Originally Posted by Skyld View Post
shared.chat(chat text)
Sets the player's chat text using the privileged setchat function. This means that the chat text works exactly like the chatbar. It interprets things like "showscriptstats" but is set to strip out toalls and toguilds.
PHP Code:
shared.chat("showscriptstats"); 
..
__________________
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 11:55 PM.


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