How to put the emblem of war accept as payment?
YesGotta change
Orange_Potion
by
War_Badge
Could use ID? even to add items
YesGotta change
Orange_Potion
by
War_Badge
Could use ID? even to add items
/* demonstrates Market Trader */prontera,150,160,6 trader HaiMarket 4_F_EDEN_OFFICER,{OnInit: tradertype(NST_MARKET); sellitem Red_Potion,-1,49; end;OnClock0000://resupplies red potions on midnightOnMyResupply: if( shopcount(Red_Potion) < 20 ) sellitem Red_Potion,-1,49; end;}
What do you mean it does not work? you cannot click the npc?YesGotta change
Orange_Potion
by
War_Badge
Could use ID? even to add items
hanged by id does not work.
Have an example
What does this npc?
/* demonstrates Market Trader */prontera,150,160,6 trader HaiMarket 4_F_EDEN_OFFICER,{OnInit: tradertype(NST_MARKET); sellitem Red_Potion,-1,49; end;OnClock0000://resupplies red potions on midnightOnMyResupply: if( shopcount(Red_Potion) < 20 ) sellitem Red_Potion,-1,49; end;}
please be specific on the word 'Nothing Happens'.In npc HaiMarket nothing happens.
I switched the potion by the emblem of war and not due for purchase.
@
- AnnieRuru help
Oh, trader type NPCs don't work on clients prior to 20131223 because of some packets that aren't elsewhere. Sorry.
Note: NST_MARKET is only available with PACKETVER 20131223 or newer.See '12 - NPC Trader-Related Commands' and /doc/sample/npc_trader_sample.txt formore information regarding how to use this NPC type.
- shop market2#hidden -1,501:1000prontera,156,172,5 script market 100,{ dispbottom "You currently have "+ countitem(.currency) +" "+ getitemname(.currency); callshop .shopname$, 1; end;OnInit: function addshopitem { npcshopdelitem .shopname$, 501; .@count = getargcount(); for ( .@i = 0; .@i < .@count; .@i++ ) { if ( .@i % 2 == 0 ) .itemid[ .@i /2 ] = getarg( .@i ); else { .itemcost[ .@i /2 ] = getarg( .@i ); npcshopadditem .shopname$, .itemid[ .@i /2 ], getarg( .@i ); } } }// ----- Configuration ------ .shopname$ = "market2#hidden"; // shop name that match the 1st line in this script .currency = 674; // item used for currency addshopitem // adds shop items here 512,10, 513,20, 514,30, 515,40, 516,50, 607,1;// ------------------------- .itemsize = getarraysize( .itemid ); for ( .@i = 0; .@i < .itemsize; .@i++ ) setd ".item"+ .itemid[.@i] +"cost", .itemcost[.@i]; npcshopattach .shopname$; end;OnBuyItem: if ( !@bought_quantity ) end; .@size = getarraysize( @bought_nameid ); for ( .@i = 0; .@i < .@size; .@i++ ) .@itemcost = .@itemcost + getd( ".item"+ @bought_nameid[.@i] +"cost" ) * @bought_quantity[.@i]; if ( .@itemcost > countitem(.currency) ) { mes "you don't have enough "+ getitemname(.currency); close; } if ( !checkweight2( @bought_nameid, @bought_quantity ) ) { mes "you can't carry all these items !"; close; } delitem .currency, .@itemcost; for ( .@i = 0; .@i < .@size; .@i++ ) getitem @bought_nameid[.@i], @bought_quantity[.@i]; end;OnSellItem: if ( !@sold_quantity ) end; .@size = getarraysize( @sold_nameid ); for ( .@i = 0; .@i < .@size; .@i++ ) .@itemgain = .@itemgain + getd( ".item"+ @sold_nameid[.@i] +"cost" ) * @sold_quantity[.@i]; if ( !checkweight( .currency, .@itemgain ) ) { mes "you can't carry all these items !"; close; } for ( .@i = 0; .@i < .@size; .@i++ ) if ( getd( ".item"+ @sold_nameid[.@i] +"cost" ) ) delitem @sold_nameid[.@i], @sold_quantity[.@i]; getitem .currency, .@itemgain; end;}
We use essential cookies to make this site work, and optional cookies to enhance your experience.