Jump to content
  • 0

Requesting for When a MVP dead Respawn a treasure box


hexor9

Question


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   0
  • Joined:  11/16/11
  • Last Seen:  

when MVP killed callfucntion summon and treasure chest

treasure chest is have 10 rewards and all in party member of killer can dice the rewards or the higher random number 1-100 can get that item 
 

Link to comment
Share on other sites

25 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

You would need to call a script, not a function. Add an event label for your desired spawns to trigger the creation of a treasure chest.

For the second part, you haven't given enough details.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   0
  • Joined:  11/16/11
  • Last Seen:  

sir euphy i cant make script ^_^ so please let me see the script in your mind

second part is like this 

MVP died trigger to summon treasure box npc
all players inside the map can click the npc and have menu yes or no if you want to dice the loots or join in the share of loots
and next message they can see what item he gotten and after all players inside the map finish to vote to yes or no the drop is distributed


NOTE highest dice 1-100 will gain the certain loots

ex: player 1 dice

item1=70
item2=1
item3=3
etc ect ect
who got the highest roll or dice in item1 he/she get it

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   0
  • Joined:  11/16/11
  • Last Seen:  

bump

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

I guess you could call this convoluted mess a proof of concept. It's no where near optimized and it's running some pretty redundant systems, but hell, it works right? Lol

function	script	timeleft__	{
	set .@left, getarg(0);
	if ( .@left <= 0 ) return getarg(0);
	set .@day, .@left / 86400;
	set .@hour, .@left % 86400 / 3600;
	set .@min, .@left % 3600 / 60;
	set .@sec, .@left % 60;
	return ( ( .@day )?.@day +" day ":"" )+( ( .@day || .@hour )?.@hour +" hour ":"" )+( ( .@day == 0 && ( .@hour || .@min ) )?.@min +" min ":"" )+( ( .@day || .@hour )?"":.@sec +" sec" );
}

