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 02-20-2009, 08:09 PM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
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
Reply With Quote
  #2  
Old 02-20-2009, 10:56 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
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.
__________________
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 05:45 PM.


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