Jump to content
  • 0

Request item drop on specific map


Dolphin86

Question


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  757
  • Reputation:   17
  • Joined:  01/07/12
  • Last Seen:  

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

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  950
  • Reputation:   180
  • Joined:  04/05/13
  • Last Seen:  

OnPCDieEvent:

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

nude;

atcommand "@dropall";

}
end;

 

Edited by Start_
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2369
  • Joined:  10/28/11
  • Last Seen:  

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.
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  757
  • Reputation:   17
  • Joined:  01/07/12
  • Last Seen:  

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

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...