// ~~~~~ Please use this latest int__ function that support negative numbers ~~~~~
function script int__ {
.@is_negative
= charat( .@str$,
0 ) == "-";
while ( .@i > .@is_negative ) {
.@i -= 3;
}
return .@str$;
}
//===== eAthena Script ============================================
//= Mission Board
//===== By: =======================================================
//= AnnieRuru
//===== Current Version: ==========================================
//= 2.4c with debug message
//===== Compatible With: ==========================================
//= hercules & rathena 2018-04-15
//===== Description: ==============================================
//= allow admin to setup their own quests dynamically
//===== Topic =====================================================
//= http://herc.ws/board/topic/15578-mission-board-only-once-doesnt-work/
//===== Additional Comments: ======================================
//= ok I leave the debug message there in case members says its bug again
//=================================================================
- script mission board#127::ms_b_ -1,{
// ===== DEBUG MODE === SO FUCKING IRRITATED NOW !!!
// message strcharinfo(0), "===== Script Checking Part 1 START =====";
// message strcharinfo(0), "This is the current Player Variable BEFORE calculating deny usage.";
// message strcharinfo(0), getd("ms_b_n_"+ strnpcinfo(2) +"$");
// .@size = getarraysize( getd( "@ms_b_n_"+ strnpcinfo(2) ) );
// message strcharinfo(0), "Date format last access this board = "+ getd( "@ms_b_n_"+ strnpcinfo(2) +"[0]" );
// message strcharinfo(0), "And these are the missions that are deny access ... BEFORE CALCULATION";
// for ( .@i = 1; .@i < .@size; ++.@i )
// message strcharinfo(0), "Mission ID#"+ getd( "@ms_b_n_"+ strnpcinfo(2) +"["+ .@i +"]" ) +" : "+ getd("$ms_b_m_"+ getd( "@ms_b_n_"+ strnpcinfo(2) +"["+ .@i +"]" ) +"$[0]");
// message strcharinfo(0), "===== Script Checking Part 1 END =====";
// ===== DEBUG MODE END =====
mes "This board is currently down";
mes "Please report to GM";
mes "Reason: Invalid NPC ID";
}
if ( .duplicate_id ) {
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+1 ) {
mes "This board is currently down";
mes "Please report to GM";
}
}
}
if ( .loading == 1 ) {
mes "The board is currently loading mission data, please try again!";
}
if ( @ms_b_loading == 1 ) {
mes "The board is currently loading player data";
}
mes "The Mission Board will instruct you to hunt certain monsters or items. Completing missions will result into rewards such as EXP and Midgard Coins";
mes "Every player may pick up to ^FF00004^000000 missions from the Mission Board.";
mes "Missions that end with '^FF0000Slayer^000000' are kill count missions and those that end with '^FF0000Collector^000000' are item gathering missions.";
mes "^FF0000Please remember that, when accepting a mission, you need to be within the assigned level range when you ACCEPT and SUBMIT it!^000000";
for ( set .@i,
1; .@i <
= 4;
set .@i, .@i
+1 ) {
if ( getd("@ms_b_m_"+ .@i
) ) {
if ( getd("$ms_b_m_"+ getd("@ms_b_m_"+ .@i
+"[0]") +"$[0]") == "" ) {
dispbottom "Mission Board: Your Mission#"+ .@i
+" has been deleted because it is no longer available.";
setd "ms_b_m_"+ .@i
+"$",
"";
deltimer "ms_b_::OnQuest"+ .@i
+"TimeUp";
}
dispbottom "Mission #"+ .@i
+": "+ getd("$ms_b_m_"+ getd("@ms_b_m_"+ .@i
+"[0]") +"$[0]") +" has expired!";
setd "ms_b_m_"+ .@i
+"$",
"";
deltimer "ms_b_::OnQuest"+ .@i
+"TimeUp";
}
}
}
for ( set .@i,
1; .@i < .@size;
set .@i, .@i
+1 ) {
}
}
for ( set .@i,
1; .@i < .@size;
set .@i, .@i
+1 )
}
else {
}
// ===== DEBUG MODE ===
// message strcharinfo(0), "===== Script Checking Part 2 START =====";
// message strcharinfo(0), "This is the current Player Variable AFTER calculating deny usage.";
// message strcharinfo(0), getd("ms_b_n_"+ strnpcinfo(2) +"$");
// .@size = getarraysize( getd( "@ms_b_n_"+ strnpcinfo(2) ) );
// message strcharinfo(0), "Date format last access this board = "+ getd( "@ms_b_n_"+ strnpcinfo(2) +"[0]" );
// message strcharinfo(0), "And these are the missions that are deny access ... AFTER CALCULATION";
// for ( .@i = 1; .@i < .@size; ++.@i )
// message strcharinfo(0), "Mission ID#"+ getd( "@ms_b_n_"+ strnpcinfo(2) +"["+ .@i +"]" ) +" : "+ getd("$ms_b_m_"+ getd( "@ms_b_n_"+ strnpcinfo(2) +"["+ .@i +"]" ) +"$[0]");
// message strcharinfo(0), "===== Script Checking Part 2 END =====";
// ===== DEBUG MODE END =====
switch ( select ( "- Submit completed mission",
"- Drop a mission",
"- Accept a mission",
( getgmlevel() <
99 )?
"":"^FF0000Administrator Settings^000000" ) ) {
case 1:
mes "Please select the mission you wish to submit:";
"#1 "+( ( @ms_b_m_1
[0] )?
"^0000FF"+ getd("$ms_b_m_"+ @ms_b_m_1
[0] +"$[0]"):"^FF0000Empty" )+"^000000",
"#2 "+( ( @ms_b_m_2
[0] )?
"^0000FF"+ getd("$ms_b_m_"+ @ms_b_m_2
[0] +"$[0]"):"^FF0000Empty" )+"^000000",
"#3 "+( ( @ms_b_m_3
[0] )?
"^0000FF"+ getd("$ms_b_m_"+ @ms_b_m_3
[0] +"$[0]"):"^FF0000Empty" )+"^000000",
"#4 "+( ( @ms_b_m_4
[0] )?
"^0000FF"+ getd("$ms_b_m_"+ @ms_b_m_4
[0] +"$[0]"):"^FF0000Empty" )+"^000000");
if ( getd("@ms_b_m_"+ @slot
+"[0]") == 0 ) {
mes "It appears that you have selected a empty slot!";
}
mes "Are you sure you want to submit the selected mission?";
mes "Please submit this mission to:";
mes "^0000FF"+ .
ms_b_name$
[ getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[11]") ] +"^000000";
}
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 ) {
if ( getd("@ms_b_m_"+ @slot
+"["+( .@i
/2 +2 )+"]") <
getd(".ms_b_t_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ (.@i
+1)+"]") ) {
mes "You do not meet the requirements to submit this mission. Please submit the mission once you've killed the required amount of monsters!";
}
}
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 ) {
if ( countitem( getd(".ms_b_ir_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ .@i
+"]") ) <
getd(".ms_b_ir_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ (.@i
+1)+"]") ) {
mes "You do not meet the requirements to submit this mission. Please submit this mission once you've gathered the required item(s)!";
}
}
if ( getd(".ms_b_ia_"+ getd("@ms_b_m_"+ @slot
+"[0]") ) ) {
deletearray @inventorylist_amount, @inventorylist_count;
deletearray @inventorylist_equip, @inventorylist_count;
deletearray @inventorylist_refine, @inventorylist_count;
deletearray @inventorylist_identify, @inventorylist_count;
deletearray @inventorylist_attribute, @inventorylist_count;
deletearray @inventorylist_card1, @inventorylist_count;
deletearray @inventorylist_card2, @inventorylist_count;
deletearray @inventorylist_card3, @inventorylist_count;
deletearray @inventorylist_card4, @inventorylist_count;
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 ) {
set .@itemWeight, .@itemWeight
+ getiteminfo( getd(".ms_b_ia_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ .@i
+"]"),
6 ) * getd(".ms_b_ia_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ (.@i
+1) +"]");
}
if ( @inventorylist_count > 95 || Weight + .@itemWeight > MaxWeight ) {
mes "It appears that you are overWeight, please clean up some inventory space.";
set @inventorylist_count,
0;
}
set @inventorylist_count,
0;
}
if ( getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[3]") && ( BaseLevel <
getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[3]") ||
BaseLevel >
getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[4]") ) ) {
mes "You're not within the level range to submit this mission!";
}
mes "Congratulations, the mission has been completed!";
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
delitem getd(".ms_b_ir_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ .@i
+"]"),
getd(".ms_b_ir_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ (.@i
+1)+"]");
if ( getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[7]") ) {
mes "Base Exp : ^0000FF"+ callfunc("int__",
getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[7]") ) +"^000000";
set BaseExp,
BaseExp + getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[7]");
}
if ( getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[8]") ) {
mes "Job Exp : ^0000FF"+ callfunc("int__",
getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[8]") ) +"^000000";
set JobExp,
JobExp + getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[8]");
}
if ( getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[9]") ) {
mes "Zeny : ^0000FF"+ callfunc("int__",
getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[9]") ) +"^000000";
set Zeny,
Zeny + getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[9]");
}
if ( getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[10]") ) {
mes "Cash Point : ^0000FF"+ callfunc("int__",
getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[10]") ) +"^000000";
set #CASHPOINTS, #CASHPOINTS
+ getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[10]");
}
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 ) {
mes "Item : ^0000FF"+ getd(".ms_b_ia_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ (.@i
+1) +"]") +" "+ getitemname( getd(".ms_b_ia_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ .@i
+"]") ) +"^000000";
getitem getd(".ms_b_ia_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ .@i
+"]"),
getd(".ms_b_ia_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ (.@i
+1) +"]");
}
if ( getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[6]") ) {
for ( set .@i,
1; .@i <
= .@size;
set .@i, .@i
+1 )
}
setd "ms_b_m_"+ @slot
+"$",
"";
deltimer "ms_b_::OnQuest"+ @slot
+"TimeUp";
// ===== DEBUG MODE ===
// message strcharinfo(0), "===== Script Checking Part 3 START =====";
// message strcharinfo(0), "This is the current Player Variable AFTER submit a mission.";
// message strcharinfo(0), getd("ms_b_n_"+ strnpcinfo(2) +"$");
// .@size = getarraysize( getd( "@ms_b_n_"+ strnpcinfo(2) ) );
// message strcharinfo(0), "Date format last access this board = "+ getd( "@ms_b_n_"+ strnpcinfo(2) +"[0]" );
// message strcharinfo(0), "And these are the missions that are deny access ... AFTER SUBMIT a mission";
// for ( .@i = 1; .@i < .@size; ++.@i )
// message strcharinfo(0), "Mission ID#"+ getd( "@ms_b_n_"+ strnpcinfo(2) +"["+ .@i +"]" ) +" : "+ getd("$ms_b_m_"+ getd( "@ms_b_n_"+ strnpcinfo(2) +"["+ .@i +"]" ) +"$[0]");
// message strcharinfo(0), "===== Script Checking Part 3 END =====";
// ===== DEBUG MODE END =====
case 2:
mes "Please select the slot with the mission that you wish to drop:";
"#1 "+( ( @ms_b_m_1
[0] )?
"^0000FF"+ getd("$ms_b_m_"+ @ms_b_m_1
[0] +"$[0]"):"^FF0000Empty" )+"^000000",
"#2 "+( ( @ms_b_m_2
[0] )?
"^0000FF"+ getd("$ms_b_m_"+ @ms_b_m_2
[0] +"$[0]"):"^FF0000Empty" )+"^000000",
"#3 "+( ( @ms_b_m_3
[0] )?
"^0000FF"+ getd("$ms_b_m_"+ @ms_b_m_3
[0] +"$[0]"):"^FF0000Empty" )+"^000000",
"#4 "+( ( @ms_b_m_4
[0] )?
"^0000FF"+ getd("$ms_b_m_"+ @ms_b_m_4
[0] +"$[0]"):"^FF0000Empty" )+"^000000");
if ( getd("@ms_b_m_"+ @slot
+"[0]") == 0 ) {
mes "It appears that you have selected a empty slot!";
}
mes "Are you sure that you want to give up this mission?";
mes "^777777NOTE: Any progress you've made for this mission will be lost!^000000";
mes "^0000FF"+ getd("$ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"$[0]") +"^000000";
mes "Mission has given up successfully";
setd "ms_b_m_"+ @slot
+"$",
"";
deltimer "ms_b_::OnQuest"+ @slot
+"TimeUp";
case 3:
mes "Please select a (empty) slot:";
mes "There is no mission available";
}
"#1 "+( ( @ms_b_m_1
[0] )?
"^0000FF"+ getd("$ms_b_m_"+ @ms_b_m_1
[0] +"$[0]"):"^FF0000Empty" )+"^000000",
"#2 "+( ( @ms_b_m_2
[0] )?
"^0000FF"+ getd("$ms_b_m_"+ @ms_b_m_2
[0] +"$[0]"):"^FF0000Empty" )+"^000000",
"#3 "+( ( @ms_b_m_3
[0] )?
"^0000FF"+ getd("$ms_b_m_"+ @ms_b_m_3
[0] +"$[0]"):"^FF0000Empty" )+"^000000",
"#4 "+( ( @ms_b_m_4
[0] )?
"^0000FF"+ getd("$ms_b_m_"+ @ms_b_m_4
[0] +"$[0]"):"^FF0000Empty" )+"^000000");
if ( getd("@ms_b_m_"+ .@slot
+"[0]") ) {
mes "The slot that you've selected is already taken by another mission. Please select another (empty) slot!";
}
mes "Select a mission to accept below:";
mes "^00CC00Green missions^000000 are within your level range and can be accepted.";
mes "^FF0000Red missions^000000 can not be accepted. The reason(s) can be: you're not within the level range or the daily cool-down delay hasn't passed yet.";
if ( basejob == Job_Novice ||
basejob == Job_SuperNovice ) set .@
basejob,
pow(2,
0);
else if ( basejob == Job_Swordman ) set .@
basejob,
pow(2,
1);
else if ( basejob == Job_Mage ) set .@
basejob,
pow(2,
2);
else if ( basejob == Job_Archer ) set .@
basejob,
pow(2,
3);
else if ( basejob == Job_Acolyte ) set .@
basejob,
pow(2,
4);
else if ( basejob == Job_Merchant ) set .@
basejob,
pow(2,
5);
else if ( basejob == Job_Thief ) set .@
basejob,
pow(2,
6);
else if ( basejob == Job_Knight ) set .@
basejob,
pow(2,
7);
else if ( basejob == Job_Priest ) set .@
basejob,
pow(2,
8);
else if ( basejob == Job_Wizard ) set .@
basejob,
pow(2,
9);
else if ( basejob == Job_Blacksmith ) set .@
basejob,
pow(2,
10);
else if ( basejob == Job_Hunter ) set .@
basejob,
pow(2,
11);
else if ( basejob == Job_Assassin ) set .@
basejob,
pow(2,
12);
else if ( basejob == Job_Crusader ) set .@
basejob,
pow(2,
13);
else if ( basejob == Job_Monk ) set .@
basejob,
pow(2,
14);
else if ( basejob == Job_Sage ) set .@
basejob,
pow(2,
15);
else if ( basejob == Job_Rogue ) set .@
basejob,
pow(2,
16);
else if ( basejob == Job_Alchemist ) set .@
basejob,
pow(2,
17);
else if ( basejob == Job_Bard ||
basejob == Job_Dancer ) set .@
basejob,
pow(2,
18);
else if ( basejob == Job_Taekwon ) set .@
basejob,
pow(2,
19);
else if ( basejob == Job_Star_Gladiator ) set .@
basejob,
pow(2,
20);
else if ( basejob == Job_Soul_Linker ) set .@
basejob,
pow(2,
21);
else if ( basejob == Job_Gunslinger ) set .@
basejob,
pow(2,
22);
else if ( basejob == Job_Ninja ) set .@
basejob,
pow(2,
23);
while (1) {
while ( .@i < .@size1 ) {
if ( .@j != .@size2 && .@size2 ||
}
mes "^0000FF"+ getd("$ms_b_m_"+ .@m_id
+"$[0]") +"^000000";
mes "Description: ^0000FF"+ getd("$ms_b_m_"+ .@m_id
+"$[1]") +"^000000";
if ( getd(".ms_b_m_"+ .@m_id
+"[6]") ) {
for ( set .@i,
1; .@i < .@size2;
set .@i, .@i
+1 ) {
}
mes "Status : "+( ( .@i
== .@size2 ||
getd("@ms_b_n_"+ strnpcinfo(2)) == 0 )?
"^FF0000Incomplete":"^00CC00Completed" )+"^000000";
}
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Require Mobs : ^0000FF"+ getd(".ms_b_t_"+ .@m_id
+"["+ (.@i
+1) +"]") +" "+ getmonsterinfo( getd(".ms_b_t_"+ .@m_id
+"["+ .@i
+"]") ,
0) +"^000000";
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Require Items : ^0000FF"+ getd(".ms_b_ir_"+ .@m_id
+"["+ (.@i
+1) +"]") +" "+ getitemname( getd(".ms_b_ir_"+ .@m_id
+"["+ .@i
+"]") ) +"^000000";
if ( getd(".ms_b_m_"+ .@m_id
+"[6]") ||
getd(".ms_b_m_"+ .@m_id
+"[3]") ||
getd(".ms_b_m_"+ .@m_id
+"[5]") ||
getd(".ms_b_m_"+ .@m_id
+"[2]") ) {
mes "[^FF0000Limitations^000000]";
if ( getd(".ms_b_m_"+ .@m_id
+"[6]") )
mes "Can do : "+( ( getd(".ms_b_m_"+ .@m_id
+"[6]") == 1 )?
"^00CC00Everyday":"^FF0000Only Once" )+"^000000";
if ( getd(".ms_b_m_"+ .@m_id
+"[3]") )
mes "Base Level :"+( ( getd(".ms_b_m_"+ .@m_id
+"[3]") )?
" ^0000FF"+ getd(".ms_b_m_"+ .@m_id
+"[3]") +( ( getd(".ms_b_m_"+ .@m_id
+"[3]") != getd(".ms_b_m_"+ .@m_id
+"[4]") )?
"~"+ getd(".ms_b_m_"+ .@m_id
+"[4]"):"" )+"^000000":"" );
if ( getd(".ms_b_m_"+ .@m_id
+"[5]") )
mes "Time Limit : ^FF0000"+( ( getd(".ms_b_m_"+ .@m_id
+"[5]") /60 )?
getd(".ms_b_m_"+ .@m_id
+"[5]") /60 +" hour"+( ( getd(".ms_b_m_"+ .@m_id
+"[5]") %60
)?
" ":"" ):"" )+( ( getd(".ms_b_m_"+ .@m_id
+"[5]") %60
)?
getd(".ms_b_m_"+ .@m_id
+"[5]") %60
+" min":"" )+"^000000";
if ( getd(".ms_b_m_"+ .@m_id
+"[2]") ) {
for ( set .@i,
0; .@i <
24;
set .@i, .@i
+1 ) {
if ( getd(".ms_b_m_"+ .@m_id
+"[2]") & pow( 2, .@i
) ) {
}
}
for ( set .@i,
1; .@i < .@size;
set .@i, .@i
+1 )
set .@joblimit$, .@joblimit$
+", "+ .
jobname$
[ .@joblimit
[.@i
] -1 ];
mes "Job Limit : ^00CC00"+ .@joblimit$
+"^000000";
}
}
mes "[^009900Rewards^000000]";
if ( getd(".ms_b_m_"+ .@m_id
+"[7]") )
mes "Base Exp : ^0000FF"+ callfunc("int__",
getd(".ms_b_m_"+ .@m_id
+"[7]") ) +"^000000";
if ( getd(".ms_b_m_"+ .@m_id
+"[8]") )
mes "Job Exp : ^0000FF"+ callfunc("int__",
getd(".ms_b_m_"+ .@m_id
+"[8]") ) +"^000000";
if ( getd(".ms_b_m_"+ .@m_id
+"[9]") )
mes "Zeny : ^0000FF"+ callfunc("int__",
getd(".ms_b_m_"+ .@m_id
+"[9]") ) +"^000000";
if ( getd(".ms_b_m_"+ .@m_id
+"[10]") )
mes "Cash Point : ^0000FF"+ callfunc("int__",
getd(".ms_b_m_"+ .@m_id
+"[10]") ) +"^000000";
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Item : ^0000FF"+ getd(".ms_b_ia_"+ .@m_id
+"["+ (.@i
+1) +"]") +" "+ getitemname( getd(".ms_b_ia_"+ .@m_id
+"["+ .@i
+"]") ) +"^000000";
if ( select ( "- Accept this mission",
"- Pick another mission" ) == 1 ) {
for ( set .@i,
1; .@i < .@size2;
set .@i, .@i
+1 ) {
mes "It appears that you have already completed this mission. This mission can either only be completed once, or the daily cool-down delay hasn't passed yet!";
}
}
if ( .@
break == 0 && ( @ms_b_m_1
[0] == .@m_id || @ms_b_m_2
[0] == .@m_id || @ms_b_m_3
[0] == .@m_id || @ms_b_m_4
[0] == .@m_id
) ) {
mes "You already taken this mission";
}
if ( .@
break == 0 && getd(".ms_b_m_"+ .@m_id
+"[3]") && ( BaseLevel <
getd(".ms_b_m_"+ .@m_id
+"[3]") ||
BaseLevel >
getd(".ms_b_m_"+ .@m_id
+"[4]") ) ) {
mes "You're not within the level range to accept this mission!";
}
if ( .@
break == 0 && getd(".ms_b_m_"+ .@m_id
+"[2]") ) {
if ( getd(".ms_b_m_"+ .@m_id
+"[2]") & .@
basejob == 0 ) {
mes "Your current job class is not allowed to do this mission";
}
}
}
}
mes "You have accepted the following mission:";
mes "^0000FF"+ getd("$ms_b_m_"+ .@m_id
+"$[0]") +"^000000";
if ( getd(".ms_b_m_"+ .@m_id
+"[5]") ) {
mes "Time Left : ^FF0000"+( ( getd(".ms_b_m_"+ .@m_id
+"[5]") /60 )?
getd(".ms_b_m_"+ .@m_id
+"[5]") /60 +" hour"+( ( getd(".ms_b_m_"+ .@m_id
+"[5]") %60
)?
" ":"" ):"" )+( ( getd(".ms_b_m_"+ .@m_id
+"[5]") %60
)?
getd(".ms_b_m_"+ .@m_id
+"[5]") %60
+" min":"" )+"^000000";
addtimer getd(".ms_b_m_"+ .@m_id
+"[5]") * 60 * 1000,
"ms_b_::OnQuest"+ .@slot
+"TimeUp";
}
setd "@ms_b_m_"+ .@slot
+"[0]", .@m_id;
setd "ms_b_m_"+ .@slot
+"$",
getd("@ms_b_m_"+ .@slot
+"[0]") +"#"+ getd("@ms_b_m_"+ .@slot
+"[1]");
case 4:
while (1) {
mes "Please select an option below:";
switch ( select ( "Setup a mission",
"Edit a mission",
"Remove a mission",
"Swap mission order" ) ) {
case 1:
if ( $ms_b_id >= 99999 ) {
mes "This is the end, you can't create anymore missions";
}
mes "Each NPC are only allowed to setup 40 missions";
}
if ( callsub( L_setupmission,
0 ) == 0 ) {
}
set $ms_b_id, $ms_b_id
+1 ;
for ( set .@i,
1; .@i < .@size;
set .@i, .@i
+1 )
@tmp_ms_b_m_$[0],
@tmp_ms_b_m_$[1],
( ( @tmp_ms_b_m_[2] )?@tmp_ms_b_m_[2]:"" )+"#"+( ( @tmp_ms_b_m_[3] )?@tmp_ms_b_m_[3]:"" )+"#"+( ( @tmp_ms_b_m_[4] )?@tmp_ms_b_m_[4]:"" )+"#"+( ( @tmp_ms_b_m_[5] )?@tmp_ms_b_m_[5]:"" )+"#"+( ( @tmp_ms_b_m_[6] )?@tmp_ms_b_m_[6]:"" )+"#"+( ( @tmp_ms_b_m_[7] )?@tmp_ms_b_m_[7]:"" )+"#"+( ( @tmp_ms_b_m_[8] )?@tmp_ms_b_m_[8]:"" )+"#"+( ( @tmp_ms_b_m_[9] )?@tmp_ms_b_m_[9]:"" )+"#"+( ( @tmp_ms_b_m_[10] )?@tmp_ms_b_m_[10]:"" )+"#"+( ( @tmp_ms_b_m_[11] )?@tmp_ms_b_m_[11]:"" )+"#"+( ( @tmp_ms_b_m_[12] )?@tmp_ms_b_m_[12]:"" )+"#"+( ( @tmp_ms_b_m_[13] )?@tmp_ms_b_m_[13]:"" ),
( ( @tmp_ms_b_t_[0] )?@tmp_ms_b_t_[0]:"" )+"#"+( ( @tmp_ms_b_t_[1] )?@tmp_ms_b_t_[1]:"" )+"#"+( ( @tmp_ms_b_t_[2] )?@tmp_ms_b_t_[2]:"" )+"#"+( ( @tmp_ms_b_t_[3] )?@tmp_ms_b_t_[3]:"" )+"#"+( ( @tmp_ms_b_t_[4] )?@tmp_ms_b_t_[4]:"" )+"#"+( ( @tmp_ms_b_t_[5] )?@tmp_ms_b_t_[5]:"" )+"#"+( ( @tmp_ms_b_t_[6] )?@tmp_ms_b_t_[6]:"" )+"#"+( ( @tmp_ms_b_t_[7] )?@tmp_ms_b_t_[7]:"" )+"#"+( ( @tmp_ms_b_t_[8] )?@tmp_ms_b_t_[8]:"" )+"#"+( ( @tmp_ms_b_t_[9] )?@tmp_ms_b_t_[9]:"" )+"#"+( ( @tmp_ms_b_t_[10] )?@tmp_ms_b_t_[10]:"" )+"#"+( ( @tmp_ms_b_t_[11] )?@tmp_ms_b_t_[11]:"" )+"#"+( ( @tmp_ms_b_t_[12] )?@tmp_ms_b_t_[12]:"" )+"#"+( ( @tmp_ms_b_t_[13] )?@tmp_ms_b_t_[13]:"" )+"#"+( ( @tmp_ms_b_t_[14] )?@tmp_ms_b_t_[14]:"" )+"#"+( ( @tmp_ms_b_t_[15] )?@tmp_ms_b_t_[15]:"" )+"#"+( ( @tmp_ms_b_ir_[0] )?@tmp_ms_b_ir_[0]:"" )+"#"+( ( @tmp_ms_b_ir_[1] )?@tmp_ms_b_ir_[1]:"" )+"#"+( ( @tmp_ms_b_ir_[2] )?@tmp_ms_b_ir_[2]:"" )+"#"+( ( @tmp_ms_b_ir_[3] )?@tmp_ms_b_ir_[3]:"" )+"#"+( ( @tmp_ms_b_ir_[4] )?@tmp_ms_b_ir_[4]:"" )+"#"+( ( @tmp_ms_b_ir_[5] )?@tmp_ms_b_ir_[5]:"" )+"#"+( ( @tmp_ms_b_ir_[6] )?@tmp_ms_b_ir_[6]:"" )+"#"+( ( @tmp_ms_b_ir_[7] )?@tmp_ms_b_ir_[7]:"" )+"#"+( ( @tmp_ms_b_ir_[8] )?@tmp_ms_b_ir_[8]:"" )+"#"+( ( @tmp_ms_b_ir_[9] )?@tmp_ms_b_ir_[9]:"" )+"#"+( ( @tmp_ms_b_ia_[0] )?@tmp_ms_b_ia_[0]:"" )+"#"+( ( @tmp_ms_b_ia_[1] )?@tmp_ms_b_ia_[1]:"" )+"#"+( ( @tmp_ms_b_ia_[2] )?@tmp_ms_b_ia_[2]:"" )+"#"+( ( @tmp_ms_b_ia_[3] )?@tmp_ms_b_ia_[3]:"" )+"#"+( ( @tmp_ms_b_ia_[4] )?@tmp_ms_b_ia_[4]:"" )+"#"+( ( @tmp_ms_b_ia_[5] )?@tmp_ms_b_ia_[5]:"" )+"#"+( ( @tmp_ms_b_ia_[6] )?@tmp_ms_b_ia_[6]:"" )+"#"+( ( @tmp_ms_b_ia_[7] )?@tmp_ms_b_ia_[7]:"" )+"#"+( ( @tmp_ms_b_ia_[8] )?@tmp_ms_b_ia_[8]:"" )+"#"+( ( @tmp_ms_b_ia_[9] )?@tmp_ms_b_ia_[9]:"" );
mes "Mission has setup successfully";
case 2:
mes "There is no mission available to edit.";
}
mes "Select a mission below to edit:";
else if ( getd(".ms_b_m_"+ getd(".ms_b_n_"+ strnpcinfo(2) +"[0]") +"[6]") == 1 ) set .@color$,
"^00CC00";
else if ( getd(".ms_b_m_"+ getd(".ms_b_n_"+ strnpcinfo(2) +"[0]") +"[6]") == 2 ) set .@color$,
"^FF0000";
for ( set .@i,
1; .@i < .@size;
set .@i, .@i
+1 ) {
if ( getd(".ms_b_m_"+ getd(".ms_b_n_"+ strnpcinfo(2) +"["+ .@i
+"]") +"[6]") == 0 ) set .@color$,
"^0000FF";
else if ( getd(".ms_b_m_"+ getd(".ms_b_n_"+ strnpcinfo(2) +"["+ .@i
+"]") +"[6]") == 1 ) set .@color$,
"^00CC00";
else if ( getd(".ms_b_m_"+ getd(".ms_b_n_"+ strnpcinfo(2) +"["+ .@i
+"]") +"[6]") == 2 ) set .@color$,
"^FF0000";
}
if ( callsub( L_setupmission,
1 ) == 0 ) {
}
@tmp_ms_b_m_$[0],
@tmp_ms_b_m_$[1],
( ( @tmp_ms_b_m_[2] )?@tmp_ms_b_m_[2]:"" )+"#"+( ( @tmp_ms_b_m_[3] )?@tmp_ms_b_m_[3]:"" )+"#"+( ( @tmp_ms_b_m_[4] )?@tmp_ms_b_m_[4]:"" )+"#"+( ( @tmp_ms_b_m_[5] )?@tmp_ms_b_m_[5]:"" )+"#"+( ( @tmp_ms_b_m_[6] )?@tmp_ms_b_m_[6]:"" )+"#"+( ( @tmp_ms_b_m_[7] )?@tmp_ms_b_m_[7]:"" )+"#"+( ( @tmp_ms_b_m_[8] )?@tmp_ms_b_m_[8]:"" )+"#"+( ( @tmp_ms_b_m_[9] )?@tmp_ms_b_m_[9]:"" )+"#"+( ( @tmp_ms_b_m_[10] )?@tmp_ms_b_m_[10]:"" )+"#"+( ( @tmp_ms_b_m_[11] )?@tmp_ms_b_m_[11]:"" )+"#"+( ( @tmp_ms_b_m_[12] )?@tmp_ms_b_m_[12]:"" )+"#"+( ( @tmp_ms_b_m_[13] )?@tmp_ms_b_m_[13]:"" ),
( ( @tmp_ms_b_t_[0] )?@tmp_ms_b_t_[0]:"" )+"#"+( ( @tmp_ms_b_t_[1] )?@tmp_ms_b_t_[1]:"" )+"#"+( ( @tmp_ms_b_t_[2] )?@tmp_ms_b_t_[2]:"" )+"#"+( ( @tmp_ms_b_t_[3] )?@tmp_ms_b_t_[3]:"" )+"#"+( ( @tmp_ms_b_t_[4] )?@tmp_ms_b_t_[4]:"" )+"#"+( ( @tmp_ms_b_t_[5] )?@tmp_ms_b_t_[5]:"" )+"#"+( ( @tmp_ms_b_t_[6] )?@tmp_ms_b_t_[6]:"" )+"#"+( ( @tmp_ms_b_t_[7] )?@tmp_ms_b_t_[7]:"" )+"#"+( ( @tmp_ms_b_t_[8] )?@tmp_ms_b_t_[8]:"" )+"#"+( ( @tmp_ms_b_t_[9] )?@tmp_ms_b_t_[9]:"" )+"#"+( ( @tmp_ms_b_t_[10] )?@tmp_ms_b_t_[10]:"" )+"#"+( ( @tmp_ms_b_t_[11] )?@tmp_ms_b_t_[11]:"" )+"#"+( ( @tmp_ms_b_t_[12] )?@tmp_ms_b_t_[12]:"" )+"#"+( ( @tmp_ms_b_t_[13] )?@tmp_ms_b_t_[13]:"" )+"#"+( ( @tmp_ms_b_t_[14] )?@tmp_ms_b_t_[14]:"" )+"#"+( ( @tmp_ms_b_t_[15] )?@tmp_ms_b_t_[15]:"" )+"#"+( ( @tmp_ms_b_ir_[0] )?@tmp_ms_b_ir_[0]:"" )+"#"+( ( @tmp_ms_b_ir_[1] )?@tmp_ms_b_ir_[1]:"" )+"#"+( ( @tmp_ms_b_ir_[2] )?@tmp_ms_b_ir_[2]:"" )+"#"+( ( @tmp_ms_b_ir_[3] )?@tmp_ms_b_ir_[3]:"" )+"#"+( ( @tmp_ms_b_ir_[4] )?@tmp_ms_b_ir_[4]:"" )+"#"+( ( @tmp_ms_b_ir_[5] )?@tmp_ms_b_ir_[5]:"" )+"#"+( ( @tmp_ms_b_ir_[6] )?@tmp_ms_b_ir_[6]:"" )+"#"+( ( @tmp_ms_b_ir_[7] )?@tmp_ms_b_ir_[7]:"" )+"#"+( ( @tmp_ms_b_ir_[8] )?@tmp_ms_b_ir_[8]:"" )+"#"+( ( @tmp_ms_b_ir_[9] )?@tmp_ms_b_ir_[9]:"" )+"#"+( ( @tmp_ms_b_ia_[0] )?@tmp_ms_b_ia_[0]:"" )+"#"+( ( @tmp_ms_b_ia_[1] )?@tmp_ms_b_ia_[1]:"" )+"#"+( ( @tmp_ms_b_ia_[2] )?@tmp_ms_b_ia_[2]:"" )+"#"+( ( @tmp_ms_b_ia_[3] )?@tmp_ms_b_ia_[3]:"" )+"#"+( ( @tmp_ms_b_ia_[4] )?@tmp_ms_b_ia_[4]:"" )+"#"+( ( @tmp_ms_b_ia_[5] )?@tmp_ms_b_ia_[5]:"" )+"#"+( ( @tmp_ms_b_ia_[6] )?@tmp_ms_b_ia_[6]:"" )+"#"+( ( @tmp_ms_b_ia_[7] )?@tmp_ms_b_ia_[7]:"" )+"#"+( ( @tmp_ms_b_ia_[8] )?@tmp_ms_b_ia_[8]:"" )+"#"+( ( @tmp_ms_b_ia_[9] )?@tmp_ms_b_ia_[9]:"" );
mes "Mission has edited successfully";
case 3:
mes "There is no mission available to remove.";
}
mes "Select a mission below to delete:";
else if ( getd(".ms_b_m_"+ getd(".ms_b_n_"+ strnpcinfo(2) +"[0]") +"[6]") == 1 ) set .@color$,
"^00CC00";
else if ( getd(".ms_b_m_"+ getd(".ms_b_n_"+ strnpcinfo(2) +"[0]") +"[6]") == 2 ) set .@color$,
"^FF0000";
for ( set .@i,
1; .@i < .@size;
set .@i, .@i
+1 ) {
if ( getd(".ms_b_m_"+ getd(".ms_b_n_"+ strnpcinfo(2) +"["+ .@i
+"]") +"[6]") == 0 ) set .@color$,
"^0000FF";
else if ( getd(".ms_b_m_"+ getd(".ms_b_n_"+ strnpcinfo(2) +"["+ .@i
+"]") +"[6]") == 1 ) set .@color$,
"^00CC00";
else if ( getd(".ms_b_m_"+ getd(".ms_b_n_"+ strnpcinfo(2) +"["+ .@i
+"]") +"[6]") == 2 ) set .@color$,
"^FF0000";
}
mes "Are you sure that you want to delete the selected mission?";
if ( getd(".ms_b_m_"+ .@m_id
+"[6]") == 0 ) set .@color$,
"^0000FF";
else if ( getd(".ms_b_m_"+ .@m_id
+"[6]") == 1 ) set .@color$,
"^00CC00";
else if ( getd(".ms_b_m_"+ .@m_id
+"[6]") == 2 ) set .@color$,
"^FF0000";
mes "^996600"+ .@m_id
+". "+ .@color$
+ getd("$ms_b_m_"+ .@m_id
+"$") +"^000000";
mes "Description: ^0000FF"+ getd("$ms_b_m_"+ .@m_id
+"$[1]") +"^000000";
mes "Mission has deleted successfully";
mes "^996600"+ .@m_id
+". "+ .@color$
+ getd("$ms_b_m_"+ .@m_id
+"$") +"^000000";
for ( set .@i,
1; .@i < .@size;
set .@i, .@i
+1 )
case 4:
mes "There is no mission available to swap";
}
mes "Select a mission below to swap:";
else if ( getd(".ms_b_m_"+ getd(".ms_b_n_"+ strnpcinfo(2) +"[0]") +"[6]") == 1 ) set .@color$,
"^00CC00";
else if ( getd(".ms_b_m_"+ getd(".ms_b_n_"+ strnpcinfo(2) +"[0]") +"[6]") == 2 ) set .@color$,
"^FF0000";
for ( set .@i,
1; .@i < .@size;
set .@i, .@i
+1 ) {
if ( getd(".ms_b_m_"+ getd(".ms_b_n_"+ strnpcinfo(2) +"["+ .@i
+"]") +"[6]") == 0 ) set .@color$,
"^0000FF";
else if ( getd(".ms_b_m_"+ getd(".ms_b_n_"+ strnpcinfo(2) +"["+ .@i
+"]") +"[6]") == 1 ) set .@color$,
"^00CC00";
else if ( getd(".ms_b_m_"+ getd(".ms_b_n_"+ strnpcinfo(2) +"["+ .@i
+"]") +"[6]") == 2 ) set .@color$,
"^FF0000";
}
mes "mission selected :";
if ( getd(".ms_b_m_"+ .@m_id1
+"[6]") == 0 ) set .@color1$,
"^0000FF";
else if ( getd(".ms_b_m_"+ .@m_id1
+"[6]") == 1 ) set .@color1$,
"^00CC00";
else if ( getd(".ms_b_m_"+ .@m_id1
+"[6]") == 2 ) set .@color1$,
"^FF0000";
mes "^996600"+ .@m_id1
+". "+ .@color1$
+ getd("$ms_b_m_"+ .@m_id1
+"$") +"^000000";
mes "Please select another mission to be swapped:";
if ( .@menu2
== .@size
) break;
mes "Missions has swapped successfully";
if ( getd(".ms_b_m_"+ .@m_id2
+"[6]") == 0 ) set .@color2$,
"^0000FF";
else if ( getd(".ms_b_m_"+ .@m_id2
+"[6]") == 1 ) set .@color2$,
"^00CC00";
else if ( getd(".ms_b_m_"+ .@m_id2
+"[6]") == 2 ) set .@color2$,
"^FF0000";
mes "^996600"+ .@m_id1
+". "+ .@color1$
+ getd("$ms_b_m_"+ .@m_id1
+"$") +"^000000";
mes "^996600"+ .@m_id2
+". "+ .@color2$
+ getd("$ms_b_m_"+ .@m_id2
+"$") +"^000000";
for ( set .@i,
1; .@i < .@size;
set .@i, .@i
+1 )
}
}
}
OnQuest1TimeUp:
dispbottom "Mission #1: "+ getd("$ms_b_m_"+ @ms_b_m_1
[0] +"$[0]") +" has Time Up";
OnQuest2TimeUp:
dispbottom "Mission #2: "+ getd("$ms_b_m_"+ @ms_b_m_2
[0] +"$[0]") +" has Time Up";
OnQuest3TimeUp:
dispbottom "Mission #3: "+ getd("$ms_b_m_"+ @ms_b_m_3
[0] +"$[0]") +" has Time Up";
OnQuest4TimeUp:
dispbottom "Mission #4: "+ getd("$ms_b_m_"+ @ms_b_m_4
[0] +"$[0]") +" has Time Up";
L_showprogress:
mes "^0000FF"+ getd("$ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"$[0]") +"^000000";
mes "Description: ^0000FF"+ getd("$ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"$[1]") +"^000000";
mes "[^804000Mission Progress^000000]";
if ( getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[5]") ) {
set .@hour, .@left
/ 3600;
set .@min, .@left
% 3600 / 60;
mes "Time Left: ^FF0000"+( ( .@hour
)?.@hour
+" hour ":"" )+( ( .@hour || .@min
)?.@min
+" min ":"" )+ .@sec
+" sec^000000";
}
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Mobs : ^0000FF"+ getmonsterinfo( getd(".ms_b_t_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ .@i
+"]") ,
0) +"^000000 ["+( ( getd("@ms_b_m_"+ @slot
+"["+( .@i
/2 +2 )+"]") >
getd(".ms_b_t_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ (.@i
+1) +"]") )?
getd(".ms_b_t_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ (.@i
+1) +"]"):getd("@ms_b_m_"+ @slot
+"["+( .@i
/2 +2 )+"]") ) +"/"+ getd(".ms_b_t_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ (.@i
+1) +"]") +"]";
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Items : ^0000FF"+ getitemname( getd(".ms_b_ir_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ .@i
+"]") ) +"^000000 ["+ countitem( getd(".ms_b_ir_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ .@i
+"]") ) +"/"+ getd(".ms_b_ir_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ (.@i
+1) +"]") +"]";
mes "[^009900Rewards^000000]";
if ( getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[7]") )
mes "Base Exp : ^0000FF"+ callfunc("int__",
getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[7]") ) +"^000000";
if ( getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[8]") )
mes "Job Exp : ^0000FF"+ callfunc("int__",
getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[8]") ) +"^000000";
if ( getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[9]") )
mes "Zeny : ^0000FF"+ callfunc("int__",
getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[9]") ) +"^000000";
if ( getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[10]") )
mes "Cash Point : ^0000FF"+ callfunc("int__",
getd(".ms_b_m_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"[10]") ) +"^000000";
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Item : ^0000FF"+ getd(".ms_b_ia_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ (.@i
+1) +"]") +" "+ getitemname( getd(".ms_b_ia_"+ getd("@ms_b_m_"+ @slot
+"[0]") +"["+ .@i
+"]") ) +"^000000";
return;
L_setupmission:
while (1) {
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
mes "Description: "+( ( @tmp_ms_b_m_$
[1] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[1]:"^FF0000Incomplete" )+"^000000";
if ( @tmp_ms_b_t_ == 0 && @tmp_ms_b_ir_ == 0 )
mes "Require mobs : ^FF0000Incomplete^000000";
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Require mobs : ^0000FF"+ @tmp_ms_b_t_
[.@i
+1] +" "+ getmonsterinfo(@tmp_ms_b_t_
[.@i
],
0) +"^000000";
if ( @tmp_ms_b_t_ == 0 && @tmp_ms_b_ir_ == 0 )
mes "Require items : ^FF0000Incomplete^000000";
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Require items : ^0000FF"+ @tmp_ms_b_ir_
[.@i
+1] +" "+ getitemname(@tmp_ms_b_ir_
[.@i
]) +"^000000";
if ( @tmp_ms_b_m_[6] || @tmp_ms_b_m_[3] || @tmp_ms_b_m_[5] || @tmp_ms_b_m_[2] ) {
mes "[^FF0000Limitations^000000]";
if ( @tmp_ms_b_m_[6] )
mes "Can do : "+( ( @tmp_ms_b_m_
[6] == 1 )?
"^00CC00Everyday":"^FF0000Only Once" )+"^000000";
if ( @tmp_ms_b_m_[3] )
mes "Base Level :"+( ( @tmp_ms_b_m_
[3] )?
" ^0000FF"+ @tmp_ms_b_m_
[3] +( ( @tmp_ms_b_m_
[3] != @tmp_ms_b_m_
[4] )?
"~"+ @tmp_ms_b_m_
[4]:"" )+"^000000":"" );
if ( @tmp_ms_b_m_[5] )
mes "Time Limit : ^FF0000"+( ( @tmp_ms_b_m_
[5] /60 )?@tmp_ms_b_m_
[5] /60 +" hour"+( ( @tmp_ms_b_m_
[5] %60
)?
" ":"" ):"" )+( ( @tmp_ms_b_m_
[5] %60
)?@tmp_ms_b_m_
[5] %60
+" min":"" )+"^000000";
if ( @tmp_ms_b_m_[2] ) {
for ( set .@i,
0; .@i <
24;
set .@i, .@i
+1 ) {
if ( @tmp_ms_b_m_
[2] & pow( 2, .@i
) ) {
}
}
for ( set .@i,
1; .@i < .@size;
set .@i, .@i
+1 )
set .@joblimit$, .@joblimit$
+", "+ .
jobname$
[ .@joblimit
[.@i
] -1 ];
mes "Job Limit : ^00CC00"+ .@joblimit$
+"^000000";
}
}
mes "[^009900Rewards^000000]";
if ( @tmp_ms_b_m_[7] || @tmp_ms_b_m_[8] || @tmp_ms_b_m_[9] || @tmp_ms_b_m_[10] || @tmp_ms_b_ia_ )
else {
mes "^FF0000Incomplete^000000";
set .@color_reward$,
" - ^FF0000Incomplete^000000";
}
if ( @tmp_ms_b_m_[7] )
mes "Base Exp : ^0000FF"+ callfunc("int__", @tmp_ms_b_m_
[7] ) +"^000000";
if ( @tmp_ms_b_m_[8] )
mes "Job Exp : ^0000FF"+ callfunc("int__", @tmp_ms_b_m_
[8] ) +"^000000";
if ( @tmp_ms_b_m_[9] )
mes "Zeny : ^0000FF"+ callfunc("int__", @tmp_ms_b_m_
[9] ) +"^000000";
if ( @tmp_ms_b_m_[10] )
mes "Cash Point : ^0000FF"+ callfunc("int__", @tmp_ms_b_m_
[10] ) +"^000000";
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Item : ^0000FF"+ @tmp_ms_b_ia_
[.@i
+1] +" "+ getitemname(@tmp_ms_b_ia_
[.@i
]) +"^000000";
if ( @tmp_ms_b_m_$[0] != "" && @tmp_ms_b_m_$[1] != "" && ( @tmp_ms_b_t_ || @tmp_ms_b_ir_ ) &&
( @tmp_ms_b_m_[7] || @tmp_ms_b_m_[8] || @tmp_ms_b_m_[9] || @tmp_ms_b_m_[10] || @tmp_ms_b_ia_ ) )
set .@color_all$,
"^00CC00";
else
set .@color_all$,
"^FF0000";
"Important Settings"+( ( @tmp_ms_b_m_$[0] != "" && @tmp_ms_b_m_$[1] != "" && ( @tmp_ms_b_t_ || @tmp_ms_b_ir_ ) )?"":" - ^FF0000Incomplete^000000" ),
"Mission Limitations",
"Rewards"+ .@color_reward$,
.@color_all$
+"Complete "+( ( getarg(0) )?
"Edit":"Setup" )+"^000000",
"- back" );
switch ( .@setupmenu ) {
case 1:
while (1) {
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
mes "Description: "+( ( @tmp_ms_b_m_$
[1] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[1]:"^FF0000Incomplete" )+"^000000";
if ( @tmp_ms_b_t_ == 0 && @tmp_ms_b_ir_ == 0 )
mes "Require mobs : ^FF0000Incomplete^000000";
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Require mobs : ^0000FF"+ @tmp_ms_b_t_
[.@i
+1] +" "+ getmonsterinfo(@tmp_ms_b_t_
[.@i
],
0) +"^000000";
if ( @tmp_ms_b_t_ == 0 && @tmp_ms_b_ir_ == 0 )
mes "Require items : ^FF0000Incomplete^000000";
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Require items : ^0000FF"+ @tmp_ms_b_ir_
[.@i
+1] +" "+ getitemname(@tmp_ms_b_ir_
[.@i
]) +"^000000";
"Mission Name"+( ( @tmp_ms_b_m_$[0] != "" )?"":" - ^FF0000Incomplete^000000" ),
"Description"+( ( @tmp_ms_b_m_$[1] != "" )?"":" - ^FF0000Incomplete^000000" ),
"Require Mobs",
"Require Items",
"- back" );
switch ( .@importantmenu ) {
case 1:
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
mes "Input the mission name";
mes "Mission name must not more than 60 characters";
}
mes "Mission name must not allow to use these symbols";
}
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
mes "Description: "+( ( @tmp_ms_b_m_$
[1] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[1]:"^FF0000Incomplete" )+"^000000";
mes "Are you sure to change the name to";
mes "^0000FF"+ .@tmp$
+"^000000";
set @tmp_ms_b_m_$
[0], .@tmp$;
case 2:
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
mes "Description: "+( ( @tmp_ms_b_m_$
[1] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[1]:"^FF0000Incomplete" )+"^000000";
mes "Input the descriptions";
do {
} while ( getstrlen( getd(".@tmp"+ .@tmp
+"$") ) >
50 && .@tmp <
3 );
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
mes "Description: "+( ( @tmp_ms_b_m_$
[1] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[1]:"^FF0000Incomplete" )+"^000000";
mes "Are you sure to change description to";
mes "^0000FF"+ .@tmp1$
+ .@tmp2$
+ .@tmp3$
+"^000000";
set @tmp_ms_b_m_$
[1], .@tmp1$
+ .@tmp2$
+ .@tmp3$;
case 3:
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
mes "Require Mobs are not allow to edit";
}
while (1) {
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
if ( @tmp_ms_b_t_ == 0 )
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Require mobs : ^0000FF"+ @tmp_ms_b_t_
[.@i
+1] +" "+ getmonsterinfo(@tmp_ms_b_t_
[.@i
],
0) +"^000000";
set .@mobmenu,
select ( "Add a monster requirement",
"Remove a monster requirement",
"- back" );
switch ( .@mobmenu ) {
case 1:
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
if ( @tmp_ms_b_t_ == 0 )
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Require mobs : ^0000FF"+ @tmp_ms_b_t_
[.@i
+1] +" "+ getmonsterinfo(@tmp_ms_b_t_
[.@i
],
0) +"^000000";
if ( .@size == 16 ) {
mes "Require mobs are only allow up to 8 different kinds";
}
if ( .@tmp == 0 ) {
mes "Invalid monster ID";
}
mes "Invalid monster ID";
}
if ( @tmp_ms_b_t_ == 0 )
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Require mobs : ^0000FF"+ @tmp_ms_b_t_
[.@i
+1] +" "+ getmonsterinfo(@tmp_ms_b_t_
[.@i
],
0) +"^000000";
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 ) {
if ( .@tmp
== @tmp_ms_b_t_
[.@i
] ) break;
}
if ( .@i != .@size ) {
}
mes "Input an amount need to be hunt";
if ( .@tmp2 == 0 ) {
}
else
setarray @tmp_ms_b_t_
[ .@size
], .@tmp, .@tmp2;
case 2:
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
if ( @tmp_ms_b_t_ == 0 ) {
mes "There are no monster to remove";
}
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Require mobs : ^0000FF"+ @tmp_ms_b_t_
[.@i
+1] +" "+ getmonsterinfo(@tmp_ms_b_t_
[.@i
],
0) +"^000000";
mes "Select a mob to delete";
for ( set .@i,
2; .@i < .@size;
set .@i, .@i
+2 )
case 3:
}
if ( .@mobmenu
== 3 ) break;
}
case 4:
while (1) {
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
if ( @tmp_ms_b_ir_ == 0 )
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Require items : ^0000FF"+ @tmp_ms_b_ir_
[.@i
+1] +" "+ getitemname(@tmp_ms_b_ir_
[.@i
]) +"^000000";
set .@item_require_menu,
select ( "add item requirement",
"remove a require item",
"- back" );
switch ( .@item_require_menu ) {
case 1:
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
if ( @tmp_ms_b_ir_ == 0 )
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Require items : ^0000FF"+ @tmp_ms_b_ir_
[.@i
+1] +" "+ getitemname(@tmp_ms_b_ir_
[.@i
]) +"^000000";
if ( .@size == 10 ) {
mes "Require items are only allow up to 5 different kinds";
}
}
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
if ( @tmp_ms_b_ir_ == 0 )
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Require items : ^0000FF"+ @tmp_ms_b_ir_
[.@i
+1] +" "+ getitemname(@tmp_ms_b_ir_
[.@i
]) +"^000000";
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 ) {
if ( .@tmp
== @tmp_ms_b_ir_
[.@i
] ) break;
}
if ( .@i != .@size ) {
}
mes "input the amount required for this item";
if ( .@tmp2 == 0 ) {
}
else
setarray @tmp_ms_b_ir_
[ .@size
], .@tmp, .@tmp2;
case 2:
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
if ( @tmp_ms_b_ir_ == 0 ) {
mes "There are no item to be remove";
}
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Require items : ^0000FF"+ @tmp_ms_b_ir_
[.@i
+1] +" "+ getitemname(@tmp_ms_b_ir_
[.@i
]) +"^000000";
mes "Select an item to delete";
for ( set .@i,
2; .@i < .@size;
set .@i, .@i
+2 )
case 3:
}
if ( .@item_require_menu
== 3 ) break;
}
case 5:
}
if ( .@importantmenu
== 5 ) break;
}
case 2:
while (1) {
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
mes "[^FF0000Limitations^000000]";
mes "Can do : "+( ( @tmp_ms_b_m_
[6] == 0 )?
"^0000FFRepeatedly": ( @tmp_ms_b_m_
[6] == 1 )?
"^00CC00Everyday":"^FF0000Only Once" )+"^000000";
mes "Base Level :"+( ( @tmp_ms_b_m_
[3] )?
" ^0000FF"+ @tmp_ms_b_m_
[3] +( ( @tmp_ms_b_m_
[3] != @tmp_ms_b_m_
[4] )?
"~"+ @tmp_ms_b_m_
[4]:"" )+"^000000":"" );
mes "Time Limit : "+( ( @tmp_ms_b_m_
[5] )?
"^FF0000"+( ( @tmp_ms_b_m_
[5] /60 )?@tmp_ms_b_m_
[5] /60 +" hour"+( ( @tmp_ms_b_m_
[5] %60
)?
" ":"" ):"" )+( ( @tmp_ms_b_m_
[5] %60
)?@tmp_ms_b_m_
[5] %60
+" min":"" )+"^000000":"" );
if ( @tmp_ms_b_m_[2] == 0 )
mes "Job Limit : ^FF0000<none>^000000";
else {
for ( set .@i,
0; .@i <
24;
set .@i, .@i
+1 ) {
if ( @tmp_ms_b_m_
[2] & pow( 2, .@i
) ) {
}
}
for ( set .@i,
1; .@i < .@size;
set .@i, .@i
+1 )
set .@joblimit$, .@joblimit$
+", "+ .
jobname$
[ .@joblimit
[.@i
] -1 ];
mes "Job Limit : ^00CC00"+ .@joblimit$
+"^000000";
}
set .@limitmenu,
select ( "Mission Status (Can do)",
"Base Level",
"Time Limit",
"Job limitation",
"- back" );
switch ( .@limitmenu ) {
case 1:
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
mes "Can do : "+( ( @tmp_ms_b_m_
[6] == 0 )?
"^0000FFRepeatedly": ( @tmp_ms_b_m_
[6] == 1 )?
"^00CC00Everyday":"^FF0000Only Once" )+"^000000";
mes "Please select a status";
switch ( select ( "^0000FFRepeatedly^000000",
"^00CC00Everyday^000000",
"^FF0000Only Once^000000" ) ) {
case 3: set @tmp_ms_b_m_
[6],
2;
}
case 2:
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
mes "Input starting range";
if ( .@tmp == 0 ) {
}
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
mes "Base Level : ^0000FF"+ .@tmp
+"~^000000";
mes "Input ending range";
if ( .@tmp2 == 0 ) {
}
else if ( .@tmp > .@tmp2 ) {
mes "Ending range cannot higher than starting range";
}
else
setarray @tmp_ms_b_m_
[3], .@tmp, .@tmp2;
case 3:
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
mes "Time Limit : "+( ( @tmp_ms_b_m_
[5] )?
"^FF0000"+( ( @tmp_ms_b_m_
[5] /60 )?@tmp_ms_b_m_
[5] /60 +" hour"+( ( @tmp_ms_b_m_
[5] %60
)?
" ":"" ):"" )+( ( @tmp_ms_b_m_
[5] %60
)?@tmp_ms_b_m_
[5] %60
+" min":"" )+"^000000":"" );
input @tmp_ms_b_m_
[5],
0,
1440;
case 4:
while (1) {
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
if ( @tmp_ms_b_m_[2] == 0 )
mes "Job Limit : ^FF0000<none>^000000";
else {
for ( set .@i,
0; .@i <
24;
set .@i, .@i
+1 ) {
if ( @tmp_ms_b_m_
[2] & pow( 2, .@i
) ) {
}
}
for ( set .@i,
1; .@i < .@size;
set .@i, .@i
+1 )
set .@joblimit$, .@joblimit$
+", "+ .
jobname$
[ .@joblimit
[.@i
] -1 ];
mes "Job Limit : ^00CC00"+ .@joblimit$
+"^000000";
}
for ( set .@i,
1; .@i <
24;
set .@i,.@i
+1 )
set @tmp_ms_b_m_
[2], @tmp_ms_b_m_
[2] ^ pow( 2, .@
menu );
}
case 5:
}
if ( .@limitmenu
== 5 ) break;
}
case 3:
while (1) {
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
mes "[^009900Rewards^000000]";
mes "Base Exp : "+( ( @tmp_ms_b_m_
[7] )?
"^0000FF"+ callfunc("int__", @tmp_ms_b_m_
[7] ):"^FF00000" ) +"^000000";
mes "Job Exp : "+( ( @tmp_ms_b_m_
[8] )?
"^0000FF"+ callfunc("int__", @tmp_ms_b_m_
[8] ):"^FF00000" ) +"^000000";
mes "Zeny : "+( ( @tmp_ms_b_m_
[9] )?
"^0000FF"+ callfunc("int__", @tmp_ms_b_m_
[9] ):"^FF00000" ) +"^000000 ";
mes "Cash Point : "+( ( @tmp_ms_b_m_
[10] )?
"^0000FF"+ callfunc("int__", @tmp_ms_b_m_
[10] ):"^FF00000" ) +"^000000";
if ( @tmp_ms_b_ia_ == 0 )
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Item : ^0000FF"+ @tmp_ms_b_ia_
[.@i
+1] +" "+ getitemname(@tmp_ms_b_ia_
[.@i
]) +"^000000";
set .@rewardmenu,
select ( "Base Exp",
"Job Exp",
"Zeny",
"Cash Points",
"Item Rewards",
"- back" );
switch ( .@rewardmenu ) {
case 1:
input @tmp_ms_b_m_
[7],
0,
2000000000;
case 2:
input @tmp_ms_b_m_
[8],
0,
2000000000;
case 3:
input @tmp_ms_b_m_
[9],
0,
2000000000;
case 4:
input @tmp_ms_b_m_
[10],
0,
2000000000;
case 5:
while (1) {
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
if ( @tmp_ms_b_ia_ == 0 )
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Item : ^0000FF"+ @tmp_ms_b_ia_
[.@i
+1] +" "+ getitemname(@tmp_ms_b_ia_
[.@i
]) +"^000000";
set .@item_reward_menu,
select ( "Add an item reward",
"Remove an item reward",
"- back" );
switch ( .@item_reward_menu ) {
case 1:
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
if ( @tmp_ms_b_ia_ == 0 )
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Item : ^0000FF"+ @tmp_ms_b_ia_
[.@i
+1] +" "+ getitemname(@tmp_ms_b_ia_
[.@i
]) +"^000000";
if ( .@size == 10 ) {
mes "Items Rewards are only allow up to 5 different kinds";
}
}
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
if ( @tmp_ms_b_ia_ == 0 )
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Item : ^0000FF"+ @tmp_ms_b_ia_
[.@i
+1] +" "+ getitemname(@tmp_ms_b_ia_
[.@i
]) +"^000000";
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 ) {
if ( .@tmp
== @tmp_ms_b_ia_
[.@i
] ) break;
}
if ( .@i != .@size ) {
}
mes "Input the amount rewards for this item";
if ( .@tmp2 == 0 ) {
}
else
setarray @tmp_ms_b_ia_
[ .@size
], .@tmp, .@tmp2;
case 2:
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
if ( @tmp_ms_b_ia_ == 0 ) {
mes "There is no item rewards to remove";
}
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Item : ^0000FF"+ @tmp_ms_b_ia_
[.@i
+1] +" "+ getitemname(@tmp_ms_b_ia_
[.@i
]) +"^000000";
mes "Select an item rewards to delete";
for ( set .@i,
2; .@i < .@size;
set .@i, .@i
+2 )
case 3:
}
if ( .@item_reward_menu
== 3 ) break;
}
case 6:
}
if ( .@rewardmenu
== 6 ) break;
}
case 4:
if ( @tmp_ms_b_m_$[0] != "" && @tmp_ms_b_m_$[1] != "" && ( @tmp_ms_b_t_ || @tmp_ms_b_ir_ ) &&
( @tmp_ms_b_m_[7] || @tmp_ms_b_m_[8] || @tmp_ms_b_m_[9] || @tmp_ms_b_m_[10] || @tmp_ms_b_ia_ ) ) {
mes "mission ID: ^996600"+( ( getarg(0) == 0 )?$ms_b_id
+1:@m_id
)+"^000000";
mes "Name : ^0000FF"+ @tmp_ms_b_m_$
[0] +"^000000";
}
else {
mes "Name : "+( ( @tmp_ms_b_m_$
[0] != "" )?
"^0000FF"+ @tmp_ms_b_m_$
[0]:"^FF0000Incomplete" )+"^000000";
mes "Some field are still Incomplete !";
}
mes "Description: ^0000FF"+ @tmp_ms_b_m_$
[1] +"^000000";
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Require mobs : ^0000FF"+ @tmp_ms_b_t_
[.@i
+1] +" "+ getmonsterinfo(@tmp_ms_b_t_
[.@i
],
0) +"^000000";
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Require items : ^0000FF"+ @tmp_ms_b_ir_
[.@i
+1] +" "+ getitemname(@tmp_ms_b_ir_
[.@i
]) +"^000000";
if ( @tmp_ms_b_m_[6] || @tmp_ms_b_m_[3] || @tmp_ms_b_m_[5] || @tmp_ms_b_m_[2] ) {
mes "[^FF0000Limitations^000000]";
if ( @tmp_ms_b_m_[6] )
mes "Can do : "+( ( @tmp_ms_b_m_
[6] == 1 )?
"^00CC00Everyday":"^FF0000Only Once" )+"^000000";
if ( @tmp_ms_b_m_[3] )
mes "Base Level :"+( ( @tmp_ms_b_m_
[3] )?
" ^0000FF"+ @tmp_ms_b_m_
[3] +( ( @tmp_ms_b_m_
[3] != @tmp_ms_b_m_
[4] )?
"~"+ @tmp_ms_b_m_
[4]:"" )+"^000000":"" );
if ( @tmp_ms_b_m_[5] )
mes "Time Limit : ^FF0000"+( ( @tmp_ms_b_m_
[5] /60 )?@tmp_ms_b_m_
[5] /60 +" hour"+( ( @tmp_ms_b_m_
[5] %60
)?
" ":"" ):"" )+( ( @tmp_ms_b_m_
[5] %60
)?@tmp_ms_b_m_
[5] %60
+" min":"" )+"^000000";
if ( @tmp_ms_b_m_[2] ) {
for ( set .@i,
0; .@i <
24;
set .@i, .@i
+1 ) {
if ( @tmp_ms_b_m_
[2] & pow( 2, .@i
) ) {
}
}
for ( set .@i,
1; .@i < .@size;
set .@i, .@i
+1 )
set .@joblimit$, .@joblimit$
+", "+ .
jobname$
[ .@joblimit
[.@i
] -1 ];
mes "Job Limit : ^00CC00"+ .@joblimit$
+"^000000";
}
}
mes "[^009900Rewards^000000]";
if ( @tmp_ms_b_m_[7] )
mes "Base Exp : ^0000FF"+ callfunc("int__", @tmp_ms_b_m_
[7] ) +"^000000";
if ( @tmp_ms_b_m_[8] )
mes "Job Exp : ^0000FF"+ callfunc("int__", @tmp_ms_b_m_
[8] ) +"^000000";
if ( @tmp_ms_b_m_[9] )
mes "Zeny : ^0000FF"+ callfunc("int__", @tmp_ms_b_m_
[9] ) +"^000000";
if ( @tmp_ms_b_m_[10] )
mes "Cash Point : ^0000FF"+ callfunc("int__", @tmp_ms_b_m_
[10] ) +"^000000";
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
mes "Item : ^0000FF"+ @tmp_ms_b_ia_
[.@i
+1] +" "+ getitemname(@tmp_ms_b_ia_
[.@i
]) +"^000000";
return 1;
case 5:
return 0;
}
}
OnInit:
bindatcmd "mission",
"mission::OnWhisperGlobal";
set .
total_npc, .
total_npc +1 ;
goto L_load_finish;
}
goto L_load_finish;
}
while ( .@i < .@ex_size ) {
}
while ( .@id < .@size ) {
explode .@ms_b_m_$
[2],
getd("$ms_b_m_"+ .@m_id
+"$[2]"),
"#";
while ( .@i < .@ex_size ) {
setd ".ms_b_m_"+ .@m_id
+"["+ .@i
+"]",
atoi( .@ms_b_m_$
[.@i
] );
}
explode .@ms_b_t_$,
getd("$ms_b_m_"+ .@m_id
+"$[3]"),
"#";
while ( .@i < .@ex_size ) {
setd ".ms_b_t_"+ .@m_id
+"["+ .@i
+"]",
atoi( .@ms_b_t_$
[.@i
] );
}
}
L_load_finish:
if ( .finish == .total_npc ) {
setarray .
jobname$,
"(Super) Novice",
"Swordman",
"Mage",
"Archer",
"Acolyte",
"Merchant",
"Thief",
"Knight",
"Priest",
"Wizard",
"Blacksmith",
"Hunter",
"Assassin",
"Crusader",
"Monk",
"Sage",
"Rogue",
"Alchemist",
"Bard/Dancer",
"Taekwon",
"Star Gladiator",
"Soul Linker",
"Gunslinger",
"Ninja";
}
}
- script mission -1,{
OnWhisperGlobal:
dispbottom "Mission Board: Loading Mission Data ......";
}
if ( @ms_b_loading == 1 ) {
dispbottom "Mission Board: Loading Player Data ......";
}
for ( set .@i,
1; .@i <
= 4;
set .@i, .@i
+1 ) {
if ( getd("@ms_b_m_"+ .@i
) ) {
if ( getd("$ms_b_m_"+ getd("@ms_b_m_"+ .@i
+"[0]") +"$[0]") == "" ) {
dispbottom "Mission Board: Your Mission#"+ .@i
+" has deleted because it is no longer available";
setd "ms_b_m_"+ .@i
+"$",
"";
deltimer "ms_b_::OnQuest"+ .@i
+"TimeUp";
}
dispbottom "Mission #1: "+ getd("$ms_b_m_"+ getd("@ms_b_m_"+ .@i
+"[0]") +"$[0]") +" has Time Up";
setd "ms_b_m_"+ .@i
+"$",
"";
deltimer "ms_b_::OnQuest"+ .@i
+"TimeUp";
}
}
}
if ( @ms_b_m_1 == 0 && @ms_b_m_2 == 0 && @ms_b_m_3 == 0 && @ms_b_m_4 == 0 ) {
dispbottom "You haven't accepted any mission(s) yet!";
}
for ( set .@j,
1; .@j <
= 4;
set .@j, .@j
+1 ) {
if ( getd("@ms_b_m_"+ .@j
+"[0]") ) {
dispbottom "Mission #"+ .@j
+": "+ getd("$ms_b_m_"+ getd("@ms_b_m_"+ .@j
+"[0]") +"$[0]");
set .@hour, .@left
/ 3600;
set .@min, .@left
% 3600 / 60;
dispbottom "Time Left: "+( ( .@hour
)?.@hour
+" hour ":"" )+( ( .@hour || .@min
)?.@min
+" min ":"" )+ .@sec
+" sec";
}
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
}
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 )
}
}
}
OnNPCKillEvent:
set .@
killedrid,
killedrid;
if ( @ms_b_loading
== 1 ) end;
for ( set .@j,
1; .@j <
= 4;
set .@j, .@j
+1 ) {
if ( getd("@ms_b_m_"+ .@j
+"[0]") ) {
if ( getd("$ms_b_m_"+ getd("@ms_b_m_"+ .@j
+"[0]") +"$[0]") == "" ) {
dispbottom "Mission Board: Your Mission#"+ .@j
+" has deleted because it is no longer available";
setd "ms_b_m_"+ .@j
+"$",
"";
deltimer "ms_b_::OnQuest"+ .@j
+"TimeUp";
}
else {
for ( set .@i,
0; .@i < .@size;
set .@i, .@i
+2 ) {
setd "@ms_b_m_"+ .@j
+"["+( .@i
/2 +2 )+"]",
getd("@ms_b_m_"+ .@j
+"["+( .@i
/2 +2 )+"]") +1;
setd "ms_b_m_"+ .@j
+"$",
getd("@ms_b_m_"+ .@j
+"[0]") +"#"+( ( getd("@ms_b_m_"+ .@j
+"[1]") )?
getd("@ms_b_m_"+ .@j
+"[1]"):"" )+"#"+( ( getd("@ms_b_m_"+ .@j
+"[2]") )?
getd("@ms_b_m_"+ .@j
+"[2]"):"" )+"#"+( ( getd("@ms_b_m_"+ .@j
+"[3]") )?
getd("@ms_b_m_"+ .@j
+"[3]"):"" )+"#"+( ( getd("@ms_b_m_"+ .@j
+"[4]") )?
getd("@ms_b_m_"+ .@j
+"[4]"):"" )+"#"+( ( getd("@ms_b_m_"+ .@j
+"[5]") )?
getd("@ms_b_m_"+ .@j
+"[5]"):"" )+"#"+( ( getd("@ms_b_m_"+ .@j
+"[6]") )?
getd("@ms_b_m_"+ .@j
+"[6]"):"" )+"#"+( ( getd("@ms_b_m_"+ .@j
+"[7]") )?
getd("@ms_b_m_"+ .@j
+"[7]"):"" )+"#"+( ( getd("@ms_b_m_"+ .@j
+"[8]") )?
getd("@ms_b_m_"+ .@j
+"[8]"):"" )+"#"+( ( getd("@ms_b_m_"+ .@j
+"[9]") )?
getd("@ms_b_m_"+ .@j
+"[9]"):"" );
}
}
}
}
}
}
while ( .@k < $@partymembercount ) {
if ( isloggedin( $@partymemberaid
[.@k
], $@partymembercid
[.@k
] ) ) {
if ( @ms_b_loading
== 0 && .@map1$
== .@map2$
&& distance(.@x1,.@y1,.@x2,.@y2
) <
= 30 && Hp ) {
while ( .@j <= 4 ) {
if ( getd("@ms_b_m_"+ .@j
+"[0]") ) {
if ( getd("$ms_b_m_"+ getd("@ms_b_m_"+ .@j
+"[0]") +"$[0]") == "" ) {
dispbottom "Mission Board: Your Mission#"+ .@j
+" has deleted because it is no longer available";
setd "ms_b_m_"+ .@j
+"$",
"";
deltimer "ms_b_::OnQuest"+ .@j
+"TimeUp";
}
else {
while ( .@i < .@size ) {
setd "@ms_b_m_"+ .@j
+"["+( .@i
/2 +2 )+"]",
getd("@ms_b_m_"+ .@j
+"["+( .@i
/2 +2 )+"]") +1;
setd "ms_b_m_"+ .@j
+"$",
getd("@ms_b_m_"+ .@j
+"[0]") +"#"+( ( getd("@ms_b_m_"+ .@j
+"[1]") )?
getd("@ms_b_m_"+ .@j
+"[1]"):"" )+"#"+( ( getd("@ms_b_m_"+ .@j
+"[2]") )?
getd("@ms_b_m_"+ .@j
+"[2]"):"" )+"#"+( ( getd("@ms_b_m_"+ .@j
+"[3]") )?
getd("@ms_b_m_"+ .@j
+"[3]"):"" )+"#"+( ( getd("@ms_b_m_"+ .@j
+"[4]") )?
getd("@ms_b_m_"+ .@j
+"[4]"):"" )+"#"+( ( getd("@ms_b_m_"+ .@j
+"[5]") )?
getd("@ms_b_m_"+ .@j
+"[5]"):"" )+"#"+( ( getd("@ms_b_m_"+ .@j
+"[6]") )?
getd("@ms_b_m_"+ .@j
+"[6]"):"" )+"#"+( ( getd("@ms_b_m_"+ .@j
+"[7]") )?
getd("@ms_b_m_"+ .@j
+"[7]"):"" )+"#"+( ( getd("@ms_b_m_"+ .@j
+"[8]") )?
getd("@ms_b_m_"+ .@j
+"[8]"):"" )+"#"+( ( getd("@ms_b_m_"+ .@j
+"[9]") )?
getd("@ms_b_m_"+ .@j
+"[9]"):"" );
}
}
}
}
}
}
}
}
OnPCLoginEvent:
while ( .@j <= 4 ) {
if ( getd("ms_b_m_"+ .@j
+"$") != "" ) {
while ( .@i < .@ex_size ) {
setd "@ms_b_m_"+ .@j
+"["+ .@i
+"]",
atoi( getd(".@ms_b_m_"+ .@j
+"$["+ .@i
+"]") );
}
}
}
while ( .@npc_id < 128 ) {
explode getd(".@ms_b_n_"+ .@npc_id
+"$"),
getd("ms_b_n_"+ .@npc_id
+"$"),
"#";
while ( .@i < .@ex_size ) {
setd "@ms_b_n_"+ .@npc_id
+"["+ .@i
+"]",
atoi( getd(".@ms_b_n_"+ .@npc_id
+"$["+ .@i
+"]") );
}
}
set .@npc_id, .@npc_id
+1 ;
}
while ( .@j <= 4 ) {
if ( getd("@ms_b_m_"+ .@j
+"[0]") ) {
if ( getd("$ms_b_m_"+ getd("@ms_b_m_"+ .@j
+"[0]") +"$[0]") == "" ) {
dispbottom "Mission Board: Your Mission#"+ .@j
+" has deleted because it is no longer available";
setd "ms_b_m_"+ .@j
+"$",
"";
}
else if ( getd("@ms_b_m_"+ .@j
+"[1]") ) {
else
doevent "ms_b_::OnQuest"+ .@j
+"TimeUp";
}
}
}
}
}
// create more missions by using npc duplicates
// display name can be anything, but the hidden name #1 #2 #35 must be a number within 1 ~ 126
// Note: npc display name plus the hidden name must not more than 23 characters
prontera,158,188,5 duplicate(ms_b_) Mission Board#3 837
prontera,163,188,5 duplicate(ms_b_) Mission Board#9 837
prontera,168,188,5 duplicate(ms_b_) Mission Board#23 837