Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 03-13-2009, 02:02 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Pretty inefficient and sore on the eyes. I use this on Maloria, perhaps any of it would make it possible for you to tweak yours?

PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
setImg("mal_clock.gif");
  
drawUnderPlayer();
  
setTimer(.05);
}

function 
onTimeOut()
{
  
// Hour
  
with (findImg(200)) {
    
this.angle = -pi*(serverr.time.hour/6);
    
polygon = { 1.9.3*sin(this.angle), .9 .3*cos(this.angle) };
    
red .45green .2blue .1;
    
layer 2;
  }
  
  
// Minute
  
with (findImg(201)) {
    
this.angle = -pi*(serverr.time.minute/30);
    
polygon = { 1.9.5*sin(this.angle), .9 .5*cos(this.angle) };
    
red .3green .2blue .1;
    
layer 2;
  }
  
  
// Second
  
with (findImg(202)) {
    
this.angle = -pi*(serverr.time.second/30);
    
polygon = { 1.9.35*sin(this.angle), .9 .35*cos(this.angle) };
    
red .3green .2blue .1;
    
layer 2;
  }
  
setTimer(.05);
}

function 
onActionDoubleMouse()
{
  
client.messages.add("This is a clock");
  
client.messages.add("The current time is" SPC serverr.time.hour ":" serverr.time.minute);

Attached Images
 
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
 


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 04:52 PM.


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