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 12-15-2001, 09:53 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Question Uhm...

I need something scripted:

It records the time a FAQ has been on a tag, and resets sunday, twelve PM, am, whatever/after eleven PM. It takes the tags/accounts, etc, out of the "guildFAQ.txt" file (if that is still the name of it). I'd need to be able to view it on my FAQ Chief tag "list times."

It'd show up in a format like the "House Owner Helper!" guy.

Account:Nickname - Hours been on.

If you know how to do this, post in this thread.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #2  
Old 12-15-2001, 12:38 PM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
Are you sure this is possible with the hours next to their name? This is very complicated.
Reply With Quote
  #3  
Old 12-15-2001, 12:41 PM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
I would think so? Classic had something similar to it, but they weren't able to have it like I described it because of no NPC server...

It's a little -faqsystem like NPC, by the way. It goes to their q-list inventory.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #4  
Old 12-15-2001, 01:59 PM
T-Squad T-Squad is offline
Banned
T-Squad's Avatar
Join Date: Mar 2001
Location: United States of America
Posts: 1,733
T-Squad is on a distinguished road
Oh if its a NPCW then it shouldn't be hard at all.
Reply With Quote
  #5  
Old 12-15-2001, 02:04 PM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Quote:
Originally posted by T-Squad
Oh if its a NPCW then it shouldn't be hard at all.
Yeah, but it'd link to some NPC Character in a level. It'd have the "view times," etc, commands there... The times the player has been online would come from the NPC, and show up in the NPC Character in a level.

Do you think you could do it? And if you could, would you mind?
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #6  
Old 12-15-2001, 03:02 PM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to entravial
~AlphaFlame~

Hmm... non-p2p would use a couple of server. flags and some this.variables... otherwise I dunno...

Note to self: do p2p scripting one day in the next 20 years
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #7  
Old 12-15-2001, 04:55 PM
Spark910 Spark910 is offline
Ex-Graal Global
Spark910's Avatar
Join Date: Oct 2001
Location: England
Posts: 10,892
Spark910 has a spectacular aura about
Note to self:Me too.
__________________
--Spark911
Reply With Quote
  #8  
