Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   A couple of script requests (https://forums.graalonline.com/forums/showthread.php?t=72098)

napo_p2p 02-10-2007 05:59 AM

A couple of script requests
 
It would be nice if we could request and send the text contents of a file with commands like:
requesttext("file", filename)
sendtext("file", filename, contents)

Also, I would like to see something like:
npc.origx and npc.origy
Where we could get the original x and y of an NPC.

I think these should be rather simple to implement, and with this done I could come up with a pretty decent online level script editor.

Bl0nkt 02-10-2007 06:04 AM

function onCreated() {
this.originx = x;
this.originy = y;
}

napo_p2p 02-10-2007 06:18 AM

Quote:

Originally Posted by Bl0nkt (Post 1275733)
function onCreated() {
this.originx = x;
this.originy = y;
}

Yes, but I made these suggestions with a script in mind (online level link editor). If I decide to release it (and implemented the way you've suggested), then it would mean all npcs would need that bit of code in it.

The origx, origy thing isn't totally needed (I could still generate some type of dropdown menu given the text contents of a file), but having it would make things more like the offline level npc editor.

Gambet 02-10-2007 06:20 AM

Quote:

Originally Posted by napo_p2p (Post 1275735)
Yes, but I made these suggestions with a script in mind (online level link editor). If I decide to release it (and implemented the way you've suggested), then it would mean all npcs would need that bit of code in it.

The origx, origy thing isn't totally needed (I could still generate some type of dropdown menu given the text contents of a file), but having it would make things more like the offline level npc editor.



Wouldn't be a difference, really.


When you move an NPC, simply save its position before moving it, which in turn would be your original coordinates.


You'd have to a bit more elaborate to explain exactly why you couldn't do it this way.

killerogue 02-10-2007 06:20 AM

Quote:

Originally Posted by napo_p2p (Post 1275735)
Yes, but I made these suggestions with a script in mind (online level link editor). If I decide to release it (and implemented the way you've suggested), then it would mean all npcs would need that bit of code in it.

The origx, origy thing isn't totally needed (I could still generate some type of dropdown menu given the text contents of a file), but having it would make things more like the offline level npc editor.

This sounds really good napo. :D Stefan! Make it happen! *2 Finger Snaps*

napo_p2p 02-10-2007 06:26 AM

Quote:

Originally Posted by Gambet (Post 1275737)
You'd have to a bit more elaborate to explain exactly why you couldn't do it this way.

If you take a look at a .nw level in notepad, NPCs' x and y are listed by their starting x and y.

If I wanted to go up to some random NPC and edit it online, I would need its original x and y to be able to pull out it's script.

I'd like to state again that the origx,origy feature isn't totally needed, but the request/send text one would be great to have.

Admins 02-10-2007 07:21 PM

The original position is mainly required for editing local npcs?

napo_p2p 02-11-2007 02:49 AM

Quote:

Originally Posted by Stefan (Post 1275854)
The original position is mainly required for editing local npcs?

That's what I would use it for, yes. However, it is not required, but I think that it would allow for an online local/level NPC editor that acts like the offline one. And perhaps for gmap support, throw in original level.


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

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