Erio-chan Posted August 4, 2017 Posted August 4, 2017 help me please adding specific maps on this script. - script nightmaremode -1,{ OnInit: .blacklist$ = "501,502,503,504,505"; end; OnPCDieEvent: if (countitem(7773) >= 1) end; if (BaseLevel < 40) end; if ( strcharinfo(3) != "prt_fild08" ) end; //if ( pkpoints < 100 ) end; getinventorylist; .@size = (@inventorylist_count-1); for ( .@i = .@size; .@i >= 0; .@i--) { if (compare(","+.blacklist$+",", ","+@inventorylist_id[.@i]+",")) { deletearray @inventorylist_id[.@i],1; deletearray @inventorylist_amount[.@i],1; deletearray @inventorylist_identify[.@i],1; deletearray @inventorylist_refine[.@i],1; deletearray @inventorylist_attribute[.@i],1; deletearray @inventorylist_card1[.@i],1; deletearray @inventorylist_card2[.@i],1; deletearray @inventorylist_card3[.@i],1; deletearray @inventorylist_card4[.@i],1; .@size--; } } if (.@size > 0) { .@r = rand(.@size); delitem2 @inventorylist_id[.@r], @inventorylist_amount[.@r], @inventorylist_identify[.@r], @inventorylist_refine[.@r], @inventorylist_attribute[.@r], @inventorylist_card1[.@r], @inventorylist_card2[.@r], @inventorylist_card3[.@r], @inventorylist_card4[.@r]; getmapxy .@map$, .@x, .@y, 0; makeitem2 @inventorylist_id[.@r], @inventorylist_amount[.@r], .@map$, .@x, .@y, @inventorylist_identify[.@r], @inventorylist_refine[.@r], @inventorylist_attribute[.@r], @inventorylist_card1[.@r], @inventorylist_card2[.@r], @inventorylist_card3[.@r], @inventorylist_card4[.@r]; } end; } Quote
0 Z3R0 Posted August 4, 2017 Posted August 4, 2017 Follow the same thing for blacklist... OnInit: .blacklist$ = "501,502,503,504,505"; .onmaps$ = "prontera,geffen,morocc"; then on... OnPCDieEvent: if (countitem(7773) >= 1) end; if (BaseLevel < 40) end; // Will halt the rest of the script if they are not on a map that is allowed if (!compare("," + .onmaps$ + ",", "," + strcharinfo(3) + ",")) end; // .... 1 Quote
0 Erio-chan Posted August 9, 2017 Author Posted August 9, 2017 On 8/5/2017 at 5:18 AM, Z3R0 said: Follow the same thing for blacklist... OnInit: .blacklist$ = "501,502,503,504,505"; .onmaps$ = "prontera,geffen,morocc"; then on... OnPCDieEvent: if (countitem(7773) >= 1) end; if (BaseLevel < 40) end; // Will halt the rest of the script if they are not on a map that is allowed if (!compare("," + .onmaps$ + ",", "," + strcharinfo(3) + ",")) end; // .... Thank you very much!!! Quote
Question
Erio-chan
help me please adding specific maps on this script.
- script nightmaremode -1,{ OnInit: .blacklist$ = "501,502,503,504,505"; end; OnPCDieEvent: if (countitem(7773) >= 1) end; if (BaseLevel < 40) end; if ( strcharinfo(3) != "prt_fild08" ) end; //if ( pkpoints < 100 ) end; getinventorylist; .@size = (@inventorylist_count-1); for ( .@i = .@size; .@i >= 0; .@i--) { if (compare(","+.blacklist$+",", ","+@inventorylist_id[.@i]+",")) { deletearray @inventorylist_id[.@i],1; deletearray @inventorylist_amount[.@i],1; deletearray @inventorylist_identify[.@i],1; deletearray @inventorylist_refine[.@i],1; deletearray @inventorylist_attribute[.@i],1; deletearray @inventorylist_card1[.@i],1; deletearray @inventorylist_card2[.@i],1; deletearray @inventorylist_card3[.@i],1; deletearray @inventorylist_card4[.@i],1; .@size--; } } if (.@size > 0) { .@r = rand(.@size); delitem2 @inventorylist_id[.@r], @inventorylist_amount[.@r], @inventorylist_identify[.@r], @inventorylist_refine[.@r], @inventorylist_attribute[.@r], @inventorylist_card1[.@r], @inventorylist_card2[.@r], @inventorylist_card3[.@r], @inventorylist_card4[.@r]; getmapxy .@map$, .@x, .@y, 0; makeitem2 @inventorylist_id[.@r], @inventorylist_amount[.@r], .@map$, .@x, .@y, @inventorylist_identify[.@r], @inventorylist_refine[.@r], @inventorylist_attribute[.@r], @inventorylist_card1[.@r], @inventorylist_card2[.@r], @inventorylist_card3[.@r], @inventorylist_card4[.@r]; } end; }
2 answers 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.