Jump to content
  • 0
classy5

R>Weapon breaking after an hour? + npc

Question

anyone have script that after an hour the weapon break and it will needed repair?

 

& repair npc could give you choices how many hours (1,2 or 3) it will last?

Edited by classy5

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

hell yeah this can be done with scripts alone

move back to script request

prontera,155,185,5	script	fsdfdskj	100,{	if ( countitem(1201) ) {		.@brokencount = getbrokencount() +1;		if ( .@brokencount ) {			.@i = 1;			while ( getbrokenid(.@i) != 1201 && .@i < .@brokencount ) .@i++;			if ( .@i < .@brokencount ) {				mes "wanna use that crappy knife again ?";				next;				if ( select( "Yes", "No" ) == 2 ) close;				repair .@i;				knife_start_break = gettimetick(2);				addtimer 10000, strnpcinfo(0)+"::Onaaa";				close;			}	//	fall through		}		mes "you already have that crappy knife";		close;	}	mes "do you want an item that can break in 10 seconds ?";	next;	if ( select( "Yes", "No" ) == 2 ) close;	getitembound 1201, 1, 4;	knife_start_break = gettimetick(2);	addtimer 10000, strnpcinfo(0)+"::Onaaa";	close;Onaaa:	getinventorylist;	for ( .@i = 0; .@i < @inventorylist_count; ++.@i )		if ( @inventorylist_id[.@i] == 1201 ) break;	delitem 1201, 1;	getitembound2 1201,1,1, @inventorylist_refine[.@i], 1, @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i], 4;	knife_start_break = 0;	end;OnPCLoginEvent:	if ( !countitem(1201) ) end;	if ( knife_start_break + 10 < gettimetick(2) )		addtimer 1, strnpcinfo(0)+"::Onaaa"; // sometimes doevent doesn't work	else		addtimer ( knife_start_break + 10 - gettimetick(2) )*1000, strnpcinfo(0)+"::Onaaa";	end;}

Share this post


Link to post
Share on other sites
  • 0

hell yeah this can be done with scripts alonemove back to script request

prontera,155,185,5	script	fsdfdskj	100,{	if ( countitem(1201) ) {		.@brokencount = getbrokencount() +1;		if ( .@brokencount ) {			.@i = 1;			while ( getbrokenid(.@i) != 1201 && .@i < .@brokencount ) .@i++;			if ( .@i < .@brokencount ) {				mes "wanna use that crappy knife again ?";				next;				if ( select( "Yes", "No" ) == 2 ) close;				repair .@i;				knife_start_break = gettimetick(2);				addtimer 10000, strnpcinfo(0)+"::Onaaa";				close;			}	//	fall through		}		mes "you already have that crappy knife";		close;	}	mes "do you want an item that can break in 10 seconds ?";	next;	if ( select( "Yes", "No" ) == 2 ) close;	getitembound 1201, 1, 4;	knife_start_break = gettimetick(2);	addtimer 10000, strnpcinfo(0)+"::Onaaa";	close;Onaaa:	getinventorylist;	for ( .@i = 0; .@i < @inventorylist_count; ++.@i )		if ( @inventorylist_id[.@i] == 1201 ) break;	delitem 1201, 1;	getitembound2 1201,1,1, @inventorylist_refine[.@i], 1, @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i], 4;	knife_start_break = 0;	end;OnPCLoginEvent:	if ( !countitem(1201) ) end;	if ( knife_start_break + 10 < gettimetick(2) )		addtimer 1, strnpcinfo(0)+"::Onaaa"; // sometimes doevent doesn't work	else		addtimer ( knife_start_break + 10 - gettimetick(2) )*1000, strnpcinfo(0)+"::Onaaa";	end;}
I moved into source considering one can have multiple knife, and it would fail to satisfy all conditions with scripting alone

While with plugin/source, one can add a time variable in item_data and can process each weapon separately...

Share this post


Link to post
Share on other sites
  • 0

with plugin/source, one can add a time variable in item_data and can process each weapon separately...

that would be interesting

add this in my to do list

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.