Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-10-2001, 06:35 AM
Termina_GP7 Termina_GP7 is offline
Registered User
Join Date: May 2001
Posts: 155
Termina_GP7 is on a distinguished road
i need someone to make a beach ball that when you hit it it will fly up in the air and it only works in water please reply
__________________

-= Rice Was Here -=
Reply With Quote
  #2  
Old 05-20-2001, 03:01 AM
Guest
Posts: n/a
Thumbs up

Well, I made all that I can of that script, I tryed to do the bouncing part but it didn't work out so good.


NPC Code:

// NPC made by Ice Pick
canbecarried;

//left wall action
if(onwall(x,y) && !onwall(x+4,y))
{
x+=1.5;
y+=.25;
sleep .05;
x+=1.4;
y+=.25;
sleep .05;
x+=1.3;
y+=.25;
sleep .05;
x+=1.2;
y+=.25;
sleep .05;
x+=1.06;
y+=.25;
sleep .05;
x+=.9;
y+=.25;
sleep .05;
x+=.7;
y+=.25;
sleep .05;
x+=.5;
y+=.25;
sleep .05;
//bounce again...
x+=.3;
y-=.5;
sleep .05;
x+=.3;
y-=.35;
sleep .05;
x+=.3;
y-=.15;
sleep .05;
x+=.3;
y-=.05;
sleep .05;
x+=.3;
y+=.05;
sleep .05;
x+=.3;
y+=.15;
sleep .05;
x+=.3;
y+=.35;
sleep .05;
x+=.3;
y+=.5;
sleep .05;

}


//right wall action
if(onwall(x+2,y) && !onwall(x-2,y))
{
x-=1.5;
y+=.25;
sleep .05;
x-=1.4;
y+=.25;
sleep .05;
x-=1.3;
y+=.25;
sleep .05;
x-=1.2;
y+=.25;
sleep .05;
x-=1.06;
y+=.25;
sleep .05;
x-=.9;
y+=.25;
sleep .05;
x-=.7;
y+=.25;
sleep .05;
x-=.5;
y+=.25;
sleep .05;
//bounce again...
x-=.3;
y-=.5;
sleep .05;
x-=.3;
y-=.35;
sleep .05;
x-=.3;
y-=.15;
sleep .05;
x-=.3;
y-=.05;
sleep .05;
x-=.3;
y+=.05;
sleep .05;
x-=.3;
y+=.15;
sleep .05;
x-=.3;
y+=.35;
sleep .05;
x-=.3;
y+=.5;
sleep .05;

}



//top wall action
if(onwall(x,y+1.5) && !onwall(x,y+5))

{
y+=1.5;
sleep .05;
y+=1.4;
sleep .05;
y+=1.3;
sleep .05;
y+=1.2;
sleep .05;
y+=1.06;
sleep .05;
y+=.9;
sleep .05;
y+=.7;
sleep .05;
y+=.5;
sleep .05;
//bounce again...
y+=.05;
sleep .05;
y+=.1;
sleep .05;
y+=.15;
sleep .05;
y+=.2;
sleep .05;
y+=.25;
sleep .05;
y+=.3;
sleep .05;
y+=.35;
sleep .05;
y+=.4;
sleep .05;

}

//bottom wall action
if(onwall(x,y+4) && !onwall(x,y))

{
y-=1.5;
sleep .05;
y-=1.4;
sleep .05;
y-=1.3;
sleep .05;
y-=1.2;
sleep .05;
y-=1.06;
sleep .05;
y-=.9;
sleep .05;
y-=.7;
sleep .05;
y-=.5;
sleep .05;
//bounce again...
y-=.05;
sleep .05;
y-=.1;
sleep .05;
y-=.15;
sleep .05;
y-=.2;
sleep .05;
y-=.25;
sleep .05;
y-=.3;
sleep .05;
y-=.35;
sleep .05;
y-=.4;
sleep .05;

}
//TEST FOR END OF MAP!
//left wall action
if(x < 2)
{
x+=1.5;
y+=.25;
sleep .05;
x+=1.4;
y+=.25;
sleep .05;
x+=1.3;
y+=.25;
sleep .05;
x+=1.2;
y+=.25;
sleep .05;
x+=1.06;
y+=.25;
sleep .05;
x+=.9;
y+=.25;
sleep .05;
x+=.7;
y+=.25;
sleep .05;
x+=.5;
y+=.25;
sleep .05;
//bounce again...
x+=.3;
y-=.5;
sleep .05;
x+=.3;
y-=.35;
sleep .05;
x+=.3;
y-=.15;
sleep .05;
x+=.3;
y-=.05;
sleep .05;
x+=.3;
y+=.05;
sleep .05;
x+=.3;
y+=.15;
sleep .05;
x+=.3;
y+=.35;
sleep .05;
x+=.3;
y+=.5;
sleep .05;

}


