Jump to content

Recommended Posts

Posted (edited)

Bueno sin ofender a Euphy creador de este npc de cazeria,

° Quisiera que me ayudaran a encontrar y elegir los monstruos a cazar, debido que están al azar.

° También una opción de % probabilidad similar a la probabilidad de drop de cartas, ejemplo: 

Usuario: THOMY a matado 1000 Zombies sin embargo por la probabilidad de drop kill de un 50%, solo lleva 500 kill en conteo. ya que cada kill tiene 50%.

° Finalmente si me ayudan agregar el conteo, como está visiblemte en la imagen, "el conteo arriba en el personaje (Honet [1/10])", está en color amarillo.

 

screenTestRO004.jpg

screenTestRO003.jpg

monster_hunting_euphy.txt

Edited by Josemaaaaa
Posted

Hola. El script de Euphy fue pensado para funcionar con monstruos aleatorios. Si deseas tener control total sobre qué monstruos elegir, te recomiendo usar el sistema de misiones de Tr0n's Quest Board, que permite seleccionar exactamente los monstruos que quieras incluir.

	//Añade misiones de caza aquí (puedes agregar tantos mobs como quieras)
	//AddHunting("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Monster ID>,<Monster Amount>,...);
	AddHunting("Eliminación de abejas",1,MAX_LEVEL,503,1,0,500,500,1004,10);
	
	
	// [Josemaaaaa] Chance de contar a kill (%)
	.count_chance = 50;

 

