Check @sold_nameid

astralprojection

New member
Messages
334
Points
0
need help on this, what i  need to accomplish here is player click npc and open sell window.  Player drag items to window and sell.  If item sold matches the given array, they will get the predefined  item from the array.  I can pay for this to accomplish, just pm me.

Code:
-	shop	dyn_shop1	FAKE_NPC,501:50.

prontera,145,94,3	script	Jaiho	4_F_JPNOBA,{
	callshop "dyn_shop1",2;  // sell only
	npcshopattach "dyn_shop1";
	end;

OnSellItem:
	check all @sold_nameid if matches the needed item below, then give the .@?item if matches. 

OnInit:
	// if 1 item sold to npc then cancell
	
	// if 2 item sold to npc then check from the array below
	setarray .@2items[ 0 ] = 501,502,503,504,505,506,545,546;
	setarray .@2need1[ 0 ], 507, 1, 508, 1;
	setarray .@2need2[ 0 ], 509, 1, 510, 2;
	setarray .@2need3[ 0 ], 511, 2, 512, 1;
	setarray .@2need4[ 0 ], 513, 1, 514, 1;
	setarray .@2need5[ 0 ], 515, 1, 516, 2;
	setarray .@2need6[ 0 ], 517, 1, 518, 1;
	setarray .@2need7[ 0 ], 519, 2, 520, 1;
	setarray .@2need8[ 0 ], 521, 1, 522, 3;	
	
	// if 3 item sold to npc then check from the array below
	setarray .@3items[ 0 ] = 501,502,503,504,505;
	setarray .@3need1[ 0 ], 507, 1, 508, 1, 509, 1;
	setarray .@3need2[ 0 ], 509, 1, 510, 2, 511, 2;
	setarray .@3need3[ 0 ], 511, 2, 512, 1, 513, 4;
	setarray .@3need4[ 0 ], 513, 1, 514, 1, 515, 2;
	setarray .@3need5[ 0 ], 515, 1, 516, 2, 517, 1;

	// if 4 item sold to npc then cancell
	// if 5 item sold to npc then cancell

	
	// if 6 item sold to npc then check from the array below
	setarray .@6items[ 0 ] = 501,502,503,504,505 ...;
	setarray .@6need1[ 0 ], 507, 1, 508, 1, 509, 1, 509, 1, 510, 2, 511, 2;
	setarray .@6need2[ 0 ], 509, 1, 510, 2, 511, 2, 511, 2, 512, 1, 513, 4;
	setarray .@6need3[ 0 ], 511, 2, 512, 1, 513, 4, 513, 1, 514, 1, 515, 2;
	setarray .@6need4[ 0 ], 513, 1, 514, 1, 515, 2, 515, 1, 516, 2, 517, 1;
	setarray .@6need5[ 0 ], 515, 1, 516, 2, 517, 1, 507, 1, 508, 1, 509, 1;
	...
	...
	...
	
	// if more than 6 item sold to npc then cancel
			
	end;
}
 
Last edited by a moderator:
Back
Top