Jump to content
  • 0

OnPCKillEvent


caspa

Question


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

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
 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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;
}

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  


 

 

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