-	script	Spoilbox_dup	-1,{
end;

Onmvpdead:
getmapxy .map$, .x, .y, 0; set .a,0; set .b,0;
	set .id,atoi(strnpcinfo(2));
	if(getmobdrops(.mvpid[.id])) {
		set .count, $@MobDrop_count;
		copyarray .item[0],$@MobDrop_item[0],.count;
		copyarray .rate[0],$@MobDrop_rate[0],.count;
		for( set .@i,0; .@i < .count; set .@i,.@i +1 ) {
			if(((.rate[.@i]/100)*.srate)>100){
				set .drops[.@b],.item[.@i]; set .droprs[.@b],((.rate[.@i]/100)*.srate); set .@b,.@b+1;
			} else if(.rate[.@i]*.srate>99){
				if(!rand((100/((.rate[.@i]/100)*.srate))-1)){ set .drops[.@b],.item[.@i]; set .droprs[.@b],((.rate[.@i]/100)*.srate); set .@b,.@b+1; }
			} else if(.rate[.@i]*.scardrate<99){
				if(!(rand((100/((.rate[.@i]*.scardrate)%100))*100)-1)){ set .drops[.@b],.item[.@i]; set .droprs[.@b],((.rate[.@i]/100)*.scardrate); set .@b,.@b+1; }
			}
		}
	} else { end; }
	if(strcharinfo(1)==""){ goto Alone; }
	deletearray $@partymemberaid[0],128;
	getpartymember getcharid(1),1;
	getpartymember getcharid(1),2;
	set .@count, $@partymembercount; set .count,0;
	copyarray .@party[0],$@partymemberaid[0],.@count;
	copyarray .@cparty[0],$@partymembercid[0],.@count;
	for( set .@i,0; .@i < .@count; set .@i,.@i +1 ) {
		getmapxy(.@map$,.@x,.@y,0,rid2name(.@party[.@i]));
		if(.@map$==strcharinfo(3)) set .@p,.@p+1;
		
	}
	if(.@p<2) goto Alone;
	for ( set .@i, 0; .@i < .@count; set .@i, .@i +1 ){
		if(isloggedin(.@party[.@i],.@cparty[.@i])){
			set .party[.count],.@party[.@i];
			set .count, .count +1 ;
		}
	}
	if(.count<2) goto Alone;
	movenpc strnpcinfo(0), .x, .y;
	restart:
	setnpctimer 0; attachnpctimer(strcharinfo(0)); startnpctimer;
	set .loop, .tlimit;
	while ( .loop ) {
		delwaitingroom strnpcinfo(0);
		waitingroom callfunc("timeleft__", .loop ), 0;
		set .loop, .loop -1;
		sleep2 1000;
	}
	if(.a<.count){
		set .a,.a+1;
		npctalk strcharinfo(0)+" has taken to long!";
		getmapxy .@map$, .@x, .@y, 0;
		warp .@map$,.@x,.@y;
		while(.b<getarraysize(.drops)){
			setd ".partyroll"+.b+"["+.a+"]",0;
			set .b,.b+1;
		}
		goto restart;
	}
	end;
	
	OnTimer1000:
		while(.a<.count){
			detachrid; attachrid(.party[.a]);
			set .b,0;
			while(.b<getarraysize(.drops)){
				if((playerattached())&&strcharinfo(3)==.map$) {
					L_lo: if(.droprs[.b]>.ratelimit&&.ratelimit>0) { setd ".partyroll"+.b+"["+.a+"]",0; }
					else { select("============(^0000FF"+getitemname(.drops[.b])+"^000000)===============:-Roll:-Pass"); if(!((@menu)-1)||@menu>3) goto L_lo; 
					if(@menu==2){ setd ".partyroll"+.b+"["+.a+"]",rand(100); npctalk strcharinfo(0)+" rolled a ["+getd(".partyroll"+.b+"["+.a+"]")+"] on "+getitemname(.drops[.b])+"."; dispbottom "You rolled a ["+getd(".partyroll"+.b+"["+.a+"]")+"] on "+getitemname(.drops[.b])+"."; } else { setd ".partyroll"+.b+"["+.a+"]",0; npctalk strcharinfo(0)+" passed a on "+getitemname(.drops[.b])+"."; dispbottom "You passed a on "+getitemname(.drops[.b])+"."; } }
					set .loop, 60;
				}
				set .b,.b+1;
			}
			set .a,.a+1;
		}
	
	//Find Highest Bawler.
	for (set .@i,0; .@i < getarraysize(.party); set .@i,.@i+1){
		for(set .@s,0; .@s < getarraysize(.drops); set .@s,.@s+1){
			if(getd(".partyroll"+.@s+"["+.@i+"]")>getd(".wpartyroll"+.@s)) { setd ".wpartyroll"+.@s,getd(".partyroll"+.@s+"["+.@i+"]"); setd ".wrid"+.@s,.party[.@i];  }
		}
	}
	
	//Distribute Prize.
	for(set .@s,0; .@s < getarraysize(.drops); set .@s,.@s+1){
		detachrid; attachrid(getd(".wrid"+.@s));
		if(getd(".wpartyroll"+.@s)){
			npctalk strcharinfo(0)+" won ["+getitemname(.drops[.@s])+"].";
			getitem .drops[.@s],1;
		} else { makeitem .drops[.@s],1,.map$,.x,.y; }
	}
	
	//Warp everyone so they aren't stuck anymore.
	for (set .@i,0; .@i < getarraysize(.party); set .@i,.@i+1){
		detachrid; attachrid(.party[.@i]);
		getmapxy .@map$, .@x, .@y, 0;
		warp .@map$,.@x,.@y;
	}
	stopnpctimer;
	delwaitingroom strnpcinfo(0);
	movenpc strnpcinfo(0), 0,0;
	end;
	
Alone:
	for(set .@s,0; .@s < getarraysize(.drops); set .@s,.@s+1){
		getitem .drops[.@s],1;
	}
	delwaitingroom strnpcinfo(0);
	movenpc strnpcinfo(0), 0,0;
	end;
	
OnInit:
	if ( strnpcinfo(2) == "" ) {
		//=-=-=-=-=-=Configuration=-=-=-=-=-=-=
		setarray .mvpid[1], 1871,1872,1719,1492,1147,1688,1583,2068,2156,2087,2165,1623,1389,1046,1272,1115,1046,1147,1272,1418,1157,2202,1685,1734,1658,1630,1038,1511,1885,1751,1150,1039,1086,1768,1832,1112,1312,1251,2131,1087,1190,1252,1059,1159,1917,1115,1785,1785,1785,1785; // MVP ids make sure each id corresponds to the duplicated npcs and maps.
		set .srate,50; // Server Drop rates
		set .scardrate,2; // Server card rate
		set .tlimit,60; // Time limit before skip player roll in seconds.
		set .ratelimit,0; // Ignores items dropped with rates higher then this value- Ignored items will be dropped by npc after rolls are over. 0 = off
		//=-=-=-=-=-=-=Skorm=-=-=-=-=-=-=-=-=-=
		//Credits to unknown artist for original
		//File architecture.
		//Thanks to Hexor9 for the idea. <3
	}
	setmapflag strnpcinfo(4),mf_nomvploot;
	end;
}

