![]() |
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---- |
Gee thanks
Come on, someone! I need the help! What do you want?
|
Re: Re: Gee thanks
Quote:
QUICK! Hurry! Burn it before we expose kyle to it! |
*twitches*
*looks for shotgun, but only finds box of bullets* *runs around throwing silver bullets at everything* |
just like to point out that in the script there was this ;) smiley lol.
|
Quote:
|
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... |
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!
|
: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 |
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
|
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. |
who knows
I'm first testing some stuff before I go it deep in Direct X . So right now its kind of slow ;P |
HOLY SHITE
OMG .... :eek: :eek: :eek: :eek: :eek: :eek: ..... what ??? omg look.... ahh .... did icepick help you with that ? :confused:
*passes out* |
*sigh* Nevermind...
|
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. |
| All times are GMT +2. The time now is 01:58 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.