Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-26-2010, 09:57 PM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
onPlayerKilled

I posted in the gserver update thread about this but I figured it would be more useful to make a thread that people can refer to for future reference.

I cannot seem to get onPlayerKilled to work at all
PHP Code:
function onPlayerKilled(){
  echo(
params[0SPC params[1]);

That is server side and I have never attempted to use onPlayerKilled before but I assume that is how it works. I already know the parameters but I couldn't seem to get it to call the event when a player gets killed. Any ideas on what's wrong?
Reply With Quote
  #2  
Old 05-27-2010, 12:20 PM
TSAdmin TSAdmin is offline
Forum Moderator
TSAdmin's Avatar
Join Date: Aug 2006
Location: Australia
Posts: 1,980
TSAdmin has much to be proud ofTSAdmin has much to be proud ofTSAdmin has much to be proud ofTSAdmin has much to be proud ofTSAdmin has much to be proud ofTSAdmin has much to be proud of
Are you trying it on a "default" Classic-Style server? If you're trying to do it on Era, I doubt it will work. Era has a custom HP system, so I may or may not be wrong but if I remember right, it also has a custom death system and would not be affected by Classic-Style "PlayerKilled" function.
__________________
TSAdmin (Forum Moderator)
Welcome to the Official GraalOnline Forums! Where sharing an opinion may be seen as a declaration of war!
------------------------
· User Agreement · Code of Conduct · Forum Rules ·
· Graal Support · Administrative Contacts ·
Reply With Quote
  #3  
Old 05-27-2010, 06:44 PM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
Quote:
Originally Posted by TSAdmin View Post
Are you trying it on a "default" Classic-Style server? If you're trying to do it on Era, I doubt it will work. Era has a custom HP system, so I may or may not be wrong but if I remember right, it also has a custom death system and would not be affected by Classic-Style "PlayerKilled" function.
Nope, I'm aware it wont work on era. I have been trying to use it on testbed.
Reply With Quote
  #4  
Old 05-28-2010, 01:44 AM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
Still cannot get this to work and have no clue why. Apparently Bell has restarted the server so it should be updated and I know I'm not doing anything wrong. Has anyone successfully gotten this to work?
Reply With Quote
  #5  
Old 05-28-2010, 08:18 AM
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
I have not, I made up a clientside detection though

HTML Code:
function onPlayerHurt() {  
  if (player.hearts <= 0) {
    this.doDeath();
  }
}
Maybe that'll help for now? :s
__________________
Reply With Quote
  #6  
Old 05-28-2010, 10:01 AM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
Quote:
Originally Posted by xAndrewx View Post
I have not, I made up a clientside detection though

HTML Code:
function onPlayerHurt() {  
  if (player.hearts <= 0) {
    this.doDeath();
  }
}
Maybe that'll help for now? :s
I was using it to check who killed whom but I can't seem to get it to work on testbed. Luca said it works on UN so I'm guessing that it is just a matter of updating testbeds gserver. I felt like I had the IQ of a dead squirrel for about 2 days because I couldn't figure it out.
Reply With Quote
  #7  
Old 05-28-2010, 10:30 AM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by Cubical View Post
I was using it to check who killed whom but I can't seem to get it to work on testbed. Luca said it works on UN so I'm guessing that it is just a matter of updating testbeds gserver. I felt like I had the IQ of a dead squirrel for about 2 days because I couldn't figure it out.
In Stefan's post it seems like he had already updated all the GServers/NPC-Servers and they just required a restart... it would be odd if only Testbed was missed.
Reply With Quote
  #8  
Old 05-28-2010, 05:48 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
Doesn't work on bravo, so I used that alternative :[
__________________
Reply With Quote
  #9  
Old 05-28-2010, 07:47 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Well I've definitely used it on UN. I don't remember for what exactly, but I remember having it sent to my F2 window for a little. I don't have access to that anymore, though.
Reply With Quote
  #10  
Old 05-28-2010, 09:05 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
It's just this second started working on Bravo =] (Noticed alot of spam in RC)
__________________
Reply With Quote
  #11  
Old 05-28-2010, 09:11 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
PHP Code:
function onPlayerKilled(vic,kill) {
  
findplayer("DustyPorViva").sendrpgmessage(vic SPC "was killed by" SPC kill);

Worked fine for me on Testbed:

Nogross was killed by DustyPorViva
Reply With Quote
  #12  
Old 05-29-2010, 05:27 AM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
Yeah, it's fixed now. I guess that testbed just needed a restart.
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 10:58 PM.


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