//===== rAthena Script =======================================
//= tr0n's Questboard
//===== By: ==================================================
//= tr0n
//===== Current Version: =====================================
//= 1.6.6
//===== Description: =========================================
//= Easily add collection and hunting quests.
//===== Changelogs: ==========================================
// 1.0.0 Release
// 1.1.0 Added zeny reward
// 1.2.0 Rewrote checkmob and killcounter
// 1.3.1 Added level restriction
// 1.3.4 Added Reward Item Amount
// 1.4.4 Added Quest delay
// 1.5.4 Added repeatable Quests
// 1.6.4 Added party support
// 1.6.5 Bug fixes for party support
// 1.6.6 Bug fixes for delay time does not appear [mazvi]
//============================================================
prontera,129,215,5	script	Questboard	4_BOARD3,{
	if(c_run==true){
		mes "[^FF7700Questboard^000000]";
		mes "^0000FF"+getd("." + currentquest$ + "_collectionname$")+"^000000";
		mes "--------------------------------";
		set .@size, getarraysize(getd("."+ currentquest$ + "_collectionitem"));
		for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
			mes "^FF0000"+getitemname(getd("."+currentquest$+"_collectionitem["+.@j+"]"))+" - "+countitem(getd("."+currentquest$+"_collectionitem["+.@j+"]"))+"/"+getd("."+currentquest$+"_collectionitem["+(.@j+1)+"]")+" ea.^000000";
		}
		mes "--------------------------------";
		mes "[Reward]";
		mes "Item: ^0000FF"+((getd("." +currentquest$+"_collectionprize"))?getitemname(getd("." +currentquest$+"_collectionprize"))+" - "+getd("." +currentquest$+"_collectionamount")+" ea.^000000":"Nothing^000000");
		mes "Zeny: ^0000FF"+getd("." +currentquest$+"_collectionzeny")+"^000000";
		mes "Base EXP: ^0000FF"+getd("." +currentquest$+"_collectionexp["+0+"]")+"^000000";
		mes "Job EXP: ^0000FF"+getd("." +currentquest$+"_collectionexp["+1+"]")+"^000000";
		next;
		if(select("Finish:Abort") == 2){
			mes "[^FF7700Questboard^000000]";
			mes "Quest aborted.";
			set currentquest$, "";
			set c_run, false;
			close;
		}
		goto L_checkitems;
	}

	if(h_run==true){
		mes "[^FF7700Questboard^000000]";
		mes "^0000FF"+getd("." + currentquest$ + "_huntingname$")+"^000000";
		mes "--------------------------------";
		set .@size, getarraysize(getd("."+ currentquest$ + "_huntingmob"));
		for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
			set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@j)+"]");
			mes "^FF0000"+getmonsterinfo(getd("."+currentquest$+"_huntingmob["+.@j+"]"), MOB_NAME)+" - "+getd(currentquest$+"_"+.@currentmob+"_"+(.@j+1)+"_killcount")+"/"+getd("."+currentquest$+"_huntingmob["+(.@j+1)+"]")+" ea.^000000";
		}
		mes "--------------------------------";
		mes "[Reward]";
		mes "Item: ^0000FF"+((getd("." +currentquest$+"_huntingprize"))?getitemname(getd("." +currentquest$+"_huntingprize"))+" - "+getd("." +currentquest$+"_huntingamount")+" ea.^000000":"Nothing^000000");
		mes "Zeny: ^0000FF"+getd("." +currentquest$+"_huntingzeny")+"^000000";
		mes "Base EXP: ^0000FF"+getd("." +currentquest$+"_huntingexp["+0+"]")+"^000000";
		mes "Job EXP: ^0000FF"+getd("." +currentquest$+"_huntingexp["+1+"]")+"^000000";
		next;
		if(select("Finish:Abort") == 2){
			mes "[^FF7700Questboard^000000]";
			mes "Quest aborted.";
			for(set .@x, 1; .@x < .@size; set .@x,.@x+2){
				set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@x-1)+"]");
				setd(currentquest$+"_"+.@currentmob+"_"+.@x+"_killcount", 0);
			}
			set currentquest$, "";
			set h_run, false;
			close;
		}
		goto L_checkmobs;
	}

	mes "[^FF7700Questboard^000000]";
	mes "Select category:";
	next;

	switch(select((.collection)?"Collection Quests":"",
				  (.hunting)?"Hunting Quests":"",
				  "Exit")) {

	case 1:
		set .@collectmenu$, "";
		for( set .@i,0; .@i < .collectionquestcount; set .@i,.@i+1){
			if (.@i) set .@collectmenu$,.@collectmenu$+":";
			set .@collectmenu$, .@collectmenu$ + "[" + getd("." +(.@i+1)+"_collectionmin") + " - " + getd("." +(.@i+1)+"_collectionmax") + "] " + getd("." + (.@i+1) + "_collectionname$");
		}
		set .@selection,select(.@collectmenu$);
		if(.quest_repeat == true){
			if(gettimetick(2) < getd(.@selection + "_collection_delay")){
				mes "[^FF7700Questboard^000000]";
				mes "You have to wait ^0000FF"+Time2Str(getd(.@selection + "_collection_delay"))+"^000000 to do this quest again.";
				close;
			}
		}
		else{
			if(getd(.@selection + "_collection_repeat") == true){
				mes "[^FF7700Questboard^000000]";
				mes "You already did this quest.";
				mes "Please choose another one.";
				close;
			}
		}
		mes "[^FF7700Questboard^000000]";
		mes "^0000FF"+getd("." + .@selection + "_collectionname$")+"^000000";
		mes "--------------------------------";
		set .@size, getarraysize(getd("."+ .@selection + "_collectionitem"));
		for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
			mes "^FF0000"+getitemname(getd("."+.@selection+"_collectionitem["+.@j+"]"))+" - "+getd("."+.@selection+"_collectionitem["+(.@j+1)+"]")+" ea.^000000";
		}
		mes "--------------------------------";
		mes "[Reward]";
		mes "Item: ^0000FF"+((getd("." +.@selection+"_collectionprize"))?getitemname(getd("." +.@selection+"_collectionprize"))+" - "+getd("." +.@selection+"_collectionamount")+" ea.^000000":"Nothing^000000");
		mes "Zeny: ^0000FF"+getd("." +.@selection+"_collectionzeny")+"^000000";
		mes "Base EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+0+"]")+"^000000";
		mes "Job EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+1+"]")+"^000000";
		next;
		if(select("Accept:Decline") == 2){
			close;
		}
		if(BaseLevel >= getd("." +.@selection+"_collectionmin") && BaseLevel <= getd("." +.@selection+"_collectionmax")){
			mes "[^FF7700Questboard^000000]";
			mes "Quest accepted.";
			set c_run, true;
			set currentquest$, .@selection;
			close;
		}
		else{
			mes "[^FF7700Questboard^000000]";
			mes "You don't have the required";
			mes "level to do this quest.";
			close;
		}

	case 2:
		set .@huntmenu$, "";
		for( set .@i,0; .@i < .huntingquestcount; set .@i,.@i+1){
			if (.@i) set .@huntmenu$,.@huntmenu$+":";
			set .@huntmenu$, .@huntmenu$ + "[" + getd("." +(.@i+1)+"_huntingmin") + " - " + getd("." +(.@i+1)+"_huntingmax") + "] " + getd("." + (.@i+1) + "_huntingname$");
		}
		set .@selection,select(.@huntmenu$);
		if(.quest_repeat == true){
			if(gettimetick(2) < getd(.@selection + "_hunting_delay")){
				mes "[^FF7700Questboard^000000]";
				mes "You have to wait ^0000FF"+Time2Str(getd(.@selection + "_hunting_delay"))+"^000000 to do this quest again.";
				close;
			}
		}
		else{
			if(getd(.@selection + "_hunting_repeat") == true){
				mes "[^FF7700Questboard^000000]";
				mes "You already did this quest.";
				mes "Please choose another one.";
				close;
			}
		}
		mes "[^FF7700Questboard^000000]";
		mes "^0000FF"+getd("." + .@selection + "_huntingname$")+"^000000";
		mes "--------------------------------";
		set .@size, getarraysize(getd("."+ .@selection + "_huntingmob"));
		for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
			mes "^FF0000"+getmonsterinfo(getd("."+.@selection+"_huntingmob["+.@j+"]"), MOB_NAME)+" - "+getd("."+.@selection+"_huntingmob["+(.@j+1)+"]")+" ea.^000000";
		}
		mes "--------------------------------";
		mes "[Reward]";
		mes "Item: ^0000FF"+((getd("." +.@selection+"_huntingprize"))?getitemname(getd("." +.@selection+"_huntingprize"))+" - "+getd("." +.@selection+"_huntingamount")+" ea.^000000":"Nothing^000000");
		mes "Zeny: ^0000FF"+getd("." +.@selection+"_huntingzeny")+"^000000";
		mes "Base EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+0+"]")+"^000000";
		mes "Job EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+1+"]")+"^000000";
		next;
		if(select("Accept:Decline") == 2){
			close;
		}
		if(BaseLevel >= getd("." +.@selection+"_huntingmin") && BaseLevel <= getd("." +.@selection+"_huntingmax")){
			mes "[^FF7700Questboard^000000]";
			mes "Quest accepted.";
			if (.count_chance > 0 && .count_chance < 100)
				mes "^FF0000Recuerda: cada vez que derrotes a un monstruo, hay una probabilidad del " + .count_chance + "% de que cuente para tu progreso.^000000";
			set h_run, true;
			set currentquest$, .@selection;
			close;
		}
		else{
			mes "[^FF7700Questboard^000000]";
			mes "You don't have the required";
			mes "level to do this quest.";
			close;
		}

	case 3:
		close;
	}

