Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   function onPlayerKills() (https://forums.graalonline.com/forums/showthread.php?t=64664)

Angel_Light 03-10-2006 02:29 PM

function onPlayerKills()
 
I can't find my other thread for this and I can't find it with surch so... w/e. Stefan should really incorporate this command into GS2.


onPlayerKills(specific account/npc id)

I know it would help with pking systems. Stefan if you read this. Please make this command. :'(

Admins 03-10-2006 03:45 PM

For the default hitpoint system ?

jake13jake 03-10-2006 08:54 PM

Well, I would say it would be extremely useful if custom hit systems could use this without lagging the server to death.

Perhaps there could be objectarray.trigger() that could somehow get rid of all the lag created by using a for loop?
like npcs.trigger("PlayerDied",obj_attacker) or npcs.trigger("PlayerKills",obj_deadplayer)
or player.weapons.trigger("Blah",null);

or
temp.triggerthese = findareanpcs(player.x-player.x%64,player.y-player.y%64,64,64);
temp.triggerthese.trigger("PlayerDied",attacker);

ApothiX 03-11-2006 03:17 AM

uh, if you had a custom hit system, you could just send a 'playerkills' message back to the player who killed the one who died. The only thing this would be neat to have in would be the default HP system.

I don't see why you'd really want to alert everyone in the level that someone killed someone else?

jake13jake 03-11-2006 03:31 AM

Quote:

Originally Posted by ApothiX
uh, if you had a custom hit system, you could just send a 'playerkills' message back to the player who killed the one who died. The only thing this would be neat to have in would be the default HP system.

I don't see why you'd really want to alert everyone in the level that someone killed someone else?

Alert everyone in the level???
I mean, the NPCs in the level. Could be used for tracking the amount of kills from a certain time outside of the damage system.

Do you have any idea how to make a custom hit system?

Angel_Light 03-13-2006 05:46 AM

yea jake understands what I'm saying. I mean something like this

if (playerkills) {
player.ap ++;
}

please pardon the GS1 but you undertsnad hopefully

napo_p2p 03-13-2006 11:22 AM

Quote:

Originally Posted by Stefan
For the default hitpoint system ?

It looks like that's what he's suggesting.

I like what jake is saying.

onPlayerKills(obj)
onPlayerDied(obj)

Where obj is a reference to the attacker.

Ajira 03-13-2006 02:42 PM

Quote:

Originally Posted by napo_p2p
It looks like that's what he's suggesting.

I like what jake is saying.

onPlayerKills(obj)
onPlayerDied(obj)

Where obj is a reference to the attacker.

For Kills, obj should refer to the victim. For Died, obj should refer to the attacker.

Skyld 03-13-2006 06:47 PM

Quote:

Originally Posted by Ajira
For Kills, obj should refer to the victim. For Died, obj should refer to the attacker.

Or even better yet, onPlayerKills(attacker, victim) or so.

jake13jake 03-13-2006 09:26 PM

Quote:

Originally Posted by Skyld
Or even better yet, onPlayerKills(attacker, victim) or so.

but player would already be assigned to the attacker object so it would be overkill.

napo_p2p 03-13-2006 09:32 PM

Quote:

Originally Posted by Ajira
For Kills, obj should refer to the victim. For Died, obj should refer to the attacker.

Heh, yeah that's what I wanted to say, but didn't. ^^

Projectshifter 03-14-2006 04:41 PM

I think this has been proposed for a long time, but is there really a need for it? I thought pretty much every server was doing some kind of a custom hit system now?

ApothiX 03-14-2006 05:14 PM

Quote:

Originally Posted by jake13jake
but player would already be assigned to the attacker object so it would be overkill.

You just said you wanted all NPCs in the level to be alerted. So obviously it wouldn't be the 'player' object if an NPC is reading it.

jake13jake 03-14-2006 10:26 PM

Quote:

Originally Posted by ApothiX
You just said you wanted all NPCs in the level to be alerted. So obviously it wouldn't be the 'player' object if an NPC is reading it.

The 'player' object would be implied because the player killing is calling the event. If it were playerdies, then the player dying would be calling the event.

Projectshifter 03-17-2006 01:13 AM

Quote:

Originally Posted by jake13jake
The 'player' object would be implied because the player killing is calling the event. If it were playerdies, then the player dying would be calling the event.

That really doesn't seem to make much sense. You're going to have an NPC in a level that reads onPlayerKills(player)? I'm not sure you're getting the concept of all of this object orientation, onPlayerKills(player) would be a member of what object? If you're wanting to do that, whenever a player is hit you can store the attacker in a string, and if that player dies then trigger to an NPC to calculate it. Otherwise I'm really not seeing the merit of it.


All times are GMT +2. The time now is 03:14 AM.

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