Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/10/19 in all areas

  1. - script sdjflsdf -1,{ OnInit: bindatcmd "whosell", strnpcinfo(0)+"::Onbbb"; bindatcmd "mapmoblist", strnpcinfo(0)+"::Onaaa"; end; Onbbb: searchstores 999, 1; // yeah I'm so cheap XD end; Onaaa: if ( .@atcmd_numparameters ) { if ( getmapusers(.@atcmd_parameters$) == -1 ) { dispbottom "Map not exist"; end; } .@map$ = .@atcmd_parameters$; } else .@map$ = strcharinfo(3); .@size = getmapunits( BL_MOB, .@map$, .@bl ); freeloop true; for ( .@i = 0; .@i < .@size; ++.@i ) { .@string$ = rid2name(.@bl[.@i]); if ( !getd(".@"+ .@string$) ) .@mobname$[.@c++] = .@string$; setd ".@"+ .@string$, getd(".@"+ .@string$) +1; } dispbottom " === These are monsters in "+ .@map$ +" ==="; for ( .@i = 0; .@i < .@c; ++.@i ) dispbottom ( .@i +1 )+". "+ .@mobname$[.@i] +" : "+ getd(".@"+ .@mobname$[.@i])+"x"; end; }
    2 points
  2. If you set the prevent logout to 30 seconds will this not affect too when player use a skill or hit a monster? . If the player wants to go to character screen after those action will wait 30 seconds
    1 point
  3. ok try 1 more time after some intense browsing src/map/clif.cpp file, this function is the one that's responsible for handling client quit /*========================================== * // line 1839 *------------------------------------------*/ void clif_quitsave(int fd,struct map_session_data *sd) { if (!battle_config.prevent_logout || sd->canlog_tick == 0 || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout) map_quit(sd); else if (sd->fd) { //Disassociate session from player (session is deleted after this function was called) //And set a timer to make him quit later. session[sd->fd]->session_data = NULL; sd->fd = 0; add_timer(gettick() + 10000, clif_delayquit, sd->bl.id, 0); } } I have tested in-game that when Player A hitting Player B, and Player B instantly Alt+F4, there is indeed a 10 seconds duration staying in the game add_timer(gettick() + 10000, clif_delayquit, sd->bl.id, 0); so just change 10000, means 10000 mili-seconds into 30000 to let the player stay in-game for 30 seconds of course the prevent_logout also set to 30000 just to be safe
    1 point
  4. Hi, I would like to play battleground and Woe in rathena/offline/local host, renewal 3RD jobs with my brother and whith evilclones. For example : we both joined in battleground, each in a different team with 10 or more evil clones each team. if any kind soul can give a light, we would be grateful. Thanks.
    1 point
  5. WAHAHAHA scrap my previous script edi ~ been so long having someone comment on my scripts ~ hahaha no more feeling lonely bg_pvp_point_clone_0.3r.txt <-- PS: no 0.2 version because scrap due to @n0tttt gives better template ? not sure about cloth color, arch bishop dye 0 gives blue color, dye 2 red color wanderer dye 0 red color, dye 2 blue color ... didn't follow a pattern maybe another callsub nah, wait someone gives feedback then only continue this
    1 point
  6. Nice script. Wouldn't you mind a little bit of editing? I don't even know if this will work or not, but I added a few setunitdatas // https://rathena.org/board/topic/114033-battleground-multiplayer-whith-evilclone/ function script F_ShuffleNumbers { deletearray getarg(2); .@static = getarg(0); .@range = getarg(1) +1 - .@static; .@count = getarg(3, .@range); if (.@range <= 0 || .@count <= 0) return 0; if (.@count > .@range) .@count = .@range; for (.@i = 0; .@i < .@range; ++.@i) .@temparray[.@i] = .@i; for (.@i = 0; .@i < .@count; ++.@i) { .@rand = rand(.@range); set getelementofarray( getarg(2), .@i ), .@temparray[.@rand] + .@static; .@temparray[.@rand] = .@temparray[--.@range]; } return .@count; } prontera,155,185,5 script bg_pvp_clone 1_F_MARIA,{ .minplayer2start = 1; // 1vs1 mes "bg_pvp_clone"; if ( .start == true ) { mes "bg_pvp_clone is on-going"; close; } while ( .aid[.@i] != getcharid(3) && .@i < .size ) ++.@i; if ( .@i < .size ) { mes "You already join the queue."; close; } select "join"; mes "you have to stick to this map"; close2; .aid[ .size++ ] = getcharid(3); for ( .@i = 0; .@i < .size; ++.@i ) { if ( !isloggedin( .aid[.@i] ) ) { deletearray .aid[.@i], 1; --.@i; --.size; } else { attachrid .aid[.@i]; if ( strcharinfo(3) != strnpcinfo(4) ) { deletearray .aid[.@i], 1; --.@i; --.size; } } } detachrid; if ( .size < .minplayer2start *2 ) { announce .size +" players join", bc_npc | bc_area; end; } .start = true; .red = bg_create( "bat_c01",53,128, strnpcinfo(0)+"::OnRedQuit", strnpcinfo(0)+"::OnRedDead" ); .blue = bg_create( "bat_c01",146,56, strnpcinfo(0)+"::OnBlueQuit", strnpcinfo(0)+"::OnBlueDead" ); callfunc "F_ShuffleNumbers", 0, .size -1, .@r; for ( .@i = 0; .@i < .size; ++.@i ) { attachrid .aid[ .@r[.@i] ]; bg_join ( .@i % 2 )? .red : .blue; } detachrid; deletearray .aid; .size = 0; bg_warp .red, "bat_c03", 53,128; bg_warp .blue, "bat_c03", 146,56; for ( .@i = 0; .@i < 20; ++.@i ) { if (.@i % 10 == 0) .@size = bg_get_data( ((.@i < 10) ? .red : .blue), 1 ); .@player = $@arenamembers[rand(.@size)]; .@mob = bg_monster( ((.@i < 10) ? .red : .blue), "bat_c03", 0,0, "--ja--", rand(1799,1804), strnpcinfo(0)+"::On"+((.@i < 10) ? "Red" : "Blue")+"CloneKill" ); setunitdata .@mob,UMOB_SEX,readparam( Sex, .@player); setunitdata .@mob,UMOB_CLASS,readparam( Class, .@player); setunitdata .@mob,UMOB_HAIRSTYLE,getlook( LOOK_HAIR, .@player); setunitdata .@mob,UMOB_HAIRCOLOR,getlook( LOOK_HAIR_COLOR, .@player); setunitdata .@mob,UMOB_HEADBOTTOM,getlook( LOOK_HEAD_BOTTOM, .@player); setunitdata .@mob,UMOB_HEADMIDDLE,getlook( LOOK_HEAD_MID, .@player); setunitdata .@mob,UMOB_HEADTOP,getlook( LOOK_HEAD_TOP, .@player); setunitdata .@mob,UMOB_CLOTHCOLOR,getlook( LOOK_CLOTHES_COLOR, .@player); setunitdata .@mob,UMOB_SHIELD,getlook( LOOK_SHIELD, .@player); setunitdata .@mob,UMOB_WEAPON,getlook( LOOK_WEAPON, .@player); } sleep 10000; // Match Duration if ( .winside == .red || .redscore > .bluescore ) { mapannounce "bat_c03", "- Red side Won the match !", bc_map; callsub L_reward, .red; } else if ( .winside == .blue || .bluescore > .redscore ) { mapannounce "bat_c03", "- Blue side Won the match !", bc_map; callsub L_reward, .blue; } else mapannounce "bat_c03", "Battle end as a draw", bc_map; bg_destroy .red; bg_destroy .blue; mapwarp "bat_c03", "prontera",150,185; .redscore = .bluescore = .start = false; bg_updatescore "bat_c03", 0, 0; end; L_reward: bg_get_data getarg(0), 1; for ( .@i = 0; .@i < $@arenamemberscount; ++.@i ) getitem 501,1, $@arenamembers[.@i]; return; OnRedCloneKill: callsub L_CloneKill, .red, .blue, .bluescore, rand(1799,1804), "::OnRedCloneKill"; OnBlueCloneKill: callsub L_CloneKill, .blue, .red, .redscore, rand(1659,1663), "::OnBlueCloneKill"; L_CloneKill: .@mob = bg_monster( getarg(0), "bat_c03", 0,0, "--ja--", getarg(3), strnpcinfo(0) + getarg(4) ); .@size = bg_get_data( getarg(0), 1 ); .@player = $@arenamembers[rand(.@size)]; setunitdata .@mob,UMOB_SEX,readparam( Sex, .@player); setunitdata .@mob,UMOB_CLASS,readparam( Class, .@player); setunitdata .@mob,UMOB_HAIRSTYLE,getlook( LOOK_HAIR, .@player); setunitdata .@mob,UMOB_HAIRCOLOR,getlook( LOOK_HAIR_COLOR, .@player); setunitdata .@mob,UMOB_HEADBOTTOM,getlook( LOOK_HEAD_BOTTOM, .@player); setunitdata .@mob,UMOB_HEADMIDDLE,getlook( LOOK_HEAD_MID, .@player); setunitdata .@mob,UMOB_HEADTOP,getlook( LOOK_HEAD_TOP, .@player); setunitdata .@mob,UMOB_CLOTHCOLOR,getlook( LOOK_CLOTHES_COLOR, .@player); setunitdata .@mob,UMOB_SHIELD,getlook( LOOK_SHIELD, .@player); setunitdata .@mob,UMOB_WEAPON,getlook( LOOK_WEAPON, .@player); set getarg(2), getarg(2) +1; // killing clones add 1 point if ( .redscore < 100 && .bluescore < 100 ) bg_updatescore "bat_c03", .redscore, .bluescore; if ( getarg(2) == 100 ) { .winside = getarg(1); awake strnpcinfo(0); } end; OnRedQuit: callsub L_Quit, .red, .blue, "Red"; OnBlueQuit: callsub L_Quit, .blue, .red, "Blue"; L_Quit: if ( bg_get_data( getarg(0), 0 ) ) end; mapannounce "bat_c03", "All "+ getarg(2) +" team members has Quit!", bc_map; .winside = getarg(1); awake strnpcinfo(0); end; OnRedDead: callsub L_Dead, .red, .blue, .bluescore; OnBlueDead: callsub L_Dead, .blue, .red, .redscore; L_Dead: set getarg(2), getarg(2) +3; // killing players add 3 points if ( .redscore < 100 && .bluescore < 100 ) bg_updatescore "bat_c03", .redscore, .bluescore; if ( getarg(2) == 100 ) { .winside = getarg(1); awake strnpcinfo(0); } sleep2 1250; percentheal 100,100; end; } bat_c03 mapflag battleground 2 bat_c03 mapflag nosave SavePoint bat_c03 mapflag nowarp bat_c03 mapflag nowarpto bat_c03 mapflag noteleport bat_c03 mapflag nomemo bat_c03 mapflag nopenalty bat_c03 mapflag nobranch bat_c03 mapflag noicewall EDIT: Ups, I didn't see that edit.
    1 point
  7. 1 - Add new map_flag: MF_NORAGEQUIT 2 - Add new value to map_session_data: lastpk 3 - Add new configuration in battle/conf.misc with PK_TIMER (time to set sd->lastpk to 0) 4 - In battle.c when player receive damage from other player in a map with this mapflag set sd->lastpk with source damage char_id. 5 - When player who logout with (sd->lastpk) > 0 && map_id2sd(sd->lastpk) is not null (still online), set for this player who last hitted the player who logout the tsd->killedrid = sd->status.char_id this sd (lets call tsd) and execute npc_event( NPCE_KILLLEVENT, tsd). 6 - Now when player A hit player B, until a ms of time, if player B Log out, the player A garants the execution of label OnPcKillEvent. 7 - Don't forget to put Add_timer in battle.c from same line of 3 step to clean the sd->lastpk of a player (gap between damage. If a player does not hit other in time of a x ms there is no reason to give the kill to the other when logout) let me improve the explication, with pseudo code. I don't remember the funcions name cause I'm on office -- battle.c pc_damage()... // Whatever where log player damage if(sd && tsd) { sd->lasthitter= tsd->status.char_id; add_timer( gettick() + 5000, function_timerToCleanLastHitter, sd->bl.id); // After 5 seconds the function will set sd->lasthitter to 0 } -- pc.c or map.c (dont remember from where OnPcLogOut is called, but the funcion of logout) pcmap_logout() { //before OnPcLogoutevent and other stuff if(sd->lasthitter > 0 && get_mapflag(sd->bl.m, MF_NORAGEQUIT) // Player logout and received hit from a player in last 5 seconds { struct map_session_data* tsd = map_ids2sd( sd->lasthitter ); if(tsd != null) { tsd->killedrid = sd->status.char_id; npce_event( map_id2sd( tsd->lasthitter, NPCE_KILLPC); } } } sorry about english and code. Writing without consulting google translate or source code
    1 point
  8. 222 downloads

    We are familiar of a Ragnarok Client HighPriest_081105 and its corresponding PDB file. This resource is invaluable for understanding the Ragnarok Client and was used on projects involved in diffing or original RO client development. I've been asked if I had a link for it by many potential developers so I thought it was very important to share and keep it live on rAthena.
    Free
    1 point
×
×
  • Create New...