Jump to content
  • 0

PvP points goes to account not only on the char. who killed a player


Question

Posted (edited)

i want every kill will be counted as account pvp points, anyone please help ?

-	script	qwerty	-1,{
OnPCKillEvent:
     if ( strcharinfo(3) == "guild_vs3" ) {
if ( getcharip(killedrid) == getcharip(getcharid(3)) ) { end; } // Can't obtain points if player has same IP
	set pvppoint,pvppoint+1;
	dispbottom "You have gained 1 Points. Total "+pvppoint+" Point";
end;
}
}

 

Edited by TrustGTX

7 answers to this question

Recommended Posts

  • 1
Posted (edited)

new trick learned, but I doubt it

-	script	sfkjsf	FAKE_NPC,{
OnInit:
//	setarray .event$, "guild_vs1", "guild_vs2", "guild_vs3", "guild_vs4", "guild_vs5";
	setarray .event$, "xmas_dun01", "xmas_dun02", "xmas_fild01", "xmas_in"; // xmas

	.event_size = getarraysize( .event$ );

	.event_implode$ = implode( .event$, " " );
	end;
OnNPCKillEvent:
//	Method 1
//	if ( strcharinfo(3) == "guild_vs1" || strcharinfo(3) == "guild_vs2" || strcharinfo(3) == "guild_vs3" || strcharinfo(3) == "guild_vs4" || strcharinfo(3) == "guild_vs5" )
	if ( strcharinfo(3) == "xmas_dun01" || strcharinfo(3) == "xmas_dun02" || strcharinfo(3) == "xmas_fild01" || strcharinfo(3) == "xmas_in" )
		dispbottom "say 1";

//	Method 2
	for ( .@i = 0; .@i < .event_size; ++.@i )
		if ( strcharinfo(3) == .event$[.@i] )
			dispbottom "say 2";

//	Method 3
	if ( countstr( .event_implode$, strcharinfo(3) ) )
		dispbottom "say 3"; // this method can trigger on the xmas map

//	dispbottom "say 3"+.event_implode$+ strcharinfo(3);
	end;
}

just tested, for example, if the script supposed to only run in xmas dungeon, but it can trigger on xmas map, because the "xmas_dun01" contain "xmas"
same for yuno_fild01 contain yuno
payon_in01 contain payon
prt_cas_q contain prt_cas

 

EDIT: I forgot I did this before LMAO !!
https://rathena.org/board/topic/91826-special-party-warper/#comment-241434
https://rathena.org/board/topic/91723-please-help-this-script-about-mac_address/?do=findComment&amp;comment=240887
 

ok so its like this ... add "#"+ strcharinfo(3) +"#" like this

-	script	sfkjsf	FAKE_NPC,{
OnInit:
//	setarray .event$, "guild_vs1", "guild_vs2", "guild_vs3", "guild_vs4", "guild_vs5";
	setarray .event$, "xmas_dun01", "xmas_dun02", "xmas_fild01", "xmas_in"; // xmas

	.event_size = getarraysize( .event$ );

	.event_implode$ = "|"+ implode( .event$, "|" ) +"|";
	end;
OnNPCKillEvent:
//	Method 1
//	if ( strcharinfo(3) == "guild_vs1" || strcharinfo(3) == "guild_vs2" || strcharinfo(3) == "guild_vs3" || strcharinfo(3) == "guild_vs4" || strcharinfo(3) == "guild_vs5" )
	if ( strcharinfo(3) == "xmas_dun01" || strcharinfo(3) == "xmas_dun02" || strcharinfo(3) == "xmas_fild01" || strcharinfo(3) == "xmas_in" )
		dispbottom "say 1";

//	Method 2
	for ( .@i = 0; .@i < .event_size; ++.@i )
		if ( strcharinfo(3) == .event$[.@i] )
			dispbottom "say 2";

//	Method 3
	if ( compare( .event_implode$, "|"+ strcharinfo(3) +"|" ) )
		dispbottom "say 3"; // tested, doesn't trigger on xmas

	end;
}

now I remember I learned this trick from Keyworld's string manipulation commands

Edited by AnnieRuru
  • 0
Posted
1 hour ago, luizragna said:

Change all:


pvppoint

To:


#pvppoint

(the prefix "#" is used to accounts variables)

like this?

	set #pvppoint,#pvppoint+1;

i did this but :

You have gained 1 points. Total 0 point
i check my pvp points it is still 0

  • 0
Posted
43 minutes ago, luizragna said:

How i sayed, change all


	#pvppoint += 1;	//Simplified version of the "set #pvppoint,#pvppoint+1"
	dispbottom "You have gained 1 Points. Total "+#pvppoint+" Point"; //Here also add # prefix

 

thankyou dude +1 for you..

  • 0
Posted
1 hour ago, luizragna said:

How i sayed, change all


	#pvppoint += 1;	//Simplified version of the "set #pvppoint,#pvppoint+1"
	dispbottom "You have gained 1 Points. Total "+#pvppoint+" Point"; //Here also add # prefix

 

thankyou dude +1 for you..

 

how about settings this in multi map like guild_vs1 and guild_vs4 

if ( strcharinfo(3) == "guild_vs3" ) {

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...