Jump to content
Theru

AYUDA CON NPC SUMMONER

Recommended Posts

Hola amigos, estuve dandole vueltas a un script que encontre en herc, y quise migrarlo a rAthena.

▫️El script funciona hasta cierto punto:
                    ▫️ Aparece el npc, hablas con el y corre todo normal, te pide items, pero al entregarlos el npc desaparece y ya no sucede nada.
▫️Cuando hablas con el y despues le das en cancelar, pero despues vuelves a hablar con el, dice que esta hablando con otra personas.
▫️ La consola no tira ningun error.
▫️Quisiera saber si se debe a que es de herc, y si es asi podrian ayudarme a migrarlo a rAthena!

Gracias de antemano /awsm

Les dejo el Script.

prontera,150,150,0	script	Thanatos Summoner#22	4W_SAILOR,{
	mes .npc$;

	[email protected]_id = getcharid(1);
	
	[email protected]	= strnpcinfo(2);
	
	if (getd(".qwerty" + [email protected])) {
		mes "Someone is talking to me!";
		emotion 23;
		close;
	}
	
	setd(".qwerty" + [email protected], 1);
	
	if ([email protected]_id && getpartyleader([email protected]_id, 2) != getcharid(0)) {
		mes "Only the party leader can talk to me";
	} else {
		mes "Hi " + strcharinfo(0) + ", What can i do for you?";
		next;
		if (select("I want to summon Thanatos:Cancel") == 1 ) {
			mes .npc$;
			mes "You need the following items to summon thanatos";
			[email protected] = 0;
			while ([email protected] < .size) {
				mes "> " + .fragments[[email protected]+1] + "x " + getitemname(.fragments[[email protected]]);
				[email protected] += 2;
			}
			next;
			if (select("Yes, I have those items and I'm ready to fight:I will think twice") == 1) {
				[email protected] = 0;
				while ([email protected] < .size) {
					if (countitem(.fragments[[email protected]]) < .fragments[[email protected]+1]) {
						mes .npc$;
						mes "You lack " + getitemname(.fragments[[email protected]]);
						setd(".qwerty" + [email protected], 0);
						close;
					}
					[email protected] += 2;
				}
				[email protected] = 0;
				while ([email protected] < .size) {
					delitem .fragments[[email protected]], .fragments[[email protected]+1];
					[email protected] += 2;
				}
				if (getcharid(1)) {
					announce "Party " + getpartyname([email protected]_id) + " has initiated Thanatos Summoner", 0;
					warpparty "thana_boss", 113, 165, [email protected]_id, true;
				} else {
					announce strcharinfo(0) + " has initiated Thanatos Summoner", 0;
					warp "thana_boss", 113, 165;
				}
				monster "thana_boss", 0, 0, "--ja--", 1708, 1, strnpcinfo(3) + "::OnKill";
				hideonnpc strnpcinfo(3);
			}
		}
	}
	
	setd(".qwerty" + [email protected], 0);
	close;

	// 50 minutes mark
	On50MinMark:
		announce "Thanatos Summoner will open in 10 minutes", 0;
		addtimer 300000, strnpcinfo(3) + "::On55MinMark";
		end;
	// 55 minutes mark
	On55MinMark:
		announce "Thanatos Summoner will open in 5 minutes", 0;
		addtimer 240000, strnpcinfo(3) + "::On59MinMark";
		end;
	// 59 minutes mark
	On59MinMark:
		announce "Thanatos Summoner will open in 1 minute", 0;
		addtimer 60000, strnpcinfo(3) + "::OnEnable";
		end;
	// 60 minutes mark
	OnEnable:
		announce "Thanatos Summoner is open", 0;
		hideoffnpc strnpcinfo(3);
		end;
		
	OnKill:
		[email protected]_id = getcharid(1);
		if ([email protected]_id) {
			announce strcharinfo(0) + " successfully killed Thanatos", 0;
			sleep2 .warp_interval * 60 * 1000;
			warp "prontera", 150, 150;
		} else {
			announce strcharinfo(0) + " of party " + getpartyname([email protected]_id) + " successfully killed Thanatos", 0;
			sleep2 .warp_interval * 60 * 1000;
			warpparty "prontera", 150, 150, [email protected]party_id, true;
		}
		announce "Thanatos summoner will open again after " + .npc_interval + " minutes", 0;
		addtimer .npc_interval * 60 * 1000, strnpcinfo(3) + "::On50MinMark";
		end;
		
	OnPCDieEvent:
		if (strcharinfo(3) == "thana_boss")
			warp "SavePoint", 0, 0;
		if (!getmapusers("thana_boss")) {
			announce "No one manage to kill Thanatos. Thanatos summoner will open again after " + .npc_interval + " minutes", 0;
			killmonsterall "thana_boss";
			addtimer .npc_interval * 60 * 1000, strnpcinfo(3) + "::On50MinMark";
		}
		end;
	
	OnInit:
		.npc$ = "[" + strnpcinfo(1) + "]";
		setarray .fragments[0], 31996, 4; // <item_id>, <amount>
		.size = getarraysize(.fragments);
		.npc_interval = 50; // 50 minutes
		.warp_interval = 3; // 3 minutes
		announce "Thanatos Summoner is open", 0;
		end;
		
}

thana_boss	mapflag	nowarp
thana_boss	mapflag	noreturn
thana_boss	mapflag	nowarpto



summoner.txt

Captura.PNG

Captura2.PNG

Captura3.PNG

Captura4.PNG

Link to comment
Share on other sites

On 1/5/2022 at 12:48 AM, Theru said:

