Jump to content

Ninja

Members
  • Posts

    513
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Ninja

  1. @ragexe please provide 1. packet_db version 2. client version 3. git hash
  2. Ninja

    Help whosell

    There was a structure change for map_sessiondata. Idk when was it made but it moved cart out of status struct. just change it to: if (pl_sd->cart.u.items_cart[pl_sd->vending[i].index].nameid != item_array[j]->nameid) continue; Full code: /*========================================== * @whosell command *------------------------------------------*/ ACMD_FUNC(whosell) { struct map_session_data *pl_sd, *b_sd[MAX_SEARCH]; struct s_mapiterator* iter; struct item_data *item_array[MAX_SEARCH]; int total[MAX_SEARCH], amount[MAX_SEARCH]; unsigned int MinPrice[MAX_SEARCH], MaxPrice[MAX_SEARCH]; char output[256]; int i, j, count = 1; char item_name[100]; int minprice = 0; if (!message || !*message || ( sscanf(message, "\"%99[^\"]\" %11d", item_name, &minprice) < 1 && sscanf(message, "%99s %11d", item_name, &minprice) < 1) ) { clif_displaymessage(fd, "Please, enter Item name or its ID (usage: @whosell <item name or ID> {<min price>})."); return -1; } if ((item_array[0] = itemdb_searchname(item_name)) == NULL && (item_array[0] = itemdb_exists(atoi(item_name))) == NULL) count = itemdb_searchname_array(item_array, MAX_SEARCH, message); if (count < 1) { // No items found clif_displaymessage(fd, msg_txt(sd, 19)); return -1; } if (count > MAX_SEARCH) count = MAX_SEARCH; // Preparing Search Recorders for (i = 0; i < MAX_SEARCH; i++) { total[i] = amount[i] = MaxPrice[i] = 0; MinPrice[i] = battle_config.vending_max_value + 1; b_sd[i] = NULL; } iter = mapit_getallusers(); for (pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter)) { if (!pl_sd->vender_id) continue; for (i = 0; i < pl_sd->vend_num; i++) { // Searching in the Vending List for (j = 0; j < count; j++) { // Compares with each search result if (pl_sd->cart.u.items_cart[pl_sd->vending[i].index].nameid != item_array[j]->nameid) continue; if (pl_sd->vending[i].value < minprice) continue; amount[j] += pl_sd->vending[i].amount; total[j]++; if (pl_sd->vending[i].value < MinPrice[j]) { // Best Price MinPrice[j] = pl_sd->vending[i].value; b_sd[j] = pl_sd; } if (pl_sd->vending[i].value > MaxPrice[j]) MaxPrice[j] = pl_sd->vending[i].value; } } } mapit_free(iter); for (i = 0; i < count; i++) { if (total[i] > 0 && b_sd[i] != NULL) { sprintf(output, "[%d] The best price found for '%s' is %u sold by '%s' at %s <%d,%d>. Max Price %u. Item found in %d shops, %d pieces for sale.", item_array[i]->nameid, item_array[i]->jname, MinPrice[i], b_sd[i]->status.name, map[b_sd[i]->bl.m].name, b_sd[i]->bl.x, b_sd[i]->bl.y, MaxPrice[i], total[i], amount[i]); if (sd->bl.m == b_sd[i]->bl.m) clif_viewpoint(sd, 1, 1, b_sd[i]->bl.x, b_sd[i]->bl.y, i, 0xFFFFFF); } else sprintf(output, "[%d] '%s' is not being sold at the moment...", item_array[i]->nameid, item_array[i]->jname); clif_displaymessage(sd->fd, output); } return 0; } Screenshot:
  3. I'll try to check this. I think this should be posted in source support
  4. Correct me if I'm wrong, your map is guild_vs4 and you want 5% chance to drop gold when some kills a monster in it? Or do you want a 5% chance to drop gold when someone kills a monster outside of guild_vs4?
  5. As much as we want to help you, we can't address Hercules emulator here as they have a different code base. But we'll gladly help you if you encounter the same issue in rAthena.
  6. If changing the IP Addresses doesn't work, you have to make sure that PHP Sockets feature is enabled in your web server and the firewall in your VPS accepts outside queries. $host = 'your rAthena server IP'; $ports = array(6900,6121,5121,3306); foreach ($ports as $port) { $connection = @fsockopen($host, $port); if (is_resource($connection)) { echo '<h2>' . $host . ':' . $port . ' ' . '(' . getservbyport($port, 'tcp') . ') is open.</h2>' . "\n"; fclose($connection); } else { echo '<h2>' . $host . ':' . $port . ' is closed.</h2>' . "\n"; } } if it returns any of the expected response, PHP sockets are enabled. If it retuns that the port is closed then your have to manage your firewall.
  7. Fixed char* temp = "{\"q\":\"\"}"; char *mes1 = malloc(strlen(temp) + strlen(mes) + 1); strcpy(mes1, "{\"q\":\""); strcat(mes1, mes); strcat(mes1, "\"}"); ShowInfo("\nMES1: %s\n",mes1); just a preview of what I'm trying to do.
  8. View File Guild Activity Logging About This File Tested and working with: c212b2ed053d60855ce584a0368d98cff94c5059 This source edit is intended for my experiments. Feel free to have fun with it but I wouldn't be held accountable for damages that it may create for your server. No support will be given other than the specified rAthena version above. Purpose To improve the Guild Activity Logging of rAthena. It works for the following Guild Logging activities: 1. Guild Creation 2. Guild Breakage 3. Guild Member Addition 4. Guild Member Removal/Leave 5. Guild Alliance Formation 6. Guild Alliance Breakage 7. Guild Antagonist Formation 8. Guild Antagonist Breakage 9. Guild Castle Occupancy 10. Guild Castle Abandonment Usage 1. Tracking guild activities of a character SELECT origin, target, `activity`, COUNT(`activity`) as "Times Done" FROM interlog WHERE origin = "this" or target = "this" GROUP BY `activity` 2. Tracking a guild's WoE Castle occupancy rate SELECT castle_id, COUNT(`activity`) as "Times Done" FROM interlog WHERE `origin` = "ThisGuild" and `activity` like "%Occupied%" GROUP BY castle_id Submitter Ninja Submitted 06/03/2017 Category Source Modifications Content Author  
  9. Well, google-daddy didn't work. I just want to ask source experts out there for some help. I have now become a donkey figuring this one out. char* mes = "This is a sample message"; char* temp = "{\"q\":\"\"}"; char* mes1 = malloc(strlen(temp) + strlen(mes) + 1); snprintf(mes1, sizeof(mes1), "{\"q\":\"%s\"}", mes); ShowInfo("\nMES1: %s\n",mes1); The output is only this: It doesn't append everything in place. I'm playing around with some 3rd party libraries and this is one thing that's blocking me to proceed. I'd really appreciate it if someone could educate me about this.
  10. Made a PR for this. Pull: 2185 Hope it helps
  11. Version 1.2.0

    107 downloads

    About This File Tested and working with: c212b2ed053d60855ce584a0368d98cff94c5059 This source edit is intended for my experiments. Feel free to have fun with it but I wouldn't be held accountable for damages that it may create for your server. No support will be given other than the specified rAthena version above. Purpose To improve the Guild Activity Logging of rAthena. It works for the following Guild Logging activities: 1. Guild Creation 2. Guild Breakage 3. Guild Member Addition 4. Guild Member Removal/Leave 5. Guild Alliance Formation 6. Guild Alliance Breakage 7. Guild Antagonist Formation 8. Guild Antagonist Breakage 9. Guild Castle Occupancy 10. Guild Castle Abandonment Usage 1. Tracking guild activities of a character SELECT origin, target, `activity`, COUNT(`activity`) as "Times Done" FROM interlog WHERE origin = "this" or target = "this" GROUP BY `activity` 2. Tracking a guild's WoE Castle occupancy rate SELECT castle_id, COUNT(`activity`) as "Times Done" FROM interlog WHERE `origin` = "ThisGuild" and `activity` like "%Occupied%" GROUP BY castle_id
    Free
  12. I've been working into some scripts for utility, specifically for guild stuff, and I found out that it the database logging of guild activities consolidates everything in 1 line. compared to other logging tables, I think it falls short of details. I would like to propose to expand this logging to reflect better data when querying stuff for guild activities such as guild creation, guild breakage, castle occupancy, etc. This will definitely include source modification.
  13. @Akkarin exactly my point in asking this question
  14. Change the item script of wickebine to. bonus5 bAutoSpell,"RG_STRIPARMOR",1,50,BF_SHORT,1; BF_SHORT is only for Melee class weapons. If you want to make it work for bows you will have to find a way to check the distance between the player and target.
  15. Would limiting the card's auto activation to non-bow type weapons work for you or do you still want this to work with bow type weapons but close range?
  16. Maybe you can tell something about this script and how it works so someone can actually help you and maybe replicate the script for you?
  17. I think you can do this by just using scripts OnPCLoadMapEvent: if(strcharinfo(3) == "pvp_n_1-1") { bonus_script "{ bonus bStr,5; }", 10000, 1; } end; This script will give +5 str for 10,000 seconds when the player enters "pvp_n_1-1" and removes it when he dies. if you don't want it to be map-specific, try playing with getmapflag instead of strcharinfo.
  18. Ninja

    help

    What does this mean? Does it mean that he can summon items at will? or do you mean that he uses a lot of programs?
  19. there are different types of variables in rAthena scripting. Please refer to this: https://github.com/rathena/rathena/wiki/Variables @ragexe I think this should be unitskillpos 'Dracula,85,10,.@x,.@y; 'id is something non-existent in your snippet and it means that it doesn't have any stat at all.
  20. Hi. I've been looking around and been snooping some stuff in the wiki. I wanted to contribute on some stuff in it but I just can't figure out how. I'm a Github newb. Can someone lead me on this? Thanks.
  21. We really can't do anything on the UI side as we dont have any access on its source code. However, we can do it via scripts and utilize what we have.
  22. View File Instakill Mapflag Tested and working with: 3e625dfdf9868690e36677701cbebe1b379a7485 This source edit is intended for my experiments. Feel free to have fun with it but I wouldn't be held accountable for damages that it may create for your server. No support will be given other than the specified rAthena version above. Purpose Create a mapflag for instakill. As it would suggest, all damages done within the map will be amplified to max damage, thus instakilling the target. It works both for the following use cases: 1. Player attacking a Monster 2. Player attacking another Player 3. Monster attacking a Player 4. Monster attacking another monster Where "Monster" can be a normal mob or a Homunculus Usage In-game @mapflag instakill [0|1] Script as mapflag prontera<tab>mapflag<tab>instakill Script as used in setmapflag setmapflag .EventMap$, mf_instakill; Example Tag, You're Dead Script Source In Action Source file 1. I will retain all the rights in all the scripts that I create 2. Client cannot redistribute nor resell the scripts that I provide 3. No refunds 4. Maintenance of scripts does not include modification of the original intended behavior. If the script has been broken due to prior modification of the original behavior then it would mean a new service request 5. Modification of the original intended behavior would mean a new service request and would go through the process mentioned above 2. This can be redistributed anywhere in any form. 3. This shall not be in any way be branded for sale anywhere in any form. 4. Maintenance will not be provided. Feel free to use the support section. 5. See #3. 6. Ninja has the right to post all my free services to the release section and make it available for everybody to use 7. Maintenance of scripts will be provide free of charge 8. I will not keep any sensitive information from your server nor any credentials that you lend me 9. I will backup all my server files before I use this. 10. Ninja will not be liable in any way at any time. 11. The moment I use anything from here, I accept all the terms of services stated above. Where the script author is Ninja (https://rathena.org/board/profile/7005-ninja/). Submitter Ninja Submitted 05/30/2017 Category Source Modifications Video Content Author Ninja
  23. Version 1.0.0

    82 downloads

    Tested and working with: 3e625dfdf9868690e36677701cbebe1b379a7485 This source edit is intended for my experiments. Feel free to have fun with it but I wouldn't be held accountable for damages that it may create for your server. No support will be given other than the specified rAthena version above. Purpose Create a mapflag for instakill. As it would suggest, all damages done within the map will be amplified to max damage, thus instakilling the target. It works both for the following use cases: 1. Player attacking a Monster 2. Player attacking another Player 3. Monster attacking a Player 4. Monster attacking another monster Where "Monster" can be a normal mob or a Homunculus Usage In-game @mapflag instakill [0|1] Script as mapflag prontera<tab>mapflag<tab>instakill Script as used in setmapflag setmapflag .EventMap$, mf_instakill; Example Tag, You're Dead Script Source In Action Source file 1. I will retain all the rights in all the scripts that I create 2. Client cannot redistribute nor resell the scripts that I provide 3. No refunds 4. Maintenance of scripts does not include modification of the original intended behavior. If the script has been broken due to prior modification of the original behavior then it would mean a new service request 5. Modification of the original intended behavior would mean a new service request and would go through the process mentioned above 2. This can be redistributed anywhere in any form. 3. This shall not be in any way be branded for sale anywhere in any form. 4. Maintenance will not be provided. Feel free to use the support section. 5. See #3. 6. Ninja has the right to post all my free services to the release section and make it available for everybody to use 7. Maintenance of scripts will be provide free of charge 8. I will not keep any sensitive information from your server nor any credentials that you lend me 9. I will backup all my server files before I use this. 10. Ninja will not be liable in any way at any time. 11. The moment I use anything from here, I accept all the terms of services stated above. Where the script author is Ninja (https://rathena.org/board/profile/7005-ninja/).
    Free
×
×
  • Create New...