Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Type Writer (https://forums.graalonline.com/forums/showthread.php?t=134262897)

xAndrewx 04-19-2011 07:00 PM

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

Crono 04-19-2011 07:07 PM

like it on bravo?

Devil_Lord2 04-19-2011 07:08 PM

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?

cbk1994 04-19-2011 09:57 PM

Should probably use shared.chat(text) instead of setting the player's chat directly so it sticks on the player.

xAndrewx 04-19-2011 10:34 PM

HTML Code:

player.chatoffset = {0,-10}; //x, y
I suggested this awhile ago, and Stefan added it recently :)

Quote:

Originally Posted by cbk1994 (Post 1644444)
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

cbk1994 04-19-2011 10:45 PM

Quote:

Originally Posted by xAndrewx (Post 1644449)
Whats shared.chat o_O

Quote:

Originally Posted by Skyld (Post 1415009)
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"); 


..


All times are GMT +2. The time now is 11:26 PM.

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