L_checkitems:
	set .@size, getarraysize(getd("."+currentquest$+"_collectionitem"));
	for( set .@k,0; .@k < .@size; set .@k,.@k+2){
		if(countitem(getd("."+currentquest$+"_collectionitem["+.@k+"]"))>=getd("."+currentquest$+"_collectionitem["+(.@k+1)+"]")){
			set .@checkitem,.@checkitem+2;
		}
	}
	if(.@checkitem<.@size){
		mes "[^FF7700Questboard^000000]";
		mes "You don't have everything.";
		close;
	}
	for( set .@delcount,0; .@delcount < .@size; set .@delcount,.@delcount+2){
		delitem getd("."+currentquest$+"_collectionitem["+.@delcount+"]"),getd("."+currentquest$+"_collectionitem["+(.@delcount+1)+"]");
	}
	mes "[^FF7700Questboard^000000]";
	mes "Congratulation! Here is your Reward.";
	if(getd("." +currentquest$+"_collectionprize")!=0) getitem(getd("." +currentquest$+"_collectionprize"),getd("." +currentquest$+"_collectionamount"));
	set Zeny,Zeny+getd("." +currentquest$+"_collectionzeny");
	getexp getd("." +currentquest$+"_collectionexp["+0+"]"),getd("." +currentquest$+"_collectionexp["+1+"]");
	setd(currentquest$ + "_collection_delay"),gettimetick(2)+.quest_delay;
	setd(currentquest$ + "_collection_repeat"),true;
	set currentquest$, "";
	set c_run, false;
	close;

L_checkmobs:
	set .@size, getarraysize(getd("."+currentquest$+"_huntingmob"));
	set .@goal, .@size/2;
	for(set .@i, 1; .@i < .@size; set .@i,.@i+2){
		set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]");
		if(getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")==getd("."+currentquest$+"_huntingmob["+.@i+"]")){
			set .@checkmonster, .@checkmonster+1;
			if(.@checkmonster==.@goal){
				goto L_checkmobs2;
			}
			continue;
		}
		goto L_checkmobs2;
	}

L_checkmobs2:
	if(.@checkmonster<.@goal){
		mes "[^FF7700Questboard^000000]";
		mes "You didn't kill everything.";
		close;
	}
	mes "[^FF7700Questboard^000000]";
	mes "Congratulation! Here is your Reward.";
	set .@size, getarraysize(getd("."+currentquest$+"_huntingmob"));
	for(set .@x, 1; .@x < .@size; set .@x,.@x+2){
		set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@x-1)+"]");
		setd(currentquest$+"_"+.@currentmob+"_"+.@x+"_killcount", 0);
	}
	if(getd("." +currentquest$+"_huntingprize")!=0) getitem(getd("." +currentquest$+"_huntingprize"),getd("." +currentquest$+"_huntingamount"));
	set Zeny, Zeny+getd("." +currentquest$+"_huntingzeny");
	getexp getd("." +currentquest$+"_huntingexp["+0+"]"),getd("." +currentquest$+"_huntingexp["+1+"]");
	setd(currentquest$ + "_hunting_delay"),gettimetick(2)+.quest_delay;
	setd(currentquest$ + "_hunting_repeat"),true;
	set currentquest$, "";
	set h_run, false;
	close;

