Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #16  
Old 08-22-2011, 07:03 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by callimuc View Post
Well I just tested it and it seems buggy. NPC images got suddenly changed, scripts like
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
blockagain();
  
drawunderplayer();
  
setimgpart("callimuc_extra-sprites.png",32,0,32,32);

suddenly changed to
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
blockagain();
  
drawunderplayer();
  
setimgpart("callimuc_extra-sprites.png,32,0,32,32);

or image names got completely removed. Would be nice if it could be fixed
Was really funny, red and yellow squares everywhere. Nice code though fowlplay. Rep+
__________________
Reply With Quote
  #17  
Old 08-22-2011, 08:55 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
Are you using V5 or V6?
Used v6
Quote:
Originally Posted by Emera View Post
Was really funny, red and yellow squares everywhere
Those where from the image as template xD
__________________
MEEP!
Reply With Quote
  #18  
Old 08-24-2011, 07:17 AM
0PiX0 0PiX0 is offline
Coder
0PiX0's Avatar
Join Date: Jan 2011
Posts: 130
0PiX0 is a jewel in the rough0PiX0 is a jewel in the rough
I tried this out. It is quite nice. Great work.

There is a bug when you change the npc's image to be nothing.

Please fix double-click detection. Sometimes if you click GraalControl then click a npc too soon, the script editor opens.
Reply With Quote
  #19  
Old 08-24-2011, 07:42 PM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
How do I delete NPCs & it says that it cant find "levels/houses/*nw" in my folders, I have in a folder levels, houses!
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
  #20  
Old 08-24-2011, 07:50 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
put

"levels/houses/%s"

in your level folders array at the top.
__________________
Quote:
Reply With Quote
  #21  
Old 08-24-2011, 08:16 PM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
Quote:
Originally Posted by fowlplay4 View Post
put

"levels/houses/%s"

in your level folders array at the top.
That didnt work
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
  #22  
Old 08-24-2011, 08:30 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 Astram View Post
That didnt work
and (npcserver) and yourself have rw levels/houses/* in your folder rights?

Quote:
Originally Posted by 0PiX0 View Post
There is a bug when you change the npc's image to be nothing.

Please fix double-click detection. Sometimes if you click GraalControl then click a npc too soon, the script editor opens.
I need instructions to reproduce the error with images.

I don't think onMouseDown reports double clicks properly because it registers the mouse down three times (which makes it very annoying to check if the double-click happened in the same area as the single click) in situations where I only clicked twice within 0.3 of a second.

Two clicks in two different spots that are more than 16 pixels shouldn't register as a double-click either but it does.

PHP Code:
//#CLIENTSIDE
function onMouseDown(click) {
  echo(
click SPC timevar2);

__________________
Quote:
Reply With Quote
  #23  
Old 08-24-2011, 08:45 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 Astram View Post
How do I delete NPCs
Like in OE with the "del" (delete) key
__________________
MEEP!
Reply With Quote
  #24  
Old 08-24-2011, 08:50 PM
0PiX0 0PiX0 is offline
Coder
0PiX0's Avatar
Join Date: Jan 2011
Posts: 130
0PiX0 is a jewel in the rough0PiX0 is a jewel in the rough
Quote:
Originally Posted by fowlplay4 View Post
I need instructions to reproduce the error with images.
  1. Open the script editor on any npc.
  2. Set this (or similar) as the script:
    PHP Code:
    //#CLIENTSIDE
    function onCreated() {
      
    showimg(300"block.png"this.xthis.y);

  3. Change the npc's default image from "*.png" to ""
  4. Apply, then f9 save
It results with this line in the level file:
"NPC (2 spaces) 34 45"
when it should be "NPC 0 34 45", or something like that.

---
PHP Code:
//#CLIENTSIDE 
function GraalControl.onMouseDown(temp.click) { 
  echo(
click SPC timevar2); 

One echo per click for me.
Reply With Quote
  #25  
Old 08-24-2011, 09:05 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 0PiX0 View Post
Image bug.

---
PHP Code:
//#CLIENTSIDE 
function GraalControl.onMouseDown(temp.click) { 
  echo(
click SPC timevar2); 

One echo per click for me.
Fixed the bug in my latest version.

GraalControl.onMouseDown isn't the same as onMouseDown. I was hoping to just use it's double-click functionality but it looks like I'll have to write my own.

Fixed the annoying double-click thing too. See attached for the latest version.

Edit: Fixed a bug that resulted in new NPCs being set to the placeholder image. Also changed editor's text profile to match external RC (bigger text, pink strings, and blue highlighting) a bit more.

Edit by Skyld: Latest version available at http://forums.graalonline.com/forums...5&postcount=39.
__________________
Quote:

Last edited by Skyld; 01-23-2012 at 08:29 PM..
Reply With Quote
  #26  
Old 08-24-2011, 11:30 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by xAndrewx View Post
You should make a level editor- I'd love it if it had the same features as this! *take the hint lol*
http://forums.graalonline.com/forums...hp?t=134258087

Not exactly the same but you get the point. Anyone that wants to can make updates to it.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #27  
Old 08-24-2011, 11:58 PM
MattKan MattKan is offline
the KattMan
Join Date: Aug 2010
Location: United States
Posts: 1,325
MattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to behold
Send a message via AIM to MattKan
I don't actually care about new Graal Developer tools anymore...Fantastic job!
Reply With Quote
  #28  
Old 08-25-2011, 02:04 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
Updated again just a minor bug and an aesthetic change with the editor. See my post above for the script.

I found this tool insanely useful yesterday when I updated around 9 Flag NPCs on Zodiac. While it's not hard to get the level name, go through the file browser, wait for the file to actually download, open in an editor, make the changes needed, and re-upload. It can end up taking long enough to turn a simple task into a tedious one.
__________________
Quote:

Last edited by fowlplay4; 08-25-2011 at 02:22 AM..
Reply With Quote
  #29  
Old 08-25-2011, 08:27 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 found this tool insanely useful yesterday when I updated around 9 Flag NPCs on Zodiac. While it's not hard to get the level name, go through the file browser, wait for the file to actually download, open in an editor, make the changes needed, and re-upload. It can end up taking long enough to turn a simple task into a tedious one.
Agreed. On small servers it might not be a problem but its still time you can save and actually you dont have to give NAT´s folder rights to thta levels.
__________________
MEEP!
Reply With Quote
  #30  
Old 09-06-2011, 02:14 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
Could a mod please replace the txt file in my first post with the one in this post:
http://forums.graalonline.com/forums...7&postcount=25
__________________
Quote:
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 01:37 AM.


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