Old 12-15-2001, 10:33 PM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
if(strequals(#g,FAQ)){
if(strtofloat(#s(starttime))<1){
setstring starttime,#v(timevar);
}
}else{
if(strtofloat(#s(starttime))<0){
setstring timeontag,#v(strtofloat(#s(timeontag))+(timevar-strtofloat(#s(starttime))));
}}

You can store it manually, and it'll store timeontag as a function of timevar (since it goes up once every like 2 seconds, divide by 30 to get the number of minutes, etc)
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #9  
Old 12-15-2001, 10:46 PM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
um it goes up every 5 seconds...
__________________
No Webhost at the moment
Reply With Quote
  #10  
Old 12-15-2001, 11:56 PM
Yakuna2001 Yakuna2001 is offline
Registered User
Yakuna2001's Avatar
Join Date: Jun 2001
Location: England U.K
Posts: 940
Yakuna2001 is on a distinguished road
Send a message via AIM to Yakuna2001
Quote:
Originally posted by Tyhm
if(strequals(#g,FAQ)){
if(strtofloat(#s(starttime))<1){
setstring starttime,#v(timevar);
}
}else{
if(strtofloat(#s(starttime))<0){
setstring timeontag,#v(strtofloat(#s(timeontag))+(timevar-strtofloat(#s(starttime))));
}}

You can store it manually, and it'll store timeontag as a function of timevar (since it goes up once every like 2 seconds, divide by 30 to get the number of minutes, etc)
tyhm...... u officially own
__________________

-Manager of the UnholyNation PlayerWorld-
UnholyNation Forums
Reply With Quote
  #11  
Old 12-16-2001, 03:49 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Quote:
Originally posted by Tyhm
if(strequals(#g,FAQ)){
if(strtofloat(#s(starttime))<1){
setstring starttime,#v(timevar);
}
}else{
if(strtofloat(#s(starttime))<0){
setstring timeontag,#v(strtofloat(#s(timeontag))+(timevar-strtofloat(#s(starttime))));
}}

You can store it manually, and it'll store timeontag as a function of timevar (since it goes up once every like 2 seconds, divide by 30 to get the number of minutes, etc)
I suck at scripting. What would go in the NPC that I say "list times" that shows the time each faq with that NPC has been online?
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #12  
Old 12-16-2001, 04:20 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
NPC Code:

if(strequals(#g,FAQ)){
if(strtofloat(#s(starttime))<1){
setstring starttime,#v(timevar);
}else if((timevar- strtofloat(#s(starttime)))+ strtofloat(#s(server.#atimeontag)) > 60){ setstring server.#atimeontag,#v( strtofloat(#s(server.#atimeontag)) + (timevar- strtofloat(#s(starttime))));
setstring starttime,#v(timevar);
}else{
if(strtofloat(#s(starttime))<0){
setstring server.#atimeontag,#v(strtofloat(#s(server.#atimeo ntag))+(timevar-strtofloat(#s(starttime))));
}
}


SHOULD update the server.[accountname]timeontag string every five minutes, assuming it is indeed 5 seconds per click.
NPC Code:

if(playerenters&&strequals(#g,FAQ Chief)) toweapons FAQ Checker;
if(playerchats&&strequals(#w,FAQ Checker)){
setcharprop #n,#c;
this.clicks=strtofloat(#s(server.#ctimeontag));
this.minutes=(this.clicks/12)%60;
this.hours=(this.clicks/720);
setplayerprop #c,#c: #v(this.hours) : #v(this.minutes) : #v((this.clicks%12)*5);
//setstring server.#ctimeontag,0;
}


Should report the H:M:S assuming 5 seconds per click - otherwise you can redo the math however you like. Uncomment the last line and it'll reset the time since last check; either way you're gonna have to record it, either how much time they put in last time you checked or what the last time you checked was. It'd be rude if you checked it (thereby clearing it), then checked again five minutes later and fired them for not coming on at all!
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #13  
Old 12-16-2001, 04:33 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Okay,
It shows up as (see attatched.)
Attached Thumbnails
Click image for larger version

Name:	bugged.png
Views:	190
Size:	25.1 KB
ID:	8952  
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #14  
Old 12-16-2001, 04:35 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
But it needs to be like this. (see attatched.)

The other stuff works fine.
Attached Thumbnails
Click image for larger version

Name:	howitissupposedtobe.png
Views:	175
Size:	24.6 KB
ID:	8953  
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #15  
Old 12-16-2001, 04:39 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
The "online" in that last one should be "on tag this week."

I'd need it to show up as something like in the screenshot attatched. Account Hours, Minutes, Seconds, etc.
Attached Thumbnails
Click image for larger version

Name:	faqtimelist.png
Views:	167
Size:	18.4 KB
ID:	8954  
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #16  
Old 12-16-2001, 10:17 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Hm, golly gee, in that case SCRIPT IT YOURSELF! Geeze, some people...give 'em an inch...*grumble grumble don't even work for this server grumble*
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #17  
Old 12-16-2001, 10:44 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough


Sorry, sorry.

I can't script at all. Maybe I could get that one script from loriel, and then go from there.

Thanks for that one script, tyhm.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #18  
Old 12-18-2001, 02:33 AM
ShockwaveISTHEBEST ShockwaveISTHEBEST is offline
Registered User
Join Date: Nov 2001
Location: never never land
Posts: 208
ShockwaveISTHEBEST is on a distinguished road
Send a message via AIM to ShockwaveISTHEBEST Send a message via Yahoo to ShockwaveISTHEBEST
Tyhm, your pretty damn good at this whole scripting bit.
__________________
[img]http://rick.*******ers.net/ss/users/jerrytyrrell64/Shockwave%20Sig%2003.jpg[/img]
Reply With Quote
  #19  
Old 12-18-2001, 03:59 AM
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
Arg use string arrays you people
Reply With Quote
  #20  
Old 12-19-2001, 12:16 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
This is with npc server?

if this is with npcserver, can't u use a with?
like:
NPC Code:

/*
you could just do something like make accounts like:
setstring server.faqacc1,accountname;
so lets make believe you have 2 faqs.
*/
Database NPC / Source NPC:
if (created||initialized) {
setstring server.faqacc0,accountname;
setstring server.faqacc1,accountname;
// this.maxaccounts should be the highest numer you have in the list...so for this example the maxaccnts is 1...
this.maxaccnts = 1;
this.i = 0;
}
while (this.i<this.maxaccnts) {
with(getplayer(#s(server.faqacc#v(this.i)))) {
if (strequals(#g,FAQ)&&strlen(#s(server.faqaccon#v(th is.i)))<1) {
setstring server.faqaccon,#v(timevar);
} else if (!strequals(#g,FAQ)&&strlen(#s(server.faqaccon#v(t his.i)))>0) {
this.starttime = strtofloat(#s(server.faqaccon#v(this.i)));
setstring server.faqaccon#v(this.i),;
this.currtime = timevar;
this.hastime = strtofloat(#s(server.faqacctime#v(this.i)));
this.newtime = (this.currtime-this.starttime)+this.hastime;
setstring server.faqacctime,#v(this.newtime);
this.i++;
}
}
sleep .1;
}
while (this.i>=this.maxaccnts) {this.i=0;sleep .1;}
if (actionserverCheckTime) {
this.j=0;
while (this.j<this.maxaccnts) {
showimg this.j+500,@#s(server.faqacc#v(this.j)): #s(server.faqacctime#v(this.j)),10,100+(this.j*15) ;
changeimgvis this.j+500;
this.j++;
}
}

The NPC Used to Check times:
if (playertouchsme) toweapons Time Check;
if (playerchats&&strequals(Check FAQ Times,#c)) {triggeraction 0,0,serverCheckTime,;}



Its mostly done, i haven't tested it, i am still at school...it looks pretty good..should work... someone test it and tell me...ok? looks pretty good to me.
-PastAustin
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it

Last edited by Saga2001; 12-19-2001 at 03:55 AM..
Reply With Quote
  #21  
Old 12-19-2001, 03:55 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
someone

does this look right? i am tired...i think it looks good...
yeah?
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
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 08:09 PM.


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