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 03-03-2008, 12:16 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
Message System [middle of screen]

Here's a message system, simply trigger the client to add a message.


Message Data = {"Message Type: [Guildmessage [green], normal [white]]", "Message Here", "Either Nickname or Account Name"}

PHP Code:
//#CLIENTSIDE
function onActionClientSide()
{
  
this.drawMessage( {params[2] @ ":" SPC params[1], "bc", (params[0] == "Guildmessage"? {010}: {111}) } );
}

function 
drawMessage(stuff)
{  
  
client.cMessages.insert(0temp.stuff);
  if (
client.cMessages.size() >= 5)
  {
    
client.cMessages.delete(5);
  }

  
this.updateMessages();
}

function 
updateMessages()
{
  for (
temp.iclient.cMessages)
  {
    
temp.o++;
    
temp.width textwidth(0.6"Tahoma"temp.i[1], temp.i[0]);
  
    
showtext(300 temp.o, (screenwidth 2) + (temp.width 2), (screenheight 16) - (temp.16), "Tahoma"temp.i[1], temp.i[0]);
    
changeimgvis(300 temp.o4);
    
changeimgzoom(300 temp.o0.6);
    
changeimgcolors(300 temp.otemp.i[2][0], temp.i[2][1], temp.i[2][2], 1);
    
    
this.("mode_" temp.o) = temp.i[2];
    
this.("fade_" temp.o) = 1;
  }
  
  if (
temp.!= null)
  {
    
scheduleevent( (temp.15) + 3"Fade""");      
  }   
}
  
function 
onFade()
{
  
temp.client.cMessages.size();
    
  
this.("fade_" temp.i) -= 0.005;
  
  if (
this.("fade_" temp.i) <= 0)
  {
    
client.cMessages.delete(temp.1);
    
this.updateMessages();
    
    return 
false;
  }
  
  
temp.this.("mode_" temp.i);
  
changeimgcolors(300 temp.itemp.g[0], temp.g[1], temp.g[2], this.("fade_" temp.i));
     
  
scheduleevent(0.05"Fade""");

__________________
Reply With Quote
  #2  
Old 03-03-2008, 05:40 PM
Dan Dan is offline
Daniel
Join Date: Oct 2007
Posts: 383
Dan is an unknown quantity at this point
Send a message via MSN to Dan
Quite simple x-x

Maybe add some wraptext thing to make it a little special atleast?
__________________
Reply With Quote
  #3  
Old 03-03-2008, 11:45 PM
Rapidwolve24 Rapidwolve24 is offline
North*
Join Date: Oct 2007
Location: Massachusetts
Posts: 178
Rapidwolve24 is on a distinguished road
Send a message via AIM to Rapidwolve24 Send a message via MSN to Rapidwolve24
Quote:
Originally Posted by Dan View Post
Maybe add some wraptext thing to make it a little special atleast?
*Chuckles*
Reply With Quote
  #4  
Old 03-04-2008, 03:53 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Hm, I remember this from somewhere ;P
It's the old /toguild thing that was used on Era. I'm not sure, but dont you need permission to post that? I know that "rule" is stupid, but still.
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 12:12 AM.


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