Undoing spar zone

im using downsiders sparring script and i don’t know how to restore the players weapons afterwards. (yes i thanked downsider in the room)

the code that takes weapons away:

if (playerenters) {
toweapons *swordsOnly;

//Co-ords to respawn at.
this.respawnX = 30;
this.respawnY = 10;

timeout = 0.05;
}

if (timeout) {
timeout = 0.05;
for (i=0;i<weaponscount;i++) {
if (strequals(#w(i),*swordsOnly)) {
selectedweapon = i;
break;
}
}
disablepause;
disableselectweapons;
disablemap;
}

if (playerdies) {
setstring client.sparLevel,#L;
playerx = this.respawnX;
playery = this.respawnY;
timeout = 0.05;
sleep 0.05;
timeout = 0.05;
for (i=0;i<4;i++) {
setlevel2 #s(client.sparLevel), this.respawnX, this.respawnY;
timeout = 0.05;
sleep 0.05;
timeout = 0.05;
}
timeout = 0.05;
}

if (actionprojectile || actionprojectile2) {
setstring this.a,#p(2);
setstring this.pl,#p(3);
if (strequals(#s(this.a),addpl)) {
if (strequals(#s(this.pl),#a)) {
for (n=0;n<npcscount;n++) {
if (npcs[n].save[0] == 177) {
callnpc n,addpl;
break;
}
}
}
} else if (strequals(#s(this.a),removepl)) {
if (strequals(#s(this.pl),#a)) {
playerx = this.respawnX;
playery = this.respawnY;
}
} else if (strequals(#s(this.a),setpl)) {
if (strequals(#s(this.pl),#a)) {
if (strtofloat(#p(4)) == 0) {
for (i=0;i<npcscount;i++) {
if (npcs[i].save[0] == 177) {
callnpc i,setplleft;
break;
}
}
} else if (strtofloat(#p(4)) == 1) {
for (i=0;i<npcscount;i++) {
if (npcs[i].save[0] == 177) {
callnpc i,setplright;
break;
}
}
}
}
}
}

(btw how do i put this in the code box thingy in the forums this is really obnoxious)

[ code] [/code]

That’s a hella lot of timeouts.
But basically what you want is if(playerenters && !strequals(#L,yoursparringlevel.nw)) destroy;

K it worked even thoug i have no idea what it did, lol

destroy command removes the npc from player inventory…

if (playerenters && !strequals(#L,downsiderssparroom))destroy;

if your not sure wether the #l string has nw in it just make a script

if (playerenters) message #L;

READ THIS IF YOU ARE LAZY:
(Shortened version: I’m a retard)

OTHERWISE READ THE LONG VERSION:

oh wow i get it. although its not like any of you explained it. i was well aware that destroy removed it, i just didnt realize that the npc was a weapon. i mean i got the whole toweapons thing but i assumed this meant if the player entered the level and the level wasnt the spar zone, it would destroy. it didnt make any sense cuz i assumed the npc would stay in the level, because i didnt realize it was a weapon

Destroy command deletes the NPC. <-- Better answer.

if (playerenters && !strequals(#L,yoursparringlevel.nw)) { destroy; }
playerenters //This means if the player enters the level
&& //This is an “and” function. It mean that they have to meet what’s on both sides
! //This means NOT
strequals // This means if the string equals in this case #L is the string
#L //The string for the LEVEL, hints the L in #L
#L,yoursparringlevel.nw // This is detecting the level you are in
destroy //This destroys the weapon/NPC

Dude. Just shut up already. This thread was already done and answered, look at the date. Fuck.