prt_fild08,175,352,1,1	boss_monster	Metaling	1613,1,1,1,"Spoilbox#1_mvp::Onmvpdead"

prt_fild08,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#1_mvp	801
abbey03,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#2_mvp	801
abyss_03,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#3_mvp	801
ama_dun03,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#4_mvp	801
anthell02,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#5_mvp	801
ayo_dun02,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#6_mvp	801
beach_dun,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#7_mvp	801
bra_dun02,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#8_mvp	801
dew_dun01,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#9_mvp	801
dic_dun02,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#10_mvp	801
dic_dun03,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#11_mvp	801
ein_dun02,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#12_mvp	801
gef_dun01,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#13_mvp	801
gef_dun02,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#14_mvp	801
gl_chyard,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#15_mvp	801
gld_dun01,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#16_mvp	801
gld_dun02,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#17_mvp	801
gld_dun03,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#18_mvp	801
gld_dun04,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#19_mvp	801
gon_dun03,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#20_mvp	801
in_sphinx5,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#21_mvp	801
iz_dun05,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#22_mvp	801
jupe_core,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#23_mvp	801
kh_dun02,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#24_mvp	801
lhz_dun02,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#25_mvp	801
lou_dun03,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#26_mvp	801
moc_pryd04,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#27_mvp	801
moc_pryd06,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#28_mvp	801
mosk_dun03,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#29_mvp	801
odin_tem03,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#30_mvp	801
pay_dun04,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#31_mvp	801
prt_maze03,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#32_mvp	801
prt_sewb4,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#33_mvp	801
ra_san05,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#34_mvp	801
thor_v03,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#35_mvp	801
treasure02,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#36_mvp	801
tur_dun04,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#37_mvp	801
xmas_dun02,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#38_mvp	801
1@mist,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#39_mvp	801
gef_fild10,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#40_mvp	801
gef_fild14,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#41_mvp	801
xmas_fild01,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#42_mvp	801
mjolnir_04,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#43_mvp	801
moc_fild17,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#44_mvp	801
moc_fild22,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#45_mvp	801
pay_fild11,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#46_mvp	801
ra_fild03,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#47_mvp	801
ra_fild04,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#48_mvp	801
ve_fild01,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#49_mvp	801
ve_fild02,0,0,0	duplicate(Spoilbox_dup)	Spoilbox#50_mvp	801
Notes:

I added this little test Metaling you can remove it. if you want to add more monsters like the mvps, just make sure you add them like:

abbey02,236,78,21,18 boss_monster Fallen Bishop Hibram 1871,1,7200000,600000,"Spoilbox#1_mvp::Onmvpdead"

in order with the .mvpid[1] array so that "#_mvp" matches with the correct spawn for that mvp, and if you do use this make sure to delete the old spawns in your npc/mobs folder.

The npc can only handle 1 MVP event death per map.

Information:

This npc will remove mvp drops from any map its duplicated to, and instead once the mvp is killed this emulates the original drops of that mvp and distributes them with dice rolls among the party members. If the user has no party or party members are on a different map all loot goes to the user who killed the MVP. After you've finished clicking "Roll" the npc gives the next person 60 seconds to roll on all their drops. If they fail to roll they will be skipped. That's pretty much it, thanks.

Edit:

First version I forgot to add a check for offline partymembers with the same accountid. It's added now.

Video:

Edited by Skorm
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   0
  • Joined:  11/16/11
  • Last Seen:  

wtf this is it but you script it with higher and super script wtf my english ^_^ i will use this in instance custom dungeon of mine sir can i pm you for this because my mind going to crash to read you script 

IM saying MVP = my custom mob not MVP official list

