Graal Forums

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

xXziroXx 05-21-2007 03:47 PM

Update packages?
 
I'm having problems making a package "popup" asking if it should be downloaded or not. I've experimented with ALL settings for the past hour, yet I can't make it work.

I've tried setting it to optional and popupforoptionalpackages to false/true. I've tried changing ALL settings. And yes, I know how they work - I've used them since they first came out.

But.. I can NOT make an optional download popup, no matter how I try. So could anyone who KNOWS EXACTLY how to do it please post an example? Because I don't want a music package to be required, and if I make it optional a lot of people won't know how to download it, so I want a popup.

Cheers in advance.

xXziroXx 05-26-2007 12:28 AM

Stefan? Anyone?

Admins 05-26-2007 12:39 AM

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);



xXziroXx 05-26-2007 12:40 AM

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);



Thanks alot! :D

cbk1994 05-26-2007 05:16 AM

I think you have to have like a main.gupd or something.

godofwarares 05-26-2007 03:06 PM

Quote:

Originally Posted by cbkbud (Post 1311989)
I think you have to have like a main.gupd or something.

Yeah, basepackage.gupd

xXziroXx 08-07-2007 10:57 PM

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);



Stefan, seeing as thought you said that it was planned to add a popup thing - has it been added? If not, will it ever be?


All times are GMT +2. The time now is 06:08 AM.

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