Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Will you help me with Wings... (https://forums.graalonline.com/forums/showthread.php?t=21136)

Joe27hunter 01-14-2002 09:17 AM

Will you help me with Wings...
 
1 Attachment(s)
Will you fix these wings i made. They work and all but there like only for staff because when you use them if you attack you can move while your doing it. There like staff boots that cant go on walls lol. Also will you make it be able if i fire it it goes off lol.

Python523 01-14-2002 09:58 AM

Let me point out a few things to change:
if (created) {x+=.5;}
Don't do x+=.5, put the exact x place you want it like x=30.5
if (playertouchsme) {
toweapons Wings;
hidelocal;
this.wings=0;
}
if (weaponfired&&this.wings==0) {
this.wings==1;
}
while (this.wings==1) {
this.oldx=playerx;
this.oldy=playery;

if (keydown(0)&&wings) {playery-=2;playerdir=0;}
else if (keydown(1)&&wings) {playerx-=2;playerdir=1;}
else if (keydown(2)&&wings) {playery+=2;playerdir=2;}
else if (keydown(3)&&wings) {playerx+=2;playerdir=3;}

if (onwall(playerx,playery+1)) {playerx=this.oldx;playery=this.oldy;}
else if (onwall(playerx+.5,playery+.5)) {playerx=this.oldx;playery=this.oldy;}
else if (onwall(playerx+.5,playery+.5)) {playerx=this.oldx;playery=this.oldy;}
else if (onwall(playerx+.5,playery+.5)) {playerx=this.oldx;playery=this.oldy;}
else if (onwall(playerx+.5,playery+.5)) {playerx=this.oldx;playery=this.oldy;}
else if (onwall(playerx+2,playery+2)) {playerx=this.oldx;playery=this.oldy;}
else if (onwall(playerx+,playery+3)) {playerx=this.oldx;playery=this.oldy;}
else if (onwall(playerx+1,playery+3)) {playerx=this.oldx;playery=this.oldy;}
else if (onwall(playerx+2,playery+3)) {playerx=this.oldx;playery=this.oldy;}
if (strequals(#c,wings off)&&this.wings==1) {
this.wings==0;
}
sleep 0.05;
}
if (weaponfired&&this.wings==1)
{this.wings==0;}
That should work fine, if it doesn't, try using a string

Faheria_LAT1 01-14-2002 10:31 AM

1 Attachment(s)
WTS? Why make wings npc with showimg wts???!?!? If its for a Free PW I understand but I prefer ganiz =P mwahahaha fear:

Joe27hunter 01-19-2002 09:46 PM

It doesnt work can you fix this...
 
1 Attachment(s)
It doesn't work still

TDO2000 01-19-2002 10:23 PM

OMG please make a better onwall-check X_x

example:
NPC Code:

for(i=0;i < 4; i++){
if(keydown(i)){
for(m=0;m < 2;m+=.05){
if(!onwall(playerx+1.5+vecx(i),playery+2+vecy(i)){
playerx+=vecx(i)*.05;
playery+=vecy(i)*.05;
}
}
}
}



not very good but it's a complete movement-script...


All times are GMT +2. The time now is 03:18 PM.

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