Jump to content
  • 0

Help Poring Race Event


powkda

Question


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   1
  • Joined:  11/11/17
  • Last Seen:  

hello, I'm having a problem with the poring race event, it all comes down to the event that goes to the npc to place the bet, he already has a race in progress, and in the log the following error:

[Error]: buildin_getmapxy: Player with nick 'Poring#prace1' is not found.
[Error]: buildin_getmapxy: Player with map id '0' is not found.
[Error]: buildin_getmapxy: Player with nick 'Angeling#prace2' is not found.
[Error]: buildin_getmapxy: Player with map id '0' is not found.
[Error]: buildin_getmapxy: Player with nick 'Metaling#prace3' is not found.
[Error]: buildin_getmapxy: Player with map id '0' is not found.
[Error]: buildin_getmapxy: Player with nick 'Deviling#prace4' is not found.
[Error]: buildin_getmapxy: Player with map id '0' is not found.
[Error]: buildin_getmapxy: Player with nick 'Poring Noel#prace5' is not found.
[Error]: buildin_getmapxy: Player with map id '0' is not found.
[Error]: buildin_getmapxy: Player with nick 'Poporing#prace6' is not found.
[Error]: buildin_getmapxy: Player with map id '0' is not found.

can someone help me?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

getmapxy(.@mapname$, .@x1, .@y, 1, "XXXXXXXXXXXXXXXXX");

change the BL_TYPE parameter type into

getmapxy(.@mapname$, .@x1, .@y, BL_NPC, "XXXXXXXXXXXXXXXXX");

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   1
  • Joined:  11/11/17
  • Last Seen:  

one of the npc that i tried to use and gave the error

//= Corrida Poring
//===== Mapflags: =============================================
p_track02	mapflag	nobranch
p_track02	mapflag	noicewall
p_track02	mapflag	nomemo
p_track02	mapflag	noreturn
p_track02	mapflag	noteleport
p_track02	mapflag	nowarpto	
p_track02	mapflag	nowarp
p_track02	mapflag	pvp	off
p_track02	mapflag	nosave
//====== Teleporte: ============================================
prontera,147,175,6	script	Poring Race#prace0	4_F_SON,{
	
	if($prace_gate == 0){
	mes "[Warper]";
	mes "Desculpe, mas a Corrida dos Porings está fechada.";
	close;
	}
	mes "[Warper]";
	mes "Olá "+strcharinfo(0)+", você quer ir";
	mes "para a Corrida dos Porings?";
	if(select("Sim, claro.:Não, obrigado.") == 2) close;
	close2; warp "p_track02",55,41; end;
}
//====== Warps: ================================================
hugel,45,57,0	warp	p_track001	2,2,p_track02,75,42
p_track02,78,42,0	warp	p_track002	1,3,hugel,48,60
//====== Checker: ==============================================
p_track02,44,41,0	script	Checker#prace0	-1,{
end;

OnChequeo:
	set .@prace_prize, 607;		     // ID do prêmio para quem vencer.
	set .@prace_prize_quantity, 100; // Quantidade do prêmio.		 

	set $prace_gate,0;
	for(set .@i,0; .@i < (getarraysize($prace_bidders)); set .@i, .@i + 1){
	if(attachrid($prace_bidders[.@i])){
	if (@prace_playing!=1) end;
	set @z, rand(150000,400000);
	dispbottom "O vencedor é o "+$prace_winner$+" e você apostou em "+@prace_winner$+".";
	if (@prace_winner$==$prace_winner$ && @prace_winner$!=""){  
   		dispbottom "Você venceu! Prêmio: 1 "+getitemname(@id); mapannounce "p_track02"," Parabéns! "+strcharinfo(0)+" venceu!",1,0xFFAB54;
   		getitem .@prace_prize,1; emotion 21,1; warp "prontera",150,170;
   	} else { dispbottom "Você perdeu."; emotion 28,1; warp "prontera",150,170; }
   		set @prace_winner$,"";set @prace_playing,0;
  	} //else { announce .@i+" || "+$prace_bidders[.@i],bc_all; }  //debug
} 	
	for(set .@i,0; .@i < (getarraysize($prace_bidders)); set .@i, .@i + 1) set $prace_bidders[.@i],0;
}

