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-2002, 06:23 PM
Dragona2002 Dragona2002 is offline
Registered User
Join Date: May 2002
Location: The Netherlands
Posts: 105
Dragona2002 is on a distinguished road
Send a message via AIM to Dragona2002 Send a message via Yahoo to Dragona2002
Drop items

i wanna know how i can make an NPC that will ad somthing to ur drop items (sword,shield,rupees etc)
so i can drop it i just cant figure it out :grrr:
__________________

Quote:
The Dark Nemesis begins.......
Reply With Quote
  #2  
Old 08-25-2002, 12:33 AM
amonrabr amonrabr is offline
Scripter
Join Date: Nov 2001
Location: Brazil
Posts: 374
amonrabr is on a distinguished road
You cant.. just if you make a script to do it, as

..... "
if(keypressed&&keydown(4)&&keydown(5)){this.mode=1 ;}
if(this.mode==1){/* showimg the image until you press something */ if(keypressed){if (keydown(6)){/* drop it*/} else /* hide the image*/}} "...


You could make a system as.. if you press S+A they are the normal items, but if you press S+D they are yours
Reply With Quote
  #3  
Old 08-25-2002, 12:35 AM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
Yes, I think it is about IMPOSSIBLE. You can try and do the S+A thing... but then again it will either A) Overwrite the existing ones or B) just totally fux up =/
---Shifter
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
Reply With Quote
  #4  
Old 08-25-2002, 09:45 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
you'll have to rewrite the current system, i suggest a gani with all the droppable items as sprites, then use a counter
__________________
[signature]insert here[/signature]
Reply With Quote
  #5  
Old 08-25-2002, 10:18 AM
Amagius Amagius is offline
Cult of the Winky
Amagius's Avatar
Join Date: Sep 2001
Location: The USoCR's friendly twin
Posts: 3,225
Amagius is on a distinguished road
I like the S+D Idea without having an NPC, but only if you had patience to add the extra for the NPCServer. If it was an NPC, it's look ugly to have it, but it would be easier.
__________________
[AIM:RitaReplusa]
mail:[email protected]]
Reply With Quote
  #6  
Old 08-25-2002, 10:56 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
it could be a hidden npc, heck include it in system, which should be your first thought anyways
__________________
[signature]insert here[/signature]
Reply With Quote
  #7  
Old 08-25-2002, 11:27 AM
Amagius Amagius is offline
Cult of the Winky
Amagius's Avatar
Join Date: Sep 2001
Location: The USoCR's friendly twin
Posts: 3,225
Amagius is on a distinguished road
A Hidden NPC would work.
__________________
[AIM:RitaReplusa]
mail:[email protected]]
Reply With Quote
  #8  
Old 08-25-2002, 12:19 PM
prozac424242 prozac424242 is offline
Registered User
prozac424242's Avatar
Join Date: May 2001
Location: Gone crazy: back soon
Posts: 356
prozac424242 is on a distinguished road
Send a message via ICQ to prozac424242 Send a message via AIM to prozac424242
well theres another way...

I once added this to a weapon, but for ocnsistency you'd have to add it to all your wepaons;
(im just giving the algorithm here)

if the player wants to drop the weapon Green Goo
The player says 'drop green goo'

The weapon npc in the players inventory is triggered that
and then does the following:
putnpc image name of the weapon, file name of a text file that is exactly the same as the weapon (you have to have a text file on the server/in your folder that you keep up to date for all dorpable weapons) , player vecx/vecy vars so it plops in front of the player.

setplayerprop #c,;

destroy the weapon so it is out of the players inventory
and is there on the screen for that player, or another player, to pick up.

If you plan to do this online be sure you trust your staff.
putnpc was not the most secure command when i was Sanstrata owner. ANyone with file upload to your levels folder
could change that text file to hack and cheat
unless they made it more secure in the past few months.

But there is one way to do it .... have fun and good luck
__________________

Useful links:
Graal Stats
Client Script Functions-GS1 to GS2
Serverside Script Functions-Gscript page
Particle Engine-Player Attributes
Server Options-Admin rights-Gmaps
Quote:
Originally Posted by Admins
Thanks for developing and improving playerworlds and such
Reply With Quote
  #9  
Old 08-25-2002, 12:22 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Re: well theres another way...

Quote:
Originally posted by prozac424242
I once added this to a weapon, but for ocnsistency you'd have to add it to all your wepaons;
(im just giving the algorithm here)

if the player wants to drop the weapon Green Goo
The player says 'drop green goo'

The weapon npc in the players inventory is triggered that
and then does the following:
putnpc image name of the weapon, file name of a text file that is exactly the same as the weapon (you have to have a text file on the server/in your folder that you keep up to date for all dorpable weapons) , player vecx/vecy vars so it plops in front of the player.

