Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-24-2005, 04:51 PM
Gamba_Legend Gamba_Legend is offline
Slow NPC Scripter
Join Date: Jun 2005
Location: Asbury Park, New Jersey
Posts: 63
Gamba_Legend is on a distinguished road
Send a message via AIM to Gamba_Legend
Addtiledef

I don't understand how the addtiledef script works.
I tried adding my own tiles in for the server and all I got was nothing. -.-

//#CLIENTSIDE
if (created) {
addtiledef reborn_tiles.gif,0,0;
}
if (playerplayerenters) {
addtiledef reborn_tiles.gif,0,0;
}

can anyone tell me what I'm doing wrong?
__________________

is bad
IDC!
s-t-f-u
Reply With Quote
  #2  
Old 08-24-2005, 04:53 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
I thought you had to specify the prefix of the level names it applies to, or is that addtiledef2 only?
__________________
Skyld
Reply With Quote
  #3  
Old 08-24-2005, 04:53 PM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
The second-to-last zero, that's what levelnames have to start with. I believe the syntax is:
NPC Code:

addtiledef imagename,levelstart,random boolean thing i dont know;

so

addtiledef tgctiles.png,tgc_,0;



That should be what you need o-o
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote
  #4  
Old 08-24-2005, 04:55 PM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
Quote:
Originally Posted by Skyld
I thought you had to specify the prefix of the level names it applies to, or is that addtiledef2 only?
That's fer both.

NPC Code:

addtiledef image,levelstart,boolean;

addtiledef2 image,levelstart,tilestartx,tilestarty;



I've personally never used the second one, but it is used on Babylon, reason why I have the syntax o-o Hope that helps! <3
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote
  #5  
Old 08-24-2005, 04:57 PM
Gamba_Legend Gamba_Legend is offline
Slow NPC Scripter
Join Date: Jun 2005
Location: Asbury Park, New Jersey
Posts: 63
Gamba_Legend is on a distinguished road
Send a message via AIM to Gamba_Legend
and this script will make it work all the time or do I have to add it to a player's weapon inventory?
__________________

is bad
IDC!
s-t-f-u
Reply With Quote
  #6  
Old 08-24-2005, 05:01 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Add it to a weapon, in case someone removes their tile definitions.
__________________
Skyld
Reply With Quote
  #7  