OnNPCKillEvent:
	if(h_run!=true) end;
	set .@size, getarraysize(getd("."+currentquest$+"_huntingmob"));
	if (.count_chance > 0 && .count_chance < 100) {
		if (rand(1,100) > .count_chance)
			.@fail = true;
	}
	for(set .@i, 1; .@i < .@size; set .@i,.@i+2){
		if(killedrid==getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]")){
			set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]");
			if(getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")<getd("."+currentquest$+"_huntingmob["+.@i+"]")){
				if (.@fail)
					dispbottom "[" + getd("."+currentquest$+"_huntingname$") + "] No se registró esta baja.";
				else {
					setd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount", getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+1);
					//message strcharinfo(0), getd("."+currentquest$+"_huntingname$")+": ["+getmonsterinfo(.@currentmob, MOB_NAME)+"] ("+ getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+"/"+getd("."+currentquest$+"_huntingmob["+.@i+"]")+")";
					message strcharinfo(0), getmonsterinfo(.@currentmob, MOB_NAME)+" ["+ getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+"/"+getd("."+currentquest$+"_huntingmob["+.@i+"]")+"]";
					//unittalk getcharid(3), getmonsterinfo(.@currentmob, MOB_NAME)+" ["+ getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+"/"+getd("."+currentquest$+"_huntingmob["+.@i+"]")+"]",bc_self;
				
				}
			}
			if(getcharid(1) != 0 && .party_support == true){
				getmapxy(.@map1$,.@x1,.@y1);
				set .@killerid, getcharid(3);
				set .@currentquest$, currentquest$;
				getpartymember getcharid(1),1;
				getpartymember getcharid(1),2;
				for(set .@j, 0; .@j < $@partymembercount; .@j++){
					if(isloggedin($@partymemberaid[.@j], $@partymembercid[.@j])){
						if(h_run==true && $@partymemberaid[.@j] != .@killerid && .@currentquest$ == getvar(currentquest$, $@partymembercid[.@j]) && readparam(HP, $@partymembercid[.@j]) > 0){
							getmapxy(.@map2$,.@x2,.@y2,BL_PC,rid2name($@partymemberaid[.@j]));
							if(.@map1$ == .@map2$ && distance(.@x1,.@y1,.@x2,.@y2) < .party_range){
								if (.@fail)
									dispbottom "[" + getd("."+.@currentquest$+"_huntingname$") + "] No se registró esta baja.","",$@partymembercid[.@j];
								else {
									set .@kill_amt,getvar(getd(.@currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount"), $@partymembercid[.@j]);
									set .@kill_goal,getd("."+.@currentquest$+"_huntingmob["+.@i+"]");
									if(.@kill_amt<.@kill_goal)
									{
										setd(.@currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount", .@kill_amt+1, $@partymembercid[.@j]);
										//message strcharinfo(0), getd("."+.@currentquest$+"_huntingname$")+": ["+getmonsterinfo(.@currentmob, MOB_NAME)+"] ("+(.@kill_amt+1)+"/"+.@kill_goal+")", 0xB6FF00, $@partymembercid[.@j];
										message strcharinfo(0,$@partymembercid[.@j]), getmonsterinfo(.@currentmob, MOB_NAME)+" [ "+(.@kill_amt+1)+" / "+.@kill_goal+" ]";
										//unittalk $@partymemberaid[.@j], getmonsterinfo(.@currentmob, MOB_NAME)+" [ "+(.@kill_amt+1)+" / "+.@kill_goal+" ]",bc_self;
									}
								}
							}
						}
					}
				}
			}
			break;
		}
	}
	end;

OnInit:

	function AddCollection;
	function AddHunting;

	//Activate/Deactivate quest categories (true/1 - activated, false/0 - deactivated)
	set .collection, true;
	set .hunting, true;

	//Quest Delay (seconds)
	//24 hours = 86400 seconds
	set .quest_delay, 0;

	//Activate/Deactivate repeatable quests (true/1 - activated, false/0 - deactivated)
	set .quest_repeat, true;

	//Activate/Deactivate party support (true/1 - activated, false/0 - deactivated)
	set .party_support, true;

	//Max range for party support (+- x & y coordinations)
	set .party_range, 25;

	//Checks if quests are loaded (prevents out of index)
	if(.questsloaded==true) end;
	set .questsloaded, true;

	//Add Collection Quests here (You can add as many required items as you want)
	//AddCollection("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Item ID>,<Item Amount>,...);


	//Añade misiones de caza aquí (puedes agregar tantos mobs como quieras)
	//AddHunting("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Monster ID>,<Monster Amount>,...);
	AddHunting("Eliminación de abejas",1,MAX_LEVEL,503,1,0,500,500,1004,10);
	
	
	// [Josemaaaaa] Chance de contar a kill (%)
	.count_chance = 50;

	end;

	function AddCollection{
		set .collectionquestcount,.collectionquestcount+1;
		setd ("." +.collectionquestcount+"_collectionname$", getarg(0));
		setd ("." +.collectionquestcount+"_collectionmin", getarg(1));
		setd ("." +.collectionquestcount+"_collectionmax", getarg(2));
		setd ("." +.collectionquestcount+"_collectionprize", getarg(3));
		setd ("." +.collectionquestcount+"_collectionamount", getarg(4));
		setd ("." +.collectionquestcount+"_collectionzeny", getarg(5));
		set .@argcount, 6;
		set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionexp"));
		setd ("." +.collectionquestcount+"_collectionexp["+.@size+"]",getarg(.@argcount)); 
		setd ("." +.collectionquestcount+"_collectionexp["+(.@size+1)+"]",getarg(.@argcount+1)); 
		set .@argcount, .@argcount+2;
		set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionitem"));
		while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1){
			setd ("."+.collectionquestcount+"_collectionitem["+.@size+"]",getarg(.@argcount)); 
			setd ("."+.collectionquestcount+"_collectionitem["+(.@size+1)+"]",getarg(.@argcount+1));
			set .@argcount,.@argcount+2;
			set .@size, .@size+2;
		}
		return;
	}

	function AddHunting{
		set .huntingquestcount,.huntingquestcount+1;
		setd ("." +.huntingquestcount+"_huntingname$", getarg(0));
		setd ("." +.huntingquestcount+"_huntingmin", getarg(1));
		setd ("." +.huntingquestcount+"_huntingmax", getarg(2));
		setd ("." +.huntingquestcount+"_huntingprize", getarg(3));
		setd ("." +.huntingquestcount+"_huntingamount", getarg(4));
		setd ("." +.huntingquestcount+"_huntingzeny", getarg(5));
		set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingexp"));
		set .@argcount, 6;
		setd ("." +.huntingquestcount+"_huntingexp["+.@size+"]",getarg(.@argcount));
		setd ("." +.huntingquestcount+"_huntingexp["+(.@size+1)+"]",getarg(.@argcount+1)); 
		set .@argcount, .@argcount+2;
		set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingmob"));
		while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1){
			setd ("."+.huntingquestcount+"_huntingmob["+.@size+"]",getarg(.@argcount)); 
			setd ("."+.huntingquestcount+"_huntingmob["+(.@size+1)+"]",getarg(.@argcount+1));
			set .@argcount, .@argcount+2;
			set .@size, .@size+2;
		}
		return;
	}
}

 

  • 2 weeks later...
  • 3 weeks later...
