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 09-06-2004, 08:59 PM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
downloadsize

How come downloadsize it returning zero everytime? simple test will prove it does

if(created||timeout){
setplayerprop #c, #D #v(downloadpos) / #v(downloadsize);
timeout = .05;
}

Notice the var downloadsize comes up 0
__________________

Reply With Quote
  #2  
Old 09-06-2004, 10:10 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
If there is no current download, the variable will become 0, are you running the script client-side? I may be wrong but I think it doesn't work server-side.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /

Last edited by osrs; 09-06-2004 at 10:34 PM..
Reply With Quote
  #3  
Old 09-06-2004, 11:41 PM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
yea its clientside, and #D work as such

#D,#D(filename)

The player chat i got was this

filename.png 32000 / 0
this script returned this to RC :
NPC Code:

if(actionserverside)
sendtonc Downloading:#p(0) #p(1) / #p(2);
//#CLIENTSIDE
if(created||timeout){
timeout=.5;
triggeraction 0,0,serverside,Sern,#D,#v(downloadpos),#v(download size),;
}



Downloading:bravo_tileset.png 32000 / 0
Downloading:bravo_tileset.png 32000 / 0
Downloading:bravo_tileset.png 32000 / 0
Downloading:bravo_tileset.png 64000 / 0
Downloading:bravo_tileset.png 64000 / 0
Downloading:bravo_tileset.png 64000 / 0
Downloading:bravo_tileset.png 96000 / 0
Downloading:bravo_tileset.png 96000 / 0
Downloading:bravo_tileset.png 96000 / 0
Downloading:bravo_tileset.png 128000 / 0
Downloading:bravo_tileset.png 128000 / 0
Downloading:bravo_tileset.png 160000 / 0
Downloading:bravo_tileset.png 160000 / 0
Downloading:bravo_tileset.png 160000 / 0
Downloading:bravo_tileset.png 192000 / 0
Downloading:bravo_tileset.png 192000 / 0
Downloading:bravo_tileset.png 192000 / 0
Downloading:bravo_tileset.png 224000 / 0
Downloading:bravo_tileset.png 224000 / 0
Downloading:bravo_tileset.png 256000 / 0
Downloading:bravo_tileset.png 256000 / 0
__________________


Last edited by ZeroTrack; 09-06-2004 at 11:52 PM..
Reply With Quote
  #4  
Old 09-07-2004, 12:04 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Your script is pretty insecure, you don't really need to use sendtonc and even inside a timeout loop.
It is returning 0, because of this:

triggeraction 0,0,serverside,Sern,#D,#v(downloadpos),#v(download size),;

The name of the variable is downloadsize, and you used space.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #5  
Old 09-07-2004, 12:11 AM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
no i didnt the fourm made it that way for some reason, which leads me to believe that the gserver is doing it too, and the sendtonc is for debuging
__________________

Reply With Quote
  #6  
Old 09-07-2004, 01:55 AM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Maybe you should try:
sendtonc Downloading:#p(0) #p(1) / #v(downloadsize);

It may just be that the client doesn't know how large the file is because it has yet to download?
Reply With Quote
  #7  
Old 09-07-2004, 02:06 AM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
Quote:
Originally Posted by Tolnaftate2004
Maybe you should try:
sendtonc Downloading:#p(0) #p(1) / #v(downloadsize);

It may just be that the client doesn't know how large the file is because it has yet to download?
hmm no that didnt work but that shouldnt matter cause the newfeatures doc states

-new scripting variable 'downloadsize': when the
graal client is currently downloading a big file
(>32k) then this variable contains the size of the
file
__________________

Reply With Quote
  #8  
Old 09-07-2004, 03:34 PM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
Has anyone figured out this problem yet?
__________________

Reply With Quote
  #9  
Old 09-16-2004, 10:19 PM
Tseng2 Tseng2 is offline
Lance
Tseng2's Avatar
Join Date: Sep 2004
Location: California, USA.
Posts: 4
Tseng2 is on a distinguished road
Quote:
Originally Posted by ZeroTrack
no i didnt the fourm made it that way for some reason, which leads me to believe that the gserver is doing it too, and the sendtonc is for debuging
You put a space in there - the forum does not insert spaces there, and the supposition that the server does so is laughable. Use the proper variable if you wish the proper result. If you still have a problem, post your revised code and we will have a look at it.
__________________
Reply With Quote
  #10  
Old 09-17-2004, 01:36 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by ZeroTrack
yea its clientside, and #D work as such

#D,#D(filename)

The player chat i got was this

filename.png 32000 / 0
this script returned this to RC :
NPC Code:

if(actionserverside)
sendtonc Downloading:#p(0) #p(1) / #p(2);
//#CLIENTSIDE
if(created||timeout){
timeout=.5;
triggeraction 0,0,serverside,Sern,#D,#v(downloadpos),#v(download size),;
}



Downloading:bravo_tileset.png 32000 / 0
Downloading:bravo_tileset.png 32000 / 0
Downloading:bravo_tileset.png 32000 / 0
Downloading:bravo_tileset.png 64000 / 0
Downloading:bravo_tileset.png 64000 / 0
Downloading:bravo_tileset.png 64000 / 0
Downloading:bravo_tileset.png 96000 / 0
Downloading:bravo_tileset.png 96000 / 0
Downloading:bravo_tileset.png 96000 / 0
Downloading:bravo_tileset.png 128000 / 0
Downloading:bravo_tileset.png 128000 / 0
Downloading:bravo_tileset.png 160000 / 0
Downloading:bravo_tileset.png 160000 / 0
Downloading:bravo_tileset.png 160000 / 0
Downloading:bravo_tileset.png 192000 / 0
Downloading:bravo_tileset.png 192000 / 0
Downloading:bravo_tileset.png 192000 / 0
Downloading:bravo_tileset.png 224000 / 0
Downloading:bravo_tileset.png 224000 / 0
Downloading:bravo_tileset.png 256000 / 0
Downloading:bravo_tileset.png 256000 / 0
I tried that with #v(downloadsize) instead of #v(download size) and got the same thing.

Bug perhaps?
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #11  
Old 09-17-2004, 01:59 PM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
Quote:
Originally Posted by Tseng2
You put a space in there - the forum does not insert spaces there, and the supposition that the server does so is laughable. Use the proper variable if you wish the proper result. If you still have a problem, post your revised code and we will have a look at it.
LANCE! post the code your-self without a space and watch what happens , i know what im doing i wouldnt put a space there, if you dont know the awnser then dont comment, please try posting the code youself then you'll see so you can put that foot back in your mouth

and BTW! read the first post here i did without using the code tags, ... oh whats that ?? its not spaced? oh loookk at thatt
__________________

Reply With Quote
  #12  
Old 09-17-2004, 02:02 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Geez, he is trying to help, don't be so rude.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #13  
Old 09-17-2004, 02:28 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
NPC Code:

message #v(downloadsize);



Edit: works?
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #14  
Old 09-17-2004, 06:02 PM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
na i tired that too returns 0 still
__________________

Reply With Quote
  #15  
Old 09-17-2004, 07:12 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Quote:
Originally Posted by ZeroTrack
na i tired that too returns 0 still
I was reffering to the forums

huh, it seems to work fine in v3, but not 2
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
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 12:22 AM.


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