-	script	Timers#prace0	-1,{

	OnClock0000: callsub OnCalll;
	OnClock0200: callsub OnCalll;
	OnClock0400: callsub OnCalll;
	OnClock0600: callsub OnCalll;
	OnClock0800: callsub OnCalll;
	OnClock1000: callsub OnCalll;
	OnClock1200: callsub OnCalll;
	OnClock1400: callsub OnCalll;
	OnClock1600: callsub OnCalll;
	OnClock1800: callsub OnCalll;
	OnClock2000: callsub OnCalll;
	OnClock1318: callsub OnCalll;

	OnCalll:
		set $prace_gate,1;		
		announce "A 'Corrida dos Porings' irá começar em breve, façam suas apostas!",bc_all|bc_yellow;
		end;
}
//====== Principal: ============================================
p_track02,61,42,5	script	Bidder#prace0	4_M_05,{ 

	set .@prace_zeny,100000;	// Preço para apostar.

	if ($prace_random < 1) callsub OnInit;
	if (@prace_playing==1) callsub AlreadyPlaying;

	if($prace_gate == 0){ mes "[Bidder]"; mes "Uma corrida está em andamento..."; close; }

	getmapxy(.@mapname$,.@x1,.@y,1,"Poring#prace1");
	getmapxy(.@mapname$,.@x2,.@y,1,"Angeling#prace2");
	getmapxy(.@mapname$,.@x3,.@y,1,"Metaling#prace3");
	getmapxy(.@mapname$,.@x4,.@y,1,"Deviling#prace4");
	getmapxy(.@mapname$,.@x5,.@y,1,"Poring Noel#prace5");
	getmapxy(.@mapname$,.@x6,.@y,1,"Poporing#prace6");
	if (.@x1 != 58 || .@x2 != 58 || .@x3 != 58 || .@x4 != 58 || .@x5 != 58 || .@x6 != 58){
	mes "[Bidder]"; mes "Uma corrida está em andamento..."; close;
	}
	mes "[Bidder]"; mes "Escolha o poring em que deseja apostar:";mes "Irá custar "+.@prace_zeny+" Zeny.";next;
	switch(select("Poring","Angeling","Metaling","Deviling","Poring Noel","Poporing")){
	case 1: callfunc "OnBid","Poring";
	case 2: callfunc "OnBid","Angeling";
	case 3: callfunc "OnBid","Metaling";
	case 4: callfunc "OnBid","Deviling";
	case 5: callfunc "OnBid","Poring Noel";
	case 6: callfunc "OnBid","Poporing";
	}

	OnReady:
		set $prace_bets,$prace_bets+1;
 		set $prace_bidders[$prace_bets],getcharid(3);
		set @prace_playing,1;
 		mes "[Bidder]";
 		mes "Eu tenho "+$prace_bets+" apostas.";
 		setnpctimer 60000; startnpctimer;
 		npctalk strcharinfo(0)+" fez sua aposta!";
 		close;

	Start1: setnpctimer 0; startnpctimer; end;
	AlreadyPlaying: mes "[Bidder]"; mes "Você apostou em ^00bb00"+@prace_winner$+"^000000."; close;
	
	StartRace:
		donpcevent "Metaling#prace3::OnRace";
		donpcevent "Poring#prace1::OnRace";
		donpcevent "Poporing#prace6::OnRace";
		donpcevent "Angeling#prace2::OnRace";
		donpcevent "Poring Noel#prace5::OnRace";
		donpcevent "Deviling#prace4::OnRace";
		end;

	OnStopRace:
		donpcevent "Poring#prace1::OnStop";
		donpcevent "Angeling#prace2::OnStop";
		donpcevent "Metaling#prace3::OnStop";
		donpcevent "Deviling#prace4::OnStop";
		donpcevent "Poring Noel#prace5::OnStop";
		donpcevent "Poporing#prace6::OnStop";
		if ($prace_winner$!="") callsub WinRace;
		end;

	ReturnRace:
		donpcevent "Poring#prace1::OnReturn";
		donpcevent "Angeling#prace2::OnReturn";
		donpcevent "Metaling#prace3::OnReturn";
		donpcevent "Deviling#prace4::OnReturn";
		donpcevent "Poring Noel#prace5::OnReturn";
		donpcevent "Poporing#prace6::OnReturn";
		end;

	WinRace:
		set $prace_gate,0;
		mapannounce "p_track02","O vencedor é o "+$prace_winner$+".",1,0xFFAB54;
		donpcevent "Checker#prace0::OnChequeo";
		setnpctimer 30000;startnpctimer;
		end;

	OnInit:
		set $prace_random,70;
		set $prace_random2,600;
		set $prace_winner$,"";
		set $prace_bets,0;
		set $prace_bidders,0;
		end;
 
	OnTimer500: mapannounce "p_track02","Porings, em suas marcas...",1,0xFFAB54; end;	
	OnTimer3000: mapannounce "p_track02","...3...",1,0xFFAB54; end;	
	OnTimer4000: mapannounce "p_track02","...2...",1,0xFFAB54; end;	
	OnTimer5000: mapannounce "p_track02","...1...",1,0xFFAB54; callsub StartRace; end;
	OnTimer6000: stopnpctimer; mapannounce "p_track02","Gooo!!!",1,0xFFAB54; end;
	OnTimer35000: set $prace_winner$,""; set $prace_bets,0; stopnpctimer; callsub ReturnRace;
	OnTimer90000: npctalk "Eu tenho "+$prace_bets+" aposta(s). Alguém mais?"; end;
	OnTimer110000: npctalk "A corrida irá começar em breve. Última chance."; end;
	OnTimer120000: callsub Start1;
}