//right wall action
if(x > 62)
{
x-=1.5;
y+=.25;
sleep .05;
x-=1.4;
y+=.25;
sleep .05;
x-=1.3;
y+=.25;
sleep .05;
x-=1.2;
y+=.25;
sleep .05;
x-=1.06;
y+=.25;
sleep .05;
x-=.9;
y+=.25;
sleep .05;
x-=.7;
y+=.25;
sleep .05;
x-=.5;
y+=.25;
sleep .05;
//bounce again...
x-=.3;
y-=.5;
sleep .05;
x-=.3;
y-=.35;
sleep .05;
x-=.3;
y-=.15;
sleep .05;
x-=.3;
y-=.05;
sleep .05;
x-=.3;
y+=.05;
sleep .05;
x-=.3;
y+=.15;
sleep .05;
x-=.3;
y+=.35;
sleep .05;
x-=.3;
y+=.5;
sleep .05;

}



//top wall action
if(y < 2)

{
y+=1.5;
sleep .05;
y+=1.4;
sleep .05;
y+=1.3;
sleep .05;
y+=1.2;
sleep .05;
y+=1.06;
sleep .05;
y+=.9;
sleep .05;
y+=.7;
sleep .05;
y+=.5;
sleep .05;
//bounce again...
y+=.05;
sleep .05;
y+=.1;
sleep .05;
y+=.15;
sleep .05;
y+=.2;
sleep .05;
y+=.25;
sleep .05;
y+=.3;
sleep .05;
y+=.35;
sleep .05;
y+=.4;
sleep .05;

}

//bottom wall action
if(y > 62)

{
y-=1.5;
sleep .05;
y-=1.4;
sleep .05;
y-=1.3;
sleep .05;
y-=1.2;
sleep .05;
y-=1.06;
sleep .05;
y-=.9;
sleep .05;
y-=.7;
sleep .05;
y-=.5;
sleep .05;
//bounce again...
y-=.05;
sleep .05;
y-=.1;
sleep .05;
y-=.15;
sleep .05;
y-=.2;
sleep .05;
y-=.25;
sleep .05;
y-=.3;
sleep .05;
y-=.35;
sleep .05;
y-=.4;
sleep .05;

}

