Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Please correct this script. (https://forums.graalonline.com/forums/showthread.php?t=15801)

maximus_asinus 10-30-2001 10:54 AM

Please correct this script.
 
This is the Timescript I made please correct it.
I think I messed up on the showimage but not sure.Please post what you think is wrong.
if (playerenters && !isweapon) {
toweapons -Time System;
timeout = 0.05;
}
if (isweapon && (playerenters || timeout)) {
mytimervar = timevar;
daymins = (mytimevar%720)*2;
days = int(mytimevar/720);
months = int(days/24);
daysinmonth = days%24;
cyclus = int(months/32);
monthincyclus = months%32;
years = 1+cyclus*2+(monthincyclus>15 ? 1 : 0);
drawDate();
drawTime();
}


function drawDate() {
setarray count,9;
drawx = 230;
drawy = 70;
count[0] = (monthincyclus<15 ? 15 : 12);
i = years;
count[2] = i%10;
count[1] = int(i/10);
count[3] = 13;
i = (monthincyclus>=15 ? monthincyclus-15 : monthin);
count[5] = i%10;
count[4] = int(i/10);
count[6] = 14;
i = daysinmonth+1;
count[8] = i%10;
count[7] = int(i/10);
i = 0;
while (i<=8) {
imgindex = 1010+i;
showimg imgindex,state.png,drawx,drawy;
changeimgpart imgindex,count[i]*14,81,14,16;
changeimgvis imgindex,4;
drawx = drawx+(12);
if (i in {0,3,6}) {
drawx = drawx+(2);
}
i = i+1;
}
}
function drawTime() {
setarray count,2;
drawx = 350;
drawy = 70;
showimg 1000,state.png,drawx,drawy;
changeimgpart 1000,162,60,14,14;
changeimgvis 1000,4;
dayhour = int(daymins/60);
count[0] = int(dayhour/10);
count[1] = dayhour%10;
i = 0;
while (i<=1) {
if (i==0 && count[i]==0) {
hideimg 1001+i;
continue;
}
showimg 1001+i,state.png,drawx+16+i*12,drawy;
changeimgpart 1001+i,count[i]*14,81,14,16;
changeimgvis 1001+i,4;
i = i+1;
}
showimg 1003,state.png,drawx+40,drawy;
changeimgpart 1003,154,81,14,16;
changeimgvis 1003,4;
mins = daymins%60;
count[0] = int(mins/10);
count[1] = mins%10;
i = 0;
while (i<=1) {
showimg 1004+i,state.png,drawx+52+i*12,drawy;
changeimgpart 1004+1,count[i]*14,81,14,16;
changeimgvis 1004+i,4;
i = i+1;
}
}
function hideicons() {
showimg 1001+i,state.png,drawx+40,drawy;
changeimgpart 1003,154,81,14,16;
mins = daymins%10;
i = 0;
while (i<=1) {
showimg 1004+i,state.png,drawx+52+i*12,drawy;
changeimgpart 1004+i,count[i]*14,81,14,16;
changeimgvis 1004+i,4;
i = i+1;
}
showimg 1003,state.png,drawx+40,drawy;
changeimgpart 1003,154,81,14,16;
changeimgvis 1003,4;
mins = daymins%60;
count[0] = int(mins/10);
count[1] = mins%10;
i = 0;
while (i<=1) {
showimg 1004+i,state.png,drawx+52+i*12,drawy;
changeimgpart 1004+i,count[i]*14,81,14,16;
changeimgvis 1004+i,4;
i = i+1;
}
}
function hideicons() {
i = 0;
while (i<=20) {
hideimg 1000+i;
i = i+1;
}
}

LiquidIce00 10-30-2001 12:41 PM

u made it urself?

BocoC 10-30-2001 01:17 PM

Most of it looks like the time script from New Main.

nyghtGT 10-30-2001 03:26 PM

whats amazing
 
its amazing how that in no way resembles the one Rob Geta posted a few days ago. ehh ?

grim_squeaker_x 10-30-2001 07:02 PM

Well you set "mytimervar = timevar" while in the rest of the script you use mytimevar instead of mytimervar, which is probably why it doesn't work.

maximus_asinus 10-31-2001 08:56 AM

Thanks to SOME people.
 
Thank you to the one person who actually tried to help me.And then there is a few people that called me a newbie but he made two new threads about simple newbie scripts.(addtiledef2 and Tokenize).
But I still have the problem with showimg and hideimg because it shows ALL of the state.png thingy not the time.Please help :p
Thanks.
ANd the only reason they look the same is because I had to borrow a few lines that kept screwing up.

nyghtGT 10-31-2001 09:36 AM

Re: Thanks to SOME people.
 
Quote:

Originally posted by maximus_asinus
Thank you to the one person who actually tried to help me.And then there is a few people that called me a newbie but he made two new threads about simple newbie scripts.(addtiledef2 and Tokenize).
But I still have the problem with showimg and hideimg because it shows ALL of the state.png thingy not the time.Please help :p
Thanks.
ANd the only reason they look the same is because I had to borrow a few lines that kept screwing up.

could you get any lamer ?

Python523 10-31-2001 10:02 AM

Re: Thanks to SOME people.
 
Quote:

Originally posted by maximus_asinus

ANd the only reason they look the same is because I had to borrow a few lines that kept screwing up.

Tanslation: I couldn't make one so I had to steal other peoples work

nyghtGT 10-31-2001 10:41 AM

Re: Re: Thanks to SOME people.
 
Quote:

Originally posted by Python523

Tanslation: I couldn't make one so I had to steal other peoples work

LOL !

btedji 10-31-2001 10:22 PM

That looks a little more complicated than u could make :D

G_yoshi 10-31-2001 10:29 PM

Re: Please correct this script.
 
Quote:

Originally posted by maximus_asinus
This is the Timescript I made please correct it.
I think I messed up on the showimage but not sure.Please post what you think is wrong.
<--Insert NPC code-->
}

Um, excuse me, but Stefan made that NPC...I have the script from him and I know for a fact that you did not make that.

Slaktmaster 10-31-2001 10:39 PM

*anger*

Poogle 11-01-2001 04:08 AM

Re: Re: Please correct this script.
 
Quote:

Originally posted by G_yoshi


Um, excuse me, but Stefan made that NPC...I have the script from him and I know for a fact that you did not make that.

He said it had errors! Stefan doesnt make errors!!!!!!!!!!!!

Faheria_GP2 11-01-2001 06:11 AM

correction: it has "NPC-Server" not "errors" but "NPC-Server"

nyghtGT 11-01-2001 04:43 PM

Re: Re: Re: Please correct this script.
 
Quote:

Originally posted by Poogle

He said it had errors! Stefan doesnt make errors!!!!!!!!!!!!

the only errors are where the people who originally copied it couldn't see parts of the script through the debugger glitch ...


All times are GMT +2. The time now is 07:49 PM.

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