Posted

Los scripts de Euphy y tr0n usan variables con OnNPCKillEvent y el color del texto es fijo.
Para mostrar los números de muertes en color amarillo, necesitarás usar el sistema oficial de misiones (setquest / checkquest / erasequest), donde cada muerte cuenta para los miembros del grupo, pero la probabilidad siempre es del 100%.

Para agregar una nueva misión personalizada, abre el archivo:
import/quest_db.yml (o import/quest_db.txt si tu rAthena está desactualizado).
Ejemplo:

  - Id: 7148
    Title: The training course 'conquer the orc village!' - A real battle 1
    Targets:
      - Mob: ORC_BABY
        Count: 10

Y el archivo en tu carpeta del cliente:
System/OngoingQuestInfoList (o data/questid2display.txt si tu ejecutable del cliente es antiguo).
Ejemplo:

	[7148] = {
		Title = "¡Conquista el Pueblo de los Orcos!",
		Description = {
			"Pueden ser crías, pero se convierten en feroces Guerreros orco. Caza 10 Bebés orco en el Pueblo de los Orcos."
		},
		Summary = ""
	},

Luego, usa el ID de la misión en el NPC.
Ejemplo:

prontera,150,150,4	script	Cazador Simple	123,{  
	if(checkquest(7148) == -1) {	// Misión no iniciada  
		mes "[Cazador Simple]";  
		mes "¡Necesito ayuda cazando monstruos!";  
		mes "¿Puedes cazar 10 Bebés orco para mí?";  
		next;  
		if(select("Aceptar:Rechazar") == 1) {  
			mes "[Cazador Simple]";  
			mes "¡Genial! Regresa cuando hayas terminado.";  
			setquest 7148;  
			close;  
		}  
		mes "[Cazador Simple]";  
		mes "Tal vez la próxima vez entonces.";  
		close;  
	} else if(checkquest(7148,HUNTING) == 2) {	// Caza completada  
		mes "[Cazador Simple]";  
		mes "¡Excelente trabajo! Aquí tienes tu recompensa.";  
		getexp 5000,0;  
		erasequest 7148;  
		close;  
	} else if(checkquest(7148) == 1) {	// Misión activa pero no completada  
		mes "[Cazador Simple]";  
		mes "¡Sigue cazando! Aún no has terminado.";  
		close;  
	}  
}


 

