Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Wtf (https://forums.graalonline.com/forums/showthread.php?t=24746)

SSRobgeta 02-28-2002 09:03 AM

Wtf
 
This is so f**ked up

// NPC made by Rob Getashu
timereverywhere;
if (playerenters) {
// Get Times Here!
this.day = int(timevar/288)%256;
this.hours = (int(timevar/12)%12);
this.hour = (this.hours%12)+1;
this.ampm = int(timevar/144)%2;
this.minute = int(timevar/.2)%60;
if (strlen(#v(this.minute))<2) {
setstring mins,0#v(this.minute);
} else {
setstring mins,#v(this.minute);

timeout=0.05;
}
}
if (strlen(#v(this.hour))<0&&strlen(#v(this.hour))>1& &strlen(#v(this.ampm))<72&&timeout) {
seteffect 0.05,0.05,0.10,0.19;
}
if (strlen(#v(this.hour))<1&&strlen(#v(this.hour))>2& &strlen(#v(this.ampm))<72&&timeout) {
seteffect 0.05,0.05,0.10,0.29;
}
if (strlen(#v(this.hour))<2&&strlen(#v(this.hour))>3& &strlen(#v(this.ampm))<72&&timeout) {
seteffect 0.05,0.05,0.10,0.39;
}
if (strlen(#v(this.hour))<3&&strlen(#v(this.hour))>4& &strlen(#v(this.ampm))<72&&timeout) {
seteffect 0.05,0.05,0.10,0.49;
}
if (strlen(#v(this.hour))<4&&strlen(#v(this.hour))>5& &strlen(#v(this.ampm))<72&&timeout) {
seteffect 0.05,0.05,0.10,0.59;
}
if (strlen(#v(this.hour))<5&&strlen(#v(this.hour))>6& &strlen(#v(this.ampm))<72&&timeout) {
seteffect 0.25,0.25,0.20,0.19;
}
if (strlen(#v(this.hour))<6&&strlen(#v(this.hour))>7& &strlen(#v(this.ampm))<72&&timeout) {
seteffect 0.75,0.85,0.70,0.99;
}
if (strlen(#v(this.hour))<7&&strlen(#v(this.hour))>8& &strlen(#v(this.ampm))<72&&timeout) {
seteffect 0,0,0,0;
}
if (strlen(#v(this.hour))<8&&strlen(#v(this.hour))>9& &strlen(#v(this.ampm))<72&&timeout) {
seteffect 0,0,1,0.99;
}
if (strlen(#v(this.hour))<9&&strlen(#v(this.hour))>10 &&strlen(#v(this.ampm))<72&&timeout) {
seteffect 0,1,0,0.99;
}
timeout=0.05;

SSRobgeta 02-28-2002 09:06 AM

Re: Wtf
 
Not complete of all the hours and the SETEFFECT is screwed for right now. I need it to work first lol

Phenom1K 02-28-2002 10:03 AM

try putting that NPC script between the tags and I might be able to help.

neomaximus2k 02-28-2002 02:33 PM

Re: Wtf
 
Originally posted by SSRobgeta
This is so f**ked up
NPC Code:

// NPC made by Rob Getashu
timereverywhere;
if (playerenters) {
// Get Times Here!
this.day = int(timevar/288)%256;
this.hours = (int(timevar/12)%12);
this.hour = (this.hours%12)+1;
this.ampm = int(timevar/144)%2;
this.minute = int(timevar/.2)%60;
if (strlen(#v(this.minute))<2) {
setstring mins,0#v(this.minute);
} else {
setstring mins,#v(this.minute);

timeout=0.05;
}
}
if (strlen(#v(this.hour))<0&&strlen(#v(this.hour))>1& &strlen(#v(this.ampm))<72&&timeout) {
seteffect 0.05,0.05,0.10,0.19;
}
if (strlen(#v(this.hour))<1&&strlen(#v(this.hour))>2& &strlen(#v(this.ampm))<72&&timeout) {
seteffect 0.05,0.05,0.10,0.29;
}
if (strlen(#v(this.hour))<2&&strlen(#v(this.hour))>3& &strlen(#v(this.ampm))<72&&timeout) {
seteffect 0.05,0.05,0.10,0.39;
}
if (strlen(#v(this.hour))<3&&strlen(#v(this.hour))>4& &strlen(#v(this.ampm))<72&&timeout) {
seteffect 0.05,0.05,0.10,0.49;
}
if (strlen(#v(this.hour))<4&&strlen(#v(this.hour))>5& &strlen(#v(this.ampm))<72&&timeout) {
seteffect 0.05,0.05,0.10,0.59;
}
if (strlen(#v(this.hour))<5&&strlen(#v(this.hour))>6& &strlen(#v(this.ampm))<72&&timeout) {
seteffect 0.25,0.25,0.20,0.19;
}
if (strlen(#v(this.hour))<6&&strlen(#v(this.hour))>7& &strlen(#v(this.ampm))<72&&timeout) {
seteffect 0.75,0.85,0.70,0.99;
}
if (strlen(#v(this.hour))<7&&strlen(#v(this.hour))>8& &strlen(#v(this.ampm))<72&&timeout) {
seteffect 0,0,0,0;
}
if (strlen(#v(this.hour))<8&&strlen(#v(this.hour))>9& &strlen(#v(this.ampm))<72&&timeout) {
seteffect 0,0,1,0.99;
}
if (strlen(#v(this.hour))<9&&strlen(#v(this.hour))>10 &&strlen(#v(this.ampm))<72&&timeout) {
seteffect 0,1,0,0.99;
}
timeout=0.05;


SSRobgeta 03-01-2002 01:11 AM

Ok well someone beat me to it -.-


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

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