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-26-2001, 12:46 PM
Zayjee Zayjee is offline
Registered User
Join Date: May 2001
Posts: 50
Zayjee is on a distinguished road
Question n00b scripting question no.2

OK. Here goes. I have this meter (originally made by G_Yoshi and edited by me with permission). And what I want it to do when it's full is make the player walk in reverse. I figured I could take Antago's opposite boot script and kinda splice the two. I'll post the two scripts and hope someone can help me out on this.

// NPC made by G_Yoshi, changed by Zayjee with permission
if (playerenters && !isweapon) {
toweapons -DrunkenStatus;
hidelocal;
}

if (created&&isweapon){
setstring oldhpmax,#s(playerfullhearts);
timeout=.05;
}

if (timeout){
Clife();
Gdisplay();
timeout=.05;
}

if (strtofloat(#s(player_drunk))=>100){
setstring player_drunk,100;
set drunkendowed;
---NOTE: This is where I need the opposite boot script---

}

if (playerdies){
Cdead();
}

function Cdead(){
hideimg 202;
hideimg 212;
showstats 1024;
}

function Clife(){
if (strtofloat(#s(player_drunk))>1){
} else if (strtofloat(#s(player_drunk))<=0){

}
if (playerhurt){
dmg = playerhurtpower;
olddrunk = strtofloat(#s(player_drunk));
newdrunk = olddrunk-dmg;
setstring player_drunk,#v(newdrunk);
}
if (strtofloat(#s(player_drunk))>strtofloat(#s(player _drunkmax))){
setstring drunk_limit,#s(player_drunkmax);
}
}

function Gdisplay(){
showstats 2015;
showimg 202,drunk_bar_#s(flavor3).png,425,64;
changeimgpart 202,0,0,166,30;
changeimgvis 202,4;
showimg 212,drunk_bar_#s(flavor3).png,466,72;
changeimgpart 212,0,30,int((strtofloat(#s(player_drunk))/strtofloat(#s(player_drunkmax)))*121)+1,14;
changeimgvis 212,4;
}

that's the meter script, now here's the Opposite Boot script. I NEED THESE PUT TOGETHER.

// Antago Opposite Boots
// My personal favorite pair
// ============================
// Made by Antago of Graal Online
// ============================
// [email protected]
// ============================
// Made for Antago, and all his fanatics!
// ============================
//
// dedicated to Jesus, for taking my
// place on that cross. He died for
// you too, becase He loves you.
//
// ============================
//
//-----To Weapons-----
if (playertouchsme) {
toweapons Opposite Boots;
set gotoppositeboots;
}
//--End To Weapons--
//=================
//-----Usage Of Boots--
if (weaponfired) {
if (this.inuse=0) {
if (strequals(#C3, white)) {
this.bootscolor=1;
}
if (strequals(#C3, yellow)) {
this.bootscolor=2;
}
if (strequals(#C3, orange)) {
this.bootscolor=3;
}
if (strequals(#C3, pink)) {
this.bootscolor=4;
}
if (strequals(#C3, red)) {
this.bootscolor=5;
}
if (strequals(#C3, darkred)) {
this.bootscolor=6;
}
if (strequals(#C3, lightgreen)) {
this.bootscolor=7;
}
if (strequals(#C3, green)) {
this.bootscolor=8;
}
if (strequals(#C3, darkgreen)) {
this.bootscolor=9;
}
if (strequals(#C3, lightblue)) {
this.bootscolor=10;
}
if (strequals(#C3, blue)) {
this.bootscolor=11;
}
if (strequals(#C3, darkblue)) {
this.bootscolor=12;
}
if (strequals(#C3, brown)) {
this.bootscolor=13;
}
if (strequals(#C3, cynober)) {
this.bootscolor=14;
}
if (strequals(#C3, purple)) {
this.bootscolor=15;
}
if (strequals(#C3, darkpurple)) {
this.bootscolor=16;
}
if (strequals(#C3, lightgray)) {
this.bootscolor=17;
}
if (strequals(#C3, gray)) {
this.bootscolor=18;
}
if (strequals(#C3, black)) {
this.bootscolor=19;
}
setshoecolor orange;
this.inuse=1;
timeout=0.05;
this.m=-1;
this.oldx = playerx;
this.oldy = playery;
unset oktouse;
setgif oppositeboots2.gif;
set obootsinuse;
} else {
this.inuse=0;
timeout=0.05;
setgif oppositeboots.gif;
unset obootsinuse;
}
}
if (timeout && this.inuse=1) {
if (playersprite=0 || playersprite>0) {
this.inuse=1;
this.mx=0; this.my=0;
if (playerx<this.oldx) this.mx=this.m;
if (playery<this.oldy) this.my=this.m;
if (playerx>this.oldx) this.mx=-1*this.m;
if (playery>this.oldy) this.my=-1*this.m;
this.dir=10*this.my+this.mx;

//HORIZONTAL movement (X)
this.rx=1;
if (this.mx<0) this.rx=4-1;
if (this.mx>0) this.rx=-1.5-1;
ok=1;
for (i=1;i<=2;i+=.25 {
this.rx+=.25;
for (this.ry=1;this.ry<=2.5;this.ry+=.5) {
if (onwall(playerx+this.rx+this.mx,playery+this.ry)) {
ok=0;
}
}
}
if (ok==1) playerx-=this.mx;

//VERTICAL movement (Y)
this.ry=1;
if (this.my<0) this.ry=4.5-1.5;
if (this.my>0) this.ry=-1-1.5;
ok=1;
for (i=1;i<=3;i+=.25 {
this.ry+=.25;
for (this.rx=.75;this.rx<=2.5;this.rx+=.5) {
if (onwall(playerx+this.rx,playery+this.ry+this.my)) {
ok=0;
}
}
}
if (ok==1) playery-=this.my;

this.oldx = playerx;
this.oldy = playery;
timeout=.05;
}
}
if (timeout && this.inuse=0) {
timeout=0.05;
}
//--End Usage Of Boots--
//-------Feet Colors----------
if (this.inuse=0 && this.bootscolor=1) {
setshoecolor white;
}
if (this.inuse=0 && this.bootscolor=2) {
setshoecolor yellow;
}
if (this.inuse=0 && this.bootscolor=3) {
setshoecolor orange;
}
if (this.inuse=0 && this.bootscolor=4) {
setshoecolor pink;
}
if (this.inuse=0 && this.bootscolor=5) {
setshoecolor red;
}
if (this.inuse=0 && this.bootscolor=6) {
setshoecolor darkred;
}
if (this.inuse=0 && this.bootscolor=7) {
setshoecolor lightgreen;
}
if (this.inuse=0 && this.bootscolor=8) {
setshoecolor green;
}
if (this.inuse=0 && this.bootscolor=9) {
setshoecolor darkgreen;
}
if (this.inuse=0 && this.bootscolor=10) {
setshoecolor lightblue;
}
if (this.inuse=0 && this.bootscolor=11) {
setshoecolor blue;
}
if (this.inuse=0 && this.bootscolor=12) {
setshoecolor darkblue;
}
if (this.inuse=0 && this.bootscolor=13) {
setshoecolor brown;
}
if (this.inuse=0 && this.bootscolor=14) {
setshoecolor cynober;
}
if (this.inuse=0 && this.bootscolor=15) {
setshoecolor purple;
}
if (this.inuse=0 && this.bootscolor=16) {
setshoecolor darkpurple;
}
if (this.inuse=0 && this.bootscolor=17) {
setshoecolor lightgray;
}
if (this.inuse=0 && this.bootscolor=18) {
setshoecolor gray;
}
if (this.inuse=0 && this.bootscolor=19) {
setshoecolor black;
}
//---End Feet Colors----

__________________
-(v)4fu|<13
Reply With Quote
  #2  
Old 05-27-2001, 02:15 AM
Zayjee Zayjee is offline
Registered User
Join Date: May 2001
Posts: 50
Zayjee is on a distinguished road
Gee thanks

Come on, someone! I need the help! What do you want?
__________________
-(v)4fu|<13
Reply With Quote
  #3  
Old 05-29-2001, 10:09 PM
freddyfox freddyfox is offline
Banned
freddyfox's Avatar
Join Date: Mar 2001
Posts: 6,705
freddyfox is on a distinguished road
Re: Re: Gee thanks

Quote:
Originally posted by Kaimetsu


For you to burn that script and start again. Short of paying me, there's no way you'll convince me to read through that thing.

QUICK! Hurry! Burn it before we expose kyle to it!
Reply With Quote
  #4  
Old 05-30-2001, 06:27 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
*twitches*

*looks for shotgun, but only finds box of bullets*

*runs around throwing silver bullets at everything*
Reply With Quote
  #5  
Old 05-30-2001, 05:31 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
Talking

just like to point out that in the script there was this smiley lol.

__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #6  
Old 05-31-2001, 10:19 PM
activeconvict activeconvict is offline
HIRYUU
activeconvict's Avatar
Join Date: Mar 2001
Posts: 1,162
activeconvict is on a distinguished road
Quote:
Originally posted by kyle0654
*twitches*

*looks for shotgun, but only finds box of bullets*

*runs around throwing silver bullets at everything*
Haha!
__________________
HIRYUU
Reply With Quote
  #7  
Old 06-01-2001, 07:55 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
but...long...ugly...argh!

*grabs bottle of pills and shoves some down his throat*

ahh...much...*twitch*...better

I don't help if script is too...*twitch*...long to look at without having a seizure. I help other places though...
Reply With Quote
  #8  
Old 06-01-2001, 09:00 AM
Zayjee Zayjee is offline
Registered User
Join Date: May 2001
Posts: 50
Zayjee is on a distinguished road
Thumbs down Yeaaah.....

Um...thanks for the responses but, I NEED HELP, not an excuse to spam! Thanks to anyone who did help. Remember don't dis me because of my bad scripting, I DID write "n00b scripting question". I'm not smart enough to script as well as my brother...I mean G_Yoshi. Heck, I don't know how to make leaps hurt the player!! I'm soooo pathetic!
__________________
-(v)4fu|<13
Reply With Quote
  #9  
Old 06-07-2001, 02:05 PM
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
:o ack dont whine!
you guys should go help people doing c++ or vb or something when they got 3000 line code that only needs to be like 1000

I'm making a tile engine with an editor and the editor that took me a day to make and debug has 500 lines and its kewl with all that
lblch = Int((Camera.X + X) / TileW) & "," & Int((Camera.Y + Y) / TileH)
stuff =D

so dont whine when you see a little Graal npc code,
lazy people =P
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)

Last edited by LiquidIce00; 06-07-2001 at 02:11 PM..
Reply With Quote
  #10  
Old 06-07-2001, 07:37 PM
T-Squad T-Squad is offline
Banned
T-Squad's Avatar
Join Date: Mar 2001
Location: United States of America
Posts: 1,733
T-Squad is on a distinguished road
you cant expect someone to comepletely rewrite a script....the fun thing in script is finding out how to do new things (At least i think so)...i would suggest you rebuild the default movement and like godspeed said add aditional speed things for drunk dosage, and maybe make him move in random directions at random moments to
Reply With Quote
  #11  
Old 06-08-2001, 12:33 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
Tile engine..
I can just specify which images I want to be 'tiles' then, then you specify if its awall or not, then the program loads some Offline DC's and lists them out and u can make a level and save/load it and im gonna make a rpg engine so you can play them also ;P


if you wanna do a really bad way but easy of doing drunk,
just make a gani of a guy walking around drunk , then freeze the player for whatever ammount and play the gani..
oh yeah make sure your gani is seamless too.
__________________
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
  #12  
Old 06-08-2001, 03:16 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
who knows
I'm first testing some stuff before I go it deep in Direct X . So right now its kind of slow ;P
__________________
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
  #13  
Old 06-08-2001, 04:02 AM
TB3 TB3 is offline
Registered User
TB3's Avatar
Join Date: May 2001
Location: US of A State of VA
Posts: 658
TB3 is on a distinguished road
Send a message via Yahoo to TB3
HOLY SHITE

OMG .... ..... what ??? omg look.... ahh .... did icepick help you with that ?
*passes out*
__________________

To the sun of your age, I arise
Reply With Quote
  #14  
Old 06-08-2001, 10:30 AM
Zayjee Zayjee is offline
Registered User
Join Date: May 2001
Posts: 50
Zayjee is on a distinguished road
*sigh* Nevermind...
__________________
-(v)4fu|<13
Reply With Quote
  #15  
Old 06-13-2001, 05:57 PM
toad1413 toad1413 is offline
toad@graal:~$ ./Oldbie
Join Date: May 2001
Location: Aust.
Posts: 3,819
toad1413 is on a distinguished road
Send a message via ICQ to toad1413
I would help, but I'm a n00b too.
But... that is a really looooooooooooooooooooooooooooooooong script. Well, two scripts actually... seeing that Antago's opposite boots script is in there too. I thought Antago was supposed to be really good at scripting... because you guys are saying that the boots script is really long and badly coded.

Just wondering.
__________________
Creator of the original 'spam' icon. Worst mistake I ever made on these forums.
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:09 AM.


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