Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Downloadsize (https://forums.graalonline.com/forums/showthread.php?t=56607)

middo 12-24-2004 01:08 AM

Downloadsize
 
Here is a snippet from a test I am conducting for a script.

this.var=downloadsize;
say2
DL SIZE: #v(downloadsize)#b
DL SIZE #s(downloadsize)#b
DL SIZE #v(this.var)#b
DL NAME: #D#b
DL PROGRESS: #v(downloadpos);

I have gotten everything to work except the variable; downloadsize.
The say2 is set to only come up when a download is in progress, but downloadsize is always blank (I just delete the tileset from the server im working with and relog, and it gives me the say2)
I tried different methods but nothing works.

I found this inside the newfeatures txt

new scripting variable 'downloadsize': when the
graal client is currently downloading a big file
(>32k) then this variable contains the size of the
file; using downloadpos, downloadsize and #D you can
check if a file is currently downloaded can
display a process bar or similar

No luck yet.

Skyld 12-24-2004 02:37 AM

I do not think downloadsize works correctly. Have you tried your script with the Graal 3 client?

ZeroTrack 12-24-2004 03:33 AM

Quote:

Originally Posted by middo
Here is a snippet from a test I am conducting for a script.

this.var=downloadsize;
say2
DL SIZE: #v(downloadsize)#b
DL SIZE #s(downloadsize)#b
DL SIZE #v(this.var)#b
DL NAME: #D#b
DL PROGRESS: #v(downloadpos);

I have gotten everything to work except the variable; downloadsize.
The say2 is set to only come up when a download is in progress, but downloadsize is always blank (I just delete the tileset from the server im working with and relog, and it gives me the say2)
I tried different methods but nothing works.

I found this inside the newfeatures txt

new scripting variable 'downloadsize': when the
graal client is currently downloading a big file
(>32k) then this variable contains the size of the
file; using downloadpos, downloadsize and #D you can
check if a file is currently downloaded can
display a process bar or similar

No luck yet.


Check forums before posting, I've already posted this problem a while ago http://forums.graalonline.com/forums...ad.php?t=56117

Slash-P2P 12-24-2004 07:47 PM

downloadsize/downloadpos/#D should apply to all files or something smaller like >=16k

JudgeDurst 12-25-2004 01:41 AM

Maybe something could be implemented that can be used to specify the file size minimum before it sets the download variables.. or something.

Probably a bad idea I guess but it is an idea.

Slash-P2P 12-26-2004 03:48 AM

Quote:

Originally Posted by JudgeDurst
Maybe something could be implemented that can be used to specify the file size minimum before it sets the download variables.. or something.

Probably a bad idea I guess but it is an idea.

It sounds like a good idea. maybe a server option?
downloadsize=16000 or something.

Python523 12-26-2004 01:46 PM

Quote:

Originally Posted by Slash-P2P
It sounds like a good idea. maybe a server option?
downloadsize=16000 or something.

16kb would be downloaded by even a 56k modem in like 4-5 seconds, hardly enough to even matter

Slash-P2P 12-26-2004 05:40 PM

Quote:

Originally Posted by Python523
16kb would be downloaded by even a 56k modem in like 4-5 seconds, hardly enough to even matter

Still, it would be useful for players to know whats downloading.

Tolnaftate2004 12-26-2004 09:59 PM

When the variable works again, you could show only larger files downloading with something like:
PHP Code:

if (downloadsize 16000){
  
//stuff



ZeroTrack 12-27-2004 12:55 AM

Quote:

Originally Posted by Tolnaftate2004
When the variable works again, you could show only larger files downloading with something like:
PHP Code:

if (downloadsize 16000){
  
//stuff



only large files show with #D and downloadpos now the way to check it would be
PHP Code:

if(strlen(#D)>0){
  
setplayerprop #c,Downloading: #D-#v(downloadpos);



Tolnaftate2004 12-27-2004 10:35 PM

Quote:

Originally Posted by ZeroTrack
only large files show with #D and downloadpos now the way to check it would be
PHP Code:

if(strlen(#D)>0){
  
setplayerprop #c,Downloading: #D-#v(downloadpos);



I was just saying that there would be no need to make a serveroption for a file size minimum (It wouldn't have to be 16000).


All times are GMT +2. The time now is 08:44 PM.

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