Jump to content
  • 0
Sign in to follow this  
Tupac

System vending

Question

Help

[Error]: Server received crash signal! Attempting to save all online characters!

to use script:

alberta,218,111,4	script	Pontos de Venda	757,{
for( set .@i,1; .@i <= .count; set .@i,.@i + 1 ){
	getmapxy( .@map$,.@x,.@y,1,"#vend_slot"+.@i );
	if( !getareausers( .map$,.@x,.@y,.@x,.@y ) && .@x > 1 && .@y > 1 ){
		 set .@available,.@available + 1;
		 set .@menu$,.@menu$ + "Slot - "+.@i+":";
	}else{
		 set .@menu$,.@menu$ + ":";
	}
}
 
if( !.@available ){
	mes "Este slot está ocupado.";
}else if( !getskilllv("MC_VENDING") ){
	mes "Você não possui a habilidade ^0055FFComércio^000000.";
}else{
	mes "Slot Disponível: "+.@available;
	mes "Por favor, escolha o seu Ponto de Venda.";
	set .@i,select( .@menu$ );
	getmapxy( .@map$,.@x,.@y,1,"#vend_slot"+.@i );
	if( .@x == 1 || .@y == 1 ){
		 mes "Este NPC está em local inválido...";
	}else{
		 warp .@map$,.@x,.@y;
		 hideonnpc "#vend_slot"+.@i;
	}
}
close;
 
OnInit:
sleep 1000;
// Map for vending
set .map$,"alberta";
setcell .map$,0,0,284,365,cell_novending,1;
 
// x and y horizone ..
setarray .x_line,208,211,214,217,220,223,226,229;
setarray .y_line,109,106,103,100,97,94;
 
set .x_line_size,getarraysize( .x_line );
set .y_line_size,getarraysize( .y_line );
set .count,1;
for( set .@x,0; .@x < .x_line_size; set .@x,.@x + 1 )
	for( set .@y,0; .@y < .y_line_size; set .@y,.@y + 1 )
		 if( checkcell( .map$,.x_line[.@x],.y_line[.@y],cell_chkpass ) ){
				movenpc "#vend_slot"+.count,.x_line[.@x],.y_line[.@y];
				setcell .map$,.x_line[.@x],.y_line[.@y],.x_line[.@x],.y_line[.@y],cell_novending,0;
				set .count,.count + 1;
		 }
npctalk "Ponto de Venda: "+.count;
donpcevent "::OnSetup";
end;
}
 
-	script	vend_slot	-1,{
getmapxy( .@map$,.@x,.@y,1 );
if( !getskilllv("MC_VENDING") ){
	mes "Você não possui a habilidade ^0055FFComércio^000000.";
}else if( getareausers( .@map$,.@x,.@y,.@x,.@y ) ){
	mes "Alguém já escolheu este local.";
}else{
	mes "Ponto de Venda : ^777777Disponível^000000";
	mes "^0055FF[ Regras dos Pontos de Venda]^000000";
	mes "^FF0000 ~ Nome adequado à loja.^000000";
	mes "^FF0000 ~ Não ocupar espaço com vendas inúteis.^000000";
	mes " ";
	mes "^777777Os players que não seguirem estas regras serão devidamente punidos.^000000";
	if( select( "Escolha o Ponto de Venda","Cancelar" ) == 1 ){
		 warp .@map$,.@x,.@y;
		 hideonnpc strnpcinfo(0);
	}
}
close;
 
OnSetup:
getmapxy( .@map$,.@x,.@y,1 );
set .@npcname$,strnpcinfo(0);
while( .@map$ != "" ){
	if( getareausers( .@map$,.@x,.@y,.@x,.@y ) ){
		 hideonnpc .@npcname$;
	}else{
		 hideoffnpc .@npcname$;
		 // specialeffect 313;
	}
	sleep 5000;
}
end;
}
 
// Add more if needed.
alberta,1,1,4	duplicate(vend_slot)	#vend_slot1	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot2	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot3	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot4	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot5	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot6	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot7	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot8	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot9	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot10	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot11	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot12	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot13	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot14	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot15	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot16	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot17	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot18	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot19	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot20	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot21	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot22	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot23	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot24	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot25	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot26	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot27	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot28	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot29	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot30	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot31	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot32	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot33	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot34	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot35	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot36	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot37	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot38	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot39	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot40	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot41	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot42	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot43	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot44	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot45	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot46	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot47	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot48	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot49	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot50	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot51	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot52	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot53	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot54	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot55	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot56	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot57	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot58	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot59	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot60	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot61	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot62	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot63	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot64	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot65	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot66	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot67	858
alberta,1,1,4	duplicate(vend_slot)	#vend_slot68	858

 

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0
I'm having the same problem
Bump!

Share this post


Link to post
Share on other sites
  • 0

I wonder there is a line of this:


donpcevent "::OnSetup";

could it actually meant this???
donpcevent "vend_slot::OnSetup";

Share this post


Link to post
Share on other sites
  • 0
41 minutes ago, utofaery said:

I wonder there is a line of this:


donpcevent "::OnSetup";

could it actually meant this???
donpcevent "vend_slot::OnSetup";

https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L6456-L6458

-	script	asdf	FAKE_NPC,{
OnInit:
	bindatcmd "asdf", strnpcinfo(0)+"::Onaaa";
	end;
Onaaa:
	donpcevent "::OnDOALL";
	end;
OnDOALL:
	if ( !getstrlen( strnpcinfo(2) ) ) end;
	npctalk "lalala";
	end;
}
prontera,150,185,5	duplicate(asdf)	asdf#1	1_F_MARIA
prontera,152,185,5	duplicate(asdf)	asdf#2	1_F_MARIA
prontera,154,185,5	duplicate(asdf)	asdf#3	1_F_MARIA
prontera,156,185,5	duplicate(asdf)	asdf#4	1_F_MARIA
prontera,158,185,5	duplicate(asdf)	asdf#5	1_F_MARIA

 

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, AnnieRuru said:

*doevent "<NPC object name>::<event label>"; << Line 6424
*donpcevent "<NPC object name>::<event label>"; << Line 6449

have the command script got updated again???
 

assuming your are saying L6456 is 

*donpcevent "<NPC object name>::<event label>";

It can run even without npc name?

not near anywhere to do any testing currently..

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, utofaery said:

have the command script got updated again???

No.

 

1 hour ago, utofaery said:

It can run even without npc name?

WTH is this nonsense.. the answer is literally in the link.

Edited by Capuche
  • Love 1

Share this post


Link to post
Share on other sites
  • 0
6 hours ago, Capuche said:

WTH is this nonsense.. the answer is literally in the link.

I did mention:

7 hours ago, utofaery said:

not near anywhere to do any testing currently..

Disregard then...I am not near any where to test or with fast internet to load anything lol...

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...

Important Information

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