Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-30-2001, 10:54 AM
maximus_asinus maximus_asinus is offline
RIP DarkCloud_PK
Join Date: Oct 2001
Location: Canada
Posts: 3,751
maximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond repute
Smile 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;
}
}
__________________
Save Classic!
Reply With Quote
  #2  
Old 10-30-2001, 12:41 PM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
u made it urself?
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #3  
Old 10-30-2001, 01:17 PM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Most of it looks like the time script from New Main.
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #4  
Old 10-30-2001, 03:26 PM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
whats amazing

its amazing how that in no way resembles the one Rob Geta posted a few days ago. ehh ?
Reply With Quote
  #5  
Old 10-30-2001, 07:02 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
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.
__________________

Reply With Quote
  #6  
Old 10-31-2001, 08:56 AM
maximus_asinus maximus_asinus is offline
RIP DarkCloud_PK
Join Date: Oct 2001
Location: Canada
Posts: 3,751
maximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond repute
Smile 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
Thanks.
ANd the only reason they look the same is because I had to borrow a few lines that kept screwing up.
__________________
Save Classic!
Reply With Quote
  #7  
Old 10-31-2001, 09:36 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
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
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 ?
Reply With Quote
  #8  
Old 10-31-2001, 10:02 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
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
Reply With Quote
  #9  
Old 10-31-2001, 10:41 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
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 !
Reply With Quote
  #10  
Old 10-31-2001, 10:22 PM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
That looks a little more complicated than u could make

Last edited by btedji; 11-01-2001 at 04:11 AM..
Reply With Quote
  #11  
Old 10-31-2001, 10:29 PM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
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.
__________________
Reply With Quote
  #12  
Old 10-31-2001, 10:39 PM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
*anger*
Reply With Quote
  #13  
Old 11-01-2001, 04:08 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
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!!!!!!!!!!!!
Reply With Quote
  #14  
Old 11-01-2001, 06:11 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
correction: it has "NPC-Server" not "errors" but "NPC-Server"
Reply With Quote
  #15  
Old 11-01-2001, 04:43 PM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
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 ...
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 11:51 PM.


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