Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-28-2002, 03:28 AM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 will become famous soon enough
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
Disabling Weapons when...

Only one weapon is highlighted... I think its something like:

NPC Code:
if (strequals(#w,RaWr)) {
disablewepons;
}
else enableweapons;
}

__________________
Reply With Quote
  #2  
Old 02-28-2002, 04:18 AM
Goboom Goboom is offline
Pixel Monkey
Goboom's Avatar
Join Date: Dec 2001
Location: Michigan
Posts: 1,702
Goboom is on a distinguished road
Send a message via ICQ to Goboom Send a message via AIM to Goboom Send a message via MSN to Goboom Send a message via Yahoo to Goboom
.....wouldnt that disable the weapons list so you couldnt select another weapon...there for you cant ever select a new weapon?
__________________
Reply With Quote
  #3  
Old 02-28-2002, 04:22 AM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 will become famous soon enough
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
well, there is something like disableinventorylist or somthing... but, it was on G2K1 with CTF
__________________
Reply With Quote
  #4  
Old 02-28-2002, 04:33 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
disableselectweapons
enableselectweapons

its something like that
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #5  
Old 02-28-2002, 04:37 AM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 will become famous soon enough
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
i'll just talk to you on msn x.x
__________________
Reply With Quote
  #6  
Old 02-28-2002, 05:09 AM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 will become famous soon enough
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
How do I destroy a weapon? like in the users inventory...
NPC Code:
if (platerenters&&strequals(#w,WeaponName&&isweapon)) {
destroy;
}

__________________
Reply With Quote
  #7  
Old 02-28-2002, 06:36 AM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 will become famous soon enough
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
Anyone?
__________________
Reply With Quote
  #8  
Old 02-28-2002, 06:40 AM
neomaximus2k neomaximus2k is offline
Registered User
Join Date: Feb 2002
Location: UK
Posts: 324
neomaximus2k is on a distinguished road
Send a message via ICQ to neomaximus2k
Quote:
Originally posted by zell12
How do I destroy a weapon? like in the users inventory...
NPC Code:
if (platerenters&&strequals(#w,WeaponName&&isweapon)) {
destroy;
}

not to sure on that, i had a script working but i lost it
__________________
Beware of thy Inner self
NPC Code:

_.,.__
((o\\o\))
.-. ` \\``
__( )___.o"".,___
=== ~~~~~~~~
==
= Neo

Reply With Quote
  #9  
Old 02-28-2002, 11:08 AM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
-=Josey=-
NPC Code:

if (playerenters&&hasweapon(yourweaponhere)){
toweapons yourweaponhere;
sleep .1;
destrory;
}



You may have to make the sleep just a tad bit longer. It should work though. Or in your weapon you could use:

NPC Code:

if (playerenters){
toweapons Destroying soon;
timeout=.05;
}
if (timeout&&hasweapon(Destroying soon)){
if (strequals(#L,levelname.graal)){
destroy;
}
timeout=.05;
}


You could use either of those two.
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #10  
Old 02-28-2002, 02:18 PM
neomaximus2k neomaximus2k is offline
Registered User
Join Date: Feb 2002
Location: UK
Posts: 324
neomaximus2k is on a distinguished road
Send a message via ICQ to neomaximus2k
Quote:
Originally posted by joseyisleet
-=Josey=-
NPC Code:

if (playerenters&&hasweapon(yourweaponhere)){
toweapons yourweaponhere;
sleep .1;
destrory;
}



You may have to make the sleep just a tad bit longer. It should work though. Or in your weapon you could use:

NPC Code:

if (playerenters){
toweapons Destroying soon;
timeout=.05;
}
if (timeout&&hasweapon(Destroying soon)){
if (strequals(#L,levelname.graal)){
destroy;
}
timeout=.05;
}


You could use either of those two.

The question is when do you want the weapon to be destroyed?
if it is part of a trading system or something then you could add the bottom code from josey into everyweapon or try and make a global one.
__________________
Beware of thy Inner self
NPC Code:

_.,.__
((o\\o\))
.-. ` \\``
__( )___.o"".,___
=== ~~~~~~~~
==
= Neo

Reply With Quote
  #11  
Old 03-01-2002, 03:01 AM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 will become famous soon enough
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
well, I added a update, and im trying to get rid of the old weapon when they walk into a certian level
__________________
Reply With Quote
  #12  
Old 03-01-2002, 06:01 AM
neomaximus2k neomaximus2k is offline
Registered User
Join Date: Feb 2002
Location: UK
Posts: 324
neomaximus2k is on a distinguished road
Send a message via ICQ to neomaximus2k
Quote:
Originally posted by zell12
well, I added a update, and im trying to get rid of the old weapon when they walk into a certian level
Ok then a simple thing would be...

in the weapon first of all...
NPC Code:

if (hasweapon(test)){
if (server.destroyweapon==1){server.destroy=0;
destroy;}
timeout=0.05;}


and the npc in a level
NPC Code:

if (playerenters && hasweapon(test)){
server.destroy=1;}


there are loads of other ways in which you can do this but that is the simpliest way of doing it i beleive
__________________
Beware of thy Inner self
NPC Code:

_.,.__
((o\\o\))
.-. ` \\``
__( )___.o"".,___
=== ~~~~~~~~
==
= Neo

Reply With Quote
  #13  
Old 03-01-2002, 06:18 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Quote:
Originally posted by TDK_RC6
disableselectweapons
enableselectweapons

its something like that
your right on the nose. and to answer the other question it has to be in the weapon, like:
NPC Code:

if (playertouchsme) toweapons weapon;
if (actionWeaponDestroy) destroy;


unless its p2p than its just:
NPC Code:

removeweapon weapon;

__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 12:39 AM.


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