Jump to content
  • 0

Simple Script Problem


kaiGAMING

Question


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  84
  • Reputation:   2
  • Joined:  05/11/12
  • Last Seen:  

hi rAthena, how can i set up my PvP map. if the player died 2 times the player warps to the savepoint?

 

 

thanks in advance!

Edited by kaiGAMING
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2371
  • Joined:  10/28/11
  • Last Seen:  

isnt that is the default behavious of pvp map ?

 

unless you have your own custom src mod and changed it..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  84
  • Reputation:   2
  • Joined:  05/11/12
  • Last Seen:  

isnt that is the default behavious of pvp map ?

 

unless you have your own custom src mod and changed it..

hi Emistry, my pvp map is guild_vs3. i removed the guild_vs3 in gvg mapflags. and set it to pvp map.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

Yes it should work then.

As long as the map has the pvp mapflag, does NOT have the pvp_nocalcrank mapflag, and pk_mode is off.

This is the source code trunk/src/map/pc.c (line 6796)

	// pvp
	// disable certain pvp functions on pk_mode [Valaris]
	if( map[sd->bl.m].flag.pvp && !battle_config.pk_mode && !map[sd->bl.m].flag.pvp_nocalcrank )
	{
		sd->pvp_point -= 5;
		sd->pvp_lost++;
		if( src && src->type == BL_PC )
		{
			struct map_session_data *ssd = (struct map_session_data *)src;
			ssd->pvp_point++;
			ssd->pvp_won++;
		}
		if( sd->pvp_point < 0 )
		{
			add_timer(tick+1000, pc_respawn_timer,sd->bl.id,0);
			return 1|8;
		}
	}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  84
  • Reputation:   2
  • Joined:  05/11/12
  • Last Seen:  

Yes it should work then.

As long as the map has the pvp mapflag, does NOT have the pvp_nocalcrank mapflag, and pk_mode is off.

This is the source code trunk/src/map/pc.c (line 6796)

	// pvp
	// disable certain pvp functions on pk_mode [Valaris]
	if( map[sd->bl.m].flag.pvp && !battle_config.pk_mode && !map[sd->bl.m].flag.pvp_nocalcrank )
	{
		sd->pvp_point -= 5;
		sd->pvp_lost++;
		if( src && src->type == BL_PC )
		{
			struct map_session_data *ssd = (struct map_session_data *)src;
			ssd->pvp_point++;
			ssd->pvp_won++;
		}
		if( sd->pvp_point < 0 )
		{
			add_timer(tick+1000, pc_respawn_timer,sd->bl.id,0);
			return 1|8;
		}
	}
i got the script, but how can i set this just for guild_vs3

 

-    script    respawn    -1,{
OnPCDieEvent:
    sleep2 1;
    set @pk_death, @pk_death + 1;
    if ( @pk_death >= 2 ) {
        warp "SavePoint",0,0;
        atcommand "@alive";
        set hp,1;
        set @pk_death,0;
    }
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

You would have to edit or remove lines 6796-6813.

Option 1: remove those lines and use a custom OnPCDieEvent script to warp them out after 2 deaths

Option 2: edit line 6798 and add a mapname check to see if they are on guild_vs3.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...