Jump to content
  • 0

Error help, event not found in Euphy's quest shop


chromus28

Question


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

what is the prob on my NPC if im having this error?

 

[Error]: npc_event: event not found [Donate NPC ::OnExit]
 


here is the script if in case

 

//===== eAthena Script =======================================
//= Euphy's Quest Shop
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.3
//===== Description: =========================================
//= A dynamic quest shop based on Lunar's, with easier config.
//= Includes support for multiple shops & cashpoints.
//= Item Preview script by ToastOfDoom.
//============================================================
					
prontera,139,225,6	script	Donate NPC 	719,{
function Add; function Chk; function Slot; function A_An;

	if(.Shops$ != "") set .@i,1;
	else {
		set .@menu$,"";
		for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1)
			set .@menu$, .@menu$+.Shops$[.@i]+":";
		set .@i, select(.@menu$); }
	dispbottom "Select one item at a time.";
	callshop "5shop"+.@i,1;
	npcshopattach "5shop"+.@i;
	end;

function Add {
	for(set .@n,5; 1; set .@n,.@n+2)
		if (!getarg(.@n,0)) break;
	for(set .@i,2; .@i<.@n; set .@i,.@i+1)
		set getd(".q_"+getarg(1)+"["+(.@i-2)+"]"), getarg(.@i);
	npcshopadditem "5shop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0);
	return; }
function Chk {
	if (getarg(0)<getarg(1)) { set @qf,1; return "^FF0000"; }
	else return "^00FF00"; }
function Slot {
	set .@s$,getitemname(getarg(0));
	switch(.ShowSlot){
		case 1: if (!getitemslots(getarg(0))) return .@s$;
		case 2: if (getiteminfo(getarg(0),11)>0) return .@s$+" ["+getitemslots(getarg(0))+"]";
		default: return .@s$; } }
function A_An {
	setarray .@A$[0],"a","e","i","o","u";
	set .@B$, "_"+getarg(0);
	for(set .@i,0; .@i<5; set .@i,.@i+1)
		if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0);
	return "a "+getarg(0); }

