Jump to content

Osus

Members
  • Posts

    14
  • Joined

  • Last visited

Posts posted by Osus

  1. On 10/22/2019 at 4:26 PM, Bringer said:

     

    
    /*==========================================
    * @whobuy - List who is buying the item (amount, price, and location).
    * remake by VoidLess, original by zephyrus_cr
    * re-edit by deathscythe to work in rAthena
    *------------------------------------------*/
    ACMD_FUNC(whobuy)
    {
    	char item_name[100];
    	int item_id, j, count = 0, sat_num = 0;
    	bool flag = 0; // place dot on the minimap?
    	struct map_session_data* pl_sd;
    	struct s_mapiterator* iter;
    	unsigned int MinPrice = battle_config.vending_max_value, MaxPrice = 0;
    	struct item_data *item_data;
    
    	nullpo_retr(-1, sd);
    	memset(item_name, '\0', sizeof(item_name));
    
    	if (!message || !*message || sscanf(message, "%99[^\n]", item_name) < 1) {
    		clif_displaymessage(fd, "Input item name or ID (use: @whobuy <name or ID>).");
    		return -1;
    	}
    	if ((item_data = itemdb_searchname(item_name)) == NULL &&
    		(item_data = itemdb_exists(atoi(item_name))) == NULL)
    	{
    		clif_displaymessage(fd, msg_txt(sd, 19)); // Invalid item ID or name.
    		return -1;
    	}
    
    	item_id = item_data->nameid;
    
    	iter = mapit_getallusers();
    	for (pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter))
    	{
    		if (pl_sd->state.buyingstore) //check if player is autobuying
    		{
    			for (j = 0; j < pl_sd->buyingstore.slots; j) {
    				if (pl_sd->buyingstore.items[j].nameid == item_id) {
    					snprintf(atcmd_output, CHAT_SIZE_MAX, "Price %d | Amount %d | Buyer %s | Map %s[%d,%d]", pl_sd->buyingstore.items[j].price, pl_sd->buyingstore.items[j].amount, pl_sd->status.name, mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y);
    					if (pl_sd->buyingstore.items[j].price < MinPrice) MinPrice = pl_sd->buyingstore.items[j].price;
    					if (pl_sd->buyingstore.items[j].price > MaxPrice) MaxPrice = pl_sd->buyingstore.items[j].price;
    					clif_displaymessage(fd, atcmd_output);
    					count;
    					flag = 1;
    				}
    			}
    			if (flag && pl_sd->mapindex == sd->mapindex) {
    				clif_viewpoint(sd, 1, 1, pl_sd->bl.x, pl_sd->bl.y, sat_num, 0xFFFFFF);
    				flag = 0;
    			}
    		}
    	}
    	mapit_free(iter);
    
    	if (count > 0) {
    		snprintf(atcmd_output, CHAT_SIZE_MAX, "Found %d ea. Prices from %dz to %dz", count, MinPrice, MaxPrice);
    		clif_displaymessage(fd, atcmd_output);
    	}
    	else
    		clif_displaymessage(fd, "Nobody buying it now.");
    
    	return 0;
    }

    when use @whobuy 607  error popoout

    image.thumb.png.80340d5ef541b2b9f4a6db8b7ad64eb9.png

    you already fixed this? *can you share with us?*

  2. 5 hours ago, Immo said:

    Hello Sir,

    may I ask you how I can get server connections on screen like you have? Maybe whole explanation what I have and what I need to reach. Right now I connect to server to Canada (I am in the middle of Europe) and the connection is not the best. So I created VPS to connect directly to Canadian server. VPS is managed but I am struggling in how to tell my RO client to connect via this VPS. 

    Do you have any idea or anybody here please.

    Hello, can you give us full details?

  3. 39 minutes ago, Valor said:

    maybe its mysql privilage issue, your username dont have permission to access its database, double check  your mysql users acces

    I can't even login to my SQL and also I can't even add MySQL username and password. 

  4. On 7/29/2012 at 8:02 PM, Emistry said:

    File Name: Random News

    File Submitter: Emistry

    File Submitted: 29 Jul 2012

    File Category: Utilities

    Content Author: Emistry

    This Script will auto Announce / Broadcast a Messages randomly every interval of times.

    Configuration :

     

    
    set .Time,60;  // Announce every x Minute.
    setarray .News$[0], // Random Message to be Announced
     "Updated News 1 every X Minute",
     "Updated News 2 every X Minute",
     "Updated News 3 every X Minute",
     "Updated News 4 every X Minute",
     "Updated News 5 every X Minute",
     "Updated News 6 every X Minute",
     "Updated News 7 every X Minute";
    
     

     

     

    https://rathena.org/board/index.php?/files/file/2503-%7B?%7D/

    Visit Emistry Topic for more Scripts...

    how to make this every 5 minutes?

×
×
  • Create New...