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
  #1  
Old 03-31-2007, 02:02 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Chandler View Post
I'd do this:
PHP Code:
public function Hurt(hurtDamageattackersAccounthurtGani)
  if (
this.clientr.hp && !this.clientr.dead && !level.nopk && !this.client.nopk)
  {
  
this.clientr.hp -= abs(temp.hurtDamage);  
  if (
temp.hurtGani
    
this.setAni("hurt""");
  
clientr.lastattacker temp.attackersAccount;
  if (
this.clientr.hp <= 0
    
this.doDeath(temp.attackersAccount);
  
this.showHp(7);
  }
public function 
doDeath(attackersAccount)
  {
  
this.clientr.dead true;
  
this.clientr.hp 0;
  
this.Kill(temp.attackersAccount); 
  } 
Ugh, that makes my eyes bleed. Your brackets should be inline with the block, not with the contents. You've missed out a load of brackets anyway, and you've mixed all sorts of conditional checks which are totally unrelated to each other in one line. :/ Bleugh.
__________________
Skyld
Reply With Quote
  #2  
Old 03-31-2007, 02:12 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Skyld View Post
Ugh, that makes my eyes bleed. Your brackets should be inline with the block, not with the contents. You've missed out a load of brackets anyway, and you've mixed all sorts of conditional checks which are totally unrelated to each other in one line. :/ Bleugh.
I second that..
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #3  
Old 03-31-2007, 07:37 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by Skyld View Post
Ugh, that makes my eyes bleed. Your brackets should be inline with the block, not with the contents. You've missed out a load of brackets anyway, and you've mixed all sorts of conditional checks which are totally unrelated to each other in one line. :/ Bleugh.
*****.
Reply With Quote
  #4  
Old 04-06-2007, 10:38 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by Skyld View Post
Ugh, that makes my eyes bleed. Your brackets should be inline with the block, not with the contents. You've missed out a load of brackets anyway, and you've mixed all sorts of conditional checks which are totally unrelated to each other in one line. :/ Bleugh.
I thought that was directed to me x.x
Reply With Quote
  #5  
Old 04-06-2007, 10:40 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Rapidwolve View Post
I thought that was directed to me x.x
Thread revival xD
__________________
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 02:37 AM.


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