moc_para01,39,36,5	script	Gestor de Misiones#2024	732,{
	mes "[^FF7700Gestor de Misiones^000000]";
	mes "Hola, por favor selecciona una misión";
	while (true) {
		switch(select((.hunting)?" ~ Misión de Cacería":"",
					  (.collection)?" ~ Misión de Recolección":"")) {
		case 1:
			set .@huntmenu$, "";
			for(set .@i,0; .@i < .huntingquestcount; set .@i,.@i+1){
				if (.@i) set .@huntmenu$,.@huntmenu$ + ":";
				if (gettimetick(2) < getd((.@i+1) + "_hunting_delay"))
					.@c$ = "^808080";
				else
					.@c$ = "^000000";
				set .@huntmenu$, .@huntmenu$ + .@c$ + "[Nv " + getd("." +(.@i+1)+"_huntingmin") + "-" + getd("." +(.@i+1)+"_huntingmax") + "] " + getd("." + (.@i+1) + "_huntingname$");
			}
			set @selection,select(.@huntmenu$);
			clear;
			if (.quest_repeat == true) {
				if(gettimetick(2) < getd(@selection + "_hunting_delay")){
					mes "[^FF7700Gestor de Misiones^000000]";
					mes "¡Lo siento, debes esperar 24 horas antes de repetir esta misión!";
					mes "Por favor espera hasta ^0000FF"+Time2Str(getd(@selection + "_hunting_delay"))+"^000000.";
					close;
				}
			}
			else {
				if (getd(@selection + "_hunting_repeat") == true){
					mes "[^FF7700Gestor de Misiones^000000]";
					mes "Ya completaste esta misión.";
					mes "Por favor elige otra.";
					close;
				}
			}
			mes "[^FF7700Gestor de Misiones^000000]";
			.@size = getarraysize(getd("."+ @selection + "_huntingmob"));
			if (.@size == 2)
				mes "Por favor caza y elimina a ^FF0000"+getd("."+@selection+"_huntingmob[1]")+" " + getmonsterinfo(getd("."+@selection+"_huntingmob[0]"),MOB_NAME)+"^000000.";
			else {
				mes "Por favor caza y elimina los siguientes monstruos:";
				for(set .@j, 0; .@j < .@size; set .@j,.@j+2)
					mes "- ^FF0000"+getd("."+@selection+"_huntingmob["+(.@j+1)+"]")+" " + getmonsterinfo(getd("."+@selection+"_huntingmob["+.@j+"]"),MOB_NAME)+"^000000";
			}  
			next;
			mes "[^FF7700Gestor de Misiones^000000]";
			mes "Recompensas:";
			if (getd("." +@selection+"_huntingexp[0]"))
				mes "^0000FF" + F_InsertComma(getd("." +@selection+"_huntingexp[0]"))+" EXP Base^000000";
			if (getd("." +@selection+"_huntingexp[1]"))
				mes "^0000FF" + F_InsertComma(getd("." +@selection+"_huntingexp[1]"))+" EXP de Clase^000000";
			if (getd("." +@selection+"_huntingzeny"))
				mes "Zeny: ^0000FF"+getd("." +@selection+"_huntingzeny")+"^000000";
			if (getd("." +@selection+"_huntingprize[0]")) {
				for(.@i = 0; .@i < getarraysize(getd("." +@selection+"_huntingprize")); .@i++)
					mes getd("." +@selection+"_huntingamount") + " " + getitemname((getd("." +@selection+"_huntingprize["+.@i+"]")));
			}
			switch(select("- Aceptar Misión", "- Entregar Misión Completada", "- Cancelar")) {
			case 1:
				clear;
				if (isbegin_quest(getd("." + @selection+"_huntingid")))
					goto havetaken;
				if (BaseLevel >= getd("." +@selection+"_huntingmin") && BaseLevel <= getd("." +@selection+"_huntingmax")){
					mes "[^FF7700Gestor de Misiones^000000]";
					mes "Misión aceptada.";
					set h_run, true;
					set currentquest$, @selection;
					setquest getd("." + @selection+"_huntingid");
					close;
				}
				else{
					mes "[^FF7700Gestor de Misiones^000000]";
					mes "No cumples con el nivel requerido para esta misión.";
					close;
				}
			case 2:
				clear;
				switch(checkquest(getd("." +@selection+"_huntingid"),HUNTING)) {
				case -1:
					goto nottaken;
				case 2:
					mes "[^FF7700Gestor de Misiones^000000]";
					mes "¡Bien hecho!";
					mes "Aquí están tus recompensas.";
					if(getd("." +@selection+"_huntingprize[0]")) {
						for(.@i = 0; .@i < getarraysize(getd("." +@selection+"_huntingprize")); .@i++)
							getitem(getd("." +@selection+"_huntingprize["+.@i+"]"),getd("." +@selection+"_huntingamount"));
					}
					set Zeny, Zeny+getd("." +@selection+"_huntingzeny");
					getexp getd("." +@selection+"_huntingexp[0]"),getd("." +@selection+"_huntingexp[1]");
					erasequest getd("." +@selection+"_huntingid");
					setd(@selection + "_hunting_delay"),gettimetick(2)+.quest_delay;
					setd(@selection + "_hunting_repeat"),true;
					set @selection, "";
					set h_run, false;
					end;
				default:
					mes "[^FF7700Gestor de Misiones^000000]";
					mes "Aún no has derrotado a todos los monstruos.";
					close;
				}
			case 3:
				end;
			}

		case 2:
			clear;
			mes "[^FF7700Gestor de Misiones^000000]";
			mes "El gremio siempre necesita más recursos.";
			mes "Por favor, selecciona el área en la que deseas ayudar hoy.";
			set .@collectmenu$, "";
			for( set .@i,0; .@i < .collectionquestcount; set .@i,.@i+1){
				if (.@i) set .@collectmenu$,.@collectmenu$ + ":";
				if (gettimetick(2) < getd((.@i+1) + "_collection_delay"))
					.@c$ = "^808080";
				else
					.@c$ = "^000000";
				set .@collectmenu$, .@collectmenu$ + .@c$ + "[Nv " + getd("." +(.@i+1)+"_collectionmin") + "-" + getd("." +(.@i+1)+"_collectionmax") + "] " + getd("." + (.@i+1) + "_collectionname$");
			}
			set @selection,select(.@collectmenu$);
			clear;        
			if(.quest_repeat == true){
				if(gettimetick(2) < getd(@selection + "_collection_delay")){
					mes "[^FF7700Gestor de Misiones^000000]";
					mes "¡Lo siento, debes esperar 24 horas antes de repetir esta misión!";
					mes "Por favor espera hasta ^0000FF"+Time2Str(getd(@selection + "_collection_delay"))+"^000000.";
					close;
				}
			}
			else{
				if(getd(@selection + "_collection_repeat") == true){
					mes "[^FF7700Gestor de Misiones^000000]";
					mes "Ya completaste esta misión.";
					mes "Por favor elige otra.";
					close;
				}
			}
			mes "[^FF7700Gestor de Misiones^000000]";
			mes "Necesitamos lo siguiente:";
			set .@size, getarraysize(getd("."+ @selection + "_collectionitem"));
			for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
				.@a = countitem(getd("."+@selection+"_collectionitem["+.@j+"]"));
				if (.@a < getd("."+@selection+"_collectionitem["+(.@j+1)+"]"))
					.@c$ = "^FF0000";
				else .@c$ = "";
				mes .@c$ + getd("."+@selection+"_collectionitem["+(.@j+1)+"]") + " " + getitemname(getd("."+@selection+"_collectionitem["+.@j+"]")) + ": " + "(" + .@a + "/"+getd("."+@selection+"_collectionitem["+(.@j+1)+"]") + ")^000000";
			}
			next;
			mes "[^FF7700Gestor de Misiones^000000]";
			mes "Recompensa:";
			if (getd("." +@selection+"_collectionexp["+0+"]"))
				mes "^0000FF" + F_InsertComma(getd("." +@selection+"_collectionexp["+0+"]")) + " EXP Base^000000";
			if (getd("." +@selection+"_collectionexp["+1+"]"))
				mes "^0000FF" + F_InsertComma(getd("." +@selection+"_collectionexp["+1+"]")) + " EXP de Clase^000000";
			if (getd("." +@selection+"_collectionzeny"))
				mes "Zeny: ^0000FF"+getd("." +@selection+"_collectionzeny")+"^000000";
			if (getd("." +@selection+"_collectionprize[0]")) {
				for(.@i = 0; .@i < getarraysize(getd("." +@selection+"_collectionprize")); .@i++)
					mes getd("." +@selection+"_collectionamount") + " " + getitemname((getd("." +@selection+"_collectionprize["+.@i+"]")));
			}
			
			if (BaseLevel < getd("." +@selection+"_collectionmin") || BaseLevel > getd("." +@selection+"_collectionmax")) {
				next;
				mes "[^FF7700Gestor de Misiones^000000]";
				mes "No cumples con el nivel requerido para esta misión.";
			}
			else {
				if(select("- Entregar objetos", "- Volver") == 1) {
					clear;
					set .@size, getarraysize(getd("."+@selection + "_collectionitem"));
					for( set .@k,0; .@k < .@size; set .@k,.@k+2) {
						if(countitem(getd("."+@selection+"_collectionitem["+.@k+"]"))>=getd("."+@selection+"_collectionitem["+(.@k+1)+"]")){
							set .@checkitem,.@checkitem+2;
						}
					}
					if(.@checkitem<.@size){
						mes "[^FF7700Gestor de Misiones^000000]";
						mes "No tienes todos los objetos necesarios.";
						mes F_Rand("¿Olvidaste el objeto en el almacenamiento?","Tal vez intenta con otra misión.","");
						break;
					}
					for( set .@delcount,0; .@delcount < .@size; set .@delcount,.@delcount+2){
						delitem getd("."+@selection+"_collectionitem["+.@delcount+"]"),getd("."+@selection+"_collectionitem["+(.@delcount+1)+"]");
					}
					mes "[^FF7700Gestor de Misiones^000000]";
					mes "¡Bien hecho!";
					mes "Aquí están tus recompensas.";
					if(getd("." +@selection+"_collectionprize[0]")) {
						for(.@i = 0; .@i < getarraysize(getd("." +@selection+"_collectionprize")); .@i++)
							getitem(getd("." +@selection+"_collectionprize["+.@i+"]"),getd("." +@selection+"_collectionamount"));
					}
					set Zeny,Zeny+getd("." +@selection+"_collectionzeny");
					getexp getd("." +@selection+"_collectionexp["+0+"]"),getd("." +@selection+"_collectionexp["+1+"]");
					setd(@selection + "_collection_delay"),gettimetick(2)+.quest_delay;
					setd(@selection + "_collection_repeat"),true;
					set @selection, "";
					close;
				}
				else {
					clear;
					mes "[^FF7700Gestor de Misiones^000000]";
					mes F_Rand("¿No fue de tu agrado?","¿Solo estás mirando?","¡Vamos a encontrar la misión adecuada para ti!");
				}
			}
			break;

		case 3:
			close;
		}
		if (rand(3) == 1)
			mes "¿Qué tal una misión de " + F_Rand("cacería","recolección","aventura","ayuda") + " hoy?";
	}

