Jump to content

Bringer

Members
  • Posts

    745
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Bringer

  1. if you still not understand why not add it Manually - = delete + = new code
  2. https://github.com/rathena/rathena/wiki/diff
  3. /*========================================== * @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
  4. @Easycore how to change the color White Color and only appear on chat box and remove the msg on top
  5. if your server is renewal is already there https://github.com/rathena/rathena/blob/master/db/re/mob_db.txt#L1366
  6. $EVT_Dice == 1 $EVT_Poring == 1 $EVT_LMS == 1 switch(select("Dice Event:Poring Event:LMS Event")) { case 1: mes "blablbala"; case 2: mes "blablbala"; case 3: mes "blablbala"; } ^FF0000Not Available^000000" "^00FF00Active^000000" how to do it when events active and menu option change colors
  7. Bringer

    Map erro

    post your status.c
  8. case UNT_MAGNUS: //if (!battle_check_undead(tstatus->race,tstatus->def_ele) && tstatus->race!=RC_ALL) //break; skill_attack(BF_MAGIC,ss,&unit->bl,bl,sg->skill_id,sg->skill_lv,tick,0); break;
  9. yes check this link https://rathena.org/board/topic/75875-mvp-kill-reward-npc/
  10. check this topic https://rathena.org/board/topic/83122-traps-traps-traps
  11. Solved if ((.@current_stat+ .@amount) >= .max_stats) { message strcharinfo(0), "You've already reached the Maximum "+.stat$[.@index]; } .max_stats = 301;
  12. no error but this code not appear even i have max str/int/dex if (.@current_stat > .max_stats) { message strcharinfo(0), "You've reached the maximum "+.stat$[.@index]; }
  13. anyone can convert this to rathena version https://herc.ws/board/topic/15948-agit-denfed-ranking/ CREATE TABLE `agit_defend_stats` ( `auto_id` int(11) unsigned NOT NULL auto_increment, `castle_name` varchar(34) NOT NULL default '', `guild_id` INT(11) NOT NULL, `conquest_time` DATETIME NULL, `lost_time` DATETIME NULL, `woe_ended` TINYINT(1) NOT NULL, `defend_time` DATETIME NULL, PRIMARY KEY (`auto_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; // The Emperium has been broken. OnAgitBreak: set .@GID,getcharid(2); // Show and log error if an unguilded player breaks the Emperium. (Should NEVER happen) if (.@GID <= 0) { set .@notice$,"Character "+strcharinfo(0)+" ("+getcharid(0)+") broke the Emperium in Castle: "+strnpcinfo(2)+" while guildless. No data will be saved and Emperium respawned."; logmes .@notice$; debugmes .@notice$; donpcevent "Agit#"+strnpcinfo(2)+"::OnStartArena"; end; } query_sql "SELECT `auto_id` FROM `agit_defend_stats` WHERE `castle_name`='" + getcastlename(strnpcinfo(2)) + "' AND `woe_ended`='0' ORDER BY `auto_id` DESC LIMIT 1",.@last_conquest; if( getarraysize(.@last_conquest) ){ query_sql "UPDATE `agit_defend_stats` SET `lost_time`=NOW() WHERE `auto_id`='" + .@last_conquest + "'"; query_sql "SELECT `conquest_time` FROM `agit_defend_stats` WHERE `auto_id`='" + .@last_conquest + "'", .@conquest_time$; query_sql "UPDATE `agit_defend_stats` SET `defend_time`=TIMEDIFF(NOW(),'" + .@conquest_time$ + "') WHERE `auto_id`='" + .@last_conquest + "'"; } // War of Emperium has ended. OnAgitEnd: if (strnpcinfo(0) == "Gld_Agit_Manager") end; GvgOff strnpcinfo(2); // If the castle has no owner at the end of WoE, do not kill Emperium. if (GetCastleData(strnpcinfo(2),CD_GUILD_ID)) { KillMonster strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak"; } query_sql "SELECT `auto_id` FROM `agit_defend_stats` WHERE `castle_name`='" + getcastlename(strnpcinfo(2)) + "' AND `woe_ended`='0' ORDER BY `auto_id` DESC LIMIT 1",.@last_conquest; if( getarraysize(.@last_conquest) ){ query_sql "SELECT `conquest_time` FROM `agit_defend_stats` WHERE `auto_id`='" + .@last_conquest + "'", .@conquest_time$; query_sql "UPDATE `agit_defend_stats` SET `defend_time`=TIMEDIFF(NOW(),'" + .@conquest_time$ + "') WHERE `auto_id`='" + .@last_conquest + "'"; query_sql "UPDATE `agit_defend_stats` SET `woe_ended`='1' WHERE `auto_id`='" + .@last_conquest + "'"; } end; error console
  14. if(getskilllv("RA_AIMEDBOLT")==10) { bonus2 bSkillAtk,"RA_AIMEDBOLT",5; }
  15. i use dispbottom but is not working too
  16. if (.@current_stat > .max_stats) { message strcharinfo(0), "You've reached the maximum "+.stat$[.@index]; } else if ((.@current_stat+ .@amount) > .max_stats) { message strcharinfo(0), "You can't exceed the maximum stats of "+.max_stats; } if i changed them is working but message strcharinfo(0) is not working
  17. i try to buy 299 int but failed
  18. prontera,155,181,5 script Stats Mistress 757,{ mes "[ Stats Mistress ]"; mes "Hello! I sell ^FF00CC1 stats for 400,000z^000000 would you like to buy!"; .@i = select( .stat_menu$ ) - 1; input .@amount,0,( .max_stats - readparam( 13+.@i ) ); if ( .@amount > 0 ) callsub( __OnBuyStat,.@i,.@amount ); close; __OnBuyStat: .@index= getarg(0); .@amount = getarg(1); .@cost = ( .cost_per_stat * .@amount ); mes "Stats : "+.stat$[.@index]+" +"+F_InsertComma( .@amount ); mes "Price : "+F_InsertComma( .@cost )+"z"; mes "Do you wish to continue ?"; if ( Zeny >= .@cost ) if ( select( "Buy "+F_InsertComma( .@amount )+" "+.stat$[.@index] ) ) { Zeny -= .@cost; statusup2 ( 13 + .@index ),.@amount; } return; OnInit: .max_stats = 300; .cost_per_stat = 400000; setarray .stat$,"Buy ^FF00CCSTR^000000","Buy ^FF00CCAGI^000000","Buy ^FF00CCVIT^000000","Buy ^FF00CCINT^000000","Buy ^FF00CCDEX^000000","Buy ^FF00CCLUK^000000"; .@stat_size = getarraysize( .stat$ ); while ( .@i < .@stat_size ) { .stat_menu$ = .stat_menu$ + .stat$[.@i] + ":"; .@i++; } end; } how i can add if player max is stats.. the npc give this message like on screenshot
  19. skill_db.txt inf 04 inf (0- passive, 1- enemy, 2- place, 4- self, 16- friend, 32- trap) 402,9,6,0,0,0x1,0,5,1,no,0,0,0,none,0,0x0, PF_MINDBREAKER,Mind Breaker
  20. no only this skill only problem if owned the agit skill has failed on the emperuim
×
×
  • Create New...