![]() |
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; } } |
u made it urself?
|
Most of it looks like the time script from New Main.
|
whats amazing
its amazing how that in no way resembles the one Rob Geta posted a few days ago. ehh ?
|
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.
|
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. |
Re: Thanks to SOME people.
Quote:
|
Re: Thanks to SOME people.
Quote:
|
Re: Re: Thanks to SOME people.
Quote:
|
That looks a little more complicated than u could make :D
|
Re: Please correct this script.
Quote:
|
*anger*
|
Re: Re: Please correct this script.
Quote:
|
correction: it has "NPC-Server" not "errors" but "NPC-Server"
|
Re: Re: Re: Please correct this script.
Quote:
|
| 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.