//====== Função Apostar: =======================================
function	script	OnBid	{

	getmapxy(.@mapname$,.@x1,.@y,1,"Poring#prace1");
	getmapxy(.@mapname$,.@x2,.@y,1,"Angeling#prace2");
	getmapxy(.@mapname$,.@x3,.@y,1,"Metaling#prace3");
	getmapxy(.@mapname$,.@x4,.@y,1,"Deviling#prace4");
	getmapxy(.@mapname$,.@x5,.@y,1,"Poring Noel#prace5");
	getmapxy(.@mapname$,.@x6,.@y,1,"Poporing#prace6");
	if (.@x1 == 58 || .@x2 == 58 || .@x3 == 58 || .@x4 == 58 || .@x5 == 58 || .@x6 == 58){
	if (Zeny < .@prace_zeny) { callsub OnZeny; } else { set Zeny,Zeny-.@prace_zeny; }
 	set @prace_winner$,getarg(0); callsub OnReady;
	}
	mes "[Bidder]"; mes "Uma corrida está em andamento..."; close;

	OnZeny: set @prace_winner$,""; mes "[Bidder]"; mes "Você não tem Zeny suficiente."; close;

	OnReady: set $prace_bets,$prace_bets+1; set $prace_bidders[$prace_bets],getcharid(3);
		set @prace_playing,1; mes "[Bidder]"; mes "Eu tenho "+$prace_bets+" apostas.";
 		setnpctimer 60000; startnpctimer; npctalk strcharinfo(0)+" fez sua aposta!"; close;
}
//====== Monstros: ==============================================
p_track02,58,38,2	script	Poring#prace1	PORING,{ 
end;
	OnRace: initnpctimer; startnpctimer; end;
	OnStop: stopnpctimer; end;
	OnReturn: npcwalkto 58,38; end;
	OnTimer1100:
		getmapxy(.@mapname$,.@x,.@y,1,"Poring#prace1");
		if(rand(100) < $prace_random) npcwalkto .@x-1,.@y;
 		setnpctimer rand($prace_random2); startnpctimer;
 		if ((.@x-1) == 29) { set $prace_winner$,"Poring"; emotion 29; donpcevent "Bidder#prace0::OnStopRace"; }
}
p_track02,58,36,2	script	Angeling#prace2	ANGELING,{
end;
	OnRace: initnpctimer; startnpctimer; end;
	OnStop: stopnpctimer; end;
	OnReturn: npcwalkto 58,36; end;
	OnTimer1100:
		getmapxy(.@mapname$,.@x,.@y,1,"Angeling#prace2");
		if(rand(100) < $prace_random) npcwalkto .@x-1,.@y;
 		setnpctimer rand($prace_random2); startnpctimer;
 		if ((.@x-1) == 29) { set $prace_winner$,"Angeling"; emotion 29; donpcevent "Bidder#prace0::OnStopRace"; }
}
p_track02,58,34,2	script	Metaling#prace3	METALING,{
end;
	OnRace: initnpctimer; startnpctimer; end;
	OnStop: stopnpctimer; end;
	OnReturn: npcwalkto 58,34; end;
	OnTimer1100:
		getmapxy(.@mapname$,.@x,.@y,1,"Metaling#prace3");
		if(rand(100) < $prace_random) npcwalkto .@x-1,.@y;
 		setnpctimer rand($prace_random2); startnpctimer;
 		if ((.@x-1) == 29) { set $prace_winner$,"Metaling"; emotion 29; donpcevent "Bidder#prace0::OnStopRace"; }
}
p_track02,58,32,2	script	Deviling#prace4	DEVILING,{
end;
	OnRace: initnpctimer; startnpctimer; end;
	OnStop: stopnpctimer; end;
	OnReturn: npcwalkto 58,32; end;
	OnTimer1100:
		getmapxy(.@mapname$,.@x,.@y,1,"Deviling#prace4");
		if(rand(100) < $prace_random) npcwalkto .@x-1,.@y;
 		setnpctimer rand($prace_random2); startnpctimer;
 		if ((.@x-1) == 29) { set $prace_winner$,"Deviling"; emotion 29; donpcevent "Bidder#prace0::OnStopRace"; }
}
p_track02,58,30,2	script	Poring Noel#prace5	PORING_,{
end;
	OnRace: initnpctimer; startnpctimer; end;
	OnStop: stopnpctimer; end;
	OnReturn: npcwalkto 58,30; end;
	OnTimer1100:
		getmapxy(.@mapname$,.@x,.@y,1,"Poring Noel#prace5");
		if(rand(100) < $prace_random) npcwalkto .@x-1,.@y;
 		setnpctimer rand($prace_random2); startnpctimer;
 		if ((.@x-1) == 29) { set $prace_winner$,"Poring Noel"; emotion 29; donpcevent "Bidder#prace0::OnStopRace"; }
}
p_track02,58,28,2	script	Poporing#prace6	POPORING,{
end;
	OnRace: initnpctimer; startnpctimer; end;
	OnStop: stopnpctimer; end;
	OnReturn: npcwalkto 58,28; end;
	OnTimer1100:
		getmapxy(.@mapname$,.@x,.@y,1,"Poporing#prace6");
		if(rand(100) < $prace_random) npcwalkto .@x-1,.@y;
 		setnpctimer rand($prace_random2); startnpctimer;
 		if ((.@x-1) == 29) { set $prace_winner$,"Poporing"; emotion 29; donpcevent "Bidder#prace0::OnStopRace"; }
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   1
  • Joined:  11/11/17
  • Last Seen:  

