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 12-11-2006, 10:42 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Question Filebrowser for a Client-RC

Does anyone know how to load the filebrowser for a Client-RC?
I know its a requesttext() operation, but I don't know what to request

I've tried requesttext("folders", player.account); but that doesn't work ;(
Reply With Quote
  #2  
Old 12-13-2006, 01:09 AM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Ignored as usual
Reply With Quote
  #3  
Old 12-13-2006, 01:17 AM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
When clientside, does this produce any result in your F2 window?
PHP Code:
//#CLIENTSIDE

function onCreated()
{
  
requesttext("clientrc"1);
}

function 
onReceiveText(texttypetextoptiontextlines)
{
  switch (
temp.texttype)
  {
    case 
"clientrc":
    {
      if (
temp.textoption == 1)
      {
        
requesttext("folders""");
      }
 
      break;
    }

    case 
"folders":
    {
      echo(
format("%s %s %s"temp.texttypetemp.textoptionstemp.textlines));
 
      break;
    }
  }

I do not remember if the filebrowser is returning a giant array or if it sends data in parts, I guess you will find out by trying that.
__________________
Skyld
Reply With Quote
  #4  
Old 12-13-2006, 01:26 AM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
That produced


folders heads/,images/,levels/,levels/bodies/,levels/ganis/,levels/guilds/,levels/heads/,levels/images/,levels/shields/,levels/swords/,logs/,npcs/,scripts/,shields/,temp/,weapons/


x.x
Reply With Quote
  #5  
Old 12-13-2006, 01:27 AM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Then I assume that your folderlist is being returned in temp.textoptions in that case. You should try sending a folder as requesttext()'s second parameter to see if you get a file listing in the same way. Then you can use the information to build your filemanager.
__________________
Skyld
Reply With Quote
  #6  
Old 12-13-2006, 01:36 AM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
And I just break down the array (Perferably using a for loop) and put it into a list / menu or whatever?
Reply With Quote
  #7  
Old 12-13-2006, 10:15 AM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Yep, something like a GuiTreeViewCtrl for the folder tree and a GuiTextListCtrl for a file list.
__________________
Skyld
Reply With Quote
  #8  
Old 12-13-2006, 01:41 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Nice. This is what I have:





Now I need to figure out how to download files with it :x
Reply With Quote
  #9  
Old 12-13-2006, 07:58 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Does anyone know how to make it download a file?

Isn't it a sendText() thing or something?
Reply With Quote
  #10  
Old 12-17-2006, 10:01 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
This is an offhand comment but thats is a nice window theme you got there. Would you mind if I used it on Aeon?
__________________
Reply With Quote
  #11  
Old 12-17-2006, 10:13 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Inverness View Post
This is an offhand comment but thats is a nice window theme you got there. Would you mind if I used it on Aeon?
Its quite 'dark & black', but it looks nice



godofwarares, any new updates on the file browser?
__________________
Reply With Quote
  #12  
Old 12-17-2006, 11:34 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Yep!

Check this out:





Still havn't figured out how to download files yet

Someone help me
Reply With Quote
  #13  
Old 12-17-2006, 11:40 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
I think the command you are looking for is selectfilefordownload(str filter), which will prompt the user for a location to save the file passed as the parameter (from the server).
__________________
Skyld
Reply With Quote
  #14  
Old 12-17-2006, 11:40 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Quote:
Originally Posted by Inverness View Post
This is an offhand comment but thats is a nice window theme you got there. Would you mind if I used it on Aeon?
Sure if you want, I'll give you it later :o
Reply With Quote
  #15  
Old 12-17-2006, 11:43 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Quote:
Originally Posted by Skyld View Post
I think the command you are looking for is selectfilefordownload(str filter), which will prompt the user for a location to save the file passed as the parameter (from the server).
o_o

I didn't know you could do requesttext("folder","C"); o_O

Cool it works

...somewhat x)
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 03:15 PM.


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