setplayerprop #c,;

destroy the weapon so it is out of the players inventory
and is there on the screen for that player, or another player, to pick up.

If you plan to do this online be sure you trust your staff.
putnpc was not the most secure command when i was Sanstrata owner. ANyone with file upload to your levels folder
could change that text file to hack and cheat
unless they made it more secure in the past few months.

But there is one way to do it .... have fun and good luck
hes talking about the DEFAULT thing built into graal where you press s+a to drop items
Reply With Quote
  #10  
Old 08-25-2002, 03:14 PM
Dragona2002 Dragona2002 is offline
Registered User
Join Date: May 2002
Location: The Netherlands
Posts: 105
Dragona2002 is on a distinguished road
Send a message via AIM to Dragona2002 Send a message via Yahoo to Dragona2002
o.O difficult i c i like prozacs idea and nice weapon name
Green goo XD
__________________

Quote:
The Dark Nemesis begins.......
Reply With Quote
  #11  
Old 08-25-2002, 03:31 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
You don't want to do it prozac's way.

He needs to catch up on some serverside scripting

NPC Code:

if (playerchats && strequals(#c,drop purple nurple)) {
removeweapon purple nurple;
putnpc2 playerx+1.5+vecx(playerdir)*2,playery+2+vecy(playe rdir)*2 {
if (created) {
setshape 0,32,32;
setimg purplenurple.png;
}
if (playertouchsme) {
addweapon purple nurple;
destroy;
}
};
}

__________________
[signature]insert here[/signature]
Reply With Quote
  #12  
Old 08-25-2002, 09:15 PM
Dragona2002 Dragona2002 is offline
Registered User
Join Date: May 2002
Location: The Netherlands
Posts: 105
Dragona2002 is on a distinguished road
Send a message via AIM to Dragona2002 Send a message via Yahoo to Dragona2002
well thx screen !

another question (i will never end = P)

how do i make a NPC that if u drop an Gold Gralat
(or red,blue,green)
it will make an gani of the gralat instead of dropping it and if touch it....u will get ur rupees though.... just like Bravo and G2k1
etc..
__________________

Quote:
The Dark Nemesis begins.......
Reply With Quote
  #13  
Old 08-25-2002, 09:22 PM
prozac424242 prozac424242 is offline
Registered User
prozac424242's Avatar
Join Date: May 2001
Location: Gone crazy: back soon
Posts: 356
prozac424242 is on a distinguished road
Send a message via ICQ to prozac424242 Send a message via AIM to prozac424242
new commands?

Whered you get those new commands?
removeweapon is not found when i run it though Graal and click Test, causes an error.
Putnpc2 is not in newfeatures2001 or newfeatures2002,
where did you get it?

I started scripting in graal 1.28 and was a big mover for getting Stefan to add functions, how do you keep up on the latest unpublished commands?

And I never had and currently do not have an npc server to work with, and therefore no reason to be informed of serverside stuff...
unless y'all tell me...

Especialy since i'd like to add them to my NPC Command Search Engine (linked below) and bring that up to date!
__________________

Useful links:
Graal Stats
Client Script Functions-GS1 to GS2
Serverside Script Functions-Gscript page
Particle Engine-Player Attributes
Server Options-Admin rights-Gmaps
Quote:
Originally Posted by Admins
Thanks for developing and improving playerworlds and such
Reply With Quote
  #14  
Old 08-25-2002, 11:18 PM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
Ah Prozac, it is ALL thanks to the wonders of the NPC Server. Stefan didn't include support for NPC Server commands into the level editor =/ He should though, it gets VERY annyoing elsewise But if you'd like, I think I've got some tutorials or something, or I could explain a bit to you if you'd like. You won't find the commands listed anywhere. Good explanation btw ScreeN Name, that is how I would've suggested it if you hadn't already but he wanted A+S stuff, not that, that was easy to do though =P
---Shifter
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
Reply With Quote
  #15  
Old 08-26-2002, 12:03 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
Re: new commands?

Quote:
Originally posted by prozac424242
Whered you get those new commands?
removeweapon is not found when i run it though Graal and click Test, causes an error.
Putnpc2 is not in newfeatures2001 or newfeatures2002,
where did you get it?

I started scripting in graal 1.28 and was a big mover for getting Stefan to add functions, how do you keep up on the latest unpublished commands?

And I never had and currently do not have an npc server to work with, and therefore no reason to be informed of serverside stuff...
unless y'all tell me...

Especialy since i'd like to add them to my NPC Command Search Engine (linked below) and bring that up to date!
Need NPC Server tha's why your getting the error message.
And the command bits like you would find arein the NPC Server document with the somewhat older commands fr it.
__________________
QUICK LOOK BUSY JESUS IS COMING!
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 07:21 AM.


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