Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prontera,158,173,4 script Party Invasion 999,{
- function F_PartyCreate;
- mes .n$;
- mes "I am looking for adventures";
- mes "that can help me invade the";
- mes "monsters spreading in a small town.";
- next;
- if(select("Join the party:Maybe next time") == 2) {
- mes .n$;
- mes "Alright, I'll see you then.";
- close;
- }
- if(BaseLevel < .baselvl){
- mes .n$;
- mes "Your power is not enough to join the party come again when you are strong enough.";
- close;
- }
- if(JobLevel < .joblvl) {
- mes .n$;
- mes "The skills that you got right now is not enough to help the party.";
- close;
- }
- // Add the players to the list
- .party_list_users[getarraysize(.party_list_users)] = getcharid(0);
- mes "I can see that you are worthy to join our adveture of invading the monsters.";
- close2;
- donpcevent strnpcinfo(0) + "::OnCheckMembers";
- end;
- OnCheckMembers:
- if(getarraysize(.party_list_users) == .register_num) {
- .joinable = false;
- for(.@a = 0; .@a < .register_num; ++.@a) {
- attachrid(convertpcinfo(.party_list_users[.@a],CPC_ACCOUNT),1);
- if(playerattached()) {
- .joinable = true;
- deletearray .party_list_users[.@a],1;
- end;
- } else { // If player is offline.
- .joinable = true;
- deletearray .party_list_users[.@a],1;
- end;
- }
- if(getcharid(1)) { // Attempting to remove player from its party.
- party_delmember(.party_list_users[.@a],getcharid(1));
- sleep2 50;
- }
- if(getcharid(1)) { // Cannot remove the player from the party.
- .joinable = true;
- deletearray .party_list_users[.@a],1;
- end;
- }
- detachrid;
- }
- // List of all members
- copyarray .@party_list_users, .party_list_users, .register_num;
- for(.@i = (.register_num)-1; .@i >= 0; --.@i) {
- set .@n, getarraysize(.@party_list_users);
- set .@temp, .@party_list_users[.@i];
- set .@party_list_users[.@i], .@party_list_users[.@n];
- set .@party_list_users[.@n], .@temp;
- }
- deletearray .party_list_users;
- .@party_create = F_PartyCreate(.@party_list_users[.@i]);
- if(!.@party_create) {
- .joinable = true;
- end;
- }
- sleep 50;
- for(.@a = 1; .@a < .register_num; ++.@a)
- party_addmember($@party_create_id,.@party_list_users[.@a]);
- warpparty .map$,0,0,.@party_list_users[.@a];
- .active = false;
- sleep 2000;
- mapannounce .map$,"YOU HUMANS!! Dont learned your lessons!",bc_all,0xFFFF00;
- for(.@i = 0; .@i < getarraysize(.mobs); ++.@i) {
- monster .map$,0,0,"Monster Guardians!",.mobs[.@i],.mobs[.@i+1], strnpcinfo(0)+"::OnMobKill";
- }
- @mob_cd = 300;
- initnpctimer;
- }
- end;
- // Triggers when 1 monster got killed.
- OnMobKill:
- --@mob_cd;
- mapannounce "("+@mob_cd+") Monster Guardian left in the map!",bc_map,0xFFFF00;
- if(!mobcount(.map$,strnpcinfo(0)+"::OnKill")) {
- goto OnTimer3600000;
- }
- end;
- OnTimer30000:
- addrid(1,0,.map$);
- getitem 32609,10;
- mapannounce .map$,"Damn........ YOU HUMANS!",bc_map,0xFFFF00;
- stopnpctimer;
- .joinable = false;
- end;
- function F_PartyCreate {
- detachrid;
- attachrid(convertpcinfo(getarg(0),CPC_ACCOUNT),1);
- switch(party_create("MonsterInvasion",getarg(0),1)) {
- case 0: debugmes "Unknown Error."; break;
- case -1: debugmes "Player not found."; break;
- case -2: debugmes "Player already has a party."; break;
- case -3: debugmes "Party name exists."; break;
- default:
- sleep 1000;
- return $@party_create_id;
- }
- return 0;
- }
- OnInit:
- .n$ = "[Party Invasion]";
- .baselvl = 500;
- .joblvl = 200;
- .register_num = 2;
- .map$ = "06guild_01";
- setarray .mobs,1002,20,1113,20,1613,20,1031,20,1242,20,1096,1;
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement