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-03-2006, 08:49 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Playerkills???

Hello,

okay, i've search the old upfated commands for GS1 and then the WIKI nothing, Is therea command when the playerkills a opponet, e.g. another player or a attcking NPC???
__________________
Deep into the Darkness peering...
Reply With Quote
  #2  
Old 01-03-2006, 09:05 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
No, closest thing you have is 'playerdies.'

Which isn't very helpful, since the person who killed you isn't communicated. :/
Reply With Quote
  #3  
Old 01-03-2006, 09:08 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
I know T_T, Well they should create a command for that for GS2. Like

playerslays();

and side the paranthses should be the type of enemy or just they any.
__________________
Deep into the Darkness peering...
Reply With Quote
  #4  
Old 01-03-2006, 09:12 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
That would be a really good idea.

PHP Code:
function onPlayerKills(killedtype,killedaccount) {
  
player.chat "I just killed" SPC killedaccount;

Also, a variable holding the last person to hit you would be nice. Or the last person you hit.
Reply With Quote
  #5  
Old 01-03-2006, 09:14 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
yea and just leave it blank if ya dont want nothing there, that's a really good idea
__________________
Deep into the Darkness peering...
Reply With Quote
  #6  
Old 01-03-2006, 10:03 PM
talkingnoodle talkingnoodle is offline
Rapidwolve
talkingnoodle's Avatar
Join Date: Nov 2005
Location: Leominster, MA
Posts: 229
talkingnoodle is on a distinguished road
Send a message via AIM to talkingnoodle Send a message via MSN to talkingnoodle
What I would do is put a flag in the client (client.lasthitby) and if the player is hit 1 more time then the person who hit them last would get credit for the kill, I put this in the projectile
__________________


AIM: Rapidwolve Graal
MSN: [email protected]


2/12/06 - Crossroads NPC Admin
Reply With Quote
  #7  
Old 01-03-2006, 10:08 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
There's no way to tell who hit you last, unless it's with a projectile.
Reply With Quote
  #8  
Old 01-03-2006, 10:11 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by Yen
There's no way to tell who hit you last, unless it's with a projectile.
That's how Era does it.

Hm, not too sure but isn't 'if (wash*t)' fully functional?
__________________
Reply With Quote
  #9  
Old 01-03-2006, 10:33 PM
talkingnoodle talkingnoodle is offline
Rapidwolve
talkingnoodle's Avatar
Join Date: Nov 2005
Location: Leominster, MA
Posts: 229
talkingnoodle is on a distinguished road
Send a message via AIM to talkingnoodle Send a message via MSN to talkingnoodle
here ill help you (this is the projectile part)

NPC Code:


if (actionprojectile){
if (strequals(#p(0),<projectile_name>))){
setstring client.lasthitby,#p(1);
}
}

__________________


AIM: Rapidwolve Graal
MSN: [email protected]


2/12/06 - Crossroads NPC Admin
Reply With Quote
  #10  
Old 01-03-2006, 10:45 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
... You make me frown.

We're talking about regular hearts. Arrows, explosions, swords, NPCs doing damage. Not projectiles.
Reply With Quote
  #11  
Old 01-03-2006, 10:54 PM
talkingnoodle talkingnoodle is offline
Rapidwolve
talkingnoodle's Avatar
Join Date: Nov 2005
Location: Leominster, MA
Posts: 229
talkingnoodle is on a distinguished road
Send a message via AIM to talkingnoodle Send a message via MSN to talkingnoodle
o_o oh..

XD
Reply With Quote
  #12  
Old 01-04-2006, 01:53 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
lol, well, hopefully stefan will make that command
__________________
Deep into the Darkness peering...
Reply With Quote
  #13  
Old 01-04-2006, 06:38 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
just handle the s key, and send a triggeraction at playerx+2*vecx(playerdir), playery+2*vecy(playerdir) with the account name as a parameter.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #14  
Old 01-04-2006, 07:53 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by ApothiX
just handle the s key, and send a triggeraction at playerx+2*vecx(playerdir), playery+2*vecy(playerdir) with the account name as a parameter.
Why not just keep track of that with washit, and then act on that when the player dies?

There is probably a better way to go about doing this, but it hardly makes sense to make it more complicated with triggeractions.
Reply With Quote
  #15  
Old 01-04-2006, 11:25 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Lance
Why not just keep track of that with washit, and then act on that when the player dies?

There is probably a better way to go about doing this, but it hardly makes sense to make it more complicated with triggeractions.
Ah, I wasn't aware that washit stored the account of the player that hit you. My bad.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #16  
Old 01-04-2006, 12:02 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by ApothiX
Ah, I wasn't aware that washit stored the account of the player that hit you. My bad.
I'm not sure if washit alone does (), but I am 99% certain that the client stores the information about who killed them somewhere - whether this is available to scripts or not, I can't say.
Reply With Quote
  #17  
Old 01-04-2006, 10:51 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Or, Why don't they just add a playerslays() command? XD Much simpler.
__________________
Deep into the Darkness peering...
Reply With Quote
  #18  
Old 01-05-2006, 01:19 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
Quote:
Originally Posted by Lance
I'm not sure if washit alone does (), but I am 99% certain that the client stores the information about who killed them somewhere - whether this is available to scripts or not, I can't say.
washit can't read who it was hit by, and I'm very sure that who the last person to hit/kill you isn't accessable by scripts.

The range of places your sword can hit is too wide, so a triggeraction isn't very safe. It could trigger on someone you didn't hit, or the person could lag and they might not catch the trigger due to the knockback.

The closest thing I was able to get was a for() loop which checks for a nearby players with the 'sword' gani.
Reply With Quote
  #19  
Old 01-05-2006, 02:57 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
But, what if they slay a NPC or players with bombs arrows Etc (custom weapons)
__________________
Deep into the Darkness peering...
Reply With Quote
  #20  
Old 01-05-2006, 03:19 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Angel_Light
But, what if they slay a NPC or players with bombs arrows Etc (custom weapons)
then I guess you're S.O.L.

The best solution would probably be to write your own battle system
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #21  
Old 01-05-2006, 04:40 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
I'm not that good of a scripter to do that T-T
__________________
Deep into the Darkness peering...
Reply With Quote
  #22  
Old 01-05-2006, 07:07 AM
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 Yen
and I'm very sure that who the last person to hit/kill you isn't accessable by scripts.
GScript does contain many secret...[ominous mood arises]...
__________________
Reply With Quote
  #23  
Old 01-05-2006, 08:03 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by ZeLpH_MyStiK
GScript does contain many secret...[ominous mood arises]...
Care to share?
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #24  
Old 01-05-2006, 09:53 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
z-z Naw, a few people looked into it with a memory viewer. These people found a list of functions, default GUI controls, ect.
They didn't find anything about hit peoples.
Reply With Quote
  #25  
Old 01-05-2006, 11:35 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Ii sent a forum pm to stefan about this
__________________
Deep into the Darkness peering...
Reply With Quote
  #26  
Old 01-09-2006, 04:07 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Yet, He seems not to reply. WHAA, Stefan doesn't like me. T-T :P
__________________
Deep into the Darkness peering...
Reply With Quote
  #27  
Old 01-09-2006, 06:01 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Angel_Light
Yet, He seems not to reply. WHAA, Stefan doesn't like me. T-T :P
Or perhaps he's busy. The coder of graal being busy.. what a concept.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #28  
Old 01-11-2006, 03:56 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
No, he hate's me. :P
__________________
Deep into the Darkness peering...
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 11:46 PM.


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