Jump to content

Question

Posted

Hi rA.

 

I need a little help.

 

I'm currently scripting a sharingan evolution system wherein if the sharingan user kills one of his friend in the PvP Room he will receive the mangekyou sharingan. Is it possible? I think it is with sql scripting. 

 

Basically, my script goes like this:

 

OnPCKillEvent:

if( strcharinfo(3) == "guild_vs2" && isequipped(sharingan_id) && <friend_variable> ) {

getitem <mangekyou_id>,1;

end;

 

Please help me.

 

Thanks in advance.

1 answer to this question

Recommended Posts

Posted

try

-	script	Sample	-1,{
OnInit:
set .sharingan_id,5022;
set .new_sharingan_id,5353;
end;

OnPCKillEvent:
	if( strcharinfo(3) == "guild_vs2" && isequipped( .sharingan_id ) ){
		query_sql( "SELECT `friend_id` FROM `friend` WHERE `char_id` = '"+getcharid(0)+"'",.@char_id );
		.@total = getarraysize( .@char_id );
		if( .@total )
			for( .@i = 0; .@i < .@total; .@i++ )
				if( killedrid == .@char_id[.@i] ){
					delitem .sharingan_id,1;
					getitem .new_sharingan_id,1;
					equip .new_sharingan_id;
					message strcharinfo(0),"Your sharingan...ugraded.";
				}
	}
end;
}

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