Jump to content

java

Members
  • Posts

    251
  • Joined

  • Last visited

Everything posted by java

  1. java

    whosell

    hi this is whosell source.. this source credit to people who make it, i just edit it add this at src/map/atcommand.c /*========================================== * @whosell - List who is vending the item (amount, price, and location). * revamped by VoidLess, original by zephyrus_cr *------------------------------------------*/ ACMD_FUNC(whosell) { char item_name[100]; int item_id = 0, j, count = 0, sat_num = 0; int s_type = 1; // search bitmask: 0-name,1-id, 2-card, 4-refine int refine = 0,card_id = 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); if (!message || !*message) { clif_displaymessage(fd, "Use: @whosell (<+refine> )(<item_id>)(<[card_id]>) or @whosell <name>"); return -1; } if (sscanf(message, "+%d %d[%d]", &refine, &item_id, &card_id) == 3){ s_type = 1+2+4; } else if (sscanf(message, "+%d %d", &refine, &item_id) == 2){ s_type = 1+4; } else if (sscanf(message, "+%d [%d]", &refine, &card_id) == 2){ s_type = 2+4; } else if (sscanf(message, "%d[%d]", &item_id, &card_id) == 2){ s_type = 1+2; } else if (sscanf(message, "[%d]", &card_id) == 1){ s_type = 2; } else if (sscanf(message, "+%d", &refine) == 1){ s_type = 4; } else if (sscanf(message, "%d", &item_id) == 1 && item_id == atoi(message)){ //names, that start on num are not working //so implemented minumum item_id>500 //or better make item_id == atoi(message) ? s_type = 1; } else if (sscanf(message, "%99[^\n]", item_name) == 1){ s_type = 1; if ((item_data = itemdb_searchname(item_name)) == NULL){ clif_displaymessage(fd, "Not found item with this name"); return -1; } item_id = item_data->nameid; } else { clif_displaymessage(fd, "Use: @whosell (<+refine> )(<item_id>)(<[card_id]>) or @whosell <name>"); return -1; } //check card if(s_type & 2 && ((item_data = itemdb_exists(card_id)) == NULL || item_data->type != IT_CARD)){ clif_displaymessage(fd, "Not found a card with than ID"); return -1; } //check item if(s_type & 1 && (item_data = itemdb_exists(item_id)) == NULL){ clif_displaymessage(fd, "Not found an item with than ID"); return -1; } //check refine if(s_type & 4){ if (refine<0 || refine>10){ clif_displaymessage(fd, "Refine out of bounds: 0 - 10"); return -1; } /*if(item_data->type != IT_WEAPON && item_data->type != IT_ARMOR){ clif_displaymessage(fd, "Use refine only with weapon or armor"); return -1; }*/ } 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 ) //check if player is vending { for (j = 0; j < pl_sd->vend_num; j++) { if((item_data = itemdb_exists(pl_sd->status.cart[pl_sd->vending[j].index].nameid)) == NULL) continue; if(s_type & 1 && pl_sd->status.cart[pl_sd->vending[j].index].nameid != item_id) continue; if(s_type & 2 && ((item_data->type != IT_ARMOR && item_data->type != IT_WEAPON) || (pl_sd->status.cart[pl_sd->vending[j].index].card[0] != card_id && pl_sd->status.cart[pl_sd->vending[j].index].card[1] != card_id && pl_sd->status.cart[pl_sd->vending[j].index].card[2] != card_id && pl_sd->status.cart[pl_sd->vending[j].index].card[3] != card_id))) continue; if(s_type & 4 && ((item_data->type != IT_ARMOR && item_data->type != IT_WEAPON) || pl_sd->status.cart[pl_sd->vending[j].index].refine != refine)) continue; if(item_data->type == IT_ARMOR) snprintf(atcmd_output, CHAT_SIZE_MAX, "+%d %d[%d] | Price %d | Amount %d | Map %s[%d,%d] | Seller %s",pl_sd->status.cart[pl_sd->vending[j].index].refine ,pl_sd->status.cart[pl_sd->vending[j].index].nameid ,pl_sd->status.cart[pl_sd->vending[j].index].card[0] ,pl_sd->vending[j].value ,pl_sd->vending[j].amount ,mapindex_id2name(pl_sd->mapindex) ,pl_sd->bl.x,pl_sd->bl.y ,pl_sd->status.name); else if(item_data->type == IT_WEAPON) snprintf(atcmd_output, CHAT_SIZE_MAX, "+%d %d[%d,%d,%d,%d] | Price %d | Amount %d | Map %s[%d,%d] | Seller %s",pl_sd->status.cart[pl_sd->vending[j].index].refine ,pl_sd->status.cart[pl_sd->vending[j].index].nameid ,pl_sd->status.cart[pl_sd->vending[j].index].card[0] ,pl_sd->status.cart[pl_sd->vending[j].index].card[1] ,pl_sd->status.cart[pl_sd->vending[j].index].card[2] ,pl_sd->status.cart[pl_sd->vending[j].index].card[3] ,pl_sd->vending[j].value ,pl_sd->vending[j].amount ,mapindex_id2name(pl_sd->mapindex) ,pl_sd->bl.x,pl_sd->bl.y ,pl_sd->status.name); else snprintf(atcmd_output, CHAT_SIZE_MAX, "ID %d | Price %d | Amount %d | Map %s[%d,%d] | Seller %s",pl_sd->status.cart[pl_sd->vending[j].index].nameid ,pl_sd->vending[j].value ,pl_sd->vending[j].amount ,mapindex_id2name(pl_sd->mapindex) ,pl_sd->bl.x, pl_sd->bl.y ,pl_sd->status.name); if(pl_sd->vending[j].value < MinPrice) MinPrice = pl_sd->vending[j].value; if(pl_sd->vending[j].value > MaxPrice) MaxPrice = pl_sd->vending[j].value; 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 is selling it now."); return 0; } and dont forget add this too at src/map/atcommand.c ACMD_DEF(whosell),
  2. untuk script di wiki rathena juga udah cukup tuh gan... tinggal improvisasi ajah... lain kali buat forum untuk emulator RO ah buat bahasa indonesia...only ahahaha biar gak pada bingung bahasanya hehhe ada yang mau bantu gak yah ... saya sediain hosting ajah ...
  3. java

    annoying IP

    i ran my server on linux root
  4. java

    annoying IP

    i think yes, that a static one
  5. java

    annoying IP

    im being upset when this IP 97.107.134.57 , try to use my connections i was deny it but for me it was verry anoying , that ip try and try to ***** my server i try to check whois and whoip 97.107.134.57 >> foto Elvira was really anoying
  6. java

    Updating SVN

    put ur screen shoot or code error here , nobody want help you if u no showing ur error
  7. hi.. i just update my server then when i recompile the server so many warning came out of my visual studio here is the warning : so many warning at const.h
  8. what do you mean of " Uses luafiles514 folder " , so the lua not inside data/lua files/ << ???? then, which one i choose lua folder if i use 20110609 ?? Uses luafiles514 folder or data/lua files/ ??
  9. how ? i know compile... edit where only start compile?? compile your server with higher event queue at src/map/map.h #define MAX_EVENTQUEUE 2
  10. wow amazing .. it's very usefull +1
  11. i was read at http://www.mikazo.co...ual-studio.html maybe it usefull or the most easy way is try to disable antivirus when u recompile server
  12. //AddHunting("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Item ID>,<Item Amount>,...); AddCollection("cecunguk bau",1,10,0,0,10480,9180,1300,2304,1); see at my example dont add [ ...] at ur script plus dont add < and > im sorry >> that's my big epic Fail copy paste hahahaha
  13. ganja on my country means to = marijuana anyway welcome
  14. I don't. one of your problem is very not my business ** Define an NPC object. <map name>,<x>,<y>,<facing>%TAB%script%TAB%<NPC Name>%TAB%<sprite id>,{<code>} owh ty it's work now
  15. already solved ... it's clear now ty
  16. i try to understanding this script, but still error my big question is : how to make this >>> http://rathena.org/b...ail-to-someone/ work? i mean how to create script for that? where to put email system.txt or what should i do to make http://rathena.org/b...ail-to-someone/ work? anyone can explain step by step??
  17. //AddHunting("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Item ID>,<Item Amount>,...); AddCollection("cecunguk bau",1,10,0,0,10480,9180,1300,2304,1); see at my example dont add [ ...] at ur script plus dont add < and >
  18. where to put E-mail System.txt? hehe my bad . it source code
  19. that's right.. u choose a good decision keep that only for ur self ( on ur personal server it's really usefull but the other ppl maybe wont their data server knowing by the other ). big LOL
  20. art of scripting but it would be nice if sombody make an example of this NPC .. since im too bad at scripting
×
×
  • Create New...