and can you please 
        set .srate,50; // Server Drop rate ---> no server drop because not mvp official list
        set .scardrate,2; // Server card rate---> like in scrate
        set .tlimit,60; // Time limit before skip player roll in seconds. ------->> not this one this one is very good ^_^
        set .ratelimit,0; // Ignores items dropped with rates higher then this value. 0 = off---- like in scrate


VERY good Scripter ^_^

 

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

Hmm, alright I'm just trying to understand want you mean. LOL

You want to use custom mobs?

Yes you can PM me on rAthena.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  111
  • Topics Per Day:  0.02
  • Content Count:  573
  • Reputation:   20
  • Joined:  11/19/11
  • Last Seen:  

awesome script skorm /no1

 

is this like in DragonNest ? :D

 

SlashGeeGee

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   0
  • Joined:  11/16/11
  • Last Seen:  

wtf he know wat i mean /gg hahahah slashgeegee

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

awesome script skorm /no1

 

is this like in DragonNest ? :D

 

SlashGeeGee

Yeah that's what I had in my mind, and it is a lot like DragonNest. I plan on using this script for my server in instances, and really big bosses. :D
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   0
  • Joined:  11/16/11
  • Last Seen:  

skorm give some credits for the idea ^_^

edit script like this

when mvp killed treasure chest or box respawn and you need to click the chest to open the roll dialog box

and after the roll of all party members automatic gain the loots not drop on the floor

Edited by hexor9
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   0
  • Joined:  11/16/11
  • Last Seen:  

i have error here sir
125hrf5.jpg

Edited by hexor9
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

Hmm weird there doesn't appear to be anything wrong with that line. 6 one side and 6 on the other... Unless you changed something? Anyways I'm going to see if I can't work on your request now.

Edit: I think this is what you wanted.

function	script	timeleft__	{
	set .@left, getarg(0);
	if ( .@left <= 0 ) return getarg(0);
	set .@day, .@left / 86400;
	set .@hour, .@left % 86400 / 3600;
	set .@min, .@left % 3600 / 60;
	set .@sec, .@left % 60;
	return ( ( .@day )?.@day +" day ":"" )+( ( .@day || .@hour )?.@hour +" hour ":"" )+( ( .@day == 0 && ( .@hour || .@min ) )?.@min +" min ":"" )+( ( .@day || .@hour )?"":.@sec +" sec" );
}