OnBuyItem:
	set .@q[0],@bought_nameid;
	copyarray .@q[1],getd(".q_"+@bought_nameid+"[0]"),getarraysize(getd(".q_"+@bought_nameid+"[0]"));
	if (!.@q[1]) { message strcharinfo(0),"An error has occurred."; end; }
	mes "[Quest Shop]";
	mes "Reward: ^0055FF"+((.@q[1]>1)?.@q[1]+"x ":"")+Slot(.@q[0])+"^000000";
	mes "Requirements:";
	if (.@q[2]) mes " > "+Chk(Zeny,.@q[2])+.@q[2]+" Zeny^000000";
	if (.@q[3]) mes " > "+Chk(getd(.Points$[0]),.@q[3])+.@q[3]+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+.@q[3]+")^000000";
	if (.@q[4]) for(set .@i,4; .@i<getarraysize(.@q); set .@i,.@i+2)
		mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1])+((.DisplayID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+.@q[.@i+1]+")^000000";
	if (@qf) { set @qf,0; close; }
	next;
	if (!checkweight(.@q[0],.@q[1])) {
		mes "[Quest Shop]";
		mes "^FF0000You need "+(((.@q[1]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000";
		close; }
	set @qe1, getiteminfo(.@q[0],5); set @qe2, getiteminfo(.@q[0],11);
	addtimer 1000, strnpcinfo(3)+"::OnExit";
	while(1){
		switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((((@qe1&1) || (@qe1&256) || (@qe1&512)) && @qe2>0 && !@qe6)?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) {
			case 1:
				if (.@q[2]) set Zeny, Zeny-.@q[2];
				if (.@q[3]) setd .Points$[0], getd(.Points$[0])-.@q[3];
				if (.@q[4]) for(set .@i,4; .@i<getarraysize(.@q); set .@i,.@i+2)
					delitem .@q[.@i],.@q[.@i+1];
				getitem .@q[0],.@q[1];
				if (.Announce) announce strcharinfo(0)+" has created "+A_An(getitemname(.@q[0]))+"!",0;
				specialeffect2 699;
				close;
			case 2:
				set @qe3, getlook(3); set @qe4, getlook(4); set @qe5, getlook(5);
				if (@qe1&1) atcommand "@changelook 3 "+@qe2;
				if (@qe1&256) atcommand "@changelook 1 "+@qe2;
				if (@qe1&512) atcommand "@changelook 2 "+@qe2;
				set @qe6,1;
				break;
			case 3:
				close; } }
OnExit:
	if (@qe6) { atcommand "@changelook 3 "+@qe3; atcommand "@changelook 1 "+@qe4; atcommand "@changelook 2 "+@qe5; }
	for(set .@i,1; .@i<7; set .@i,.@i+1) setd "@qe"+.@i,0;
	end;

OnInit:

// --------------------- Config ---------------------
// Custom points, if needed: "<variable>","<name to display>"
	setarray .Points$[0],"#CASHPOINTS","Cash Points";

	set .Announce,0;	// Announce quest completion? (1: yes / 0: no)
	set .ShowSlot,1;	// Show item slots? (2: all equipment / 1: if slots > 0 / 0: never)
	set .DisplayID,0;	// Show item IDs? (1: yes / 0: no)
	set .ShowZeny,0;	// Show Zeny cost, if any? (1: yes / 0: no)

// Shop categories, if needed: "<Shop 1>","<Shop 2>"{,...};
// Duplicate dummy data for any additional shops (bottom of script).
// If no categories, use the second line instead (remove //).

	setarray .Shops$[1],"Armor","Shield","Garment","Accesories","Cards","Weapon's","Headgear's","Usable";
	// set .Shops$,"n/a";

// Add(<shop number>,<reward ID>,<reward amount>,<Zeny cost>,<point cost>,
//     <required item ID>,<required item amount>{,...});
// Shop number corresponds with order above (default is 1).
// Note: Do NOT use a reward item more than once!



	Add(1,2394,1,0,0,7179,30);
	Add(1,2345,1,0,0,7179,20);
	Add(1,2347,1,0,0,7179,20);
	Add(1,2349,1,0,0,7179,20);
	Add(1,2351,1,0,0,7179,20);

	Add(2,2137,1,0,0,7179,30);
	Add(2,2138,1,0,0,7179,18);
	Add(2,2130,1,0,0,7179,18);

	Add(3,2554,1,0,0,7179,35);

	Add(4,2772,1,0,0,7179,28);
	Add(4,2737,1,0,0,7179,18);
	Add(4,2733,1,0,0,7179,24);

	Add(5,4441,1,0,0,7179,35);
	Add(5,4429,1,0,0,7179,20);
	Add(5,4430,1,0,0,7179,30);
	Add(5,4427,1,0,0,7179,25);
	Add(5,4361,1,0,0,7179,45);
	Add(5,4365,1,0,0,7179,100);
	Add(5,4359,1,0,0,7179,35);
	Add(5,4357,1,0,0,7179,100);
	Add(5,4407,1,0,0,7179,35);
	Add(5,4408,1,0,0,7179,40);
	Add(5,4399,1,0,0,7179,35);
	Add(5,4128,1,0,0,7179,45);
	Add(5,4318,1,0,0,7179,35);

	Add(6,1279,1,0,0,7179,45);
	Add(6,1280,1,0,0,7179,45);
	Add(6,1281,1,0,0,7179,45);
	Add(6,1486,1,0,0,7179,45);
	Add(6,1546,1,0,0,7179,45);
	Add(6,1576,1,0,0,7179,55);
	Add(6,1577,1,0,0,7179,55);
	Add(6,1426,1,0,0,7179,55);
	Add(6,2002,1,0,0,7179,60);
	Add(6,13416,1,0,0,7179,60);
	Add(6,1826,1,0,0,7179,60);
	Add(6,1310,1,0,0,7179,35);
	Add(6,1981,1,0,0,7179,35);
	Add(6,1927,1,0,0,7179,35);
	Add(6,13176,1,0,0,7179,25);
	Add(6,13177,1,0,0,7179,25);
	Add(6,13178,1,0,0,7179,25);
	Add(6,13179,1,0,0,7179,25);
	Add(6,13110,1,0,0,7179,20);
	Add(6,1743,1,0,0,7179,25);
	Add(6,13306,1,0,0,7179,30);
	Add(6,13307,1,0,0,7179,30);
	Add(6,13412,1,0,0,7179,15);
	Add(6,13413,1,0,0,7179,15);

	Add(7,5137,1,0,0,7179,15);
	Add(7,5766,1,0,0,7179,15);
	Add(7,5013,1,0,0,7179,15);
	Add(7,20261,1,0,0,7179,15);
	Add(7,30064,1,0,0,7179,15);
	Add(7,18503,1,0,0,7179,15);
	Add(7,20028,1,0,0,7179,15);
	Add(7,20030,1,0,0,7179,15);
	Add(7,5401,1,0,0,7179,15);
	Add(7,5767,1,0,0,7179,15);
	Add(7,2687,1,0,0,7179,15);
	Add(7,30067,1,0,0,7179,15);
	Add(7,5389,1,0,0,7179,15);
	Add(7,5521,1,0,0,7179,15);
	Add(7,5800,1,0,0,7179,15);
	Add(7,5304,1,0,0,7179,15);
	Add(7,5591,1,0,0,7179,15);
	Add(7,5170,1,0,0,7179,15);
	Add(7,5518,1,0,0,7179,15);
	Add(7,5374,1,0,0,7179,15);
	Add(7,5476,1,0,0,7179,15);
	Add(7,5822,1,0,0,7179,15);
	Add(7,5138,1,0,0,7179,15);
	Add(7,5753,1,0,0,7179,15);
	Add(7,5751,1,0,0,7179,15);
	Add(7,5483,1,0,0,7179,15);
	Add(7,5375,1,0,0,7179,15);

	Add(8,12246,1,0,0,7179,10);



// --------------------------------------------------
	for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1)
		npcshopdelitem "5shop"+.@i,909;
waitingroom "Newbie Gift!",0;
	end;
}

// -------- Dummy data (duplicate as needed) --------
-	shop	5shop1	-1,909:-1
-	shop	5shop2	-1,909:-1
-	shop	5shop3	-1,909:-1
-	shop	5shop4	-1,909:-1
-	shop	5shop5	-1,909:-1
-	shop	5shop6	-1,909:-1
-	shop	5shop7	-1,909:-1
-	shop	5shop8	-1,909:-1


another help please on my v4p shop

 

-	shop	vote_shop1	111,501:50
prontera,144,230,6	script	Vote Shop#1	714,{
	set @i,0;
	mes "[ Annie ]";
	mes "Each item will cost you some ^008800Voting Proof Tickets^000000";
	mes "Select only one.";
	callshop "vote_shop1",1;
	npcshopattach "vote_shop1";
	end;


OnBuyItem:
	if(.BuildQuest) {
		for(set .e,0; !compare(""+getarg(.e+1),"Zeny"); set .e,.e+2) {}
		npcshopadditem "vote_shop1",getarg(.e+2),getarg(.e)*compare(""+getarg(.e+1),"SZeny");
		setarray .Shop[.i],getarg(.e+2);
		set .i,.i+1;
		goto Quest_Setup;
	}
	if(.Shop[@i]!=@bought_nameid) for(set @i,1; 1; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set .i,@i; callsub Quest_Setup; }
	for(set @i,1; !@e; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set @e,1; set .i,@i; callsub Quest_Setup; }
	mes "[ Annie ]";
	mes "I require the following:";
	for(set @i,0; !compare(""+getarg(@i+1),"Zeny"); set @i,@i+2) mes "^880000" + ((countitem(getarg(@i))>=getarg(@i+1))? "^008800":"") + "" + getarg(@i+1) + " " + getitemname(getarg(@i)) + " [" + countitem(getarg(@i)) + "/" + getarg(@i+1) + "]";
	if(getarg(@i)) mes "^880000" + ((Zeny>=getarg(@i))? "^008800":"") + "" + getarg(@i) + " Zeny";
	mes "^000000In exchange, I will give you:^000088";
	for(set @i,@i+2; getarg(@i+1,0); set @i,@i+2) mes getarg(@i+1) + " " + getitemname(getarg(@i));
	switch(select("Exchange:" + (((((getiteminfo(@bought_nameid,5) & 1) || (getiteminfo(@bought_nameid,5) & 256) || (getiteminfo(@bought_nameid,5) & 512)) && @equip==0))? "Preview Item":"") + ":No thanks")) {
		case 1:
			for(set @i,0; !compare(""+getarg(@i+1),"Zeny"); set @i,@i+2) if(countitem(getarg(@i)) < getarg(@i+1)) {
				next;
				mes "You have " + countitem(getarg(@i)) + " " + getitemname(getarg(@i)) + ", while I require " + getarg(@i+1) + ".";
				mes "Please obtain ^880000" + (getarg(@i+1)-countitem(getarg(@i))) + " more " + getitemname(getarg(@i)) + "^000000.";
				close;
			}
			if(Zeny < getarg(@i)) {
				next;
				mes "You do not have enough Zeny.";
				mes "Please obtain ^880000" + (getarg(@i)-Zeny) + " more Zeny^000000.";
				close;
			}
			for(set @i,0; !compare(""+getarg(@i+1),"Zeny"); set @i,@i+2) delitem getarg(@i),getarg(@i+1);
			set Zeny,Zeny-getarg(@i);
			for(set @i,@i+2; getarg(@i+1,0); set @i,@i+2) getitem getarg(@i),getarg(@i+1);
			if (compare(""+getarg(@i,0),"announce")) announce strcharinfo(0) + " has just obtained " + getitemname(@bought_nameid) + "!",bc_all;
			close;
		case 2:
			set @bottomview, getlook(3);
			set @topview, getlook(4);
			set @midview, getlook(5);
			addtimer 1000, strnpcinfo(3)+"::On_Leave";
			set @equip,getiteminfo(@bought_nameid, 5);
			set @view, getiteminfo(@bought_nameid, 11);
			if(@equip != -1 && @view > 0) {
				if(@equip & 1) atcommand "@changelook 3 " + @view;
				if(@equip & 256) atcommand "@changelook 1 " + @view;
				if(@equip & 512) atcommand "@changelook 2 " + @view;
			}
			next;
			goto OnBuyItem;
		case 3:
			close;
	}
On_Leave:
	atcommand "@changelook 1 " + @topview;
	atcommand "@changelook 2 " + @midview;
	atcommand "@changelook 3 " + @bottomview;
	set @equip,0;
	set @view,0;
	set @topview,0;
	set @midview,0;
	set @bottomview,0;
	end;
OnInit:
waitingroom "V4P Shop",0;
	npcshopitem "vote_shop1",0,0;
	set .BuildQuest,1;
	set .i,1;
Quest_Setup:
	switch(.i) {
		default: set .BuildQuest,0; set .e,0; set .i,0; end;
		case 1: callsub OnBuyItem,7227,20,20,"SZeny",5274,1;
		case 2: callsub OnBuyItem,7227,20,20,"SZeny",5274,1;
		case 3: callsub OnBuyItem,7227,20,20,"SZeny",5275,1;
		case 4: callsub OnBuyItem,7227,20,20,"SZeny",5276,1;
		case 5: callsub OnBuyItem,7227,20,20,"SZeny",5298,1;
	}
}

and here is the error

 

[Warning]: itemdb_search: Item ID 0 does not exists in the item_db. Using dummy data.
 
i dont know what it saying item id 0 does not exists but in the callsub there is no item 0 
 
please help me with this 2 errors i have


bump

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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