View Single Post
  #10  
Old 07-06-2001, 05:55 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
Quote:
Originally posted by SSmutz

About a week after I quit FAQ, my computer got fried and I'm getting it back tomorrow, completely fixed.
yey come visit =)

oh yeah and I forgot the sleep bar but I took it off.
and im giving away the code if any1 wants.
you need sleep or the bar goes down. if the bar goes empty you start to get hurt.
it goes up when your in bed.

// NPC made by LiquidIce
//sleepy system
//Do Not Use w/o Author Permission!!!!
// made for Unholy Nation

if (playerenters&&!isweapon&&!hasweapon(-sleepsystem)) {
hide;
toweapons -sleepsystem;
setstring sleepcounter,70;
timeout=.05;
}

if (playerenters&&!isweapon&&hasweapon(sleepsystem)) { hide; }

if (playerenters&&isweapon) {
if (timeout=0) { timeout=.05; }
}

if (timeout) {
checksleep();
checkhurt();
Draw();
timeout=.05;
}

function checksleep() {
this.sleepneed=strtofloat(#s(sleepcounter));
if (strequals(#m,sleep)&&this.sleepneed<70) {
this.sleepneed+=.05;
}

if (this.sleepneed>1&&!strequals(#m,sleep)&&!strequal s(#m,dead)) { this.sleepneed-=.001; }

//checks
// if (strequals(#m,dead)||this.sleepneed>70) { this.sleepneed=70; }
if (this.sleepneed<1) { this.sleepneed=1; }
//set string
setstring sleepcounter,#v(this.sleepneed);
}

function Draw() {
//design
showimg 251,unsleepbar.gif,17,125;
changeimgpart 251,,,124,24;
changeimgvis 251,4;
//bar
showimg 250,unsleepbar.gif,66,127;
changeimgpart 250,,24,strtofloat(#s(sleepcounter)),19;
changeimgvis 250,4;
}

function checkhurt() {
this.hurtplayer+=1;
if (this.hurtplayer=100) { this.hurtplayer=0; }
if (!strequals(#m,sleep)&&!strequals(#m,dead)&&strtof loat(#s(sleepcounter))=1&&this.hurtplayer=99) {
hurt 1;
}
}

if (playerdies) {
this.checklife=strtofloat(#s(sleepcounter));
if (this.checklife<25) { this.checklife=25; }
setstring sleepcounter,#v(this.checklife);
}
__________________
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; 07-06-2001 at 06:56 AM..
Reply With Quote