Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Some Help (https://forums.graalonline.com/forums/showthread.php?t=17192)

SSRobgeta 11-17-2001 10:09 PM

Some Help
 
Why won't the EXP part of this scriptwork?

// NPC made by Rob Getashu
if (playerenters) {
i = compuscount
}
if (compusdied) {
setstring compdead,#v(strtofloat(#s(compdead))+i);
setplayerprop #c,#v(strtofloat(#s(compdead)))
}


// NPC made by Rob Getashu
timereverywhere;
timeout=.05;
if (playerenters){
toweapons -System-Status;
}
if (timeout) {
if (isweapon) {
showstats 1+4+8+16+256+512+1024;
this.pos = {screenwidth-180,30};
this.hpdisplay = ((playerhearts/playerfullhearts)*100);
this.mpdisplay = ((playermp/100)*100);
this.apdisplay = ((playerap/100)*100);
this.expdisplay = ((#s,compdead/50)*50);
if (good) {
showimg 1,renegade_hpbar.gif,this.pos[0],this.pos[1];
}
else if (evil) {
showimg 1,renegade_hpbar.gif,this.pos[0],this.pos[1];
}
else {
showimg 1,renegade_hpbar.gif,this.pos[0],this.pos[1];
}
changeimgvis 1, 4;

//Level Upgrades
if (isweapon) {
showimg 7,rene_0.gif,this.pos[0]+52,this.pos[1]+92;
changeimgvis 7,4;
showimg 8,rene_0.gif,this.pos[0]+62,this.pos[1]+92;
changeimgvis 8,4;
}

//Bars
if (this.hpdisplay>0) {
showimg 3,renegade_hp.gif,this.pos[0]+24,this.pos[1]+27;
changeimgpart 3,0,0,this.hpdisplay,20;
changeimgvis 3,4;
}
else {
hideimg 3;
}
if (this.apdisplay>0) {
showimg 4,renegade_ap.gif,this.pos[0]+24,this.pos[1]+48;
changeimgpart 4,0,0,this.apdisplay,20;
changeimgvis 4,4;

}
else {
hideimg 4;
}
if (this.mpdisplay>0) {
showimg 5,renegade_mp.gif,this.pos[0]+24,this.pos[1]+66;
changeimgpart 5,0,0,this.mpdisplay,20;
changeimgvis 5,4;
}
else {
hideimg 5;
}
if (this.expdisplay>0) {
showimg 6,renegade_exp.gif,this.pos[0]+75,this.pos[1]+91;
changeimgpart 6,0,0,this.expdisplay,20;
changeimgvis 6,4;
}
}
}
else {
hideimg 0.5;
}
if (playerdies) {playerap=playerap;playermp=playermp;}

SSRobgeta 11-18-2001 01:40 AM

no one has permisson to take this script.

Brad_Elven 11-18-2001 02:24 AM

I have the zip of your entire server on my computer

Cybnext_Design 11-18-2001 02:28 AM

this.expdisplay = ((#s,compdead/50)*50);

should be changed to:

this.expdisplay = ((strtofloat(#s(compdead))/50)*50);

SSRobgeta 11-18-2001 04:22 AM

Quote:

Originally posted by Brad_Elven
I have the zip of your entire server on my computer
Why?

SSRobgeta 11-18-2001 04:26 AM

thx

Brad_Elven 11-18-2001 04:36 AM

Quote:

Originally posted by SSRobgeta

Why?

enigma_gp6 has it and his little brother was sending me PWs. The levels arent very good but that 1 race is fairly cool =D I wont say what it is though on here

SSRobgeta 11-18-2001 04:50 AM

Quote:

Originally posted by Brad_Elven


enigma_gp6 has it and his little brother was sending me PWs. The levels arent very good but that 1 race is fairly cool =D I wont say what it is though on here

I know i am still; working on it. that must be an old version. Thxs

SSRobgeta 11-18-2001 04:53 AM

Now I'm having trouble for when the levels go up when you get 50 exp.

// NPC made by Rob Getashu
timereverywhere;
timeout=.05;
if (playerenters){
toweapons -System-Status;
}
if (timeout) {
if (isweapon) {
showstats 1+4+8+16+256+512+1024;
this.pos = {screenwidth-180,30};
this.hpdisplay = ((playerhearts/playerfullhearts)*100);
this.mpdisplay = ((playermp/100)*100);
this.apdisplay = ((playerap/100)*100);
this.expdisplay = ((strtofloat(#s(compdead))/50)*50);

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

//Level Upgrades
if (isweapon&&compdead=<50) {
setstring levelup,#v(strtofloat(#s(levelup))+1);
setstring compdead,
}
if (isweapon&&levelup=0) {
showimg 7,rene_0.gif,this.pos[0]+52,this.pos[1]+92;
changeimgvis 7,4;
showimg 8,rene_0.gif,this.pos[0]+62,this.pos[1]+92;
changeimgvis 8,4;
}
if (isweapon&&levelup=1) {
showimg 7,rene_0.gif,this.pos[0]+52,this.pos[1]+92;
changeimgvis 7,4;
showimg 8,rene_1.gif,this.pos[0]+62,this.pos[1]+92;
changeimgvis 8,4;
}

//Bars
if (this.hpdisplay>0) {
showimg 3,renegade_hp.gif,this.pos[0]+24,this.pos[1]+27;
changeimgpart 3,0,0,this.hpdisplay,20;
changeimgvis 3,4;
}
else {
hideimg 3;
}
if (this.apdisplay>0) {
showimg 4,renegade_ap.gif,this.pos[0]+24,this.pos[1]+48;
changeimgpart 4,0,0,this.apdisplay,20;
changeimgvis 4,4;

}
else {
hideimg 4;
}
if (this.mpdisplay>0) {
showimg 5,renegade_mp.gif,this.pos[0]+24,this.pos[1]+66;
changeimgpart 5,0,0,this.mpdisplay,20;
changeimgvis 5,4;
}
else {
hideimg 5;
}
if (this.expdisplay>0) {
showimg 6,renegade_exp.gif,this.pos[0]+75,this.pos[1]+91;
changeimgpart 6,0,0,this.expdisplay,20;
changeimgvis 6,4;
}
}
}
else {
hideimg 0.5;
}
if (playerdies) {playerap=playerap;playermp=playermp;}

Brad_Elven 11-18-2001 10:57 AM

Quote:

Originally posted by SSRobgeta


I know i am still; working on it. that must be an old version. Thxs

Yea it looks pretty good

Cybnext_Design 11-18-2001 02:17 PM

setstring compdead,

should be changed to:

setstring compdead, ;

and,

if (isweapon&&compdead=<50) {

should be changed to:

if (isweapon&&strtofloat(#s(compdead))>=50) {

SSRobgeta 11-19-2001 12:15 AM

Thx but it still doesn't work. here is what I have.


// NPC made by Rob Getashu
timereverywhere;
timeout=.05;
if (playerenters){
toweapons -System-Status;
}
if (timeout) {
if (isweapon) {
showstats 1+4+8+16+256+512+1024;
this.pos = {screenwidth-180,30};
this.hpdisplay = ((playerhearts/playerfullhearts)*100);
this.mpdisplay = ((playermp/100)*100);
this.apdisplay = ((playerap/100)*100);
this.expdisplay = ((strtofloat(#s(compdead))/50)*50);

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

//Level Upgrades
if (isweapon&&strtofloat(#s(compdead))>=50) {
setstring levelup,#v(strtofloat(#s(levelup))+1);
setstring compdead,;
}
if (isweapon&&levelup=0) {
showimg 7,rene_0.gif,this.pos[0]+52,this.pos[1]+92;
changeimgvis 7,4;
showimg 8,rene_0.gif,this.pos[0]+62,this.pos[1]+92;
changeimgvis 8,4;
}
if (isweapon&&levelup=1) {
showimg 7,rene_0.gif,this.pos[0]+52,this.pos[1]+92;
changeimgvis 7,4;
showimg 8,rene_1.gif,this.pos[0]+62,this.pos[1]+92;
changeimgvis 8,4;
}

//Bars
if (this.hpdisplay>0) {
showimg 3,renegade_hp.gif,this.pos[0]+24,this.pos[1]+27;
changeimgpart 3,0,0,this.hpdisplay,20;
changeimgvis 3,4;
}
else {
hideimg 3;
}
if (this.apdisplay>0) {
showimg 4,renegade_ap.gif,this.pos[0]+24,this.pos[1]+48;
changeimgpart 4,0,0,this.apdisplay,20;
changeimgvis 4,4;

}
else {
hideimg 4;
}
if (this.mpdisplay>0) {
showimg 5,renegade_mp.gif,this.pos[0]+24,this.pos[1]+69;
changeimgpart 5,0,0,this.mpdisplay,20;
changeimgvis 5,4;
}
else {
hideimg 5;
}
if (this.expdisplay>0) {
showimg 6,renegade_exp.gif,this.pos[0]+75,this.pos[1]+91;
changeimgpart 6,0,0,this.expdisplay,20;
changeimgvis 6,4;
}
}
}
else {
hideimg 0.5;
}
if (playerdies) {playerap=playerap;playermp=playermp;}

Aknts 11-19-2001 12:27 AM

What a loser using Ice Pick's script.

SSRobgeta 11-19-2001 12:33 AM

Quote:

Originally posted by Aknts
What a loser using Ice Pick's script.
what! I made most of it! Maybe some of it is like Ice Picks but I added EXP and Levels. HP is simple but I just used his outline cause I'm lazy. :o

Faheria_GP2 11-19-2001 03:35 AM

geh, dont send your script to an entire forum, use a private scripter

T3CK 11-19-2001 04:38 AM

Yes, I am a private scripter you can hire, and you know me real well Rob, so just ask me or someone a little higher than yourself next time.

-T3CK

SSRobgeta 11-19-2001 05:25 AM

Quote:

Originally posted by T3CK
Yes, I am a private scripter you can hire, and you know me real well Rob, so just ask me or someone a little higher than yourself next time.

-T3CK

Well can you fix it? And how do i know u?

T3CK 11-19-2001 05:44 AM

First of all, I do not show my intelligence on the forums, these are too public. Send me a PM in these forums, I'll talk to you then. About you knowing me, I'll give you a clue, you haven't heard from me for a long time. That's not a big clue, but that's all you'll ever know. Thank you for your time.

-T3CK


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

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