Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Amnimal (https://forums.graalonline.com/forums/showthread.php?t=1497)

freddyfox 04-18-2001 08:05 AM

My first "real" movement template... even has onwall stuff (Which is a big step for me):

NPC Code:

// NPC made by Tgf_guy
//Basic Animal Template
if(playerenters){
this.dir = 1;
timeout = 0.05;
}
if(this.dir=0&&timeout){
x ++;
timeout = 0.19;
}
if(this.dir=1&&timeout){
y ++;

timeout = 0.19;
}
if(this.dir=2&&timeout){
x --;

timeout = 0.19;
}
if(this.dir=3&&timeout){
y --;

timeout = 0.19;
}
if(onwall(x +3,y)){
this.dir = 2;
timeout = 0.19;
}
if(onwall(x -3,y)){
this.dir = 0;
timeout = 0.19;
}
if(onwall(x,y +3)){
this.dir = 3;
timeout = 0.19;
}
if(onwall(x,y -3)){
this.dir = 1;
timeout = 0.19;
}



I know it's long. If Kyle is still there, maybe he could help me shorten it.

04-18-2001 08:09 AM

it is a script!
*is baffled by scripting*


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

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