Jump to content
  • 0
unit001

Dispel / Yggdrasil Berry and Seed restriction

Question

Good Morning,

 

Our server currently have 2 problems.

 

1. Food (Non-Cash) can be dispelled and;

2. We need to restrict the Crusader class to use Yggdrasil Berry (607) and Yggdrasil Seed (608). Although we are still figuring out if we want the restriction to be permanent, or during PVP/WOE only.

 

Below is a list of the stuff I already tried but failed.

 

We would like to refrain from using Cash Item for the +20 foods, because we want the Real Cash Food (+10) to stack with the +20 Food.

 

- Food Problem

 

Edit SC_Config.txt

SC_FOOD_STR, 94 // 2 + 4 + 8 + 16 + 64 = 94SC_FOOD_AGI, 94SC_FOOD_VIT, 94SC_FOOD_DEX, 94SC_FOOD_INT, 94SC_FOOD_LUK, 94

 

Edited Skill.C

Note: I commented on it because it gives compile Errors.

for(i = 0; i < SC_MAX; i++)				{					if ( !tsc->data[i] )							continue;					if( SC_COMMON_MAX < i ){						if ( iStatus->get_sc_type(i)&SC_NO_DISPELL )							continue;					}					switch (i) {						/**						 * bugreport:4888 these songs may only be dispelled if you're not in their song area anymore						 **/						case SC_WHISTLE:						case SC_ASSNCROS:						case SC_POEMBRAGI:						case SC_APPLEIDUN:						case SC_HUMMING:						case SC_DONTFORGETME:						case SC_FORTUNE:						case SC_SERVICEFORYOU:							if( tsc->data[i]->val4 ) //val4 = out-of-song-area								continue;							break;						case SC_ASSUMPTIO:							if( bl->type == BL_MOB )								continue;							break;						case SC_BERSERK:						case SC_SATURDAY_NIGHT_FEVER:							tsc->data[i]->val2=0;  //Mark a dispelled berserk to avoid setting hp to 100 by setting hp penalty to 0.							break;						//Case SC_FOOD_STR:						//Case SC_FOOD_AGI:						//Case SC_FOOD_VIT:						//Case SC_FOOD_DEX:						//Case SC_FOOD_INT:						//Case SC_FOOD_LUK:						//Case SC_FOOD_STR_CASH:						//Case SC_FOOD_AGI_CASH:						//Case SC_FOOD_VIT_CASH:						//Case SC_FOOD_DEX_CASH:						//Case SC_FOOD_INT_CASH:						//Case SC_FOOD_LUK_CASH:						//Case SC_INSPIRATION:					}

 

Edited Status.C

Note: I Commented the skills since it gives compile errors

int status_change_clear(struct block_list* bl, int type) {	struct status_change* sc;	int i;	sc = iStatus->get_sc(bl);	if (!sc || !sc->count)		return 0;	for(i = 0; i < SC_MAX; i++) {		if(!sc->data[i])			continue;		if(type == 0){			if( iStatus->get_sc_type(i)&SC_NO_REM_DEATH ){				switch (i) {				case SC_ARMOR_PROPERTY://Only when its Holy or Dark that it doesn't dispell on death					if( sc->data[i]->val2 != ELE_HOLY && sc->data[i]->val2 != ELE_DARK )						break;				default:					continue;				}			}		}		if( type == 3 ) {			switch (i) {// TODO: This list may be incomplete			case SC_WEIGHTOVER50:			case SC_WEIGHTOVER90:			case SC_NOCHAT:			case SC_PUSH_CART:			case SC_JAILED:			case SC_ALL_RIDING:						//Case SC_FOOD_STR:						//Case SC_FOOD_AGI:						//Case SC_FOOD_VIT:						//Case SC_FOOD_DEX:						//Case SC_FOOD_INT:						//Case SC_FOOD_LUK:						//Case SC_FOOD_STR_CASH:						//Case SC_FOOD_AGI_CASH:						//Case SC_FOOD_VIT_CASH:						//Case SC_FOOD_DEX_CASH:						//Case SC_FOOD_INT_CASH:						//Case SC_FOOD_LUK_CASH:						//Case SC_INSPIRATION:				continue;			}		}

 

 

 

-- Yggdrasil Berry/Seed Restriction

 

I tried some stuff here > http://rathena.org/board/topic/58596-disable-ygg-on-paladin/

 

I tried a lot of Hexcodes based on > http://herc.ws/wiki/Custom_Items

 

But still no avail.

 

Hoping for your kind assistance on this matter.

 

Thank You!

-Wilfred

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

using that on item script should work

 

{ if(Class == 4015 || Class == 4022){ getitem 607,1; end; } percentheal 100,100; }

 

 

and for sc_config.txt use only 14 (2 + 4 + 8) and you should be fine

Share this post


Link to post
Share on other sites
  • 0

I tried both but it still did not work.

 

607,Yggdrasilberry,Yggdrasil Berry,0,5000,,300,,,,,0xFFFFFFFF,63,2,,,,,,{ if(Class == 4015 || Class == 4022){ getitem 607,1; end; } percentheal 100,100; },{},{}608,Seed_Of_Yggdrasil,Yggdrasil Seed,0,5000,,300,,,,,0xFFFFFFFF,63,2,,,,,,{ if(Class == 4015 || Class == 4022){ getitem 608,1; end; } percentheal 50,50; },{},{}
SC_FOOD_STR, 14SC_FOOD_AGI, 14SC_FOOD_VIT, 14SC_FOOD_DEX, 14SC_FOOD_INT, 14SC_FOOD_LUK, 14

Share this post


Link to post
Share on other sites
  • 0

try this:

 

if(Class == 4015 || Class == 4022){ getitem 607,1; dispbottom "Crusaders and Paladin are Restricted to use this item.",0; end; } else { percentheal 100,100; }

Edited by Frost

Share this post


Link to post
Share on other sites
  • 0

Fixed the YGG/Seed restriction by changing the Class to { if(Class == 4073 || Class == 4066 || Class == 4015 ){ getitem 607,1; end; }

Fixed the Dispel problem by adding the ff to the sc_config.txt

SC_SAVAGE_STEAK, 28SC_COCKTAIL_WARG_BLOOD, 28SC_MINOR_BBQ, 28SC_SIROMA_ICE_TEA, 28SC_DROCERA_HERB_STEAMED, 28SC_PUTTI_TAILS_NOODLES, 28

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.