Jump to content
  • 0

OnPCKillEvent


Question

Posted

can i request a script where if my name start with [wolf] and i kill a player who has a name of [sheep] it will give me 10 TCG card while if i kill a person whose name start with [wofl] also i will get 5 TCG card?

ohh...  same goes for the [sheep]

ex.. 

[sheep] juan killed [wolf] benjie = he gains 10 tcg card 

while

[sheep] juan killed [sheep] bonie = he gains 5 tcg card
 

4 answers to this question

Recommended Posts

Posted (edited)

I saw you post a lot of requests, have you tried to learn writing script?

 

or just wait someone do it for you?

 

-

 

anyway, back to request, 

 

if my name start with [wolf]...

 

where is those [***] come from?

 

is this from player did it when he create char or other system given it?

Edited by goddameit
  • Upvote 2
Posted

it's an npc on my server where if you click it you get to choice between wolf and sheep before you can enter the main map........ 

query_sql "UPDATE `char` SET name='[Wolf] "+ escape_sql(@charname$) + "' WHERE `char_id`="+escape_sql(@charid$)+"";

query_sql "UPDATE `char` SET name='[sheep] "+ escape_sql(@charname$) + "' WHERE `char_id`="+escape_sql(@charid$)+"";

this will be attached to them forever....


so i need a script where if they go to pvp if they kill the opposing on their name they will get 10 TCG and if they kill their own they get 5 TCG


 



I saw you post a lot of requests, have you tried to learn writing script?

 

or just wait someone do it for you?

 

-

 

anyway, back to request, 

 

 

if my name start with [wolf]...

 

where is those [***] come from?

 

is this from player did it when he create char or other system given it?

Posted

Try this

-	script	fghk	-1,{

OnPCKillEvent:
	.@sub_killer$ = substr( strcharinfo(0),0,6 );
	.@sub_killed$ = substr( rid2name( killedrid ),0,6 );
	if( .@sub_killer$ == .@sub_killed$ )
		getitem 7227, 5;
	else if( ( .@sub_killer$ == "[Wolf] " || .@sub_killer$ == "[Sheep]" ) && ( .@sub_killed$ == "[Wolf] " || .@sub_killed$ == "[Sheep]" ) )
		getitem 7227, 10;
	end;
}

 

Posted (edited)


 

 

Try this

-	script	fghk	-1,{

OnPCKillEvent:
	.@sub_killer$ = substr( strcharinfo(0),0,6 );
	.@sub_killed$ = substr( rid2name( killedrid ),0,6 );
	if( .@sub_killer$ == .@sub_killed$ )
		getitem 7227, 5;
	else if( ( .@sub_killer$ == "[Wolf] " || .@sub_killer$ == "[Sheep]" ) && ( .@sub_killed$ == "[Wolf] " || .@sub_killed$ == "[Sheep]" ) )
		getitem 7227, 10;
	end;
}

tried this sir capu... i only get the 5 tcg not 10........ and also it only works with [wolf] killing [sheep] its not working if a [sheep] is kiling the [wolf]
 

 

Lol.... Hahaha It's All Working Now....... i just check the script and ive putted 2891 instead of 28911(Wolf Badge) on the getitem part.......... 


Thank you so much sir capu for the script.......... [ SOLVED ]
 

Edited by caspa

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...