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 01-06-2002, 08:37 PM
Kumada Kumada is offline
Ded
Kumada's Avatar
Join Date: Nov 2001
Location: Usa
Posts: 1,088
Kumada is on a distinguished road
Angry (playerkillsplayer)

I was wondering if there was something that can check if the player kills another player..
I would use ap but a flag would be much easier.
__________________
Aim: Mmm Kumada

Reply With Quote
  #2  
Old 01-06-2002, 11:22 PM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
I think there is. How else could Stefan make the AP thing? I don't know what the code would be though. Try different variables for the server kills data. Then you could put it on a timeout to use it.
- shrugs. Other then that I have no idea.
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #3  
Old 01-06-2002, 11:53 PM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 has a spectacular aura about
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
I saw that command on some NPC scripting site, never paid attention to it though
__________________
Reply With Quote
  #4  
Old 01-07-2002, 01:20 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
You could do it if you had it in a system npc and used triggeraction i do belive....
__________________
Reply With Quote
  #5  
Old 01-07-2002, 02:32 AM
Kumada Kumada is offline
Ded
Kumada's Avatar
Join Date: Nov 2001
Location: Usa
Posts: 1,088
Kumada is on a distinguished road
Joey...
You can see if a player kills another player by using client.strings or this.strings Like this.
NPC Code:

if (playerenters){
toweapons -Kill;
timeout=.05;
this.ap = playerap;
}

if (timeout&&isweapon){
testap();
timeout=.05;
}

function testap();
{
if (playerap=<this.ap){
this.ap = playerap;
setplayerprop #c, U ARE HEV SINNED GY;
}
}



Something like this.. I know the
NPC Code:
 if (playerap=<this.ap) 

Probably will not work.. but ohwhell im just supposed to be showing you how its done.. damn im tired
__________________
Aim: Mmm Kumada

Reply With Quote
  #6  
Old 01-07-2002, 04:23 AM
WHIPENIE4 WHIPENIE4 is offline
I am X-Mann
Join Date: Aug 2001
Location: PA
Posts: 2,715
WHIPENIE4 is on a distinguished road
Send a message via ICQ to WHIPENIE4 Send a message via AIM to WHIPENIE4
[screen_name says:]

there are problems with that script, but it is in the right direction

Quote:
Originally posted by Kumada
Joey...
You can see if a player kills another player by using client.strings or this.strings Like this.
NPC Code:

if (playerenters){
toweapons -Kill;
timeout=.05;
this.ap = playerap;
}

if (timeout&&isweapon){
testap();
timeout=.05;
}

function testap();
{
if (playerap=<this.ap){
this.ap = playerap;
setplayerprop #c, U ARE HEV SINNED GY;
}
}



Something like this.. I know the
NPC Code:
 if (playerap=<this.ap) 

Probably will not work.. but ohwhell im just supposed to be showing you how its done.. damn im tired
__________________
Mind over Matter. If your body dont mind, why does it matter?

- X-Mann (Blessing Graal since 1998) Haha