if(playerchats)
{
if (strcontains(#c,recoverred))
{
if(playerdir==0)
{
x=playerx;
y=playery-4;
}
if(playerdir==1)
{
x=playerx-4;
y=playery;
}
if(playerdir==3)
{
x=playerx+4;
y=playery;
}
if(playerdir==2)
{
x=playerx;
y=playery+4;
}

}
}
if (playerenters) {
}
if (playertouchsme) {
set ballisheld;

if(onwater(x,y))
{
//vars for player so ball doesn't dynamically update player pos
myy=players[player].y;
myx=players[player].x;
y-=(myy-y)/5;
x-=(myx-x)/5;
sleep .05;
y-=(myy-y)/6;
x-=(myx-x)/6;
sleep .05;
y-=(myy-y)/7;
x-=(myx-x)/7;
sleep .05;
y-=(myy-y)/8;
x-=(myx-x)/8;
sleep .05;
y-=(myy-y)/9;
x-=(myx-x)/9;
sleep .05;
y-=(myy-y)/12;
x-=(myx-x)/12;
sleep .05;
y-=(myy-y)/16;
x-=(myx-x)/16;
sleep .05;
y-=(myy-y)/20;
x-=(myx-x)/20;
sleep .05;
y-=(myy-y)/25;
x-=(myx-x)/25;
sleep .05;
}
}


if (washit) {

//vars for player so ball doesn't dynamically update player pos
myy=players[player].y;
myx=players[player].x;
//If character is sort of below the NPC
y-=(myy-y)/5;
x-=(myx-x)/5;
sleep .05;
y-=(myy-y)/6;
x-=(myx-x)/6;
sleep .05;
y-=(myy-y)/7;
x-=(myx-x)/7;
sleep .05;
y-=(myy-y)/8;
x-=(myx-x)/8;
sleep .05;
y-=(myy-y)/9;
x-=(myx-x)/9;
sleep .05;
y-=(myy-y)/12;
x-=(myx-x)/12;
sleep .05;
y-=(myy-y)/16;
x-=(myx-x)/16;
sleep .05;
y-=(myy-y)/20;
x-=(myx-x)/20;
sleep .05;
y-=(myy-y)/25;
x-=(myx-x)/25;
sleep .05;


}

if(wasthrown)
{
sleep 1;
if(dir==0)
{
y-=.05;
sleep .05;
y-=.1;
sleep .05;
y-=.15;
sleep .05;
y-=.2;
sleep .05;
y-=.25;
sleep .05;
y-=.3;
sleep .05;
y-=.35;
sleep .05;
y-=.4;
sleep .05;
}
}

Reply With Quote
  #3  
Old 05-20-2001, 03:03 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
*trembling, takes out bottle of pills, shakes some into hand, then stuffs them down his throat...and shakes uncontrollably*
Reply With Quote
  #4  
Old 05-20-2001, 03:32 AM
Lion'el-Jonson Lion'el-Jonson is offline
Please Wait....
Lion'el-Jonson's Avatar
Join Date: Mar 2001
Location: I like to eat food samples at price club.
Posts: 1,663
Lion'el-Jonson will become famous soon enough
Send a message via AIM to Lion'el-Jonson Send a message via Yahoo to Lion'el-Jonson
::scratches head::
__________________


"My words are like weaponry on a record"
Reply With Quote
  #5  
Old 05-20-2001, 03:44 AM
Cyboars Cyboars is offline
Registered User
Cyboars's Avatar
Join Date: Mar 2001
Location: Everwhere.
Posts: 209
Cyboars will become famous soon enough
Send a message via AIM to Cyboars Send a message via Yahoo to Cyboars
*falls over*
*eyes fall out of sockets*
Holy....
*passes out from lack of scripting powers, and ability to withstand the shock of an immense script*
Reply With Quote
  #6  
Old 05-20-2001, 05:25 AM
freddyfox freddyfox is offline
Banned
freddyfox's Avatar
Join Date: Mar 2001
Posts: 6,705
freddyfox is on a distinguished road
Quote:
Originally posted by IcePick_2001
Well, I made all that I can of that script, I tryed to do the bouncing part but it didn't work out so good.

[/code]

AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!

*Motions for kyle to hand him some of those pills*

I MUST NOW GOUGE MY EYEBALLS OUT!
Reply With Quote
  #7  
Old 05-20-2001, 05:33 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
*looks at script again*
*runs to kitchen, takes out bag of salt, and pours in eyes, then slowly crawls back to computer, curls up in a small ball on the floor, and twitches insanely*
Reply With Quote
  #8  
Old 05-20-2001, 09:03 AM
CrazedMerlin CrazedMerlin is offline
Some Guy :\
Join Date: Apr 2001
Posts: 3,619
CrazedMerlin is on a distinguished road
Send a message via AIM to CrazedMerlin Send a message via Yahoo to CrazedMerlin
did ice pick say he MADE a script?
OMGOMGOMG
its a first
__________________

ICQ: 117881194
AIM: TehWizad
E-Mail: [email protected]
Reply With Quote
  #9  
Old 05-20-2001, 10:45 AM
_Shoey_Fighter_ _Shoey_Fighter_ is offline
Registered User
Join Date: Mar 2001
Location: Salem, OR, US
Posts: 45
_Shoey_Fighter_ is on a distinguished road
Send a message via ICQ to _Shoey_Fighter_ Send a message via AIM to _Shoey_Fighter_
I've always wondered why people never use the for command...

But, it is nice seeing Icepick trying to help out for a change...
__________________
www.mooglecave.com - Console RPG Site
http://sdragons.mooglecave.com - Graal Scripting Page
Reply With Quote
  #10  
Old 05-20-2001, 02:50 PM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to entravial
umm, who's a script??

j/k
------
Entravial (Bravo NAT)

Reply With Quote
  #11  
Old 05-20-2001, 10:05 PM
Guest
Posts: n/a
Yes, I did make that script. Why do you ask?
Reply With Quote
  #12  
Old 05-20-2001, 11:21 PM
CrazedMerlin CrazedMerlin is offline
Some Guy :\
Join Date: Apr 2001
Posts: 3,619
CrazedMerlin is on a distinguished road
Send a message via AIM to CrazedMerlin Send a message via Yahoo to CrazedMerlin
Eh...
Its a little big
__________________

ICQ: 117881194
AIM: TehWizad
E-Mail: [email protected]
Reply With Quote
  #13  
Old 05-21-2001, 12:17 AM
Guest
Posts: n/a
Yes I know, But once you get the first 50 lines or so done, It gets very easy.
Reply With Quote
  #14  
Old 05-21-2001, 01:06 AM
bb2k1 bb2k1 is offline
Registered User
Join Date: Apr 2001
Location: Canada
Posts: 396
bb2k1 is on a distinguished road
Send a message via ICQ to bb2k1
IcePick, the script is crap. It's horribley coded and doesn't need to be nearly
that long.
__________________

- Richter fighting his doppleganger

- Richter Belmont

"Jesus, Jesus, hes our savior. If he can't do it, we'll choose another religious flavor!"
Reply With Quote
  #15  
Old 05-21-2001, 11:31 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
Ice_Pick..
get in touch with your sine and cosine and loops.
it makes it alot easier and alot better effect.
and with sine / cosine you would be able to change 'force' and such making how far it travels and stuff like that..
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
Reply


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 12:55 AM.


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