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 01-12-2002, 04:24 AM
Oxy-Moron Oxy-Moron is offline
Registered User
Join Date: Dec 2001
Location: New Joisey
Posts: 217
Oxy-Moron is on a distinguished road
Send a message via AIM to Oxy-Moron
Using onlinetime or something similar...

I've been toying around with the idea of a sort of exp system based off of onlinetime, but I'm having some serious trouble getting any thoughts relative to this from my NATs.

In principle, a player would make a class, and when made, it would set a flag in their account equal to their online time. Then when the player goes to some sort of shop (we'll call it an exp. shop just for sanity's sake), the shop's script compares the player's current online time to the time in the flag. It would find the difference between the two and give the player exp according to that amount (calculation still to be figured). The shop would then set the original online time flag to the player's current online time.

As far as I've heard, there probably isn't a command for detecting online time, so is there any way possible, if this is so, that a system could be rigged to work LIKE this without having timeouts run for 60 seconds and adding on, to prevent lag? (Like Mithica's horrible EXP system).

Any help would be much appreciated.
__________________
Munki - Delteria Server Admin
Reply With Quote
  #2  
Old 01-12-2002, 05:38 AM
Kumada Kumada is offline
Ded
Kumada's Avatar
Join Date: Nov 2001
Location: Usa
Posts: 1,088
Kumada is on a distinguished road
Re: Using onlinetime or something similar...

Quote:
Originally posted by Oxy-*****
I've been toying around with the idea of a sort of exp system based off of onlinetime, but I'm having some serious trouble getting any thoughts relative to this from my NATs.

In principle, a player would make a class, and when made, it would set a flag in their account equal to their online time. Then when the player goes to some sort of shop (we'll call it an exp. shop just for sanity's sake), the shop's script compares the player's current online time to the time in the flag. It would find the difference between the two and give the player exp according to that amount (calculation still to be figured). The shop would then set the original online time flag to the player's current online time.

As far as I've heard, there probably isn't a command for detecting online time, so is there any way possible, if this is so, that a system could be rigged to work LIKE this without having timeouts run for 60 seconds and adding on, to prevent lag? (Like Mithica's horrible EXP system).

Any help would be much appreciated.
not that hard.. i could do it when i have the time
__________________
Aim: Mmm Kumada

Reply With Quote
  #3  
Old 01-12-2002, 06:02 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
use a counting var in a timeout in your system NPC...
so u just refresh the time string every 10 seconds and there is no big lagg...
__________________
No Webhost at the moment
Reply With Quote
  #4  
Old 01-12-2002, 08:32 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
Quote:
Originally posted by TDO2000
use a counting var in a timeout in your system NPC...
so u just refresh the time string every 10 seconds and there is no big lagg...

erm.....
or just use timevar..

this.second=int(timevar)%60;
this.minutes=int(timevar/60)%60;

that will give seconds and minutes.

figure the rest out from there, im not your *****
Reply With Quote
  #5  
Old 01-12-2002, 08:54 AM
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
Timevar is server onlinetime.
Reply With Quote
  #6  
Old 01-12-2002, 09:10 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
ok then..

use the var i did b4
then do..

onlinetime=(int(timevar)%60)-this.second;
Reply With Quote
  #7  
Old 01-12-2002, 10:29 AM
Shard_IceFire Shard_IceFire is offline
Registered User
Shard_IceFire's Avatar
Join Date: Jun 2001
Location: Eastern Harkoonia
Posts: 861
Shard_IceFire is on a distinguished road
Quote:
Originally posted by Slaktmaster
Timevar is server onlinetime.
Yes but it works offline too, so you could still be able to test the NPC to some extent.
__________________

-=Shard IceFire=-
Reply With Quote
  #8  
Old 01-12-2002, 11:54 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
he meant time for server, not player, but i fixed it
Reply With Quote
  #9  
Old 01-12-2002, 07:55 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
Quote:
Originally posted by Warcaptain
ok then..

use the var i did b4
then do..

onlinetime=(int(timevar)%60)-this.second;
That would mean everyone has the same online time :/

Anyhow...
NPC Code:
if (playerenters&&!(hasweapon(-OnlineTimeSystem))) toweapon -OnlineTimeSystem;
//#CLIENTSIDE
if ((created||timeout)&&isweapon) {
setstring client.seconds,#v((strtofloat(#s(client.seconds))+ 0.05)%60);
if (strtofloat(#s(client.seconds))==0) {
setstring client.seconds,#v(strtofloat((#s(client.minutes))+ 1)%60);
if (strtofloat(#s(client.minutes))==0) setstring client.hours,#v(strtofloat(#s(client.hours))+1);
}
timeout=0.05;
}

Would be an acceptable way of easily keeping track of the online time a player has, though it would reset if the player's account is reset.
__________________

Reply With Quote
  #10  
Old 01-15-2002, 07:31 AM
LilNiglet LilNiglet is offline
Registered User
Join Date: Jun 2001
Posts: 3,178
LilNiglet is on a distinguished road
Quote:
Originally posted by grim_squeaker_x
That would mean everyone has the same online time :/

Anyhow...
NPC Code:
if (playerenters&&!(hasweapon(-OnlineTimeSystem))) toweapon -OnlineTimeSystem;
//#CLIENTSIDE
if ((created||timeout)&&isweapon) {
setstring client.seconds,#v((strtofloat(#s(client.seconds))+ 0.05)%60);
if (strtofloat(#s(client.seconds))==0) {
setstring client.seconds,#v(strtofloat((#s(client.minutes))+ 1)%60);
if (strtofloat(#s(client.minutes))==0) setstring client.hours,#v(strtofloat(#s(client.hours))+1);
}
timeout=0.05;
}

Would be an acceptable way of easily keeping track of the online time a player has, though it would reset if the player's account is reset.
Wow, really good! We think we may use that, with your permission, of course...
Reply With Quote
  #11  
Old 01-15-2002, 08:54 AM
Oxy-Moron Oxy-Moron is offline
Registered User
Join Date: Dec 2001
Location: New Joisey
Posts: 217
Oxy-Moron is on a distinguished road
Send a message via AIM to Oxy-Moron
Wow.. sorry for not responding to here for a while, but I've been pre-occupied lately (ie. doing damn near everything for Delteria. That time system, Squeaker... simple efficient and really rather nice. So, with your permission, could I use that code for the EXP system I'm creating? Full credit would be given to you for the timer.
Reply With Quote
  #12  
Old 01-15-2002, 08:58 AM
Boozy_Bravo Boozy_Bravo is offline
Registered User
Join Date: Sep 2001
Location: Texas, USA
Posts: 1,108
Boozy_Bravo is on a distinguished road
Send a message via AIM to Boozy_Bravo Send a message via Yahoo to Boozy_Bravo
I don't think going by onlinetime for anything is a good idea.
Reply With Quote
  #13  
Old 01-15-2002, 09:20 AM
Oxy-Moron Oxy-Moron is offline
Registered User
Join Date: Dec 2001
Location: New Joisey
Posts: 217
Oxy-Moron is on a distinguished road
Send a message via AIM to Oxy-Moron
It's a work in progress... again, these are just ideas. Once we get everything finished, we DON'T want Delteria to be known as a newbie PK server, so we AREN'T going to give Experience for player killing. So I feel that the best basis for experience that I can come up with for now is online time...
Reply With Quote
  #14  
Old 01-15-2002, 07:17 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
Feel free to use it.
__________________

Reply With Quote
  #15  
Old 01-16-2002, 06:16 AM
Boozy_Bravo Boozy_Bravo is offline
Registered User
Join Date: Sep 2001
Location: Texas, USA
Posts: 1,108
Boozy_Bravo is on a distinguished road
Send a message via AIM to Boozy_Bravo Send a message via Yahoo to Boozy_Bravo
Quote:
Originally posted by Oxy-*****
It's a work in progress... again, these are just ideas. Once we get everything finished, we DON'T want Delteria to be known as a newbie PK server, so we AREN'T going to give Experience for player killing. So I feel that the best basis for experience that I can come up with for now is online time...
You can think of something else, just script everything for onlinetime now, untill you find a better away.

And PK'ing is one of the funnest things on graal.
Reply With Quote
  #16  
Old 01-17-2002, 03:19 AM
Oxy-Moron Oxy-Moron is offline
Registered User
Join Date: Dec 2001
Location: New Joisey
Posts: 217
Oxy-Moron is on a distinguished road
Send a message via AIM to Oxy-Moron
Quote:
Originally posted by Boozy_Bravo

You can think of something else, just script everything for onlinetime now, untill you find a better away.

And PK'ing is one of the funnest things on graal.
I agree x.x But since Delteria has such a bad name, we're trying hard to pull a complete 180 now that Ice is gone.. Err, anyway this has gone off topic.

Fixed a few slight flaws, and with the help of Nyght, got a rough EXP system up and running based around onlinetime. Thanks again Grim
Reply With Quote
  #17  
Old 01-17-2002, 09:51 PM
Ultima_P2P Ultima_P2P is offline
Registered User
Join Date: Dec 2001
Location: On Your Doorstep
Posts: 168
Ultima_P2P is on a distinguished road
Send a message via AIM to Ultima_P2P
Ultima is posting this message for Chicken!

Chicken Says:

Like delteria is liek the Noob Factory it will neever Become Un-Nooby it's been Nooby Since it got up Like almost everyone there Uses Npcs and Pauses I Got like Alota deaths by stupid Npcs and crap Omg and Using Online time for Exp omg like total Lameness how Dull And Saying pking For exp is for Noobs lool Hell no fool!!

[Ultima has no affiliation with any messages or disturbances posted in this post]
__________________

- ¤*U£†îmå*¤

Forever in my hands
I hold the sword...
Reply With Quote
  #18  
Old 01-18-2002, 01:05 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
Though it sounds like a good system you should decide if you want to do hours or not, and maybe you could do an age script!!! that would be ub3r leet, and your appearance changes...somehow...that would be a fun server to work on p2p or no?
__________________

!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 01:20 AM.


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