OnInit:

	function AddCollection;
	function AddHunting;
	questinfo QTYPE_DAILYQUEST, QMARK_NONE;

	//Activate/Deactivate quest categories (true/1 - activated, false/0 - deactivated)
	set .collection, true;
	set .hunting, true;

	//Quest Delay (seconds)
	//24 hours = 86400 seconds
	set .quest_delay, 120;

	//Activate/Deactivate repeatable quests (true/1 - activated, false/0 - deactivated)
	set .quest_repeat, true;

	//Activate/Deactivate party support (true/1 - activated, false/0 - deactivated)
	set .party_support, true;

	//Max range for party support (+- x & y coordinations)
	set .party_range, 25;

	//Checks if quests are loaded (prevents out of index)
	if(.questsloaded==true) end;
	set .questsloaded, true;


	//Add Hunting Quests here (You can add as many required mobs as you want)
	//AddHunting("<Quest Name>",<Quest ID>,<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Monster ID>,<Monster Amount>,...);
	AddHunting("Prontera Field 01",11340,1,21,"608|609|501|502",1,0,2100,2100,1063,10);
	AddHunting("Prontera Field 02",11341,1,51,"610",1,0,27300,14700,1063,3,1113,3,1031,3);
	AddHunting("Descendencia de los orcos",7148,30,99,"610",1,0,27300,14700,1686,10);

	//Add Collection Quests here (You can add as many required items as you want)
	//AddCollection("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Item ID>,<Item Amount>,...);
	AddCollection("Foliage Gathering",1,11,"502",1,0,2100,2100,705,10,707,10,7100,10,706,1);
	AddCollection("Herb Gathering",1,21,"611|612|613|614",1,0,2100,2100,507,8,508,8,509,8,510,8,511,8,621,3);
	AddCollection("Flower Gathering",1,31,"607",1,0,2100,2100,704,10,708,10,703,10,709,10);
	AddCollection("Vegetable Gathering",1,41,"607",1,0,2100,2100,515,10,516,10,535,10);

	end;


	function AddCollection{
		set .collectionquestcount,.collectionquestcount+1;
		setd ("." +.collectionquestcount+"_collectionname$", getarg(0));
		setd ("." +.collectionquestcount+"_collectionmin", getarg(1));
		setd ("." +.collectionquestcount+"_collectionmax", getarg(2));

		explode(getd(".@" +.collectionquestcount+"_collectionprize$"), getarg(3) + "", "|");
		for(.@i = 0; .@i < getarraysize(getd(".@" +.collectionquestcount+"_collectionprize$")); .@i++)
			setd ("."+.collectionquestcount+"_collectionprize["+.@i+"]",atoi(getd(".@" +.collectionquestcount+"_collectionprize$["+.@i+"]")));
		//setd ("." +.collectionquestcount+"_collectionprize", getarg(3));


		setd ("." +.collectionquestcount+"_collectionamount", getarg(4));
		setd ("." +.collectionquestcount+"_collectionzeny", getarg(5));
		set .@argcount, 6;
		set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionexp"));
		setd ("." +.collectionquestcount+"_collectionexp["+.@size+"]",getarg(.@argcount)); 
		setd ("." +.collectionquestcount+"_collectionexp["+(.@size+1)+"]",getarg(.@argcount+1)); 
		set .@argcount, .@argcount+2;
		set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionitem"));
		while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1){
			setd ("."+.collectionquestcount+"_collectionitem["+.@size+"]",getarg(.@argcount)); 
			setd ("."+.collectionquestcount+"_collectionitem["+(.@size+1)+"]",getarg(.@argcount+1));
			set .@argcount,.@argcount+2;
			set .@size, .@size+2;
		}
		return;
	}

	function AddHunting{
		set .huntingquestcount,.huntingquestcount+1;
		setd ("." +.huntingquestcount+"_huntingname$", getarg(0));
		setd ("." +.huntingquestcount+"_huntingid", getarg(1));
		setd ("." +.huntingquestcount+"_huntingmin", getarg(2));
		setd ("." +.huntingquestcount+"_huntingmax", getarg(3));
		
		explode(getd(".@" +.huntingquestcount+"_huntingprize$"), getarg(4) + "", "|");
		for(.@i = 0; .@i < getarraysize(getd(".@" +.huntingquestcount+"_huntingprize$")); .@i++)
			setd ("."+.huntingquestcount+"_huntingprize["+.@i+"]",atoi(getd(".@" +.huntingquestcount+"_huntingprize$["+.@i+"]")));

		setd ("." +.huntingquestcount+"_huntingamount", getarg(5));
		setd ("." +.huntingquestcount+"_huntingzeny", getarg(6));
		set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingexp"));
		set .@argcount, 7;
		setd ("." +.huntingquestcount+"_huntingexp["+.@size+"]",getarg(.@argcount));
		setd ("." +.huntingquestcount+"_huntingexp["+(.@size+1)+"]",getarg(.@argcount+1)); 
		set .@argcount, .@argcount+2;
		set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingmob"));
		while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1){
			setd ("."+.huntingquestcount+"_huntingmob["+.@size+"]",getarg(.@argcount)); 
			setd ("."+.huntingquestcount+"_huntingmob["+(.@size+1)+"]",getarg(.@argcount+1));
			set .@argcount, .@argcount+2;
			set .@size, .@size+2;
		}
		return;
	}

havetaken:
	clear;
	mes "[^FF7700Gestor de Misiones^000000]";
	mes "Lo siento, ya tienes esta misión activa.";
	close;

nottaken:
	clear;
	mes "[^FF7700Gestor de Misiones^000000]";
	mes "Parece que aún no has aceptado esta misión.";
	close;
}

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...