Bin4ry Posted September 22, 2012 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 782 Reputation: 82 Joined: 01/01/12 Last Seen: September 21, 2015 Share Posted September 22, 2012 (edited) Like title. I think this would be very helpful Edited September 22, 2012 by darristan Quote Link to comment Share on other sites More sharing options...
nanakiwurtz Posted September 22, 2012 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Share Posted September 22, 2012 What do you mean? I don't fully understand Quote Link to comment Share on other sites More sharing options...
Bin4ry Posted September 22, 2012 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 782 Reputation: 82 Joined: 01/01/12 Last Seen: September 21, 2015 Author Share Posted September 22, 2012 (edited) In the latest SVN, pushcart is acting like a 'buff' behavior so when you use any script that has sc_end it takes away merchant's cart too. (Correct me is the 'Buff' is wrong) Edit: Status behavior sounds more appropriate. Edited September 22, 2012 by darristan Quote Link to comment Share on other sites More sharing options...
malufett Posted September 22, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 554 Reputation: 70 Joined: 04/04/12 Last Seen: November 8, 2013 Share Posted September 22, 2012 @script.c if( !bl ) return 0; if( type >= 0 && type < SC_MAX ) { struct status_change *sc = status_get_sc(bl); struct status_change_entry *sce = sc?sc->data[type]:NULL; if (!sce) return 0; //This should help status_change_end force disabling the SC in case it has no limit. sce->val1 = sce->val2 = sce->val3 = sce->val4 = 0; status_change_end(bl, (sc_type)type, INVALID_TIMER); } else status_change_clear(bl, 2);// remove all effects if( type == SC_PUSH_CART ) return 0; add this after if( !bl ) return 0; Quote Link to comment Share on other sites More sharing options...
Napster Posted November 21, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 196 Reputation: 72 Joined: 12/12/11 Last Seen: November 6, 2016 Share Posted November 21, 2012 (edited) @malufett if sc_end SC_ALL; how to fix src exclude cart remove type = SC_ALL switch(type) { case SC_PUSH_CART: return 0; } thankyou Edited November 21, 2012 by Napster Quote Link to comment Share on other sites More sharing options...
malufett Posted November 21, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 554 Reputation: 70 Joined: 04/04/12 Last Seen: November 8, 2013 Share Posted November 21, 2012 @Napster if this will be the case 'sc_end SC_ALL;' then by default it cannot be remove so nothing to worried about... Quote Link to comment Share on other sites More sharing options...
Napster Posted November 21, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 196 Reputation: 72 Joined: 12/12/11 Last Seen: November 6, 2016 Share Posted November 21, 2012 (edited) @malufett I have test but... cart status has been remove away ex. npc [/color] morocc,158,92,5 script test 69,{ sc_end SC_ALL; end; } src BUILDIN_FUNC(sc_end) { struct block_list* bl; int type; type = script_getnum(st,2); if( script_hasdata(st,3) ) bl = map_id2bl(script_getnum(st,3)); else bl = map_id2bl(st->rid); if( potion_flag==1 && potion_target ) {//##TODO how does this work [FlavioJS] bl = map_id2bl(potion_target); } if( !bl ) return 0; if( type == SC_PUSH_CART ) return 0; if( type >= 0 && type < SC_MAX ) { struct status_change *sc = status_get_sc(bl); struct status_change_entry *sce = sc?sc->data[type]:NULL; if (!sce) return 0; //This should help status_change_end force disabling the SC in case it has no limit. sce->val1 = sce->val2 = sce->val3 = sce->val4 = 0; status_change_end(bl, (sc_type)type, INVALID_TIMER); } else status_change_clear(bl, 2);// remove all effects return 0; } Edited November 21, 2012 by Napster Quote Link to comment Share on other sites More sharing options...
malufett Posted November 21, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 554 Reputation: 70 Joined: 04/04/12 Last Seen: November 8, 2013 Share Posted November 21, 2012 SC_ALL will trigger this one 'status_change_clear(bl, 2);' oh..wait I forgot..type 2 in 'status_change_clear' means remove all buff regardless the settings..sorry.. ok go to status.c and look for 'status_change_clear' declaration then after case SC_L_LIFEPOTION: case SC_PUSH_CART: continue; } add this if( i == SC_PUSH_CART ) continue; so regardless the type it will not remove SC_PUSH_CART Quote Link to comment Share on other sites More sharing options...
Napster Posted November 21, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 196 Reputation: 72 Joined: 12/12/11 Last Seen: November 6, 2016 Share Posted November 21, 2012 ok! thank you sir this it working Quote Link to comment Share on other sites More sharing options...
QQfoolsorellina Posted November 21, 2012 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 587 Reputation: 105 Joined: 11/19/11 Last Seen: July 7, 2019 Share Posted November 21, 2012 I wonder why you don't use loop to check every sc status? http://www.eathena.ws/board/index.php?showtopic=239242 just put SC_PUSH_CART(518) into if condition I think that should work Quote Link to comment Share on other sites More sharing options...
Napster Posted November 21, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 196 Reputation: 72 Joined: 12/12/11 Last Seen: November 6, 2016 Share Posted November 21, 2012 I wonder why you don't use loop to check every sc status? http://www.eathena.w...howtopic=239242 just put SC_PUSH_CART(518) into if condition I think that should work some status found problem with SC_ALL ex. SC_LEADERSHIP SC_GLORYWOUNDS SC_SOULCOLD SC_HAWKEYES i thank this status can't remove and i want fix in mysrc Quote Link to comment Share on other sites More sharing options...
Question
Bin4ry
Like title. I think this would be very helpful
Edited by darristanLink to comment
Share on other sites
10 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.