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 12-16-2001, 03:53 AM
LordMatt LordMatt is offline
V Avatar
LordMatt's Avatar
Join Date: Jun 2001
Location: Texas
Posts: 954
LordMatt is on a distinguished road
Send a message via AIM to LordMatt
Laying a custom item

Can someone help me with laying a custom item, I just want it where if (weaponfired) it lays a custom npc at ur x and y with all the scripting in it. Can someone help?
__________________
-Matt
Reply With Quote
  #2  
Old 12-16-2001, 03:55 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
if (weaponfired)
{ putnpc imagename.png/gif,text/scriptfile.txt,playerx,playery;
}
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #3  
Old 12-16-2001, 05:13 AM
Knight_Vincent Knight_Vincent is offline
Registered User
Knight_Vincent's Avatar
Join Date: Aug 2001
Location: Troy, MI
Posts: 682
Knight_Vincent is on a distinguished road
Send a message via ICQ to Knight_Vincent Send a message via AIM to Knight_Vincent Send a message via Yahoo to Knight_Vincent
Hmm,

Now for a better example.

NPC Code:

//NPC made by Lord Vincent

if (playertouchsme) {
toweapons Example;
}

if (weaponfired) {
putnpc example.gif,example.txt,playerx+1,playery+1;
}

__________________
"Did you write the Book of Love And do you have faith in God above If the Bible tells you so Do you believe in rock 'n roll Can music save your mortal soul And can you teach me how to dance real slow Well, I know that you're in love with him 'Cause I saw you dancin' in the gym You both kicked off your shoes Man, I dig those rhythm and blues I was a lonely teenage broncin' buck With a pink carnation and a pickup truck But I knew I was out of luck The day the music died" --Don McLean 'American Pie'

Last edited by Knight_Vincent; 12-16-2001 at 06:03 AM..
Reply With Quote
  #4  
Old 12-16-2001, 05:33 AM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
umm

btw: the example.txt has to have regular NPC coding in it, just as if you typed it in graal.

So, in the text file, you might want to have...

if (playerenters) {message Hi; sleep 1; message bye; sleep 2; destroy;
}


if you have a .txt file of your homework for science class, chances are, it wont work, lol.
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #5  
Old 12-16-2001, 05:48 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Knight_Vincent
Hmm,

Now for a better example.

NPC Code:

//NPC made by Lord Vincent

if (playertouchsme) {
toweapons Example;
}

if (weaponfired) {
putnpc example.gif,example.txt,playerx=1,playery=1;
}

I think it's
putnpc example.gif,example.txt,1,1;
no playerx='s or playery='s in it
Reply With Quote
  #6  
Old 12-16-2001, 05:50 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Quote:
Originally posted by Python523

I think it's
putnpc example.gif,example.txt,1,1;
no playerx='s or playery='s in it
You need playerx/y, or else it'll go to the coordinates listed in the level.
e.x:

putnpc door.gif,door.txt,30,30;
That will show the door image at the 30,30 coordinates of the level.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #7  
Old 12-16-2001, 05:51 AM
AlexH AlexH is offline
Have A Drink On Me
AlexH's Avatar
Join Date: Jun 2001
Location: Somewhere In Time
Posts: 7,442
AlexH is on a distinguished road
Send a message via AIM to AlexH Send a message via MSN to AlexH
know whats so funny about your "better" example?
its wrong
it should be

NPC Code:

if (playertouchsme) {
toweapons Example;
}

if (weaponfired) {
putnpc example.gif,example.txt,playerx+1,playery+1;
}



+ not =
__________________
QUICK LOOK BUSY JESUS IS COMING!
Reply With Quote
  #8  
Old 12-16-2001, 05:52 AM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to entravial
~AlphaFlame~

But not playerx/y=... you don't set a value inside a putnpc command =/
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #9  
Old 12-16-2001, 05:54 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Torankusu
You need playerx/y, or else it'll go to the coordinates listed in the level.
e.x:

putnpc door.gif,door.txt,30,30;
That will show the door image at the 30,30 coordinates of the level.

But if you want it to be there then
putnpc door.gif,door.txt,30,30;
if the right way
Reply With Quote
  #10  
Old 12-16-2001, 05:57 AM
AlexH AlexH is offline
Have A Drink On Me
AlexH's Avatar
Join Date: Jun 2001
Location: Somewhere In Time
Posts: 7,442
AlexH is on a distinguished road
Send a message via AIM to AlexH Send a message via MSN to AlexH
it is

putnpc img,txtfile,x,y

so putnpc door.gif,door.txt,30,30;
would put a door at 30,30 and toran rightfully said

and putnpc example.gif,example.txt,playerx+1,playery+1;
as i said would put an example npc at playerx+1 and playery+1
__________________
QUICK LOOK BUSY JESUS IS COMING!
Reply With Quote
  #11  
Old 12-16-2001, 05:58 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by AlexH
it is

putnpc img,txtfile,x,y

so putnpc door.gif,door.txt,30,30;
would put a door at 30,30 and toran rightfully said

and putnpc example.gif,example.txt,playerx+1,playery+1;
as i said would put an example npc at playerx+1 and playery+1

I think we all know what it does and how it works but we're confusing each other by explaining it the wrong way
Reply With Quote
  #12  
Old 12-16-2001, 06:00 AM
AlexH AlexH is offline
Have A Drink On Me
AlexH's Avatar
Join Date: Jun 2001
Location: Somewhere In Time
Posts: 7,442
AlexH is on a distinguished road
Send a message via AIM to AlexH Send a message via MSN to AlexH
Quote:
Originally posted by Python523

[COLOR=red][FONT=New Times Roman]
I think we all know what it does and how it works but we're confusing each other by explaining it the wrong way
no ones explaing it the wrong way besides the guy who said the bit about playerx=1,playery=1
__________________
QUICK LOOK BUSY JESUS IS COMING!
Reply With Quote
  #13  
Old 12-16-2001, 06:21 AM
kp_p2p kp_p2p is offline
Banned
kp_p2p's Avatar
Join Date: Sep 2001
Location: In my own world of chaos and depression.
Posts: 1,758
kp_p2p is on a distinguished road
errr

btw in the txt, it would be better if it was if(created) not if(playerenters).
Reply With Quote
  #14  
Old 12-16-2001, 06:45 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Quote:
Originally posted by Python523

But if you want it to be there then
putnpc door.gif,door.txt,30,30;
if the right way
I know, but it isn't the right way when the person that started this thread asked for the playerx and playery.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #15  
Old 12-16-2001, 08:06 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
this is probably for andor so use putnpc2 and you dont need the test i dont think.....i am pretty sure, thats the advantage
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:40 AM.


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