PDA

View Full Version : Spar House Script


ownerofbabylon
06-18-2001, 02:06 PM
I made somthing for my server called Spar World. It came out nice but I am owner, not a NAT and I do not know how to make it so when either fighter says start, it shows a door.gif so no one can leave and no one from outside can enter because door is blocked off. I guess this would use a server flag but im not sure how to do that. Anyone got any ideas???

Lion'el-Jonson
06-18-2001, 02:33 PM
WHOA! Thats a hooge sig

CrazedMerlin
06-18-2001, 11:31 PM
in the door gif
if (playerenters) {hide;}
if (playersays(start spar)) {
if (isleader) {show;}}
if (playersays(end spar)) {
if (isleader) {show;}}

that would make it so only the first person in can open/close it

CrazedMerlin
06-18-2001, 11:38 PM
Originally posted by Kaimetsu


Ew, that's kinda inefficient and playersays isn't really approved of any more. I'd change that to:

if(playerenters) hide;
if(playerchats){
if(isleader){
if(strequals(#c,start spar)) show;
elseif(strequals(#c,end spar)) hide;
}
}


NOTE: I do not take responsibility for this script. I only neatened it up; I didn't script the basic components.
lol
thanks =D

CrazedMerlin
06-18-2001, 11:49 PM
Originally posted by Kaimetsu
Actually, I decided to rescript it. Just one of those annoying compulsive habits of mine.
lol
Im having trouble making a health bar :(
I dont know what the health bar itself should look like (size-shape)
:(((

CrazedMerlin
06-19-2001, 12:14 AM
Originally posted by Kaimetsu


Why not just make it like the AP bar but bigger?
:eek: that might work
but like
how do you script it so it changes depending on health?

ownerofbabylon
06-19-2001, 12:23 AM
Thanks for the script help :) but why isnt playersays approved of anymore???

CrazedMerlin
06-19-2001, 12:27 AM
Originally posted by ownerofbabylon
Thanks for the script help :) but why isnt playersays approved of anymore???
its used just not as officent

ownerofbabylon
06-19-2001, 01:50 AM
I did not sleep last night I was up till 5 am and then I went to work at 8:30 am :( I had nothing to do so I thought about how to make Babylon better so Geovanie might like it more. I thought about it and I really want to add fishing. I thought it over and over but I cant figure out how to make it. I dont want the exact code (but i will if you wanna give ;) because im trying to learn how to make it :( not going so well though

CrazedMerlin
06-19-2001, 02:19 AM
Originally posted by Kaimetsu
What are you planning for the system? Describe what you want it to be.
Me?
Im trying to make a health bar but all of it is so confusing :((

CrazedMerlin
06-19-2001, 02:22 AM
Originally posted by Kaimetsu
I actually meant the babylon owner dude, with his fishing thing. But hey, if your health script is a problem then I can help with that too.
im having a huge problem, I dont know where to start i just want a basic health bar its sooooo confusing lol

Bhala
06-19-2001, 02:23 AM
whats so confuzing?

if (playerenters){
toweapons -hpsystem;
}

//insert some stuff that puts the HP bar up(I dont remember it & I cant get to my pc right now)

if(created||timeout) {
setimgpart 0,0,20,s(hp);
timeout=.5;
}


ya know some thing like that

I know I am missing a TON of stuff but I cant remember it

CrazedMerlin
06-19-2001, 02:25 AM
Originally posted by Bhala
whats so confuzing?

if (playerenters){
toweapons -hpsystem;
}

//insert some stuff that puts the HP bar up(I dont remember it & I cant get to my pc right now)

if(created||timeout) {
setimgpart 0,0,20,s(hp);
timeout=.5;
}


ya know some thing like that

I know I am missing a TON of stuff but I cant remember it

ummm..... that dosent seem right...

Bhala
06-19-2001, 02:28 AM
well what doesnt work? I wana know...but like I said I cant get to the commands right now so I cant check my self right now

CrazedMerlin
06-19-2001, 02:28 AM
But the gfx itself i dont understand what the exact size has to be...

CrazedMerlin
06-19-2001, 02:36 AM
ok...what color do you leave the inside like where the health part would be? white?

Bhala
06-19-2001, 02:48 AM
it is ezest to have the lenght of the bar the same as the max total amount of ap....

ownerofbabylon
06-19-2001, 11:19 AM
About the fishing script. I want one thats like Sanstrata's (in the sense its for free servers) and I wanna have a pond or some body of water setup near a fishing store. The player goes in and buys a fishing pole (maybe lure and bait, depends how hard it would be) and then can go fish with those. And if they catch a fish they can have it cooked and they can sell it and stuff. DO YOU THINK THAT WOULD BE TOO HARD KAIMETSU???

General
06-19-2001, 11:49 AM
A bar would work like this

first you would use this
this.stat = int((hp/maxhp)*pixels);

obviosly you have to change maxhp & pixels to actual numbers, unless you can upgrade you max HP, in which case you would just change pixels to a number. Now anyways let me describe how this works: hp/maxhp turns your hp into a percentage, then * pixels gives you the length (in pixels) the bar should be

then you use showimg 201,x,y;
then you do changeimgvis and set it on statbar layer

then you would use a simple changeimgpart 201,0,0,this.stat,10; to change the bar to it's correct shape (Change 10 to the height of the bar in pixels

General
06-19-2001, 11:50 AM
Ph yes, about the int, occasionally you will get 46.5% health, now of course you can't have .5 of a pixel, so it rounds off to the nearest integer