Use this command. He will call npc event OnWantToSell from SELL_NPC.
ACMD_FUNC(sell)
{
nullpo_retr(-1,sd);
if( sd->npc_id || sd->vender_id || sd->buyer_id || sd->state.trading || sd->state.storage_flag )
return -1;
npc_event(sd,"SELL_NPC::OnWantToSell",0);
return 0;
}
NPC script:
-<tab>script<tab>SELL_NPC<tab>-1,{
OnWantToSell:
callshop "SellShop",2;
end;
- shop SellShop 139,2117:-1,7521:-1,7522:-1,7523:-1,7524:-1,13250:-1,13251:-1,13252:-1,13253:-1,13254:-1
}