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 10-10-2001, 06:00 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
Boss

as you all know I SUCK HORRIBLY as scripting. I am working on a boss for the heck of it and just wanted to show off that im actually getting better ^_^


if(created){
setgifpart roller.gif,0,0,63,49;
timeout=.5;
}
if(timeout){
if(x<playerx){rollright();}
if(y<playery){rolldown();}
if(x>playerx){rollleft();}
if(y>playery){rollup();}
timeout=.1;
}

function rollup(){
y--;
setgifpart roller.gif,0,49,63,49;
sleep .1;
y--;
setgifpart roller.gif,0,98,63,49;
sleep .1;
y--;
setgifpart roller.gif,0,147,63,49;
}

function rolldown(){
y++;
setgifpart roller.gif,63,49,63,49;
sleep .1;
y++;
setgifpart roller.gif,63,98,63,49;
sleep .1;
y++;
setgifpart roller.gif,63,147,63,49;
}

function rollleft(){
x--;
setgifpart roller.gif,189,49,63,49;
sleep .1;
x--;
setgifpart roller.gif,189,98,63,49;
sleep .1;
x--;
setgifpart roller.gif,189,147,63,49;
}

function rollright(){
x++;
setgifpart roller.gif,126,49,63,49;
sleep .1;
x++;
setgifpart roller.gif,126,98,63,49;
sleep .1;
x++;
setgifpart roller.gif,126,147,63,49;
sleep .1;
}

if(playertouchsme){
hurt 1;
timeout=.1;
}

if(washit){
timeout=.1;
}
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #2  
Old 10-10-2001, 06:09 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Re: Boss

Quote:
Originally posted by ownerofbabylon
as you all know I SUCK HORRIBLY as scripting. I am working on a boss for the heck of it and just wanted to show off that im actually getting better ^_^


if(created){
setgifpart roller.gif,0,0,63,49;
timeout=.5;
}
if(timeout){
if(x<playerx){rollright();}
if(y<playery){rolldown();}
if(x>playerx){rollleft();}
if(y>playery){rollup();}
timeout=.1;
}

function rollup(){
y--;
setgifpart roller.gif,0,49,63,49;
sleep .1;
y--;
setgifpart roller.gif,0,98,63,49;
sleep .1;
y--;
setgifpart roller.gif,0,147,63,49;
}

function rolldown(){
y++;
setgifpart roller.gif,63,49,63,49;
sleep .1;
y++;
setgifpart roller.gif,63,98,63,49;
sleep .1;
y++;
setgifpart roller.gif,63,147,63,49;
}

function rollleft(){
x--;
setgifpart roller.gif,189,49,63,49;
sleep .1;
x--;
setgifpart roller.gif,189,98,63,49;
sleep .1;
x--;
setgifpart roller.gif,189,147,63,49;
}

function rollright(){
x++;
setgifpart roller.gif,126,49,63,49;
sleep .1;
x++;
setgifpart roller.gif,126,98,63,49;
sleep .1;
x++;
setgifpart roller.gif,126,147,63,49;
sleep .1;
}

if(playertouchsme){
hurt 1;
timeout=.1;
}

if(washit){
timeout=.1;
}
cool
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #3  
Old 10-10-2001, 06:28 AM
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
~AlphaFlame~

You don't need the functions...

And this brings up an issue again: WHY do people use functions for one-time things? You use functions for MULTIPLE time things...
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #4  
Old 10-10-2001, 06:51 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by entravial
~AlphaFlame~

You don't need the functions...

And this brings up an issue again: WHY do people use functions for one-time things? You use functions for MULTIPLE time things...
he does use the functions more than one time, but i think i know what you mean

this script looks like it could be optimized, but im not sure how exactly to go about doing so
Reply With Quote
  #5  
Old 10-10-2001, 07:27 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
this was my first script that is more than making a door disappear.
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #6  
Old 10-10-2001, 07:42 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by ownerofbabylon
this was my first script that is more than making a door disappear.

definitley more advanced
Reply With Quote
  #7  
Old 10-10-2001, 09:41 AM
dragoonvenganc dragoonvenganc is offline
Registered User
Join Date: Jul 2001
Location: USA
Posts: 331
dragoonvenganc is on a distinguished road
Send a message via ICQ to dragoonvenganc Send a message via AIM to dragoonvenganc
Yes in his script they are used once just repeated so he does not need the functions..
__________________
Dragoon Vengance
Owner of Pangea Relics of Time
P2P Rp server
For info or job
Email: [email protected]
aim: dragoonvengnc
Reply With Quote
  #8  
