Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   somebody help me with this script (https://forums.graalonline.com/forums/showthread.php?t=84322)

GULTHEX 02-20-2009 08:09 PM

somebody help me with this script
 
PHP Code:

//#CLIENTSIDE
//up
if (playerdir=0){
  
this.x=playerx-1;
  
this.y=playery-2;
}
//left
if (playerdir=1){
  
this.x=playerx-2;
  
this.y=playery;
}
//down
if (playerdir=2){
  
this.x=playerx+1;
  
this.y=playery+2;
}
//right
if (playerdir=3){
  
this.x=playerx+2;
  
this.y=playery;
}
if (
playerenters) {
  
toweapons Test;
}

if (
weaponfired){
  
setani dg_iron-sword-attack,;
  
freezeplayer 0.0383;
  
sleep 0.1;
}

if (
actionprojectile) {
  if(
strequals(#p(index),PARAMEQUALS)) {
    
hurt 3;
  }




hmm for some reason it dont hurt the player whats wrong with it please correct me in the script

cbk1994 02-20-2009 10:56 PM

Quote:

Originally Posted by Scripting Forum Rules
1. Be clear on your ability level. In other words, do not post asking for scripts, or asking people to fix scripts that are above your ability level. If you are writing a script to aid learning, then try writing a simpler script. If you are looking for a script for a server, then the best solution is probably to hire a scripter.

I would think you would be quite acquainted with this quote by now...

By the string "PARAMEQUALS" it seems to me that you copied that directly out of somewhere, and now don't know how to make it work.

There are a lot of flaws in that code, but the one I think you need is to add params to the shoot function. setshootparams() should do that fine.


All times are GMT +2. The time now is 06:58 AM.

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