Hola amigos, estuve dandole vueltas a un script que encontre en herc, y quise migrarlo a rAthena.

▫️El script funciona hasta cierto punto:
                    ▫️ Aparece el npc, hablas con el y corre todo normal, te pide items, pero al entregarlos el npc desaparece y ya no sucede nada.
▫️Cuando hablas con el y despues le das en cancelar, pero despues vuelves a hablar con el, dice que esta hablando con otra personas.
▫️ La consola no tira ningun error.
▫️Quisiera saber si se debe a que es de herc, y si es asi podrian ayudarme a migrarlo a rAthena!

Gracias de antemano /awsm

Les dejo el Script.

prontera,150,150,0	script	Thanatos Summoner#22	4W_SAILOR,{
	mes .npc$;

	[email protected]_id = getcharid(1);
	
	[email protected]	= strnpcinfo(2);
	
	if (getd(".qwerty" + [email protected])) {
		mes "Someone is talking to me!";
		emotion 23;
		close;
	}
	
	setd(".qwerty" + [email protected], 1);
	
	if ([email protected]_id && getpartyleader([email protected]_id, 2) != getcharid(0)) {
		mes "Only the party leader can talk to me";
	} else {
		mes "Hi " + strcharinfo(0) + ", What can i do for you?";
		next;
		if (select("I want to summon Thanatos:Cancel") == 1 ) {
			mes .npc$;
			mes "You need the following items to summon thanatos";
			[email protected] = 0;
			while ([email protected] < .size) {
				mes "> " + .fragments[[email protected]+1] + "x " + getitemname(.fragments[[email protected]]);
				[email protected] += 2;
			}
			next;
			if (select("Yes, I have those items and I'm ready to fight:I will think twice") == 1) {
				[email protected] = 0;
				while ([email protected] < .size) {
					if (countitem(.fragments[[email protected]]) < .fragments[[email protected]+1]) {
						mes .npc$;
						mes "You lack " + getitemname(.fragments[[email protected]]);
						setd(".qwerty" + [email protected]i, 0);
						close;
					}
					[email protected] += 2;
				}
				[email protected] = 0;
				while ([email protected] < .size) {
					delitem .fragments[[email protected]], .fragments[[email protected]+1];
					[email protected] += 2;
				}
				if (getcharid(1)) {
					announce "Party " + getpartyname([email protected]_id) + " has initiated Thanatos Summoner", 0;
					warpparty "thana_boss", 113, 165, [email protected]_id, true;
				} else {
					announce strcharinfo(0) + " has initiated Thanatos Summoner", 0;
					warp "thana_boss", 113, 165;
				}
				monster "thana_boss", 0, 0, "--ja--", 1708, 1, strnpcinfo(3) + "::OnKill";
				hideonnpc strnpcinfo(3);
			}
		}
	}
	
	setd(".qwerty" + [email protected], 0);
	close;

	// 50 minutes mark
	On50MinMark:
		announce "Thanatos Summoner will open in 10 minutes", 0;
		addtimer 300000, strnpcinfo(3) + "::On55MinMark";
		end;
	// 55 minutes mark
	On55MinMark:
		announce "Thanatos Summoner will open in 5 minutes", 0;
		addtimer 240000, strnpcinfo(3) + "::On59MinMark";
		end;
	// 59 minutes mark
	On59MinMark:
		announce "Thanatos Summoner will open in 1 minute", 0;
		addtimer 60000, strnpcinfo(3) + "::OnEnable";
		end;
	// 60 minutes mark
	OnEnable:
		announce "Thanatos Summoner is open", 0;
		hideoffnpc strnpcinfo(3);
		end;
		
	OnKill:
		[email protected]_id = getcharid(1);
		if ([email protected]_id) {
			announce strcharinfo(0) + " successfully killed Thanatos", 0;
			sleep2 .warp_interval * 60 * 1000;
			warp "prontera", 150, 150;
		} else {
			announce strcharinfo(0) + " of party " + getpartyname([email protected]_id) + " successfully killed Thanatos", 0;
			sleep2 .warp_interval * 60 * 1000;
			warpparty "prontera", 150, 150, [email protected]_id, true;
		}
		announce "Thanatos summoner will open again after " + .npc_interval + " minutes", 0;
		addtimer .npc_interval * 60 * 1000, strnpcinfo(3) + "::On50MinMark";
		end;
		
	OnPCDieEvent:
		if (strcharinfo(3) == "thana_boss")
			warp "SavePoint", 0, 0;
		if (!getmapusers("thana_boss")) {
			announce "No one manage to kill Thanatos. Thanatos summoner will open again after " + .npc_interval + " minutes", 0;
			killmonsterall "thana_boss";
			addtimer .npc_interval * 60 * 1000, strnpcinfo(3) + "::On50MinMark";
		}
		end;
	
	OnInit:
		.npc$ = "[" + strnpcinfo(1) + "]";
		setarray .fragments[0], 31996, 4; // <item_id>, <amount>
		.size = getarraysize(.fragments);
		.npc_interval = 50; // 50 minutes
		.warp_interval = 3; // 3 minutes
		announce "Thanatos Summoner is open", 0;
		end;
		
}

thana_boss	mapflag	nowarp
thana_boss	mapflag	noreturn
thana_boss	mapflag	nowarpto



summoner.txt 3.47 kB · 0 downloads

Captura.PNG

Captura2.PNG

Captura3.PNG

Captura4.PNG

por que no usas la quest de thanatos para invocarlo, y por lo que vi dice que sera invocado en thana_boss fuiste aya a verificar si el mvp aparecio? por que la consola no tira ningun error.

Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.