Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Check a package has downloaded? (https://forums.graalonline.com/forums/showthread.php?t=75107)

JkWhoSaysNi 07-04-2007 09:42 PM

Check a package has downloaded?
 
Is there any way to tell when the base package has finished downloading?

I want to warp the player to the starting point once the package is downloaded. At the moment everything is still download via the package as they enter the game.

Chompy 07-04-2007 10:02 PM

Since you can script packages (quote below (From Ziro's thread about popup for packages)), maybe :o

Quote:

Originally Posted by Stefan (Post 1311914)
There is no popup thing right now, it was planned though. You can however script it yourself, something like this (calling update() is downloading it):

PHP Code:

printPackage(getBasePackage());

function 
printPackage(package) {
  echo(
"package: " package.filename " - " package.name);
  if (
package.filename=="mymusic.gupd" &&
      
package.localversion<package.version)
    
package.update();

  for (
temp.subpackagepackage.packages)
    
printPackage(temp.subpackage);



Dunno if it helps, but

you could check in a timeout this:
PHP Code:

temp.package getBasePackage();
if (
temp.package.localversion == temp.package.version) {
  
// do stuff



Admins 07-04-2007 10:15 PM

There is also an event "onPackagesDownloadComplete"

coreys 07-04-2007 10:37 PM

lol, Stefan just owned Chompy. ;(

JkWhoSaysNi 07-04-2007 11:35 PM

ah thanks :) Chompy & Stefan.


All times are GMT +2. The time now is 03:53 AM.

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