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 02-06-2004, 01:56 AM
Gman4pwnu Gman4pwnu is offline
Banned
Join Date: Jan 2004
Posts: 434
Gman4pwnu is on a distinguished road
Send a message via AIM to Gman4pwnu
I made these staff blocks(They wont delete!)

I cant get rid of them, i used putnpc2, what is the serverside destroy command?

Last edited by Gman4pwnu; 02-06-2004 at 02:20 AM..
Reply With Quote
  #2  
Old 02-06-2004, 02:08 AM
Duwul Duwul is offline
Registered User
Join Date: Nov 2003
Posts: 105
Duwul is on a distinguished road
Re: I made these staff blocks

Quote:
Originally posted by Gman4pwnu
I cant get rid of them, i used putnpc2, what is the serverside destroy command?
You said it yourself..."destroy;"
__________________
-Ajira
Liek, omigosh.
<3 DoomsDay.
Reply With Quote
  #3  
Old 02-06-2004, 02:12 AM
Gman4pwnu Gman4pwnu is offline
Banned
Join Date: Jan 2004
Posts: 434
Gman4pwnu is on a distinguished road
Send a message via AIM to Gman4pwnu
Doesn't work, scripts:
(Just borrowing the era stuff temporarily, not to mention some era staff work on our server)
Staff Stick:
NPC Code:

//#CLIENTSIDE
if (weaponfired){
setani era_gani-superstick2,;
triggeraction playerx+1.5+vecx(playerdir)*2,playery+2+vecy(playe rdir)*2,stafftest,;
}


Staff Block Placer:
NPC Code:

if (actionserverside) {
putnpc2 playerx+.5,playery+.5,{join staffblock};
}
//#CLIENTSIDE

if (weaponfired){
triggeraction playerx+.5,playery+.5,serverside,Staff Blocks;
}




Staff Block Class:
NPC Code:

// NPC made by Josey Hunt
if (actionstafftest){
destroy;
}

//#CLIENTSIDE

if (playerenters) {
setimg era_staffblock.png;
block;
drawunderplayer;
}

if (created) {
setimg era_staffblock.png;
block;
drawunderplayer;
}

Reply With Quote
  #4  
Old 02-06-2004, 02:50 AM
Termina_Owner Termina_Owner is offline
Registered User
Join Date: Oct 2003
Posts: 175
Termina_Owner is on a distinguished road
Use RC and say:
/clearnpcs LEVEL


edit: staffblock NPC
NPC Code:

