Graal Forums

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

Metal-Slug 09-28-2001 09:21 AM

Bread Help
 
ok, i have this script, and i wanna make it so you can have more than one, and im getting new at this whole npc scripting with stuff like this.wahtever and stuff, can some one help me with this, i tried it but it doesn't work

NPC Code:

// NPC made by Urónd the Paladin
if (playertouchsme) {
toweapons Bread;
this.Bcount = +1;
}
if (isweapon && Bcount<1) {
destroy;
}
if (weaponfired && this.Bcount>1) {
playerhearts+=2;
this.Breadcount = -1;
}


SSj_Link 09-28-2001 10:05 AM

ok Im gonna fix this, BUT I have to be able to use it on my server
ok?


// NPC made by Urónd the Paladin
if (playertouchsme) {
toweapons Bread;
this.Bcount = +1;
}
if (isweapon && Bcount<1) {
destroy;
}
if (weaponfired && this.Bcount>1) {
playerhearts+=2;
this.Bcount -=1;
}

That should fix it

and Im waiting for Kai, Rebel95 or possibly KJL to correct me

-freaky-

Speedoflight14 09-28-2001 10:14 AM

you should never put it up until he says ok

Metal-Slug 09-28-2001 10:16 AM

Quote:

Originally posted by SSj_Link
ok Im gonna fix this, BUT I have to be able to use it on my server
ok?


// NPC made by Urónd the Paladin
if (playertouchsme) {
toweapons Bread;
this.Bcount = +1;
}
if (isweapon && Bcount<1) {
destroy;
}
if (weaponfired && this.Bcount>1) {
playerhearts+=2;
this.Bcount -=1;
}

That should fix it

-freaky-

thanks, but only if it works can you use it, i'll tell you tommorow

Metal-Slug 09-28-2001 10:18 AM

Quote:

Originally posted by SSj_Link
ok Im gonna fix this, BUT I have to be able to use it on my server
ok?


// NPC made by Urónd the Paladin
if (playertouchsme) {
toweapons Bread;
this.Bcount = +1;
}
if (isweapon && Bcount<1) {
destroy;
}
if (weaponfired && this.Bcount>1) {
playerhearts+=2;
this.Bcount -=1;
}

That should fix it

and Im waiting for Kai, Rebel95 or possibly KJL to correct me

-freaky-

nope, dont work, didnt fix, but thanks for helping and not flaming or splodin a grenade on my face

SSj_Link 09-28-2001 10:22 AM

Hmm I didnt care lol


if (playertouchsme) {
toweapons Bread;
this.Bcount = +1;
}
if (weaponfired && this.Bcount>=1) {
playerhearts+=2;
this.Bcount =-1;
}
if (isweapon && Bcount<1) {
destroy;
}

hmm maybe this.....

someone correct me

-freaky-

Metal-Slug 09-28-2001 07:31 PM

ok, thanks for the help kamu (not sarcasim, im serious) but, i have know idea what you mean, so

NPC Code:

// NPC made by Urónd the Paladin
if (playertouchsme) {
toweapons Bread;
this.Bcount = +1;
}
if (weaponfired && this.Bcount>1) {
playerhearts+=2;
this.Bcount -=1;
if (isweapon && this.Bcount<1) {
destroy;
}
}



will work?

Metal-Slug 09-28-2001 07:51 PM

so i need
NPC Code:

// NPC made by Urónd the Paladin
if (playertouchsme) {
toweapons Bread;
this.Bcount = =1;
}
if (weaponfired && this.Bcount>1) {
playerhearts+=2;
this.Bcount ==1;
if (isweapon && this.Bcount<1) {
destroy;
}
}


or
NPC Code:

// NPC made by Urónd the Paladin
if (playertouchsme) {
toweapons Bread;
this.Bcount ==+1;
}
if (weaponfired && this.Bcount>1) {
playerhearts+=2;
this.Bcount -==1;
if (isweapon && this.Bcount<1) {
destroy;
}
}


Metal-Slug 09-28-2001 08:03 PM

ok

dragoonvenganc 09-28-2001 09:54 PM

+=
not
=+

SSj_Link 09-29-2001 12:37 AM

ooh..
Hmm
Im not too good with this.variables and strings...

Kai, or anyone else, could you give me an example of how strings work with counts?
( like minerals in mining)


Thanks

-freaky-

dragoonvenganc 09-29-2001 12:39 AM

ok
setstring Bcount,strtofloat(#s(Bcount))+1;

that is adding 1
setstring Bcount,strtofloat(#s(Bcount))-1;
should work..

SSj_Link 09-29-2001 12:41 AM

Thanks!
 
Thanks
Im just learning strings and this.variables
I now understand them both
^_^


-Freaky-


All times are GMT +2. The time now is 05:47 PM.

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