Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #61  
Old 12-07-2012, 09:26 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by greggiles View Post
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); 
__________________
MEEP!
Reply With Quote
  #62  
Old 12-07-2012, 11:36 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by greggiles View Post
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.
__________________
Reply With Quote
  #63  
Old 03-10-2013, 04:11 AM
Draenin Draenin is offline
Magnificent Bastard
Draenin's Avatar
Join Date: Dec 2004
Location: Bermuda Triangle
Posts: 6,790
Draenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud of
Send a message via AIM to Draenin Send a message via MSN to Draenin Send a message via Yahoo to Draenin
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.
Reply With Quote
  #64  
Old 03-10-2013, 10:16 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
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)'
__________________
Quote:
Reply With Quote
  #65  
Old 03-10-2013, 05:32 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by fowlplay4 View Post
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
__________________
MEEP!
Reply With Quote
  #66  
Old 04-03-2013, 02:11 AM
Joshua_P2P Joshua_P2P is offline
Graal Developer
Joshua_P2P's Avatar
Join Date: Dec 2012
Posts: 74
Joshua_P2P is on a distinguished road
question does there have to be a npc in the level to use it or can it place npcs in a new level?
__________________
Keeping it real in Graal since 2010
Reply With Quote
  #67  
Old 04-03-2013, 02:38 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by Joshua_P2P View Post
question does there have to be a npc in the level to use it
No.
__________________
Quote:
Reply With Quote
  #68  
Old 04-21-2013, 11:48 PM
iAxeis iAxeis is offline
Owner of GraalOnlineElite
Join Date: Nov 2012
Location: Scotland
Posts: 28
iAxeis is on a distinguished road
Very nice so flexible and easy to work with !
Reply With Quote
  #69  
Old 09-07-2013, 07:35 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
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.
Attached Files
File Type: txt olne.txt (38.7 KB, 685 views)
__________________
Quote:
Reply With Quote
  #70  
Old 09-07-2013, 09:05 PM
TSAdmin TSAdmin is offline
Forum Moderator
TSAdmin's Avatar
Join Date: Aug 2006
Location: Australia
Posts: 1,980
TSAdmin is a splendid one to beholdTSAdmin is a splendid one to beholdTSAdmin is a splendid one to beholdTSAdmin is a splendid one to beholdTSAdmin is a splendid one to behold
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
__________________
TSAdmin (Forum Moderator)
Welcome to the Official GraalOnline Forums! Where sharing an opinion may be seen as a declaration of war!
------------------------
· User Agreement · Code of Conduct · Forum Rules ·
· Graal Support · Administrative Contacts ·
Reply With Quote
  #71  
Old 09-07-2013, 11:28 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
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.
__________________
Quote:
Reply With Quote
  #72  
Old 02-19-2015, 03:22 PM
Alpho Alpho is offline
Registered User
Alpho's Avatar
Join Date: Dec 2011
Location: California, USA
Posts: 80
Alpho will become famous soon enough
Are any more updates coming to the NPC Editor?
Reply With Quote
  #73  
Old 04-14-2015, 09:00 PM
Alpho Alpho is offline
Registered User
Alpho's Avatar
Join Date: Dec 2011
Location: California, USA
Posts: 80
Alpho will become famous soon enough
Here's what I've done to the NPC Editor

Reply With Quote
  #74  
Old 04-20-2015, 08:35 PM
Draenin Draenin is offline
Magnificent Bastard
Draenin's Avatar
Join Date: Dec 2004
Location: Bermuda Triangle
Posts: 6,790
Draenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud of
Send a message via AIM to Draenin Send a message via MSN to Draenin Send a message via Yahoo to Draenin
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
Reply With Quote
  #75  
Old 04-22-2015, 03:03 PM
Alpho Alpho is offline
Registered User
Alpho's Avatar
Join Date: Dec 2011
Location: California, USA
Posts: 80
Alpho will become famous soon enough
Quote:
Originally Posted by Draenin View Post
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");

Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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:30 AM.


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