-	script	TreasureChest_dup	-1,{
end;

Oncmvpdead:
getmapxy .map$, .x, .y, 0; set .a,0; set .b,0;
	set .id,atoi(strnpcinfo(2));
	if(getmobdrops(.mvpid[.id])) {
		for( set .@i,0; .@i < getarraysize(.loot); set .@i,.@i +1 ) {
			if((.lrates[.@i]/100)>100){
				set .drops[.@b],.loot[.@i]; set .droprs[.@b],(.lrates[.@i]/100); set .@b,.@b+1;
			} else if(.lrates[.@i]>99){
				if(!rand((100/(.lrates[.@i]/100))-1)){ set .drops[.@b],.loot[.@i]; set .droprs[.@b],(.lrates[.@i]/100); set .@b,.@b+1; }
			} else if(.lrates[.@i]<99){
				if(!(rand((100/(.lrates[.@i]%100))*100)-1)){ set .drops[.@b],.loot[.@i]; set .droprs[.@b],(.lrates[.@i]/100); set .@b,.@b+1; }
			}
		}
	} else { end; }
	if(strcharinfo(1)==""){ goto Alone; }
	deletearray $@partymemberaid[0],128;
	getpartymember getcharid(1),1;
	getpartymember getcharid(1),2;
	set .@count, $@partymembercount; set .count,0;
	copyarray .@party[0],$@partymemberaid[0],.@count;
	copyarray .@cparty[0],$@partymembercid[0],.@count;
	for( set .@i,0; .@i < .@count; set .@i,.@i +1 ) {
		getmapxy(.@map$,.@x,.@y,0,rid2name(.@party[.@i]));
		if(.@map$==strcharinfo(3)) set .@p,.@p+1;
		
	}
	if(.@p<2){ goto Alone; }
	for ( set .@i, 0; .@i < .@count; set .@i, .@i +1 ){
		if(isloggedin(.@party[.@i],.@cparty[.@i])){
			set .party[.count],.@party[.@i];
			set .count, .count +1 ;
		}
	}
	if(.count<2) { goto Alone; }
	movenpc strnpcinfo(0), .x, .y;
	restart:
	setnpctimer 0; attachnpctimer(strcharinfo(0)); startnpctimer;
	set .loop, .tlimit;
	while ( .loop ) {
		delwaitingroom strnpcinfo(0);
		waitingroom callfunc("timeleft__", .loop ), 0;
		set .loop, .loop -1;
		sleep2 1000;
	}
	if(.a<.count){
		set .a,.a+1;
		npctalk strcharinfo(0)+" has taken to long!";
		getmapxy .@map$, .@x, .@y, 0;
		warp .@map$,.@x,.@y;
		while(.b<getarraysize(.drops)){
			setd ".partyroll"+.b+"["+.a+"]",0;
			set .b,.b+1;
		}
		goto restart;
	}
	end;
	
	OnTimer1:
		while(.a<.count){
			detachrid; attachrid(.party[.a]);
			set .b,0;
			while(.b<getarraysize(.drops)){
				if((playerattached())&&strcharinfo(3)==.map$) {
					L_lo: if(.droprs[.b]>.ratelimit&&.ratelimit>0) { setd ".partyroll"+.b+"["+.a+"]",0; }
					else { select("============(^0000FF"+getitemname(.drops[.b])+"^000000)===============:-Roll:-Pass"); if(!((@menu)-1)||@menu>3) goto L_lo; 
					if(@menu==2){ setd ".partyroll"+.b+"["+.a+"]",rand(100); npctalk strcharinfo(0)+" rolled a ["+getd(".partyroll"+.b+"["+.a+"]")+"] on "+getitemname(.drops[.b])+"."; dispbottom "You rolled a ["+getd(".partyroll"+.b+"["+.a+"]")+"] on "+getitemname(.drops[.b])+"."; } else { setd ".partyroll"+.b+"["+.a+"]",0; npctalk strcharinfo(0)+" passed a on "+getitemname(.drops[.b])+"."; dispbottom "You passed a on "+getitemname(.drops[.b])+"."; } }
					set .loop, 60;
				}
				set .b,.b+1;
			}
			set .a,.a+1;
		}
	
	//Find Highest Bawler.
	for (set .@i,0; .@i < getarraysize(.party); set .@i,.@i+1){
		for(set .@s,0; .@s < getarraysize(.drops); set .@s,.@s+1){
			if(getd(".partyroll"+.@s+"["+.@i+"]")>getd(".wpartyroll"+.@s)) { setd ".wpartyroll"+.@s,getd(".partyroll"+.@s+"["+.@i+"]"); setd ".wrid"+.@s,.party[.@i];  }
		}
	}
	
	//Distribute Prize.
	for(set .@s,0; .@s < getarraysize(.drops); set .@s,.@s+1){
		detachrid; attachrid(getd(".wrid"+.@s));
		if(getd(".wpartyroll"+.@s)){
			npctalk strcharinfo(0)+" won ["+getitemname(.drops[.@s])+"].";
			getitem .drops[.@s],1;
		} else { makeitem .drops[.@s],1,.map$,.x,.y; }
	}
	
	//Warp everyone so they aren't stuck anymore.
	for (set .@i,0; .@i < getarraysize(.party); set .@i,.@i+1){
		detachrid; attachrid(.party[.@i]);
		getmapxy .@map$, .@x, .@y, 0;
		warp .@map$,.@x,.@y;
	}
	stopnpctimer;
	delwaitingroom strnpcinfo(0);
	movenpc strnpcinfo(0), 0,0;
	end;
	
Alone:
	for(set .@s,0; .@s < getarraysize(.drops); set .@s,.@s+1){
		getitem .drops[.@s],1;
	}
	delwaitingroom strnpcinfo(0);
	movenpc strnpcinfo(0), 0,0;
	end;
	
OnInit:
	if ( strnpcinfo(2) == "" ) {
		//=-=-=-=-=-=Configuration=-=-=-=-=-=-=
		setarray .mvpid[1], 1871,1872,1719; // Custom Mob IDs here.
		setarray .loot[0], 501,502,503,504,505,506; // Items that will be looted from the box.
		setarray .lrates[0], 1,10000,50,600,700,100; // Rate that item will be dropped by chest. 10000 = 100% / 1 = 0.01% 
		set .tlimit,60; // In seconds
		set .ratelimit,0; // Ignores roll on loot with rates higher then this value. 0 = off
		//=-=-=-=-=-=-=Skorm=-=-=-=-=-=-=-=-=-=
	}
	//setmapflag strnpcinfo(4),mf_nomvploot; // Enable if mob has loot by default. If monster summoned with boss_monster this will disable the drops.
	end;
}