- Graal 2000 Project (Contact Me to get Apart of this expierience

Windows Vista. Graal. Not a Good Combination.
Reply With Quote
  #7  
Old 01-07-2002, 04:24 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
Um but if u have 0 AP or the guy u kiled had? wouldn't really work

there is no scripting command counting the kills or death u can use... um no command I knew
__________________
No Webhost at the moment
Reply With Quote
  #8  
Old 01-07-2002, 04:36 AM
Shard_IceFire Shard_IceFire is offline
Registered User
Shard_IceFire's Avatar
Join Date: Jun 2001
Location: Eastern Harkoonia
Posts: 861
Shard_IceFire is on a distinguished road
Hmm. Couldn't it be done somehow with the (playerdies) command?
__________________

-=Shard IceFire=-
Reply With Quote
  #9  
Old 01-07-2002, 04:44 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
Quote:
Originally posted by Shard_IceFire
Hmm. Couldn't it be done somehow with the (playerdies) command?
If u are doing something like a 2 players-arena sure (P2P) but if there are more then 2 players in a level I don't think it relly possible to do it a good way...
__________________
No Webhost at the moment
Reply With Quote
  #10  
Old 01-07-2002, 06:35 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
you could use theplayerdies and playertouchsother, possibly, but the playerdies command is only active for the current player, meaning it would only register on the player that dies, it would be too complicated...i guess you could just do some sory of playercount thing...its possible, but it would take a lot of workarounds...A LOT! you could do a variation of the other guy's thing...
like:
NPC Code:

// Just include this in the system...
if (created)
{
plap = playerap;
playerz = playerscount;
}
if (timeout) {
if (plap<playerap||playerz<playerscount) {
if (playertouchsother) plkills++;
plap = playerap;
playerz = playerscount;
}
}


not exactly, but a lot like that.
__________________

!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
  #11  
Old 01-07-2002, 09:04 PM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
Quote:
Originally posted by Saga2001
you could use theplayerdies and playertouchsother, possibly, but the playerdies command is only active for the current player, meaning it would only register on the player that dies, it would be too complicated...i guess you could just do some sory of playercount thing...its possible, but it would take a lot of workarounds...A LOT! you could do a variation of the other guy's thing...
like:
NPC Code:

// Just include this in the system...
if (created)
{
plap = playerap;
playerz = playerscount;
}
if (timeout) {
if (plap<playerap||playerz<playerscount) {
if (playertouchsother) plkills++;
plap = playerap;
playerz = playerscount;
}
}


not exactly, but a lot like that.
Um wouldn't work...
__________________
No Webhost at the moment
Reply With Quote
  #12  
Old 01-07-2002, 09:55 PM
Kumada Kumada is offline
Ded
Kumada's Avatar
Join Date: Nov 2001
Location: Usa
Posts: 1,088
Kumada is on a distinguished road
Quote:
Originally posted by TDO2000
Um but if u have 0 AP or the guy u kiled had? wouldn't really work

there is no scripting command counting the kills or death u can use... um no command I knew
0 AP lasts for 5 seconds.
__________________
Aim: Mmm Kumada

Reply With Quote
  #13  
Old 01-07-2002, 10:19 PM
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 TDO2000


Um wouldn't work...
yeah i know, its not like that was final, but it would be a lot like that.
__________________

!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
  #14  
Old 01-07-2002, 11:37 PM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
it can be done, you would have to use testplayer, and indexes, and maybe triggeraction, it would be very difficult, i am trying to make one, but if you wanted to use ap, you would have to set the ap at 100 all the time, and if it lowered you would know the player killed someone, but then you could not longer use ap
Reply With Quote
  #15  
Old 01-08-2002, 04:59 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
Quote:
Originally posted by btedji
it can be done, you would have to use testplayer, and indexes, and maybe triggeraction, it would be very difficult, i am trying to make one, but if you wanted to use ap, you would have to set the ap at 100 all the time, and if it lowered you would know the player killed someone, but then you could not longer use ap
It's possible, that 2 or more players are at the same position so testplayer wouldn't really help

the best way doing this should be a complete new Weapon system (self coded sword and stuff) working with trigegractions so it could be done
__________________
No Webhost at the moment
Reply With Quote
  #16  
Old 01-08-2002, 05:12 AM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
if (playerkillsplayer)

#r(0) is the account name of the killed player
#r(1) is the account name of the killer
#r(2) is the ap loss
Reply With Quote
  #17  
Old 01-08-2002, 05:21 AM
LilNiglet LilNiglet is offline
Registered User
Join Date: Jun 2001
Posts: 3,178
LilNiglet is on a distinguished road
Quote:
Originally posted by Slaktmaster
if (playerkillsplayer)

#r(0) is the account name of the killed player
#r(1) is the account name of the killer
#r(2) is the ap loss
is that a actual command? because i am making a bounty system for 2001
Reply With Quote
  #18  
Old 01-08-2002, 01:53 PM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
No. But there really should be one like that. I'll post in the future improvements.
Reply With Quote
  #19  
Old 01-08-2002, 03:47 PM
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
lol well thats interasting, posting non-existant commands...ook
__________________

!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
  #20  
Old 01-08-2002, 06:45 PM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
Kumada,
You could check if a player killed someone like that, yes. I don't think Stefan coded it like that though. How else would you do it when you said `showkills`. It would be a waist of time to use this.kills and stuff.
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #21  
Old 01-08-2002, 11:32 PM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by joseyisleet
Kumada,
You could check if a player killed someone like that, yes. I don't think Stefan coded it like that though. How else would you do it when you said `showkills`. It would be a waist of time to use this.kills and stuff.
That's hardcoded into graal there, slappy...
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
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:34 AM.


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