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 10-02-2001, 02:44 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Post My MP Bar

How would I make my own MP bar? Sorta like making your own AP bar. I started to make one but for some reason it won't work?

// NPC made by Rob Getashu
timereverywhere;
timeout=.05;
if (playerchats&&strequals(#c,human)) {
toweapons -System Status-;
}
if (timeout)
if (isweapon) {
showstats 1+2+4+8+16+32+256+512+1024;
this.pos = {screenwidth-180,30};
this.mpdisplay = ((playermp/100)*100);
if (good) {
showimg 1,Picture1.gif,this.pos[2],this.pos[1];
}
else if (evil) {
showimg 1,Picture1.gif,this.pos[2],this.pos[1];
}
else {
showimg 1,Picture1.gif,this.pos[2],this.pos[1];
}
changeimgvis 1, 4;
}
if (this.mpdisplay>0) {
showimg 2,Picture2.gif,this.pos[2],this.pos[1];
changeimgpart 5,0,0,this.mpdisplay,6;
changeimgvis 1,4;
}



if (playerdies) {playermp=playermp}
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #2  
Old 10-02-2001, 03:00 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Re: My MP Bar

I think this part is the problem

if (this.mpdisplay>0) {
showimg 2,Picture2.gif,this.pos[2],this.pos[1];
changeimgpart 5,0,0,this.mpdisplay,6;
changeimgvis 1,4;
}

should the changeimgpart be 2 so it is changing picture2.gif and shouldnt the changeimg vis be 2 so it will change the level of picture2.gif?
Reply With Quote
  #3  
Old 10-02-2001, 03:04 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Ok I'll try that
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #4  
Old 10-02-2001, 03:07 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Re: Re: My MP Bar

Quote:
Originally posted by btedji
I think this part is the problem

if (this.mpdisplay>0) {
showimg 2,Picture2.gif,this.pos[2],this.pos[1];
changeimgpart 5,0,0,this.mpdisplay,6;
changeimgvis 1,4;
}

should the changeimgpart be 2 so it is changing picture2.gif and shouldnt the changeimg vis be 2 so it will change the level of picture2.gif?
Which parts should be 2?
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #5  
Old 10-02-2001, 03:08 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
NM I got it thx!
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #6  
Old 10-02-2001, 03:09 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
np
Reply With Quote
  #7  
Old 10-02-2001, 03:36 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
OK thx , but now it won't show the MP picture change when you use the magic?

// NPC made by Rob Getashu
timereverywhere;
timeout=.05;
if (playerchats&&strequals(#c,human)) {
toweapons -MP Bar-;
}
if (timeout)
if (isweapon) {
showstats 1+2+4+8+16+256+512+1024;
this.pos = {screenwidth-180,30};
this.mpdisplay = ((playermp/100)*100);
if (good) {
showimg 1,picture1.gif,this.pos[2],this.pos[1];
}
else if (evil) {
showimg 1,picture1.gif,this.pos[2],this.pos[1];
}
else {
showimg 1,picture1.gif,this.pos[2],this.pos[1];
}
changeimgvis 1, 4;
}
if (this.mpdisplay>0) {
showimg 2,picture2.gif,this.pos[2],this.pos[1];
changeimgpart 5,0,0,this.mpdisplay,2;
changeimgvis 2,4;
}

else {
hideimg=0.5;
}




if (playerdies) {playermp=playermp}
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #8  
Old 10-02-2001, 03:44 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by SSRobgeta
OK thx , but now it won't show the MP picture change when you use the magic?

NPC Code:

// NPC made by Rob Getashu
timereverywhere;
timeout=.05;
if (playerchats&&strequals(#c,human)) {
toweapons -MP Bar-;
}
if (timeout)
if (isweapon) {
showstats 1+2+4+8+16+256+512+1024;
this.pos = {screenwidth-180,30};
this.mpdisplay = ((playermp/100)*100);
if (good) {
showimg 1,picture1.gif,this.pos[2],this.pos[1];
}
else if (evil) {
showimg 1,picture1.gif,this.pos[2],this.pos[1];
}
else {
showimg 1,picture1.gif,this.pos[2],this.pos[1];
}
changeimgvis 1, 4;
}

stuff below this line should be in the timeout loop and you need a timeout command at the bottom of the timeout loop

if (this.mpdisplay>0) {
showimg 2,picture2.gif,this.pos[2],this.pos[1];
changeimgpart 5,0,0,this.mpdisplay,2;
changeimgvis 2,4;
}

else {
hideimg=0.5;
}

if (playerdies) {playermp=playermp}


Reply With Quote
  #9  
Old 10-02-2001, 03:46 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
You mean like this


// NPC made by Rob Getashu
timereverywhere;
timeout=.05;
if (playerchats&&strequals(#c,human)) {
toweapons -MP Bar-;
}
if (timeout)
if (isweapon) {
showstats 1+2+4+8+16+256+512+1024;
this.pos = {screenwidth-180,30};
this.mpdisplay = ((playermp/100)*100);
if (good) {
showimg 1,picture1.gif,this.pos[2],this.pos[1];
}
else if (evil) {
showimg 1,picture1.gif,this.pos[2],this.pos[1];
}
else {
showimg 1,picture1.gif,this.pos[2],this.pos[1];
}
changeimgvis 1, 4;

timeout = .5;
}
if (this.mpdisplay>0&&timeout) {
showimg 2,picture2.gif,this.pos[2],this.pos[1];
changeimgpart 5,0,0,this.mpdisplay,2;
changeimgvis 2,4;
}

else {
hideimg=0.5;
}
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #10  
Old 10-02-2001, 03:47 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
you didnt put the stuff below the timeout loop in the timeout loop and the timeout should be .05
Reply With Quote
  #11  
Old 10-02-2001, 03:49 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Can you give me an exsample
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #12  
Old 10-02-2001, 04:01 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
NPC Code:

timereverywhere;
timeout=.05;
if (playerchats&&strequals(#c,human)) {
toweapons -MP Bar-;
}
if (timeout)
if (isweapon) {
showstats 1+2+4+8+16+256+512+1024;
this.pos = {screenwidth-180,30};
this.mpdisplay = ((playermp/100)*100);

if (good) {
showimg 1,picture1.gif,this.pos[1],this.pos[0];
}
else if (evil) {
showimg 1,picture1.gif,this.pos[1],this.pos[0];
}
else {
showimg 1,picture1.gif,this.pos[1],this.pos[0];
}

changeimgvis 1, 4;

if (this.mpdisplay>0&&timeout) {
showimg 2,picture2.gif,this.pos[1],this.pos[0];
changeimgpart 2,0,0,this.mpdisplay,2;
changeimgvis 2,4;
}

timeout = .05;
}




try this
Reply With Quote
  #13  
Old 10-02-2001, 04:02 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Ok let me try
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #14  
Old 10-02-2001, 04:12 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Ok now it's not working at all! Can you try to figure it out and I'll check it when I get back on later? I would really apreicate it!
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #15  
Old 10-02-2001, 04:13 AM
Riot-Starter Riot-Starter is offline
Registered User
Join Date: Aug 2001
Location: Central Florida, USA
Posts: 79
Riot-Starter is on a distinguished road
Send a message via AIM to Riot-Starter
shouldnt the image indexes be higher than 199 so they are local or is all imgvis 4 images local
Reply With Quote
  #16  
Old 10-02-2001, 04:14 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
NPC Code:

timereverywhere;
timeout=.05;
if (playerchats&&strequals(#c,human)) {
toweapons -MP Bar-;
}
if (timeout) {

if (isweapon) {
showstats 1+2+4+8+16+256+512+1024;
this.pos = {screenwidth-180,30};
this.mpdisplay = ((playermp/100)*100);}

if (good) {
showimg 1,picture1.gif,this.pos[0],this.pos[1];
}
else if (evil) {
showimg 1,picture1.gif,this.pos[0],this.pos[1];
}
else {
showimg 1,picture1.gif,this.pos[0],this.pos[1];
}

changeimgvis 1, 4;

if (this.mpdisplay>0) {
showimg 2,picture2.gif,this.pos[0],this.pos[1];
changeimgpart 2,0,0,this.mpdisplay,2;
changeimgvis 2,4;
}

timeout = .05;
}




maybe this?
Reply With Quote
  #17  
Old 10-02-2001, 07:37 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
and I wanted to say... The MP Bar goes where the AP bar is
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
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 11:00 PM.


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