Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   Rawr.. things needed for the OLE (https://forums.graalonline.com/forums/showthread.php?t=66444)

Warcaptain 06-04-2006 04:06 AM

Rawr.. things needed for the OLE
 
Ooookay Stefan you asked me to post it.. here is everything WE NEED for the OLE.
  1. level.npc object this should be an multilevel array.. ie:
    level.npc[npcID] = {script,of,npc,line,by,line};
    so lets say NPC ID 1's script is this:
    NPC Code:

    function onCreated(){
    player.chat="Hello!";
    }


    level.npc[1]=={"function onCreated(){","player.chat=""Hello!"";","}"}

    Get it? So level.npc[1] would be an array of the script of that npc, where each index of the array is a line in the script.
  2. level.sign/link/chest object improvement currently these objects are pretty pointless.. we cant modify them and things like level.link does not even include destination level!! These objects NEED to be able to be modified serverside and all the attributes of these objects need to be loaded into the object.. link the signs x,y,w,h etc!
  3. level.save() function this function needs to be made so that once modifications are made to the level object (ie: signs, npc, links) the changes can be saved into the NW file.

Seriously though Stefan.. I have been trying to do all this stuff for a while and it just doesn't seem possible without it.. at least not to make all this stuff effectively.

I made a script to load the local NPC's in a level by parsing the .nw file.. but it does not work on gmaps because I use the NPC ID to find which script to load from the NW file (the ID in inside levels is the order in which they appear in the .NW file so its easy) It would be just so much easier.. and I doubt too much work on your end, to make this in the NPC-Server x-x

Not to mention that there is no way to edit levels now aside from tiles.. because you cant save* anything (savelines or anything) so I do not know how you expect us to do any of this x-x

Thanks!

xXziroXx 06-04-2006 04:10 AM

Great suggestions, would actually come in handy.

Admins 06-04-2006 12:19 PM

You can request the script with requesttext, need to check if it's working for local npcs now

Warcaptain 06-04-2006 05:36 PM

You can do this for all NPC's??

What about saving the script?

What is the syntax for requesting it?

What about the rest of the things I requested.

Maniaman 06-05-2006 01:19 AM

Also would be nice if "TILES" worked for showimgs too, instead of just GuiDrawingPanels

Yen 06-07-2006 03:19 AM

So, remind me...
Why can't you just write to the level as text?

Warcaptain 06-07-2006 03:36 AM

You can not write to files in the levels folder, at least not with save*() functions.

Yen 06-07-2006 03:42 AM

Quote:

Originally Posted by Warcaptain
You can not write to files in the levels folder, at least not with save*() functions.

Yes you can.
I recently replaced all of my overworld's tile bushes with NPCs by writing directly to the level as text.
levels/overworld_*

napo_p2p 06-07-2006 04:53 AM

I completely agree with Maniaman's post. I would love to see these things implemented.

Quote:

Originally Posted by Warcaptain
What is the syntax for requesting it?

I'm curious about that too (more specifically, the parameters for requesttext for requesting level scripts).

Warcaptain 06-07-2006 05:53 AM

requesttext("npc",id) is for DB npcs... but level npc's I do not think there is yet a way.

Maniaman 06-07-2006 02:22 PM

Quote:

Originally Posted by Warcaptain
You can not write to files in the levels folder, at least not with save*() functions.

yes you can

Warcaptain 06-07-2006 06:49 PM

Oh well, I thought I read somewhere on here that you could not.. Well that is good then. I should be able to make a local NPC editor.. except for the fact that there is no way of telling on GMAPS what NPCs are what since the npcs[index].id is for all the NPCs on the gmap.. not the local (level) npcs

Admins 06-07-2006 09:18 PM

Ok we have made requesttext work for local npcs, there is still a problem with dummy npcs (npcs without active script which are optimized to not appear in the npcs[] list) and local npcs are not saved right now. The new npcserver is not uploaded to all machines yet.

Yen 06-07-2006 11:03 PM

findareanpcs(getmapx(player.level)*64, getmapy(player.level)*64, 64, 64) ?

Admins 06-08-2006 11:15 AM

Quote:

Originally Posted by Yen
findareanpcs(getmapx(player.level)*64, getmapy(player.level)*64, 64, 64) ?

What do you want to say?


All times are GMT +2. The time now is 02:11 PM.

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