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
  #16  
Old 10-04-2002, 12:47 AM
Lit Lit is offline
Registered User
Join Date: Jul 2002
Location: none
Posts: 41
Lit is on a distinguished road
Send a message via AIM to Lit Send a message via Yahoo to Lit
so what u want is swords disabled but not the NPCs Weapons Or anything in that order may i ask why and why dont u use
PHP Code:
if (playerenters) {toweapons *WeaponsDisabled;}     if (!strequals(#l,Levelname)) {destroy;} 
Eh?
__________________
-=Babylon's GP Chief=-
Reply With Quote
  #17  
Old 10-04-2002, 01:23 AM
R0b1n-NPC R0b1n-NPC is offline
Registered User
Join Date: Sep 2002
Posts: 397
R0b1n-NPC is on a distinguished road
Quote:
Originally posted by Lit
so what u want is swords disabled but not the NPCs Weapons Or anything in that order may i ask why and why dont u use
PHP Code:
if (playerenters) {toweapons *WeaponsDisabled;}     if (!strequals(#l,Levelname)) {destroy;} 
Eh?
AHHHHHH WHERES THE CARRIGE RETURNS!!!!!!!!!!!!?!?!??!?!?!?!?

PHP Code:
if (playerenters) {
  
toweapons *WeaponsDisabled;
}
if (!
strequals(#l,Levelname)) {
  
destroy;

Also Kaimetsu is right, your script would do bugger all..
__________________
- R0bin
Reply With Quote
  #18  
Old 10-04-2002, 04:34 AM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
With that script you could simply select another weapon.
Use timeouts and set selectedweapon to this weapon always.
I did so in the Nimda sparring.

But we are off-topic now.

We wanted to disable the sword, and just the sword.
By doing "setsword no-sword.png,0;" you still have a zero displayed.
Using disabledefmovement would hide that, but I couldn't carry NPCs anymore.
I know how to carry tile objects like bushes and so, and yes I could even make the player carry a bomb, but I can't make him carry a whole script.
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
Reply With Quote
  #19  
Old 10-04-2002, 04:42 AM
sage_chaozu sage_chaozu is offline
Registered User
sage_chaozu's Avatar
Join Date: Feb 2002
Location: Florida, USA
Posts: 143
sage_chaozu will become famous soon enough
Send a message via ICQ to sage_chaozu Send a message via AIM to sage_chaozu Send a message via MSN to sage_chaozu Send a message via Yahoo to sage_chaozu
Disabling NPC Weapons

if (playerenters) {
if (!isweapon) {
toweapons NoWeaponSelected;
}
disableselectweapons;
timeout = .05;
}

if (timeout) {
if (!strequals(#w(selectedweapon),NoWeaponSelected)) {
for (this.index = 0; this.index <= weaponscount; this.index++){
if (strequals(#w(this.index),NoWeaponSelected))
break;
}
selectedweapon = this.index;
}
timeout = .05;
}

That should be the correct way to disable npc weapons...
almost forgot the disable q select
Reply With Quote
  #20  
Old 10-04-2002, 04:47 AM
R0b1n-NPC R0b1n-NPC is offline
Registered User
Join Date: Sep 2002
Posts: 397
R0b1n-NPC is on a distinguished road
disableweapons;
__________________
- R0bin
Reply With Quote
  #21  
Old 10-04-2002, 04:49 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 R0b1n-NPC
disableweapons;
That disables all weaons including D NPCs.
His just stops the sword from working.
__________________
QUICK LOOK BUSY JESUS IS COMING!
Reply With Quote
  #22  
Old 10-04-2002, 04:49 AM
sage_chaozu sage_chaozu is offline
Registered User
sage_chaozu's Avatar
Join Date: Feb 2002
Location: Florida, USA
Posts: 143
sage_chaozu will become famous soon enough
Send a message via ICQ to sage_chaozu Send a message via AIM to sage_chaozu Send a message via MSN to sage_chaozu Send a message via Yahoo to sage_chaozu
Disableweapons?

Disable Weapons does not let you use your sword...
that script lets you use your sword...

also, I had to re-edit because I forgot about disableselectweapons;
Reply With Quote
  #23  
Old 10-04-2002, 04:54 PM
Graal2001_Developer1 Graal2001_Developer1 is offline
Registered User
Join Date: Sep 2002
Location: Germany - Lübeck
Posts: 17
Graal2001_Developer1 is on a distinguished road
Send a message via ICQ to Graal2001_Developer1
Quote:
Originally posted by Kaimetsu


Hmm. Surely shoot and putnpc2 could do the trick. I'm not sure, I haven't ever really used shoot.
But it's the way it works
after doing shoot the control-npc would get triggered, you set some params with setshootparams and it reads them out
after this you can place the right NPC whre you actually throw it
__________________
This is TDO
Nothing to say.. just need a webhost for images
Reply With Quote
  #24  
Old 10-04-2002, 11:11 PM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
Why would you really want to disable JUST the sword?? I generally do it the other way, KEEP just the sword, in which case you run it on a timeout, and have it set a this.var of what the selectedweapon is. Such as like:
NPC Code:

if (created)
{ toweapons *Sword-Only;
this.weap=selectedweapon;
timeout=0.25;
}

if (timeout)
{ if (!selectedweapon=this.weap)
{ selectedweapon=this.weap;}
timeout=0.25;
}


Is it setting the selected weapon or setplayerprop, god, I dunno, I have one I made that I just repeatedly used. I'm scripted out for a few days, I just made a security system, took AGES to do, it wasn't necessarily hard, just long coded. Angel wanted it scripted, so I did :P I worked on it a total of three days, but it was mostly sitting down and doing one thing, coming back hours l8er or what not It's got a keypad that you can click or type in.
---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
  #25  
Old 10-05-2002, 12:54 AM
sage_chaozu sage_chaozu is offline
Registered User
sage_chaozu's Avatar
Join Date: Feb 2002
Location: Florida, USA
Posts: 143
sage_chaozu will become famous soon enough
Send a message via ICQ to sage_chaozu Send a message via AIM to sage_chaozu Send a message via MSN to sage_chaozu Send a message via Yahoo to sage_chaozu
Quote:
Originally posted by emortylone

NPC Code:

if (created)
{ toweapons *Sword-Only;
this.weap=selectedweapon;
timeout=0.25;
}

if (timeout)
{ if (!selectedweapon=this.weap)
{ selectedweapon=this.weap;}
timeout=0.25;
}


I don't think that would work as good as the example I posted earlier because the weapon's index would change if a weapon whose index is lower gets deleted.

Also one reason why to have the sword disabled is so you can have a server whose primary weapon is not a sword. Like for instance it could be a regular pistol or socom.
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 04:48 PM.


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