Jump to content

gleynn

Members
  • Posts

    63
  • Joined

  • Last visited

Posts posted by gleynn

  1. 8 minutes ago, gleynn said:

    Hi,

    I have my sample npc script below with SQL query. In database, it has multiple rows of result.
    can you please show me how can i make the dispbottom to reflect the first 3 rows of result?
     

    image.png.fe6419e9b57ae93a89501183ab29cb21.png

    izlude,117,110,6	script	sample	952,{
    
    	input .@item_id;
    	query_sql("SELECT char_id, nameid, amount FROM `inventory` HAVING nameid = "+.@item_id+" ORDER BY amount DESC",.@charid,.@nameid,.@amnt);
    	dispbottom .@charid+" : "+getitemname(.@nameid)+" "+.@amnt+"pcs";
    	end;
    }

     

    please ignore my question above, I found this very helpful guide by AnnieRuru

     

  2. Hi,

    I have my sample npc script below with SQL query. In database, it has multiple rows of result.
    can you please show me how can i make the dispbottom to reflect the first 3 rows of result?
     

    image.png.fe6419e9b57ae93a89501183ab29cb21.png

    izlude,117,110,6	script	sample	952,{
    
    	input .@item_id;
    	query_sql("SELECT char_id, nameid, amount FROM `inventory` HAVING nameid = "+.@item_id+" ORDER BY amount DESC",.@charid,.@nameid,.@amnt);
    	dispbottom .@charid+" : "+getitemname(.@nameid)+" "+.@amnt+"pcs";
    	end;
    }

     

  3. Hi,

    By default, only the top 5 will be display if we use @whodrops. I want to increase this, to 30 or maybe just 20.
    then i tried to modify this command in atcommand.c and changed MAX_SEARCH to 30.

    /*==========================================
     * Show who drops the item.
     *------------------------------------------*/
    ACMD_FUNC(whodrops)
    {
    	//struct item_data *item_data, *item_array[MAX_SEARCH];
    	struct item_data *item_data, *item_array[30];
    	int i,j, count = 1;
    
    	if (!message || !*message) {
    		clif_displaymessage(fd, msg_txt(sd,1284)); // Please enter item name/ID (usage: @whodrops <item name/ID>).
    		return -1;
    	}
    	if ((item_array[0] = itemdb_exists(strtoul(message, nullptr, 10))) == nullptr)
    		//count = itemdb_searchname_array(item_array, MAX_SEARCH, message);
    		count = itemdb_searchname_array(item_array, 30, message);
    
    	if (!count) {
    		clif_displaymessage(fd, msg_txt(sd,19));	// Invalid item ID or name.
    		return -1;
    	}
    
    	//if (count == MAX_SEARCH) {
    	if (count == 30) {
    		//sprintf(atcmd_output, msg_txt(sd,269), MAX_SEARCH); // Displaying first %d matches
    		sprintf(atcmd_output, msg_txt(sd,269), 30); // Displaying first %d matches
    		clif_displaymessage(fd, atcmd_output);
    	}
    	for (i = 0; i < count; i++) {
    		item_data = item_array[i];
    		sprintf(atcmd_output, msg_txt(sd,1285), item_data->ename.c_str(), item_data->slots, item_data->nameid); // Item: '%s'[%d] (ID:%u)
    		clif_displaymessage(fd, atcmd_output);
    
    		if (item_data->mob[0].chance == 0) {
    			strcpy(atcmd_output, msg_txt(sd,1286)); //  - Item is not dropped by mobs.
    			clif_displaymessage(fd, atcmd_output);
    		} else {
    			//sprintf(atcmd_output, msg_txt(sd,1287), MAX_SEARCH); //  - Common mobs with highest drop chance (only max %d are listed):
    			sprintf(atcmd_output, msg_txt(sd,1287), 30); //  - Common mobs with highest drop chance (only max %d are listed):
    			clif_displaymessage(fd, atcmd_output);
    
    			//for (j=0; j < MAX_SEARCH && item_data->mob[j].chance > 0; j++)
    			for (j=0; j < 30 && item_data->mob[j].chance > 0; j++)
    			{
    				int dropchance = item_data->mob[j].chance;
    				std::shared_ptr<s_mob_db> mob = mob_db.find(item_data->mob[j].id);
    				if(!mob) continue;
    
    #ifdef RENEWAL_DROP
    				if( battle_config.atcommand_mobinfo_type ) {
    					dropchance = dropchance * pc_level_penalty_mod( sd, PENALTY_DROP, mob ) / 100;
    					if (dropchance <= 0 && !battle_config.drop_rate0item)
    						dropchance = 1;
    				}
    #endif
    				if (pc_isvip(sd)) // Display item rate increase for VIP
    					dropchance += (dropchance * battle_config.vip_drop_increase) / 100;
    				sprintf(atcmd_output, "- %s (%d): %02.02f%%", mob->jname.c_str(), item_data->mob[j].id, dropchance/100.);
    				clif_displaymessage(fd, atcmd_output);
    			}
    		}
    	}
    	return 0;
    }

    however, after the changes above, it is still showing top 5.
    is there any other source code that i need to modify?
    image.png.08e87f1066184dd1dc11d2d7abeb4f58.png

  4. On 6/2/2021 at 11:50 AM, RafaelGomez23 said:

    I see, could  you share me your data folder? 

    I got this sorted now, I found the diff that's causing this -- but what remains unclear to me is RE.exe version worked for me with packetver 20180621 + 2018-06-21aRagexeRE 
    Admin/Moderator please feel free to close this topic. Thank you.

    can you share the solution for this?

     

  5. Hi,

    I tried to diff the clients from:
     Tool: 2018-06-21aRagexeRE Client - Modified - Third Party Releases - rAthena 
    and Where I can find 2018-06-21aRagexeRE? - Client Requests - rAthena provided by Haruka Mayumi
    using WARP - A Successor to NEMO - Client Releases - rAthena.
    However, i always received this failed translation error once I load the session from ROenglishRE/2018_Translation.yml at master · llchrisll/ROenglishRE · GitHub.image.png.dd897517175643d85f93195cafa73fb5.png

    image.png.36a34f809b1019420356139b5dd3ab26.png

    and after applying the patches, I always receive Failed to Connect to Server after selecting service (before character selection screen)
    image.thumb.png.0e02802e0a8430cc38ce17a914229f15.png

    another thing that i notice, it seems that if i apply the patch for Customize ClientInfo file and change the default value to clientinfo.xml, it is still reading the sclientinfo.xml

    though i don't have any issue from the diffed client provided by my hosting service provider. but i wanted to learn how to diff my own client.

  6. On 2/5/2018 at 4:11 AM, whodhell said:
    
        parse_callfunc: not enough arguments, expected ','
        19 :                                mes "Sorry, but don't have enough PODs in your inventory.";
        20 :                                mes " Please come back when you have enough.";
        21 :                                close;
        22 :                        }
        23 :                        else {
    *   24 :                                set .@StatToBe = StatBought+(.@amount*.@SellStatPOD)';'
        25 :                                if (.@MaxStat < .@StatToBe) {
        26 :                                        mes "Sorry, but you're about to reach the max stat points that can be bought.";
        27 :                                        mes "You have already purchase "+StatBought+" stat points.";
        28 :                                        close;
        29 :                         

    got error my friend

    ohh, apologies, it should be using comma ( , ) instead an equal sign, here i have updated the script

    stat seller with limitv2.txt

  7. 6 minutes ago, Anacondaqq said:
    
    prontera,156,180,5	script	brobrobro	89,{
    
    if(!getcharid(1) || !getcharid(2)) {
    	mes "You don't have party or guild";
    	close;
    }
    
    if(getpartyleader(getcharid(1,2)) == getcharid(0)) {
    	dispbottom "You're party leader";
    	.party_leader = getcharid(0);
    }
    
    if(.party_leader) {
    	if(getcharid(2) == getcharid(2,.party_leader))
    		dispbottom "You're in the same guild with "+ rid2name(.party_leader);
    	else
    		dispbottom "You're outside of the guild of the your party leader";
    } else {
    	dispbottom "Sorry, but there is no party leader yet. Try later.";
    }
    
    end;
    
    }

    something very stupid like that. Not tested. How is it work? Everyone should talk to the NPC

    Thanks Anacondaqq and apologies for the confusion, im not clear with my request, but im looking for an npc that only talks to a party leader.

  8. Hi,

    Can someone please show me a sample script that checks if all party members are in the same guild with the party leader. Thanks :)

     

    Edit: only party leader can talk to the npc, and it checks if all of his party members are in the same guild with his.

  9. in terms of support, budget and other services?
    kanino po sulit na magpahost ng private server?

    try ko sana kasi mag open ulet ng private server.
    baka may mga mairerecommend po kayo.

    nakita ko sa paid services yung post nila 
    PONY, WANhosting and trinity. baka may iba pa kayong alam?

    thanks  /kis2

×
×
  • Create New...