Graal Forums

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

RTelvecho 01-28-2003 01:43 AM

Setshape Ganis?
 
Ok Im making this thing that requires setshape2 for a gani.. im not sure if I use setshape2 or if there is another way of doing this... I did some tests first. To get familiar with setshape2 I did this
NPC Code:

if (created) {
setimgpart od_fishingboat0.gif,47,0,79,195;
drawunderplayer;
setshape2 5,12,{
0,0,22,0,0,
0,22,22,22,0,
22,22,22,22,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22,22,22,22,22,
22,22,22,22,22,
0,0,22,0,0,
0,0,22,0,0,
};

}
if (playertouchsme) {
playerx=35;
playery=45;
attachplayertoobj 0,id;
this.mode=1;
}
if (created||timeout) {
if (this.mode==1) {
playerx=x+2.5;
playery=y+1.5;
y-=1;
}
timeout=.1;
}


Then I tried it in a gani and stuff.. no luck..

NPC Code:

if (playerenters) {
toweapons Boat;
}
if (weaponfired) {
this.on=1-this.on;
timeout=.05;
}
if(timeout) {
if (this.on==1) {
setshape2 5,12,{
0,0,22,0,0,
0,22,22,22,0,
22,22,22,22,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22,22,22,22,22,
22,22,22,22,22,
0,0,22,0,0,
0,0,22,0,0,
};
setani cyn_boat,;
} else {
setani idle,;
}
timeout=.05;
}


please help :)

tlf288 01-28-2003 01:48 PM

Quote:

Originally posted by Kaimetsu
In a script gani? No chance. I thought about the same thing once but it'd just be a big security hole.
I think he is talking of a NPC on a level. Or even more likely a DB NPC considering it is for a boat.

RTelvecho 01-28-2003 08:09 PM

No its a personal boat u fire and it sets ur gani to that...
I was doing tests off line thats why I didnt sort out the server and clientsides

tlf288 01-28-2003 08:56 PM

Using a boat as a weapon seems rather..., I can't think of a nicer word so I'll say it, stupid. I mean what is the point? Just use it online as a DB NPC.

RTelvecho 01-29-2003 04:43 AM

This boat is a boat the player buys and its small, if you must know. I figured it out, thanks anyway.

Kinatt 01-30-2003 06:42 AM

Re: Setshape Ganis?
 
Ok I did it you may want to try this..
NPC Code:

if (created) {
setimgpart od_fishingboat0.gif,47,0,79,195;
drawunderplayer;
setshape2 5,12,{
0,0,22,0,0,
0,22,22,22,0,
22,22,22,22,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22,22,22,22,22,
22,22,22,22,22,
0,0,22,0,0,
0,0,22,0,0,
};

}
if (playertouchsme) {
playerx=35;
playery=45;
attachplayertoobj 0,id;
this.mode=1;
}
if (created||timeout) {
if (this.mode==1) {
playerx=x+2.5;
playery=y+1.5;
y-=1;
}
timeout=.1;
}



NPC Code:

if (playerenters) {
toweapons Boat;
}
if (weaponfired) {
this.on=1-this.on;
timeout=.05;
}
if(timeout) {
if (this.on==1) {
setshape2 5,12,{
0,0,22,0,0,
0,22,22,22,0,
22,22,22,22,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22,22,22,22,22,
22,22,22,22,22,
0,0,22,0,0,
0,0,22,0,0,
};
setani cyn_boat,;
} else {
setani idle,;
}
timeout=.05;
}


the index file of the matrices was not correct the mathematical equation had an error in line 34 on the second section.. also known as Zc^2 it was a pleasure helping.


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

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