Old 08-24-2005, 05:01 PM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
The script will work from when the player enters the level to the time when the player disconnects from the server. I'd suggest putting it inside an 'if (created) {' block inside a system NPC, clientsided of course. That's how we have it on Babylon.
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote
  #8  
Old 08-24-2005, 05:06 PM
Gamba_Legend Gamba_Legend is offline
Slow NPC Scripter
Join Date: Jun 2005
Location: Asbury Park, New Jersey
Posts: 63
Gamba_Legend is on a distinguished road
Send a message via AIM to Gamba_Legend
oh yeah and I did something wrong I think...
now the level in both editor and offline mode have scrambled/distorted gfx all over life theres a big error..

//#CLIENTSIDE
if (created) {
addtiledef reborn_tiles.gif,gamba_test.nw,0;

^thats what I did (and I don't understand what the 0 is for)
and this is what I got (screenie):
Attached Thumbnails
Click image for larger version

Name:	untitled.GIF
Views:	182
Size:	217.5 KB
ID:	33158  
__________________

is bad
IDC!
s-t-f-u
Reply With Quote
  #9  
Old 08-24-2005, 05:32 PM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
Ah yes, the spazzy tiledefs. And I don't understand what the zero is either, I just leave it.

As for the spazzy problem, just exit and reenter levels and move around a bit as the tileset downloads from the server. Or...! If you're doing this offline, then make sure the Graal exe can find the tiledef image. That spazzy tiledef happens, too, when Graal can't locate the tileset you want. Just fiddle around, I get that thing all the time. o-o
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote
  #10  
Old 08-24-2005, 05:41 PM
Gamba_Legend Gamba_Legend is offline
Slow NPC Scripter
Join Date: Jun 2005
Location: Asbury Park, New Jersey
Posts: 63
Gamba_Legend is on a distinguished road
Send a message via AIM to Gamba_Legend
OH?!
damn I've been fiddling with it awhile...but I'm sure it'll work eventually.
Thank you everyone for your help. =)
__________________

is bad
IDC!
s-t-f-u
Reply With Quote
  #11  
Old 08-24-2005, 05:53 PM
Gamba_Legend Gamba_Legend is offline
Slow NPC Scripter
Join Date: Jun 2005
Location: Asbury Park, New Jersey
Posts: 63
Gamba_Legend is on a distinguished road
Send a message via AIM to Gamba_Legend
ok I give up everything is having a problem.
I want to make it work on my online server and offline of course so I can make levels with it.
I want it to work on all levels whenever someone signs on.
Can someone tell me exactly what to do/script step by step please?
-I feel retarded =(
__________________

is bad
IDC!
s-t-f-u
Reply With Quote
  #12  
Old 08-24-2005, 07:17 PM
alissalee alissalee is offline
Mr. Ciprioni Atrius Admin
alissalee's Avatar
Join Date: Dec 2004
Location: Lawrence, Ma
Posts: 190
alissalee is an unknown quantity at this point
Send a message via AIM to alissalee Send a message via MSN to alissalee
Gamba we just need to work on it by the server with the lvls in the script after it finds the teldefs we can then start bilding the lvl thats the way to make it or how i learnd from One of the servers i worked at
Reply With Quote
  #13  
Old 08-24-2005, 07:35 PM
nullify nullify is offline
Registerd Abuser
nullify's Avatar
Join Date: May 2004
Location: The cheese state.
Posts: 851
nullify has a spectacular aura about
use setbackpal tilesetname.png;
Reply With Quote
  #14  
Old 08-24-2005, 07:56 PM
Gamba_Legend Gamba_Legend is offline
Slow NPC Scripter
Join Date: Jun 2005
Location: Asbury Park, New Jersey
Posts: 63
Gamba_Legend is on a distinguished road
Send a message via AIM to Gamba_Legend
thanks nullify
and everyone excuse the person I haven't fired yet -.-
__________________

is bad
IDC!
s-t-f-u
Reply With Quote
  #15  
Old 08-24-2005, 07:58 PM
Gamba_Legend Gamba_Legend is offline
Slow NPC Scripter
Join Date: Jun 2005
Location: Asbury Park, New Jersey
Posts: 63
Gamba_Legend is on a distinguished road
Send a message via AIM to Gamba_Legend
it says file does not exist when I try the backpal
aren't backpals used for a different type of lighting effects? O_O
__________________

is bad
IDC!
s-t-f-u
Reply With Quote
  #16  
Old 08-24-2005, 08:00 PM
Gamba_Legend Gamba_Legend is offline
Slow NPC Scripter
Join Date: Jun 2005
Location: Asbury Park, New Jersey
Posts: 63
Gamba_Legend is on a distinguished road
Send a message via AIM to Gamba_Legend
Nevermind that last post...
it works but every tiles is a new neon color instead now XD
__________________

is bad
IDC!
s-t-f-u
Reply With Quote
  #17  
Old 08-24-2005, 08:17 PM
Gamba_Legend Gamba_Legend is offline
Slow NPC Scripter
Join Date: Jun 2005
Location: Asbury Park, New Jersey
Posts: 63
Gamba_Legend is on a distinguished road
Send a message via AIM to Gamba_Legend
how do I make this work both online and offline for every level?
what do I do on rc?
what do I do script on the npc?
__________________

is bad
IDC!
s-t-f-u
Reply With Quote
  #18  
Old 08-24-2005, 08:18 PM
Ajira Ajira is offline
Poont.
Join Date: Oct 2004
Location: NY, USA
Posts: 477
Ajira is on a distinguished road
Erm, backpals are deprecated. Use seteffect.
__________________
Liek omigosh.

Reply With Quote
  #19  
Old 08-24-2005, 09:04 PM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
Quote:
Originally Posted by nullify
use setbackpal tilesetname.png;
NO! DO NOT use setbackbal! Never! EVER! z-z RAWR!!

That command has been deprecated and I'd like to never see it again. Please do not use it, ever again. Thank you <3
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote
  #20  
Old 08-24-2005, 09:21 PM
calani calani is offline
Scriptess
calani's Avatar
Join Date: Aug 2003
Location: asmgarden.gmap
Posts: 606
calani is on a distinguished road
Send a message via AIM to calani
Quote:
Originally Posted by ForgottenLegacy
addtiledef imagename,levelstart,random boolean thing i dont know;
The 'random boolean thing' tells the script whether the tileset is the old format or the new format (classic tileset (pics1.png) versus new order, such as picso.png used on GK)


Also, for the levelstart part, you only need to add the first few characters of the levelname. This is useful for gmaps where all the levels start with the same thing, such as babylon_*.nw or rift_arena1_*.nw
For test levels, or other levels that you only want the addtiledef to work on single levels, add the full name so that it doesn't accidentally load on another level that has a similar name (testleveljo for testleveljo.nw, but it would also work on testleveljohn.nw)
__________________
Reply With Quote
  #21  
Old 08-24-2005, 09:35 PM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
Cheers to Cal o-o That's a good way of explaining it.
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote
  #22  
Old 08-24-2005, 09:37 PM
calani calani is offline
Scriptess
calani's Avatar
Join Date: Aug 2003
Location: asmgarden.gmap
Posts: 606
calani is on a distinguished road
Send a message via AIM to calani
Oh, and yes. setbackpal = evil.
....unless of course you want to confuse the hell out of a lat ^_~ *halo*
__________________
Reply With Quote
  #23  
Old 08-24-2005, 09:40 PM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
Quote:
Originally Posted by calani
Oh, and yes. setbackpal = evil.
....unless of course you want to confuse the hell out of a lat ^_~ *halo*
Halo? So those horns are there to keep the halo up? o_O Makes sense.

On topic: Setbackpal, along with playersays(), followplayer, and toinventory have been deprecated with Graal3 and GS2. The command/function 'toweapons' is severely frowned upon and may/should be deprecated soon, as well.
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote
  #24  
Old 08-24-2005, 09:48 PM
calani calani is offline
Scriptess
calani's Avatar
Join Date: Aug 2003
Location: asmgarden.gmap
Posts: 606
calani is on a distinguished road
Send a message via AIM to calani
Quote:
Originally Posted by ForgottenLegacy
The command/function 'toweapons' is severely frowned upon and may/should be deprecated soon, as well.
get rid of the "may/" part and you'll be a bit more accurate.
__________________
Reply With Quote
  #25  
Old 08-25-2005, 02:27 AM
Malinko Malinko is offline
Unholy Nation
Join Date: Mar 2004
Location: Massachusetts, U.S.A.
Posts: 1,782
Malinko is on a distinguished road
Send a message via AIM to Malinko
For your tiledefs problem:

C*GRAALFOLDER*\levels\tiledefs\

Delete all the text documents within here to restore the options to default.

For your script problem:

Refer to post in this thread by ForgottenLegacy.
Reply With Quote
  #26  
Old 08-25-2005, 12:29 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Use .png 8bit.
Make sure the image is indexed.
addtiledef tileset.png,reborn_,0;
__________________
Reply With Quote
  #27  
Old 08-25-2005, 07:18 PM
nullify nullify is offline
Registerd Abuser
nullify's Avatar
Join Date: May 2004
Location: The cheese state.
Posts: 851
nullify has a spectacular aura about
Backpals are obviously old, but they are always set to pics1, hence the need to be changed.
Reply With Quote
  #28  
Old 08-25-2005, 11:34 PM
Gamba_Legend Gamba_Legend is offline
Slow NPC Scripter
Join Date: Jun 2005
Location: Asbury Park, New Jersey
Posts: 63
Gamba_Legend is on a distinguished road
Send a message via AIM to Gamba_Legend
O_O
thanks.
__________________

is bad
IDC!
s-t-f-u
Reply With Quote
  #29  
Old 08-26-2005, 01:51 AM
alissalee alissalee is offline
Mr. Ciprioni Atrius Admin
alissalee's Avatar
Join Date: Dec 2004
Location: Lawrence, Ma
Posts: 190
alissalee is an unknown quantity at this point
Send a message via AIM to alissalee Send a message via MSN to alissalee
your ganna fire me Gamba X.x
Reply With Quote
  #30  
Old 08-27-2005, 08:35 AM
calani calani is offline
Scriptess
calani's Avatar
Join Date: Aug 2003
Location: asmgarden.gmap
Posts: 606
calani is on a distinguished road
Send a message via AIM to calani
get a nat instead
__________________
Reply With Quote
  #31  
Old 10-02-2005, 03:41 AM
alissalee alissalee is offline
Mr. Ciprioni Atrius Admin
alissalee's Avatar
Join Date: Dec 2004
Location: Lawrence, Ma
Posts: 190
alissalee is an unknown quantity at this point
Send a message via AIM to alissalee Send a message via MSN to alissalee
ok now i did that how do i make it show up on the server it works in editor
wait let me try something else nope didnt work look at them please the one u can see the tileset is offline and one that u cant is online help me please
Attached Thumbnails
Click image for larger version

Name:	graal_1128217712.png
Views:	125
Size:	32.7 KB
ID:	33759   Click image for larger version

Name:	stuff.png
Views:	130
Size:	46.4 KB
ID:	33760  
__________________
account was being used by jigga.... sorry for what he has said in the past
Reply With Quote
  #32  
Old 10-02-2005, 03:53 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Is it clientsided?
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #33  
Old 10-02-2005, 04:26 AM
alissalee alissalee is offline
Mr. Ciprioni Atrius Admin
alissalee's Avatar
Join Date: Dec 2004
Location: Lawrence, Ma
Posts: 190
alissalee is an unknown quantity at this point
Send a message via AIM to alissalee Send a message via MSN to alissalee
yes
__________________
account was being used by jigga.... sorry for what he has said in the past
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 02:15 AM.


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