Tolong saya ubah script ini... ini script mission hunting...script ini hanya fungsi untuk 1 char klau char itu champion char lain dah tak boleh sambung mission ini walaupon 1 ID....boleh tak ubah jadi 1 ID boleh selesia kan mission... harap kamu semua paham apa yg saya tulis....
//===== rAthena Script =======================================
//= Hunting Missions
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= Random hunting missions.
//= Rewards are based on quest difficulty.
//============================================================
prontera,55,149,3 script Hunting Missions 811,{
function Chk; function Cm;
mes "[Hunting Missions]";
mes "Hello, "+strcharinfo(0)+"!";
if (!#Mission_Delay) {
next;
mes "[Hunting Missions]";
mes "I can't find any records...";
mes "You must be new here!";
emotion e_omg;
next;
callsub Mission_Info;
emotion e_go;
set #Mission_Delay,1;
close;
}
mes rand(2)?"Working hard, as always...":"Not slacking, I hope...";
mes "Is there anything I can help";
mes "you with?";
mes " ";
mes "^777777~ You've completed ^0055FF"+Mission_Total+"^777777 mission"+((Mission_Total == 1)?"":"s")+". ~^000000";
next;
switch(select(((!Mission0)?" ~ New Mission::":": ~ Mission Status: ~ Abandon Mission")+": ~ Information: ~ Mission Shop: ~ View Top Hunters: ~ ^777777Cancel^000000")) {
case 1:
mes "[Hunting Missions]";
if (#Mission_Count) {
mes "You've started a mission";
mes "on another character.";
close;
}
if (#Mission_Delay > gettimetick(2) && .Delay) {
set [email protected], #Mission_Delay-gettimetick(2);
if ([email protected] > 3600) set [email protected]$, ([email protected]/3600)+" hour"+((([email protected]/3600) == 1)?"":"s");
else if ([email protected] > 60) set [email protected]$, ([email protected]/60)+" minute"+((([email protected]/60) == 1)?"":"s");
else set [email protected]$, ([email protected])+" second"+(([email protected] == 1)?"":"s");
mes "I'm afraid you'll have to wait "[email protected]$+" before taking another mission.";
close;
}
mes "You must hunt:";
query_sql("SELECT ID FROM `mob_db` WHERE left(Sprite, 4) != 'meta' AND left(Sprite, 2) != 'E_' AND ~Mode & 32 AND EXP > 0 AND MVP1id = 0 AND DropCardid > 4000 AND DropCardid < 5000 AND ID < 2000 AND instr('"+.Blacklist$+"',ID) = 0 ORDER BY rand() LIMIT "+.Quests, [email protected]);
for (set [email protected],0; [email protected]<.Quests; set [email protected],[email protected]+1) {
setd "Mission"[email protected], [email protected][[email protected]];
setd "Mission"[email protected] +"_",0;
}
set #Mission_Count, rand(.Count[0],.Count[1]);
callsub Mission_Status;
next;
mes "[Hunting Missions]";
mes "Report back when";
mes "you've finished.";
mes "Good luck!";
close;
case 2:
mes "[Hunting Missions]";
mes "Mission status:";
callsub Mission_Status;
close;
case 3:
mes "[Hunting Missions]";
mes "Do you really want to";
mes "abandon your mission?";
if (.Delay) mes "Your delay time will not be reset.";
next;
switch(select(" ~ Abandon...: ~ ^777777Cancel^000000")) {
case 1:
mes "[Hunting Missions]";
mes "Alright, I've dropped";
mes "your current mission.";
specialeffect2 EF_STORMKICK4;
for(set [email protected],0; [email protected]<.Quests; set [email protected],[email protected]+1) {
setd "Mission"[email protected],0;
setd "Mission"[email protected]+"_",0;
}
set #Mission_Count,0;
if (.Delay) set #Mission_Delay, gettimetick(2)+(.Delay*3600);
close;
case 2:
mes "[Hunting Missions]";
mes "I knew you were kidding!";
mes "Keep up the good work.";
emotion e_heh;
close;
}
case 4:
callsub Mission_Info;
close;
case 5:
mes "[Hunting Missions]";
mes "You have ^0055FF"+#Mission_Points+"^000000 Mission Points.";
mes "Use them well!";
callshop "mission_shop",1;
npcshopattach "mission_shop";
end;
case 6:
mes "[Hunting Missions]";
mes "The top hunters are:";
query_sql("SELECT char_id AS id, (SELECT `name` FROM `char` WHERE char_id = id),`value` FROM `global_reg_value` WHERE str = 'Mission_Total' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 5",[email protected],[email protected]$,[email protected]);
for(set [email protected],0; [email protected]<5; set [email protected],[email protected]+1)
mes " [Rank "+([email protected]+1)+"] "+(([email protected]$[[email protected]] == "")?"^777777none":"^0055FF"[email protected]$[[email protected]]+"^000000 : ^FF0000"[email protected][[email protected]]+" pt.")+"^000000";
close;
case 7:
mes "[Hunting Missions]";
mes "Nothing? Okay...";
emotion e_hmm;
close;
}
next;
mes "[Hunting Missions]";
mes "Mission rewards:";
mes " > Mission Points: ^0055FF"[email protected]_Points+"^000000";
mes " > Base Experience: ^0055FF"+Cm([email protected]_Exp)+"^000000";
mes " > Job Experience: ^0055FF"+Cm([email protected]_Exp)+"^000000";
mes " > Zeny: ^0055FF"+Cm([email protected])+"^000000";
if (@f) { set @f,0; return; }
next;
mes "[Hunting Missions]";
mes "Oh, you're done!";
mes "Good work.";
mes "Here's your reward.";
emotion e_no1;
specialeffect2 EF_ANGEL;
specialeffect2 EF_TRUESIGHT;
set #Mission_Points, #[email protected]_Points;
set BaseExp, [email protected]_Exp;
set JobExp, [email protected]_Exp;
set Zeny, [email protected];
for(set [email protected],0; [email protected]<.Quests; set [email protected],[email protected]+1) {
setd "Mission"[email protected],0;
setd "Mission"[email protected]+"_",0;
}
set #Mission_Count,0;
if (.Delay) set #Mission_Delay, gettimetick(2)+(.Delay*3600);
set Mission_Total, Mission_Total+1;
if (Mission_Total == 1) query_sql("INSERT INTO `global_reg_value` (`char_id`,`str`,`value`,`type`,`account_id`) VALUES ("+getcharid(0)+",'Mission_Total','1',3,0)");
else query_sql("UPDATE `global_reg_value` SET `value` = "+Mission_Total+" WHERE char_id = "+getcharid(0)+" AND `str` = 'Mission_Total'");
close;
Mission_Info:
mes "[Hunting Missions]";
mes "If you so choose, I can assign";
mes "you a random hunting quest.";
mes "Some are easier than others, but";
mes "the rewards increase with difficulty.";
next;
mes "[Hunting Missions]";
mes "Missions points are shared";
mes "amongst all your characters.";
if (.Delay) mes "Delay time is, too.";
mes "You can't take missions on";
mes "multiple characters at once.";
next;
mes "[Hunting Missions]";
mes "You can start a quest";
if (.Delay) mes "every "+((.Delay == 1)?"hour.":.Delay+" hours.");
else mes "whenever you want.";
mes "That's everything~";
return;
function Chk {
if (getarg(0) < getarg(1)) { set @f,1; return "^FF0000"; }
else return "^00FF00"; }
OnInit:
set .Delay,12; // Quest delay, in hours (0 to disable).
set .Quests,4; // Number of subquests per mission (increases rewards).
set .Party,3; // Party options: 0 (exclude party kills), 1 (include party kills), 2 (same map only), 3 (screen area only)
setarray .Count[0], // Min and max monsters per subquest (increases rewards).
40,70;
setarray .Modifier[0], // Multipliers for Base Exp, Job Exp, and Zeny rewards.
getbattleflag("base_exp_rate")/100,getbattleflag("job_exp_rate")/100,60;
setarray .Shop[0], // Reward items: <ID>,<point cost> (about 10~20 points per hunt).
12900,50,13582,150,5106,150,
set .Blacklist$, // Blacklisted mob IDs.
"1062,1088,1183,1186,1200,1212,1220,1221,1234,1235,"+
"1244,1245,1250,1268,1290,1293,1294,1296,1298,1299,"+
"1300,1301,1303,1304,1305,1306,1308,1309,1311,1313,"+
"1515,1588,1618,1676,1677,1678,1679,1796,1797,1974,"+
"1975,1976,1977,1978,1979,1512";
Codebox
Link to comment
Share on other sites