Jump to content
  • 0

Request item drop on specific map


Question

Posted

hye, i would like to request a script that when ever any player killed at specific map, all item in inventory will be drop

only to specific map which is atlantis, not to every time they died, just when they enter that map as i mention, all item within their inventory will drop if they get killed

 

3 answers to this question

Recommended Posts

  • 0
Posted (edited)
OnPCDieEvent:

if(strcharinfo(3) == "atlantis"){

nude;

atcommand "@dropall";

}
end;

 

Edited by Start_
  • 0
Posted (edited)

wouldn't recommend using atcommand since it would spam the atcommand log if the server enabled it.

-	script	sample	-1,{
	OnPCDieEvent:
		getmapxy(.@map$, .@x, .@y, BL_PC);
		if (.@map$ == "prontera") {
			getinventorylist;
			while (.@i < @inventorylist_count) {
				if (!@inventorylist_bound[.@i] && !@inventorylist_equip[.@i]) {
					for (.@roi = 0; .@roi < 5; .@roi++) {
						.@RandomIDArray[.@roi] = getd("@inventorylist_option_id"+(.@roi+1)+"["+.@i+"]");
						.@RandomValueArray[.@roi] = getd("@inventorylist_option_value"+(.@roi+1)+"["+.@i+"]");
						.@RandomParamArray[.@roi] = getd("@inventorylist_option_parameter"+(.@roi+1)+"["+.@i+"]");
					}
					delitem3 @inventorylist_id[.@i],@inventorylist_amount[.@i],@inventorylist_identify[.@i],@inventorylist_refine[.@i],@inventorylist_attribute[.@i],@inventorylist_card1[.@i],@inventorylist_card2[.@i],@inventorylist_card3[.@i],@inventorylist_card4[.@i],.@RandomIDArray,.@RandomValueArray,.@RandomParamArray;
					makeitem3 @inventorylist_id[.@i],@inventorylist_amount[.@i],.@map$, .@x + rand(-2,2), .@y + rand(-2,2),@inventorylist_identify[.@i],@inventorylist_refine[.@i],@inventorylist_attribute[.@i],@inventorylist_card1[.@i],@inventorylist_card2[.@i],@inventorylist_card3[.@i],@inventorylist_card4[.@i],.@RandomIDArray,.@RandomValueArray,.@RandomParamArray;
				}
				.@i++;
			}
		}
		end;
}

you can try something like this.

U0IEBkA.png

Edited by Emistry
fix variables.
  • 0
Posted

i have tested neither work..

On 4/12/2020 at 1:45 AM, Emistry said:

wouldn't recommend using atcommand since it would spam the atcommand log if the server enabled it.

-	script	sample	-1,{
	OnPCDieEvent:
		getmapxy(.@map$, .@x, .@y, BL_PC);
		if (.@map$ == "prontera") {
			getinventorylist;
			while (.@i < @inventorylist_count) {
				if (!@inventorylist_bound[.@i] && !@inventorylist_equip[.@i]) {
					for (.@roi = 0; .@roi < 5; .@roi++) {
						.@RandomIDArray[.@roi] = getd("@inventorylist_option_id"+(.@roi+1)+"["+.@i+"]");
						.@RandomValueArray[.@roi] = getd("@inventorylist_option_value"+(.@roi+1)+"["+.@i+"]");
						.@RandomParamArray[.@roi] = getd("@inventorylist_option_parameter"+(.@roi+1)+"["+.@i+"]");
					}
					delitem3 @inventorylist_id[.@i],@inventorylist_amount[.@i],@inventorylist_identify[.@i],@inventorylist_refine[.@i],@inventorylist_attribute[.@i],@inventorylist_card1[.@i],@inventorylist_card2[.@i],@inventorylist_card3[.@i],@inventorylist_card4[.@i],.@RandomIDArray,.@RandomValueArray,.@RandomParamArray;
					makeitem3 @inventorylist_id[.@i],@inventorylist_amount[.@i],.@map$, .@x + rand(-2,2), .@y + rand(-2,2),@inventorylist_identify[.@i],@inventorylist_refine[.@i],@inventorylist_attribute[.@i],@inventorylist_card1[.@i],@inventorylist_card2[.@i],@inventorylist_card3[.@i],@inventorylist_card4[.@i],.@RandomIDArray,.@RandomValueArray,.@RandomParamArray;
				}
				.@i++;
			}
		}
		end;
}

you can try something like this.

U0IEBkA.png

i did try it, within the custom map atlantis, but nothing drop

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...