Bin4ry Posted September 22, 2012 Posted September 22, 2012 (edited) Like title. I think this would be very helpful Edited September 22, 2012 by darristan Quote
nanakiwurtz Posted September 22, 2012 Posted September 22, 2012 What do you mean? I don't fully understand Quote
Bin4ry Posted September 22, 2012 Author 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
malufett Posted September 22, 2012 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
Napster Posted November 21, 2012 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
malufett Posted November 21, 2012 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
Napster Posted November 21, 2012 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
malufett Posted November 21, 2012 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
QQfoolsorellina Posted November 21, 2012 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
Napster Posted November 21, 2012 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
Question
Bin4ry
Like title. I think this would be very helpful
Edited by darristan10 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.