Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Spar House Script (https://forums.graalonline.com/forums/showthread.php?t=5080)

ownerofbabylon 06-18-2001 01:06 PM

Spar House Script
 
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 01:33 PM

WHOA! Thats a hooge sig

CrazedMerlin 06-18-2001 10: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 10:38 PM

Quote:

Originally posted by Kaimetsu


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

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 10:49 PM

Quote:

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-18-2001 11:14 PM

Quote:

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-18-2001 11:23 PM

Thanks for the script help :) but why isnt playersays approved of anymore???

CrazedMerlin 06-18-2001 11:27 PM

Quote:

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 12: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 01:19 AM

Quote:

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 01:22 AM

Quote:

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 01: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 01:25 AM

Quote:

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 01: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 01:28 AM

But the gfx itself i dont understand what the exact size has to be...

CrazedMerlin 06-19-2001 01:36 AM

ok...what color do you leave the inside like where the health part would be? white?

Bhala 06-19-2001 01: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 10: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 10: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 10: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


All times are GMT +2. The time now is 03:09 PM.

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