prt_fild08,175,352,1,1	boss_monster	Metaling	1613,1,1,1,"TreasureChest#1_mvp::Oncmvpdead"

prt_fild08,0,0,0	duplicate(TreasureChest_dup)	TreasureChest#1_mvp	100
abbey03,0,0,0	duplicate(TreasureChest_dup)	TreasureChest#2_mvp	100
abyss_03,0,0,0	duplicate(TreasureChest_dup)	TreasureChest#3_mvp	100
Edited by Skorm
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   0
  • Joined:  11/16/11
  • Last Seen:  

oh i deleted the duplicate but not all prt_fild08 duplicate

and please ^_^ my private message to you ^_^ hehehe 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   0
  • Joined:  11/16/11
  • Last Seen:  

error again to me T_T 

64gmr8.png

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

Somehow a random Zero snuck in there... I've removed it... Probably a typo when I was posting.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   0
  • Joined:  11/16/11
  • Last Seen:  

now not error in script when killing metaling this will make me client error

33udann.jpg

first post im not getting error!

Edited by hexor9
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

That's because I changed the sprite ID to a treasure chest you probably don't have that specific one.

 

Find:
1350

 

Replace it with:

http://ratemyserver.net/index.php?mob_name=treasure&page=mob_db&f=1&mob_search=Search&page_num=4

 

One of those that works for you in your server when you do @disguise.

 

If you keep erroring you might want to change it to a non-3D mob I've noticed myself in RO, on multiple occasions, if you're loading a map and the 3D mob is in one of the first 24 squares you load it will cause error even if you have the files. :/
 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   0
  • Joined:  11/16/11
  • Last Seen:  

i can disguise in 1350 and i also change it nothing is change im error when i killed it

 

do you try the script im using lates svn and nothing is change i change in npc id and always error

Edited by hexor9
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

Change it to a really common npc just to test, because I'm not getting this error running the most updated version of rAthena.


prt_fild08,0,0,0    duplicate(TreasureChest_dup)    TreasureChest#1_mvp    100
abbey03,0,0,0    duplicate(TreasureChest_dup)    TreasureChest#2_mvp    100
abyss_03,0,0,0    duplicate(TreasureChest_dup)    TreasureChest#3_mvp    100

 

100 is non-3D sailor npc... If that doesn't work maybe it has something to do with the items you've set here.

 

setarray .loot[0], 501,502,503,504,505,506; // Items that will be looted from the box.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   0
  • Joined:  11/16/11
  • Last Seen:  

error why the old script not giving me error T_T the first one i see there a casket npc but i already use it and now its error T_T

Edited by hexor9
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   0
  • Joined:  11/16/11
  • Last Seen:  

i'm just copy paste your code and no error in running but error in client i dont have any changes maden

can i ask for the first 1 you post not in #13 post the old 1 because im not error on that

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

I replaced the 13 post with the version that I know is working on my server, because maybe the forums editor distorted my previous post. Make sure you aren't using both of these npcs at the same time that could be causeing errors. If it still doesn't work I feel there is nothing I can do, and perhaps it's just a misconfiguration on your part or maybe you're not reloading scripts or something of that nature. Good Luck

For some reason the editor doesn't like %100 and replaced them with 0 :/

Edited by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   0
  • Joined:  11/16/11
  • Last Seen:  

anyone can make a new 1 script like this or edit this

when i kill monster i always error

treasurechest.txt

Edited by hexor9
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  118
  • Reputation:   6
  • Joined:  12/20/12
  • Last Seen:  

why do not use the OnMobKill src mod? o.o?  

 

It isn't easier? o.o?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   0
  • Joined:  11/16/11
  • Last Seen:  

bump

Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

×
×
  • Create New...