Hi guys ! I need a little help with my instance settings.. This is how this should work...
#1. Party of 2 to 5 members to finish an instance. If they a player die 3x inside the instance, that player should warp out and automatically transfer the leadership (if the died player is the leader) [RANDOMLY] to any party member, so that the instance wont break. the condition is that member should be ONLINE..
#2. When creating an instance the leader and members should share the quest price. For example the party has 4 members (including leader) and the amount to get quest is 10,000 zeny .. The NPC should check if party members and also the leader have enough zeny to pay for it .. so every member should have 2,500 zeny on their wallet..
here are my sample scripts .. Im really tired, apology if I messed up
This first one is not organized yet and Im kinda confused what to do with this
switch (@menu_instance) {
case 1:
case 2:
case 3:
case 4:
if (instance_active > 0) {
mes .@name$;
mes "You have already created one. Kindly destroy instance before getting new one.";
end;
}
instance_create(.@instance_name$[@menu_instance], IM_PARTY);
set @instance_name$ , ""+.@instance_name$[@menu_instance]+"";
instance_active = 1;
break;
case 5:
mes .@name$;
mes "Are you sure you want to destroy ["+.@instance_name$[@menu_instance]+"] instance?";
switch (select("I'm 100% sure!","No, cancel it!")) {
case 1:
dispbottom "["+@instance_name$+"] instance has been destroyed.";
instance_destroy(instance_id(IM_PARTY));
specialeffect2 677;
set @instance_name$, "";
instance_active = 0;
end;
break;
case 2:
end;
}
}
Question
Eross
Hi guys ! I need a little help with my instance settings.. This is how this should work...
#1. Party of 2 to 5 members to finish an instance. If they a player die 3x inside the instance, that player should warp out and automatically transfer the leadership (if the died player is the leader) [RANDOMLY] to any party member, so that the instance wont break. the condition is that member should be ONLINE..
#2. When creating an instance the leader and members should share the quest price. For example the party has 4 members (including leader) and the amount to get quest is 10,000 zeny .. The NPC should check if party members and also the leader have enough zeny to pay for it .. so every member should have 2,500 zeny on their wallet..
here are my sample scripts .. Im really tired, apology if I messed up
This first one is not organized yet and Im kinda confused what to do with this
- script mh_ghall -1,{ OnPCDieEvent: @die_count++; if (@die_count >= 1) { .@party_id = getcharid(1); if (is_party_leader(getcharid(1))) { getpartymember .@party_id, 1; party_changeleader(getcharid(1),$@partymembercid[rand(1,$@partymembercount)]); } party_delmember(getcharid(0)); @die_count = 0; end; } end; OnPCLogoutEvent: instance_destroy(instance_id(IM_PARTY)); set @instance_name$, ""; instance_active = 0; }
This is the creating of instance NPC
switch (@menu_instance) { case 1: case 2: case 3: case 4: if (instance_active > 0) { mes .@name$; mes "You have already created one. Kindly destroy instance before getting new one."; end; } instance_create(.@instance_name$[@menu_instance], IM_PARTY); set @instance_name$ , ""+.@instance_name$[@menu_instance]+""; instance_active = 1; break; case 5: mes .@name$; mes "Are you sure you want to destroy ["+.@instance_name$[@menu_instance]+"] instance?"; switch (select("I'm 100% sure!","No, cancel it!")) { case 1: dispbottom "["+@instance_name$+"] instance has been destroyed."; instance_destroy(instance_id(IM_PARTY)); specialeffect2 677; set @instance_name$, ""; instance_active = 0; end; break; case 2: end; } }
Thankyou !
Edited by ErossLink to comment
Share on other sites
1 answer 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.