Jump to content

Athan17

Members
  • Posts

    57
  • Joined

  • Last visited

  • Days Won

    1

Community Answers

  1. Athan17's post in Boss mvp room script was marked as the answer   
    check how lhz_dun03 and lhz_dun04 bosses are spawned.

    well, base on your script, looks like you kill the mvp every 10mins?
    i have two solutions for you, coz im not sure if you want to retain that every 10 mins of spawn.
    first solution would be, make an npc variable that will be set to "true" when is spawned and set to "false" when mvp died.
     
    OnInit: set .isMonAlive, 0; // not alive ... OnMinute00: OnMinute10: OnMinute20: OnMinute30: OnMinute40: OnMinute50: if(.isMonAlive) end; // checks if monster still alive, do not run the script. ... //after calling monster .isMonAlive = 1; // set to 1 because monster spawned ... OnBossMvPKilled: .isMonAlive = 0; // after mvp died, set 0, means its dead.
    then, 2nd solution would be, spawn a random monster every 10 mins, this works like lhz_dun03/04
     
    OnInit: // spawn monster on init OnTimer60000: //not sure if 10mins or 1hr, check docu //call random monster with ::OnBossMvpDead ... end; OnBossMvpDead: initnpctimer; end;  
  2. Athan17's post in Recall character in ID to save point was marked as the answer   
    haha i thought so, here's an update regarding bug check. sorry i cant test it in office.
     
    // Reset Position In-game version prontera,160,160,4 script Position Reset 909,{ mes "[System]"; mes "Please select a character"; mes "return to save point..."; set .@count, query_sql("SELECT `char_id`,`name` FROM `char` WHERE `account_id` = "+getcharid(3),.@charid,.@charname$); set .@menu$, ""; for ( set @ctr,0; @ctr < .@count; @ctr++ ) .@menu$ = .@menu$ + .@charname$[@ctr]+":"; .@menu = .@menu$ + "Cancel"; set .@selectedchar, select(.@menu$)-1; next; if( .@selectedchar < .@count ) { if( getcharid(0) != .@charid[.@selectedchar] ) { query_sql("UPDATE `char` AS ch SET ch.last_map = ch.save_map, ch.last_x = ch.save_x, ch.last_y = ch.save_y WHERE ch.char_id = "+.@charid[.@selectedchar]); mes .@charname$[@selectedchar] + "'s position has been reset."; } else { // TODO: instead of having if-else, its better not to show the invoker's name in selection. mes "you cant reset your own position"; } } end; }  
  3. Athan17's post in OnTouch NPC not working? (SOLVED) was marked as the answer   
    prontera,150,150,5 script Guard 966,2,2,{ // <~ you need to set x and y something  

  4. Athan17's post in Custom Battleground (rathena) cannot give rewards to Lose Team? (SOLVED) was marked as the answer   
    //===== rAthena Script ======================================= //= Battleground: Emperium //===== By: ================================================== //= AnnieRuru //===== Current Version: ===================================== //= 1.1 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= A simple battleground script: //= Destroy the opponent's Emperium to win the match. //===== Additional Comments: ================================= //= 1.0 First version, edited. [Euphy] //= 1.1 Added rewards for losers. [Athan17] //============================================================ - script bg_emp#control -1,{ OnInit: .minplayer2start = 1; // minimum players to start (ex. if 3vs3, set to 3) .eventlasting = 20*60; // event duration before auto-reset (20 minutes * seconds) setarray .rewarditem[0], // rewards for the winning team: <item>,<amount>,... 501, 10; setarray .rewardloser[0], // rewards for the losing team: <item>,<amount>,... 969, 1; .team1name$ = "Red"; .team2name$ = "Blue"; end; OnStart: if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) end; // create Battleground and teams .red = waitingroom2bg( "bat_a01", 157,347, strnpcinfo(0)+"::OnRedQuit", strnpcinfo(0)+"::OnRedDead", .rednpcname$ ); copyarray .team1aid, $@arenamembers, $@arenamembersnum; .team1count = .minplayer2start; .blue = waitingroom2bg( "bat_a01", 142,51, strnpcinfo(0)+"::OnBlueQuit", strnpcinfo(0)+"::OnBlueDead", .bluenpcname$ ); copyarray .team2aid, $@arenamembers, $@arenamembersnum; .team2count = .minplayer2start; delwaitingroom .rednpcname$; delwaitingroom .bluenpcname$; disablenpc .rednpcname$; disablenpc .bluenpcname$; setwall "bat_a01", 164,347, 6, 4, 0, "bg_emp_town_red"; setwall "bat_a01", 154,51, 6, 4, 0, "bg_emp_town_blue"; bg_warp .red, "bat_a01", 171,346; bg_warp .blue, "bat_a01", 162,50; bg_updatescore "bat_a01", 0, 0; // delay before match begins sleep 6000; mapannounce "bat_a01", "The rules are simple. The first team to break the opponent's Emperium wins!", bc_map; sleep 3000; for ( .@i = 5; .@i > 0; .@i-- ) { mapannounce "bat_a01", "["+ .@i +"]", bc_map; sleep 1000; } mapannounce "bat_a01", "Start!", bc_map; // spawn Emperiums bg_monster .red,"bat_a01",171,346, "--ja--",1915, strnpcinfo(3)+"::OnRedDown"; bg_monster .blue,"bat_a01",162,50, "--ja--",1914, strnpcinfo(3)+"::OnBlueDown"; delwall "bg_emp_town_red"; delwall "bg_emp_town_blue"; // match duration sleep .eventlasting * 1000; // end match, destroy Battleground, reset NPCs killmonster "bat_a01", strnpcinfo(3)+"::OnRedDown"; killmonster "bat_a01", strnpcinfo(3)+"::OnBlueDown"; if ( .winside ) { mapannounce "bat_a01", "- "+ getd( ".team"+ .winside +"name$" ) +" Team is victorious! -", bc_map; for ( .@i = 0; .@i < getd(".team"+ .winside +"count"); .@i++ ) getitem .rewarditem[0], .rewarditem[1], getd(".team"+ .winside +"aid["+ .@i +"]" ); for ( .@i = 0; .@i < getd(".team"+ .loseside +"count"); .@i++ ) getitem .rewardloser[0], .rewardloser[1], getd(".team"+ .loseside +"aid["+ .@i +"]" ); } else mapannounce "bat_a01", "- The match has ended in a draw! -", bc_map; sleep 5000; bg_warp .red, "prontera", 155,182; bg_warp .blue, "prontera", 158,182; bg_destroy .red; bg_destroy .blue; delwall "bg_emp_town_red"; delwall "bg_emp_town_blue"; deletearray .team1aid; deletearray .team2aid; .winside = .loseside = .team1count = .team2count = 0; enablenpc .rednpcname$; enablenpc .bluenpcname$; donpcevent .rednpcname$ +"::OnStart"; donpcevent .bluenpcname$ +"::OnStart"; end; // Emperium destroyed OnRedDown: callsub L_EmpDown, 1, 2; OnBlueDown: callsub L_EmpDown, 2, 1; L_EmpDown: mapannounce "bat_a01", strcharinfo(0) +" has destroyed "+ getd( ".team"+ getarg(0) +"name$" ) +" Team's Emperium.", bc_map; .winside = getarg(1); .loseside = getarg(0); awake strnpcinfo(0); end; // "OnDeath" event OnRedDead: OnBlueDead: sleep2 1250; percentheal 100,100; end; // "OnQuit" event OnRedQuit: callsub L_Quit, 1, 2; OnBlueQuit: callsub L_Quit, 2, 1; L_Quit: percentheal 100, 100; while ( getd( ".team"+ getarg(0) +"aid["+ .@i +"]" ) != getcharid(3) && .@i < getd(".team"+ getarg(0) +"count") ) .@i++; deletearray getd( ".team"+ getarg(0) +"aid["+ .@i +"]" ), 1; setd ".team"+ getarg(0) +"count", getd(".team"+ getarg(0) +"count") -1; if ( getd(".team"+ getarg(0) +"count") ) end; mapannounce "bat_a01", "All "+ getd( ".team"+ getarg(0) +"name$" ) +" team members have quit!", bc_map, 0xff3333; end; } prontera,155,182,5 script Red Team#bg_emp 733,{ end; OnInit: sleep 1; set getvariableofnpc( .rednpcname$, "bg_emp#control" ), strnpcinfo(0); OnStart: waitingroom "Red Team", getvariableofnpc( .minplayer2start, "bg_emp#control" ) +1, "bg_emp#control::OnStart", getvariableofnpc( .minplayer2start, "bg_emp#control" ); end; } prontera,158,182,5 script Blue Team#bg_emp 734,{ end; OnInit: sleep 1; set getvariableofnpc( .bluenpcname$, "bg_emp#control" ), strnpcinfo(0); OnStart: waitingroom "Blue Team", getvariableofnpc( .minplayer2start, "bg_emp#control" ) +1, "bg_emp#control::OnStart", getvariableofnpc( .minplayer2start, "bg_emp#control" ); end; } bat_a01 mapflag battleground bat_a01 mapflag nosave SavePoint bat_a01 mapflag nowarp bat_a01 mapflag nowarpto bat_a01 mapflag noteleport bat_a01 mapflag nomemo bat_a01 mapflag nopenalty bat_a01 mapflag nobranch bat_a01 mapflag noicewall bat_a01 mapflag hidemobhpbar can you try this? quick and dirty modification, gonna try this also when i get home. all thanks to AnnieRuru and Euphy for this awesome script
  5. Athan17's post in Thara frog is like GTB was marked as the answer   
    from what i research so far, thara frog card DO affect magic damage. but if you really want ALL magical damages to ignore race calculation, here's a solution:
    src/battle.c
     
    int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_list *target, int nk, int rh_ele, int lh_ele, int64 damage, int left, int flag){ ..... #define APPLY_CARDFIX(damage, fix) { (damage) = (damage) - (int64)(((damage) * (1000 - (fix))) / 1000); } switch( attack_type ) { case BF_MAGIC: ........ cardfix = cardfix * (100 - tsd->subsize[sstatus->size] - tsd->subsize[SZ_ALL]) / 100; cardfix = cardfix * (100 - tsd->subrace2[s_race2]) / 100; cardfix = cardfix * (100 - tsd->subrace[sstatus->race] - tsd->subrace[RC_ALL]) / 100; cardfix = cardfix * (100 - tsd->subclass[sstatus->class_] - tsd->subclass[CLASS_ALL]) / 100; comment out the tsd->subrace cardfix = cardfix * (100 - tsd->subsize[sstatus->size] - tsd->subsize[SZ_ALL]) / 100; cardfix = cardfix * (100 - tsd->subrace2[s_race2]) / 100; //cardfix = cardfix * (100 - tsd->subrace[sstatus->race] - tsd->subrace[RC_ALL]) / 100; cardfix = cardfix * (100 - tsd->subclass[sstatus->class_] - tsd->subclass[CLASS_ALL]) / 100; not yet tested
  6. Athan17's post in Card that make all equipment unbreakable? was marked as the answer   
    https://github.com/rathena/rathena/blob/master/doc/item_bonus.txt

     
    Strip/Break equipment --------------------- bonus bUnstripableWeapon,n; Weapon cannot be taken off via Strip skills (n is meaningless) bonus bUnstripableArmor,n; Armor cannot be taken off via Strip skills (n is meaningless) bonus bUnstripableHelm,n; Helm cannot be taken off via Strip skills (n is meaningless) bonus bUnstripableShield,n; Shield cannot be taken off via Strip skills (n is meaningless) bonus bUnstripable,n; All equipment cannot be taken off via strip skills (n is meaningless) bonus bUnbreakableGarment,n; Garment cannot be damaged/broken by any means (n is meaningless) bonus bUnbreakableWeapon,n; Weapon cannot be damaged/broken by any means (n is meaningless) bonus bUnbreakableArmor,n; Armor cannot be damaged/broken by any means (n is meaningless) bonus bUnbreakableHelm,n; Helm cannot be damaged/broken by any means (n is meaningless) bonus bUnbreakableShield,n; Shield cannot be damaged/broken by any means (n is meaningless) bonus bUnbreakableShoes,n; Shoes cannot be damaged/broken by any means (n is meaningless) bonus bUnbreakable,n; Reduces the break chance of all equipped equipment by n% bonus bBreakWeaponRate,n; Adds a n/100% chance to break enemy's weapon while attacking (stacks with other break chances) bonus bBreakArmorRate,n; Adds a n/100% chance to break enemy's armor while attacking (stacks with other break chances)  
  7. Athan17's post in Statpoint table(Question) was marked as the answer   
    i believe its max statpoint per level. increase in level each line.
    there are two statpoints.txt inside db folder. one is inside 'pre-re' folder, other is in 're'.
  8. Athan17's post in Custom items on 11/04/2015 Client was marked as the answer   
    have you tried adding your items in iteminfo.lub? or in case you have diffed or applied a patch from NEMO on getting different file for iteminfo.lub.
    you should add it there.

    where is it? under System/iteminfo.lub
    https://github.com/ROClientSide/Translation
  9. Athan17's post in ismounting() not working?? was marked as the answer   
    reminder, ismounting is for cash mounts, while checkriding is for peco rides.
×
×
  • Create New...