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 aloneWhile with plugin/source, one can add a time variable in item_data and can process each weapon separately...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;}
that would be interestingadd this in my to do listwith plugin/source, one can add a time variable in item_data and can process each weapon separately...
We use essential cookies to make this site work, and optional cookies to enhance your experience.