Graal Forums

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

Brad_Elven 10-26-2001 10:36 AM

Chest
 
Whats wrong with this script?

// NPC made by Lord Helmut
if (playerenters&&!hasbomb) {
setgifpart b_chest.png,0,0,32,32;
}
if(playertouchsme&&!hasbomb){
set hasbomb;
toweapons Bomb;
}
if (playerenter&&hasbomb) {
setgifpart b_chest.png,32,0,32,32;
}

yes i know im missing the if(weaponfired) part

nyghtGT 10-26-2001 10:45 AM

why dont you do:
NPC Code:

NPC Code:

// NPC made by Lord Helmut
if (playerenters && !hasweapon(Bomb)) {
setgifpart b_chest.png,0,0,32,32;
}
if(playertouchsme && !hasweapon(Bomb)) {
toweapons Bomb;
}
if (playerenters && hasweapon(Bomb)) {
setgifpart b_chest.png,32,0,32,32;
}




royce 10-26-2001 11:18 AM

whats it used for? if u get the bomb through the chest make sure u play chest.wav

Brad_Elven 10-26-2001 01:14 PM

no that code wont work for some reason...like it wont open if they touch it =/

royce 10-26-2001 01:18 PM

brad, make a image of the chest open...here we go!! put a open chest image where the npc is and when u play the sound make sure u hide it and it'll look like the chest opened

Brad_Elven 10-26-2001 02:09 PM

first off I am Lord Helmut, second of all thats *** when u can just change the image part...

royce 10-27-2001 02:34 AM

not really...u can destory that npc to make the game faster

nyghtGT 10-27-2001 05:00 AM

everyone
 
Quote:

Originally posted by royce
not really...u can destory that npc to make the game faster
when you destroy an NPC it destroys it for everyone ... not just the player ...

nyghtGT 10-27-2001 05:01 AM

it would be a really cool idea if you could move NPC's from levels to level ... like say for instance you get the bomb ... then you could disable all the bomb commands and make it do some other command ... using a bunch of NPCs in a level causes lag evetually (if there are enough)

Xaviar 10-27-2001 05:08 AM

Re: Chest
 
Quote:

Originally posted by Brad_Elven
Whats wrong with this script?

// NPC made by Lord Helmut
if (playerenters&&!hasweapon(bomb)) {
setgifpart b_chest.png,0,0,32,32;
}
if(playertouchsme&&!hasweapon(bomb)){
<removed set hasbomb;>
toweapons Bomb;
setgifpart b_chest.png,32,0,32,32;
}
if (playerenters&&hasweapon(bomb)) {
setgifpart b_chest.png,32,0,32,32;
}

yes i know im missing the if(weaponfired) part

Underlined the changes, and for the weaponfired part, look in my system, I've got it there all ready for use with our "special" system

nyghtGT 10-27-2001 05:30 AM

Re: Re: Chest
 
Quote:

Originally posted by Xaviar


Underlined the changes, and for the weaponfired part, look in my system, I've got it there all ready for use with our "special" system

...
Quote:

Originally posted by nyghtGT

NPC Code:

NPC Code:

// NPC made by Lord Helmut
if (playerenters && !hasweapon(Bomb)) {
setgifpart b_chest.png,0,0,32,32;
}
if(playertouchsme && !hasweapon(Bomb)) {
toweapons Bomb;
}
if (playerenters && hasweapon(Bomb)) {
setgifpart b_chest.png,32,0,32,32;
}





and i said what ?

Xaviar 10-27-2001 05:36 AM

Re: Re: Re: Chest
 
Quote:

Originally posted by nyghtGT

...

and i said what ?

I was re-affirming(sp?) what you said, and adding a setgifpart to the playertouchsme

Bravo_LAT-Admin 10-27-2001 08:42 PM

Well npcs can be moved level to level using npcserver and canwarp and canwarp2 commands.

FF8Fan2000 10-27-2001 09:33 PM

What about this?

NPC Code:

// NPC made by Lord Helmut
if (playerenters && !hasweapon(Bomb)) {
setgifpart b_chest.png,0,0,32,32;
}
if(playertouchsme && !hasweapon(Bomb)) {
toweapons Bomb;
setgifpart b_chest.png,32,0,32,32;
}
if (playerenters && hasweapon(Bomb)) {
setgifpart b_chest.png,32,0,32,32;
}


Xaviar 10-28-2001 01:17 AM

Quote:

Originally posted by FF8Fan2000
What about this?

NPC Code:

// NPC made by Lord Helmut
if (playerenters && !hasweapon(Bomb)) {
setgifpart b_chest.png,0,0,32,32;
}
if(playertouchsme && !hasweapon(Bomb)) {
toweapons Bomb;
setgifpart b_chest.png,32,0,32,32;
}
if (playerenters && hasweapon(Bomb)) {
setgifpart b_chest.png,32,0,32,32;
}


Thank you, kind sir, for repeating me.

FF8Fan2000 10-28-2001 01:58 AM

I did? Whoops!


All times are GMT +2. The time now is 01:54 PM.

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