if (playerchats&&strequals(#a,Gman)){
if (strequals(#c,destroy)) destroy;
}



Like that, you won't need to "clearnpcs", but simply say "destroy" on player.

EDIT 2: I should read your question.

NPC Code:

if (created){
setshape 1,32,32;
}


^ That should be placed serverside. The triggeraction doesn't detect the trigger because the shape doesn't have a width/length. To fix that, you must put it. Common error.
__________________
- Rance Vicious
Reply With Quote
  #5  
Old 02-06-2004, 03:00 AM
Gman4pwnu Gman4pwnu is offline
Banned
Join Date: Jan 2004
Posts: 434
Gman4pwnu is on a distinguished road
Send a message via AIM to Gman4pwnu
That works, but how come it doesn't work when a trigger action is sent from the staff stick, i would really like to be able to remove only the ones i hit.
Reply With Quote
  #6  
Old 02-06-2004, 03:18 AM
Termina_Owner Termina_Owner is offline
Registered User
Join Date: Oct 2003
Posts: 175
Termina_Owner is on a distinguished road
Quote:
Originally posted by Termina_Owner

NPC Code:

if (created){
setshape 1,32,32;
}


^ That should be placed serverside. The triggeraction doesn't detect the trigger because the shape doesn't have a width/length. To fix that, you must put it. Common error.

Place that on the serverside of the class...
__________________
- Rance Vicious
Reply With Quote
  #7  
Old 02-06-2004, 03:26 AM
Duwul Duwul is offline
Registered User
Join Date: Nov 2003
Posts: 105
Duwul is on a distinguished road
You should combine it all into one npc..=/
Just make it so like pressing a different key sets the gani and also triggers the action. Better than having 2 different weapons.

You can also use

NPC Code:

with (npcs[testnpc(playerx+1.5+vecx(playerdir)*2,playery+2+ve cy(playerdir)*2)]){
destroy;
}

__________________
-Ajira
Liek, omigosh.
<3 DoomsDay.
Reply With Quote
  #8  
Old 02-06-2004, 03:46 AM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Quote:
Originally posted by Duwul
You should combine it all into one npc..=/
Just make it so like pressing a different key sets the gani and also triggers the action. Better than having 2 different weapons.

You can also use

NPC Code:

with (npcs[testnpc(playerx+1.5+vecx(playerdir)*2,playery+2+ve cy(playerdir)*2)]){
destroy;
}

I'd prefer if you set a flag in the npc such as "this.isblock" then check for it so you don't remove NPCs that arent ment to be removed.
Reply With Quote
  #9  
Old 02-06-2004, 03:51 AM
Duwul Duwul is offline
Registered User
Join Date: Nov 2003
Posts: 105
Duwul is on a distinguished road
Quote:
Originally posted by Riot

I'd prefer if you set a flag in the npc such as "this.isblock" then check for it so you don't remove NPCs that arent ment to be removed.
Yes, that would be helpful. =P
I wasn't really thinking when I posted it, just a general idea of how to destroy it.
__________________
-Ajira
Liek, omigosh.
<3 DoomsDay.
Reply With Quote
  #10  
Old 02-06-2004, 04:52 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally posted by Gman4pwnu
That works, but how come it doesn't work when a trigger action is sent from the staff stick, i would really like to be able to remove only the ones i hit.
NPC Code:

if(was hit && strequals(#a,account)){
destroy;
}





Note: I write was hit with spaces because if you write it together it will turn into "shi.t" and change the word by *'s.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #11  
Old 02-06-2004, 05:38 AM
Gman4pwnu Gman4pwnu is offline
Banned
Join Date: Jan 2004
Posts: 434
Gman4pwnu is on a distinguished road
Send a message via AIM to Gman4pwnu
Thats all cleared up, thanks again!
Reply With Quote
  #12  
Old 02-13-2004, 01:14 PM
KuJiGX KuJiGX is offline
Registered User
Join Date: Dec 2003
Location: New York
Posts: 52
KuJiGX is on a distinguished road
Send a message via AIM to KuJiGX
Quote:
Originally posted by Gman4pwnu
Thats all cleared up, thanks again!
Im gonna count all your "HELP ME" threads on scripting
brb
__________________
-KuJi
Reply With Quote
  #13  
Old 02-13-2004, 01:35 PM
KuJiGX KuJiGX is offline
Registered User
Join Date: Dec 2003
Location: New York
Posts: 52
KuJiGX is on a distinguished road
Send a message via AIM to KuJiGX
Im back (Sorry for double posting)

http://forums.graal2001.com/forums/s...threadid=50886
http://forums.graal2001.com/forums/s...threadid=50920
http://forums.graal2001.com/forums/s...threadid=50949
http://forums.graal2001.com/forums/s...threadid=50930
http://forums.graal2001.com/forums/s...threadid=50892
http://forums.graal2001.com/forums/s...threadid=50856

All the links to his thread he made in about 1 week.
The last one contains about 20 threads tho
__________________
-KuJi
Reply With Quote
  #14  
Old 02-13-2004, 02:47 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
You didn't make it if it says
//NPC made by Josey Hunt
LOL
__________________
V$:CONFL16T
Reply With Quote
  #15  
Old 02-13-2004, 03:14 PM
Termina_Owner Termina_Owner is offline
Registered User
Join Date: Oct 2003
Posts: 175
Termina_Owner is on a distinguished road
*Waves hand in air* SPLENDID!
__________________
- Rance Vicious
Reply With Quote
  #16  
Old 02-14-2004, 02:23 AM
KuJiGX KuJiGX is offline
Registered User
Join Date: Dec 2003
Location: New York
Posts: 52
KuJiGX is on a distinguished road
Send a message via AIM to KuJiGX
Hehe. Damn he likes to make a lot of threads.
__________________
-KuJi
Reply With Quote
  #17  
Old 02-14-2004, 06:40 AM
TB3 TB3 is offline
Registered User
TB3's Avatar
Join Date: May 2001
Location: US of A State of VA
Posts: 658
TB3 is on a distinguished road
Send a message via Yahoo to TB3
Here is an idea add this to all putnpc2 npcs

NPC Code:

join npccontrols;



Then make a class like this
Class name = npccontrols
NPC Code:

if(destroy) {
destroy;
}



Then make an npc weapon that calls all npcs in a level with the destroy flag that way you can clear levels easily.

*Just a suggestion to prevent future problems or you can use the rc to clear it*
__________________

To the sun of your age, I arise
Reply With Quote
  #18  
Old 02-14-2004, 03:43 PM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
or
NPC Code:

if (playerchats&&strequals(#c,destroy)&&strequals(#g, NPC Admin)) {
destroy;
}

Reply With Quote
  #19  
Old 02-14-2004, 03:57 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
Quote:
Originally posted by R0bin
or
NPC Code:

if (playerchats&&strequals(#c,destroy)&&strequals(#g, NPC Admin)) {
destroy;
}

Use KGSI or what ever it's called!
It's hard to read that way, like this!:
NPC Code:

if (playerchats){
if(strequals(#c,destroy)){
if(strequals(#g,NPC Admin)) {
destroy;
}
}
}


Easier to read, rawr
__________________
V$:CONFL16T
Reply With Quote
  #20  
Old 02-14-2004, 06:22 PM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Quote:
Originally posted by WanDaMan

Use KGSI or what ever it's called!
It's hard to read that way, like this!:
NPC Code:

if (playerchats){
if(strequals(#c,destroy)){
if(strequals(#g,NPC Admin)) {
destroy;
}
}
}


Easier to read, rawr
Why? They are all related, and I find R0bins just as easy to read.
Reply With Quote
  #21  
Old 02-14-2004, 06:41 PM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
Quote:
Originally posted by WanDaMan

Use KGSI or what ever it's called!
Its also easier to read if its indented, why dont YOU read the KSI-GS?
Reply With Quote
  #22  
Old 02-14-2004, 07:34 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
Quote:
Originally posted by R0bin


Its also easier to read if its indented, why dont YOU read the KSI-GS?
Because I find it retarded and in some areas not finished.
__________________
V$:CONFL16T
Reply With Quote
  #23  
Old 02-15-2004, 03:39 PM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
Um, **** wan?

Looks like the GMan was hacking earlier, a bunch of "Gman4pwnu has added a weapon (hacker?)" when it was known scripts didnt cause them, rofl.
Reply With Quote
  #24  
Old 02-15-2004, 09:40 PM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Quote:
Originally posted by R0bin
Um, **** wan?

Looks like the GMan was hacking earlier, a bunch of "Gman4pwnu has added a weapon (hacker?)" when it was known scripts didnt cause them, rofl.
ROFL that's funny. I made a script a long time ago that tried to put baddies on the level. When I used it, the server d/ced me and said sort of the same thing on rc "ZeLpH_MyStiK has added a baddy (hacker?)" xD it was funny cause the GP Chief was on at the same time...
__________________
Reply With Quote
  #25  
Old 02-15-2004, 09:49 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
Quote:
Originally posted by R0bin
Um, **** wan?

Looks like the GMan was hacking earlier, a bunch of "Gman4pwnu has added a weapon (hacker?)" when it was known scripts didnt cause them, rofl.
Instant ban
Ugh he is banned on era for hacking an account or something, snake just told me, LOL
__________________
V$:CONFL16T
Reply With Quote
  #26  
Old 02-16-2004, 02:58 PM
KuJiGX KuJiGX is offline
Registered User
Join Date: Dec 2003
Location: New York
Posts: 52
KuJiGX is on a distinguished road
Send a message via AIM to KuJiGX
Snake is like wierd.
Moment i log on Era i get banned for something that i didn't do.
*Logs on Era*
*Gets d/ced from Era*
*Logs again*
You have been banned for hacking 105/10 hp.


If i wanted to hack my hp (Which i can't) why would i want 105? why not 9999999 right?
__________________
-KuJi
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:19 AM.


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