Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Online Level NPC Editor (OLNE) (https://forums.graalonline.com/forums/showthread.php?t=134264280)

callimuc 12-07-2012 09:26 PM

Quote:

Originally Posted by greggiles (Post 1708891)
Script: triggerclient() was used with wrong target: npcEdit (must be weapon or gui) at line 82 in script of npcEdit (in level cabi_ak-02.nw at pos (0, 0))

It keeps doing this :(

change line 82 to this:

PHP Code:

player.triggerclient("gui"this.name"leveldata"temp.leveldatatemp.readonly); 


cbk1994 12-07-2012 11:36 PM

Quote:

Originally Posted by greggiles (Post 1708891)
Script: triggerclient() was used with wrong target: npcEdit (must be weapon or gui) at line 82 in script of npcEdit (in level cabi_ak-02.nw at pos (0, 0))

It keeps doing this :(

Read the ~4 posts before yours.

Draenin 03-10-2013 04:11 AM

Suggestion for the next version, if you should happen to update it:

An option to copy-paste NPCs from level to level on a gmap.

Basically, you'd need to store the information in a 'clipboard,' similar to the way Pixel's tile editor utilizes that kind of function as well.

fowlplay4 03-10-2013 10:16 AM

I've been using it quite a bit lately (extremely useful in dungeon work), and would of found copying sets of certain npcs (was doing light details in numerous levels) really handy.

I will look into making a clipboard feature. My idea:

Press CTRL+[0-9] to set the clipboard position. (Position 0 by default)
Press CTRL+C to copy to the clipboard. (Save clipboard data locally in text files)
Press CTRL+V to paste NPC at your mouse position based on clipboard data.

I also think if you put a comment in the NPC like:

//DESC:Tree

When you change clipboard slots it will say 'Clipboard Slot # (Tree)'

callimuc 03-10-2013 05:32 PM

Quote:

Originally Posted by fowlplay4 (Post 1714901)
I've been using it quite a bit lately (extremely useful in dungeon work), and would of found copying sets of certain npcs (was doing light details in numerous levels) really handy.

I will look into making a clipboard feature. My idea:

Press CTRL+[0-9] to set the clipboard position. (Position 0 by default)
Press CTRL+C to copy to the clipboard. (Save clipboard data locally in text files)
Press CTRL+V to paste NPC at your mouse position based on clipboard data.

I also think if you put a comment in the NPC like:

//DESC:Tree

When you change clipboard slots it will say 'Clipboard Slot # (Tree)'

sounds awesome! would love to see that happen

Joshua_P2P 04-03-2013 02:11 AM

question does there have to be a npc in the level to use it or can it place npcs in a new level?

fowlplay4 04-03-2013 02:38 PM

Quote:

Originally Posted by Joshua_P2P (Post 1715733)
question does there have to be a npc in the level to use it

No.

iAxeis 04-21-2013 11:48 PM

Very nice so flexible and easy to work with :D!

fowlplay4 09-07-2013 07:35 PM

1 Attachment(s)
There was a bug in getVarValue, values set to ( I.e. this.attr[1] = ""; ) would cause the script to hit the loop limit and break during the loading phase.

You can either replace getVarValue with this one, or re-download the script I'm going to attach.

PHP Code:

function getVarValue(varinpc_script) {
  
// Find Variable
  
temp.aa npc_script.positions(vari);
  for (
temp.atemp.aa) {
    
// Check for Assignment
    
temp.npc_script.substring(temp.a);
    
temp.temp.s.pos("=");
    
temp.temp.s.pos(";");
    
// Make Sure Semi-Colon is After Assignment
    
if (temp.temp.c) {
      
// Ignore ""
      
if (temp.s.pos("\"\"") >= 0) return "";
      
// Determine Value
      
temp.temp.s.substring(temp.e+1);
      
temp.sc temp.s.pos(";");
      
temp.temp.s.substring(0, (temp.sc == -temp.s.length() : temp.sc));
      
temp.temp.s.trim();
      if (
temp.s.size() == 2) {
        
temp.s.delete(0);
        
temp.temp.s[0];
      }
      
// Remove Double-Quotes
      
while (temp.s.starts('"')) temp.temp.s.substring(0);
      while (
temp.s.ends('"')) temp.temp.s.substring(0,temp.s.length()-1);
      
// (0) White Color Fix
      
if (vari.starts("colors") && (temp.== "0")) {
        
temp."white";
      }
      
// Return Value
      
return temp.s;
    }
  }
  return 
NULL;


@Mods:

Remove the attachments from these posts:

http://forums.graalonline.com/forums...5&postcount=39
http://forums.graalonline.com/forums...1&postcount=42
http://forums.graalonline.com/forums...2&postcount=57

And update the script in my main post with this one or link it to here.

TSAdmin 09-07-2013 09:05 PM

I've made the changes you requested and linked the latest download in the main post to your post above. Let me know if there's anything I've overlooked :)

fowlplay4 09-07-2013 11:28 PM

thx m8

Just debugged another issue.

If get errors you "You don't have access to this level!" or similar and your rights and (npcserver) are set correctly then make sure you haven't replaced the default hasright function with one in a player joined class.

Alpho 02-19-2015 03:22 PM

Are any more updates coming to the NPC Editor?

Alpho 04-14-2015 09:00 PM

Here's what I've done to the NPC Editor

http://i.imgur.com/uRCvPly.png

Draenin 04-20-2015 08:35 PM

A major error has been coming up for Kraak, who is currently using a mac for editing. Basically as soon as he types in the 'join' command, Graal as a whole will crash, and we're not entirely sure why since the issue doesn't happen on Windows.

This is what the error report kicks back to him:

http://pastebin.com/k6iVgEFj

Alpho 04-22-2015 03:03 PM

Quote:

Originally Posted by Draenin (Post 1735798)
A major error has been coming up for Kraak, who is currently using a mac for editing. Basically as soon as he types in the 'join' command, Graal as a whole will crash, and we're not entirely sure why since the issue doesn't happen on Windows.

This is what the error report kicks back to him:

http://pastebin.com/k6iVgEFj

That has happened to me before. Do this instead:
PHP Code:

function onCreated() {
  
this.join("foo_bar");




All times are GMT +2. The time now is 02:56 AM.

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