Graal Forums

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

Geovanie Legend 06-21-2001 02:09 PM

Weapon killer
 
A long time ago I made a script that would delete a weapon from your inventory when you entered a level, but now i can't remember how it's done :(
Would someone be so kind as to post the script here for me or send it to me in a pm. thanks :)

CrazedMerlin 06-21-2001 03:03 PM

do alot like this
if (playerenters&&hasweapon(LAT Boots)) {toweapons LAT Boots;
if (playerenters&&hasweapon(Heart Stone)) {toweapons Heart Stone;
if (weaponfired) {destroy;}
}
}
like that, you get the point

Geovanie Legend 06-21-2001 03:12 PM

Quote:

do alot like this
if (playerenters&&hasweapon(LAT Boots)) {toweapons LAT Boots;
if (playerenters&&hasweapon(Heart Stone)) {toweapons Heart Stone;
if (weaponfired) {destroy;}
}
}
like that, you get the point
So i could redo it some and make it like this?

if (playerenters) {
timeout=0.5;
}
if (playerenters&&hasweapon(LAT Boots)) {toweapons LAT Boots;
if (playerenters&&hasweapon(Heart Stone)) {toweapons Heart Stone;
if (isweapon||timeout) {destroy;}
}
}

grim_squeaker_x 06-21-2001 05:13 PM

NPC Code:
if (playerenters&&isweapon&&strequals(#L,levelname)) destroy;


Er1c 06-22-2001 08:24 AM

Here's how it should be done...

NPC Code:

if (playerenters) {
toweapons NAME TO DELETE;
}
if (isweapon)
destroy;



Very easy to make... Even easier with the NPC server.

NPC Code:

removeweapon NAME TO DELETE;


CrazedMerlin 06-22-2001 08:26 AM

yea but my way is easier if its alot of weapons you want to destroy

06-22-2001 09:36 AM

Hmm... try this

NPC Code:


if (playerenters) {
if (hasweapon(Weapon name)) {
toweapons Weapon name;
timeout=.05;
}}
if (isweapon||weaponfired) {
destroy;
}
if (timeout) {
if (isweapon) {
destroy;
}
timeout=.05;

}



Tyhm 06-22-2001 11:55 AM

if(playerenters) toweapons Tree Seeds;
if(isweapon) destroy;

Warning: Though this seems to happen instantaneously, some NPCs will detect hasweapon(Tree Seeds). Very bad if you're running an autojailer on it! =_=;

supersaiyanboo2 06-22-2001 04:52 PM

lol?
 
y just do this lil code lol:

if (weaponfired && !strequals(#L, UR LEVEL)){ //when the weapon is fired in another level//
destroy;
}


All times are GMT +2. The time now is 02:08 AM.

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