Old 10-11-2001, 06:46 AM
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
~AlphaFlame~

Sure, Kaimetsu. If you say so. Guess I'll just be doing this then:

if (playertouchsme){
Hide();
Sleep();
Show();
}
function Hide(){
hide;
}
function Sleep(){
sleep .5;
}
function Show(){
show;
}

__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #9  
Old 10-11-2001, 09:48 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by entravial
~AlphaFlame~

Sure, Kaimetsu. If you say so. Guess I'll just be doing this then:

if (playertouchsme){
Hide();
Sleep();
Show();
}
function Hide(){
hide;
}
function Sleep(){
sleep .5;
}
function Show(){
show;
}

LOL thats just messed now
Reply With Quote
  #10  
Old 10-11-2001, 07:48 PM
pezi pezi is offline
Registered User
Join Date: Sep 2001
Location: Home
Posts: 183
pezi is on a distinguished road
Send a message via ICQ to pezi Send a message via AIM to pezi
Re: Boss

Quote:
Originally posted by ownerofbabylon
as you all know I SUCK HORRIBLY as scripting. I am working on a boss for the heck of it and just wanted to show off that im actually getting better ^_^


if(created){
setgifpart roller.gif,0,0,63,49;
timeout=.5;
}
if(timeout){
if(x<playerx){rollright();}
if(y<playery){rolldown();}
if(x>playerx){rollleft();}
if(y>playery){rollup();}
timeout=.1;
}

function rollup(){
y--;
setgifpart roller.gif,0,49,63,49;
sleep .1;
y--;
setgifpart roller.gif,0,98,63,49;
sleep .1;
y--;
setgifpart roller.gif,0,147,63,49;
}

function rolldown(){
y++;
setgifpart roller.gif,63,49,63,49;
sleep .1;
y++;
setgifpart roller.gif,63,98,63,49;
sleep .1;
y++;
setgifpart roller.gif,63,147,63,49;
}

function rollleft(){
x--;
setgifpart roller.gif,189,49,63,49;
sleep .1;
x--;
setgifpart roller.gif,189,98,63,49;
sleep .1;
x--;
setgifpart roller.gif,189,147,63,49;
}

function rollright(){
x++;
setgifpart roller.gif,126,49,63,49;
sleep .1;
x++;
setgifpart roller.gif,126,98,63,49;
sleep .1;
x++;
setgifpart roller.gif,126,147,63,49;
sleep .1;
}

if(playertouchsme){
hurt 1;
timeout=.1;
}

if(washit){
timeout=.1;
}
I saw the boss
__________________
PUT DELTERIA UP!
Reply With Quote
  #11  
Old 10-13-2001, 02:53 AM
Enigma_GP6 Enigma_GP6 is offline
Banned
Join Date: Jul 2001
Location: Who?
Posts: 261
Enigma_GP6 is on a distinguished road
Send a message via ICQ to Enigma_GP6 Send a message via AIM to Enigma_GP6
Here isd something, I guess I'll have to demoralize myself down to Helmut's level, here goes nothing.

//Starts Here
timeout=0.05;
if (playerenters||timeout||washit||wasshot||playercha ts||exploded){
bigboom();
this.boomed,5;
timeout=0.05;
}
if (this.boom>15){
bigboom();
timeout=0.05;
}
function bigboom(){
if (timeout){
putleaps 0,playerx,playery;
putexplosion 2,int.random(playerx-3),int.random(playery-3);
putexplosion 2,int.random(playerx+3),int.random(playery+3);
timeout=0.05;
this.boomed++;
}
}
//Ends Here


Gosh, that took like, what, 0.05 seconds?

-Rebel95 -DND- -Working Heavily on Server-
Reply With Quote
  #12  
Old 10-13-2001, 02:58 AM
Enigma_GP6 Enigma_GP6 is offline
Banned
Join Date: Jul 2001
Location: Who?
Posts: 261
Enigma_GP6 is on a distinguished road
Send a message via ICQ to Enigma_GP6 Send a message via AIM to Enigma_GP6
Maybe I buddged that up a little too much.


-Rebel95 -DND- -Working heavily on Server-
Reply With Quote
  #13  
Old 10-13-2001, 04:16 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by Enigma_GP6
Maybe I buddged that up a little too much.


-Rebel95 -DND- -Working heavily on Server-
this.boomed,5; is messed up, easily fixed
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 03:01 AM.


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