On 4/5/2020 at 11:04 AM, Emistry said:

getmapxy(.@mapname$, .@x1, .@y, 1, "XXXXXXXXXXXXXXXXX");

change the BL_TYPE parameter type into


getmapxy(.@mapname$, .@x1, .@y, BL_NPC, "XXXXXXXXXXXXXXXXX");

 

It worked, thank you very much
taking advantage of the momentum, I'm having problems with sleep 2 only in the logs, the npv works normal, but I want to fix it.
I already changed sleep2 for sleep but there was another error:

		sleep 1000;
		for(set .@p,0;.@p<getarraysize($@tarot_participantes$);set .@p,.@p+1){
		sleep2 1000;
		if(getmapusers("poring_w01") == 1){goto Vencer;}
			attachrid(getcharid(3,$@tarot_participantes$[.@p]));
				if( strcharinfo(3) == $@mapeventtarot$[0] ){
					set .@CARDs,522+rand(1,14);
					specialeffect2 .@CARDs, strcharinfo(0);
					if( .@CARDs == 531 ){
						deletearray $@tarot_participantes$[.@p], 1;
						percentheal -99,-99;
						sleep2 1500;
						warp "SavePoint",0,0;
[Error]: buildin_warp: fatal error ! player not attached!
[Debug]: Function: warp (3 parameters):
[Debug]: Data: string value="SavePoint"
[Debug]: Data: number value=0
[Debug]: Data: number value=0
[Debug]: Source (NPC): Tarot Event (invisible/not on a map)

want me to post the full npc?

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
Answer this question...

×   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...