Jump to content
  • 0
ThyroDree

Branch Room NPC Monster Kill and Drops

Question

Hello anyone can help? Adding command that cleans the room when a player enters the room, ex. If there is monster inside from previous renter, It will die and drops will automatically remove/clean.

I tried to add atcommand "@killmonster"; :oops:

prontera,165,161,4	script	Private Branch Room	4_M_EIN_SOLDIER,{
setarray $@maps$[1], "pvp_n_1-1", "06guild_01", "06guild_02", "06guild_03", "06guild_04", "06guild_05";
setarray .@price[1], 200, 35000000, 35000000, 35000000, 35000000, 35000000;
for(set .@b,1; .@b < getarraysize($@maps$); set .@b,.@b + 1) {
	if(.@b==1){ set .@menu$, .@menu$  + "Public- "+((getmapusers($@maps$[.@b])>=30)?"^CD0000Full^000000("+getmapusers($@maps$[.@b])+")":"^007700Open^000000("+getmapusers($@maps$[.@b])+") ["+.@price[.@b]+" zeny]")+":"; } else { set .@menu$, .@menu$  + "Private["+(.@b-1)+"]- "+((getmapusers(""+$@maps$[.@b]+"")>0)?"^CD0000Full^000000("+getmapusers($@maps$[.@b])+")":"^007700Open^000000("+getmapusers($@maps$[.@b])+") ["+.@price[.@b]+" zeny]")+":"; }
}
			mes "[ ^007fffBranch Manager^000000 ]";
			mes "Private Branch Room cost ^FF000035,000,000^000000z.";
			mes "You can only use the room for only ^FF000030 minutes^000000.";
			next;
			mes "[ ^007fffBranch Manager^000000 ]";
			mes "Once you leave the room, you will need to pay again to enter this room.";
			next;
			mes "[ ^007fffBranch Manager^000000 ]";
			mes "Please select a Private Branch room.";
			mes "^FF0000Remember^000000:";
			mes "Once you leave the room, you will need to pay again to enter this room.";
if(select(.@menu$)) {
	if(Zeny<.@price[@menu]){
	mes "[ ^007fffBranch Manager^000000 ]";
	mes "I'm sorry but you don't have enough Zeny, please come back later.";
	close;
	}
	if(getmapusers($@maps$[@menu])<=30&&@menu==1){
		set Zeny,Zeny-.@price[@menu];
		set $@maps$,$@maps$[@menu];
		setnpctimer 0; attachnpctimer(strcharinfo(0)); startnpctimer; warp $@maps$[@menu],111,67; end;
	}
	if(!getmapusers($@maps$[@menu])){
		mes "...";
		next;
		mes "[ ^007fffBranch Manager^000000 ]";
		mes "Use Private DB Room for";
		mes "30 minutes!";
		mes "But you need to pay me 35,000,000z";
		mes "Input a new password.";
		input($password$[@menu]);
		set Zeny,Zeny-.@price[@menu];
		set $@maps$,$@maps$[@menu];
		next; setnpctimer 0; attachnpctimer(strcharinfo(0)); startnpctimer; warp $@maps$[@menu],50,50; atcommand "@killmonster"; atcommand "@cleanmap"; end;
	}
	if(getmapusers($@maps$[@menu])<=0&&@menu!=1) {
		mes "[ ^007fffBranch Manager^000000 ]";
		mes "This room is password protected please input the password now.";
		input(@name$);
		if(@name$==$password$[@menu]){
			set Zeny,Zeny-.@price[@menu];
			set $@maps$,$@maps$[@menu];
			mes "correct!"; next; setnpctimer 0; attachnpctimer(strcharinfo(0)); startnpctimer; warp $@maps$[@menu],50,50; end;
		} else {
			mes "Incorrect!";
			close;
		}
	} else {
		mes "[ ^007fffBranch Manager^000000 ]";
		mes "I'm sorry this room is full.";
		close;
	}
}

OnTimer1800000:
if(strcharinfo(3)==$@maps$){
	warp "prontera",156,191;
	end;
}
}

 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.