• 0
Sign in to follow this  
Rizz

Having Problem with item effect on specific classes.

Question

Hello, I'm sorry I ask a newbie question. I tried editing itemsthat would have different effects based on the class using this item. However, when I tried to implement it. The server notified that there is a wrong effect. I beg if there are friends here who can provide solutions for this script? Thank you in advance.

 

20507,C_Poring_Bag,Costume Poring Bag,4,0,,0,,0,,0,0xFFFFFFFF,63,2,8192,,1,0,16,{ if(BaseJob==Job_Rogue) bonus2 bSkillAtk,"RG_RAID",25; bonus2 bSkillAtk,"RG_BACKSTAP",25; bonus5 bAutoSpell,"NPC_WIDESTONE",1,70,BF_WEAPON,0; else if(BaseJob==Job_Knight) bonus bAspdRate,10; bonus bCritical,15; bonus2 bSkillAtk,"KN_PIERCE",30; bonus2 bSkillAtk,"KN_BRANDISHSPEAR",30; bonus2 bSkillAtk,"KN_SPEARSTAB",30; bonus2 bSkillAtk,"KN_SPEARBOOMERANG",30; else if(BaseJob==Job_Crusader) bonus2 bSkillAtk,"CR_GRANDCROSS",30; bonus2 bSkillAtk,"CR_SHIELDBOOMERANG",10; bonus2 bSubClass,Class_Boss,25; bonus2 bSubSize,Size_Large,25; else if(BaseJob==Job_Monk) bonus3 bAutoSpell,"MO_CALLSPIRITS",1,20; bonus bHit,30; bonus bAspdRate,5; bonus2 bSkillAtk,"MO_COMBOFINISH",40; bonus2 bSkillCooldown,"MO_EXTREMITYFIST",20000; else if(BaseJob==Job_Priest) bonus bMaxSPrate,25; bonus2 bSkillAtk,"PR_MAGNUS",30; bonus2 bVariableCastrate,"PR_MAGNUS",-30; bonus bMatkRate,20; skill "ALL_ODINS_POWER",1; else if(BaseJob==Job_Hunter) bonus bCritical,15; bonus2 bSkillAtk,"HT_BLITZBEAT",30; bonus3 bAutoSpell,"HT_BLITZBEAT",5,500; bonus bLongAtkRate,10; else if(BaseJob==Job_Bard) bonus bLongAtkRate,10; bonus2 bSkillAtk,"BA_MUSICALSTRIKE",300; bonus4 bAutoSpellOnSkill,"BA_MUSICALSTRIKE","BA_PANGVOICE",1,1000; else if(BaseJob==Job_Dancer) bonus bLongAtkRate,10; bonus2 bSkillAtk,"DC_THROWARROW",300; bonus4 bAutoSpellOnSkill,"DC_THROWARROW","DC_WINKCHARM",1,1000; else if(BaseJob==Job_Wizard) bonus2 bSkillAtk,"WZ_EARTHSPIKE",40; bonus2 bVariableCastrate,"WZ_EARTHSPIKE",-25; bonus4 bAutoSpellOnSkill,"WZ_HEAVENDRIVE","WZ_EARTHSPIKE",5,2500; bonus2 bSubEle,Ele_Neutral,15; else if(BaseJob==Job_Sage) bonus2 bSkillAtk,"MG_THUNDERSTORM",40; bonus2 bVariableCastrate,"MG_THUNDERSTORM",-10; bonus bLongAtkDef,15; bonus2 bSkillAtk,"MG_NAPALMBEAT",40; else if(BaseJob==Job_Blacksmith) bonus bSplashRange,1; bonus bBaseAtk,50; bonus2 bSubEle,Ele_Neutral,15; bonus2 bSubEle,Ele_Fire,15; bonus2 bSkillAtk,"MC_MAMMONITE",20; else if(BaseJob==Job_Alchemist) bonus2 bSkillAtk,"AM_ACIDTERROR",20; bonus2 bSkillAtk,"AM_DEMONSTRATION",20; bonus2 bAddMonsterDropItem,929,2500; else if(BaseJob==Job_Assassin) bonus bAspdRate,5; bonus bCritAtkRate,20; bonus2 bIgnoreDefClassRate,Class_Normal,25; bonus2 bSkillAtk,"AS_SPLASHER",25; },{},{}

 

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Your item bonus script is too long. Your bonus script consist of 2280 characters. i even minimized it and used switch. still have 2104 characters. The longest bonus script i've seen so far on db is 669 characters which is krieger staff..
The solution i know so far is create a function for it and use callfunc on your item.

Also your script should have "{ }" for every if/else if since its not a 1 liner..

Here's my solution
Create a function script first. Load it then reloaditemdb. 

function	script	itembonus	{
switch(BaseJob){
case Job_Rogue:
	bonus2 bSkillAtk,"RG_RAID",25;bonus2 bSkillAtk,"RG_BACKSTAP",25;bonus5 bAutoSpell,"NPC_WIDESTONE",1,70,BF_WEAPON,0;break;
case Job_Knight:
	bonus bAspdRate,10; bonus bCritical,15; bonus2 bSkillAtk,"KN_PIERCE",30; bonus2 bSkillAtk,"KN_BRANDISHSPEAR",30; bonus2 bSkillAtk,"KN_SPEARSTAB",30; bonus2 bSkillAtk,"KN_SPEARBOOMERANG",30;break;
case Job_Crusader:
	bonus2 bSkillAtk,"CR_GRANDCROSS",30; bonus2 bSkillAtk,"CR_SHIELDBOOMERANG",10; bonus2 bSubClass,Class_Boss,25; bonus2 bSubSize,Size_Large,25;break;
case Job_Monk:
	bonus3 bAutoSpell,"MO_CALLSPIRITS",1,20; bonus bHit,30; bonus bAspdRate,5; bonus2 bSkillAtk,"MO_COMBOFINISH",40; bonus2 bSkillCooldown,"MO_EXTREMITYFIST",20000;break;
case Job_Priest:
	bonus bMaxSPrate,25; bonus2 bSkillAtk,"PR_MAGNUS",30; bonus2 bVariableCastrate,"PR_MAGNUS",-30; bonus bMatkRate,20; skill "ALL_ODINS_POWER",1;break;
case Job_Hunter:
	bonus bCritical,15; bonus2 bSkillAtk,"HT_BLITZBEAT",30; bonus3 bAutoSpell,"HT_BLITZBEAT",5,500; bonus bLongAtkRate,10;break;
case Job_Bard:
	bonus bLongAtkRate,10; bonus2 bSkillAtk,"BA_MUSICALSTRIKE",300; bonus4 bAutoSpellOnSkill,"BA_MUSICALSTRIKE","BA_PANGVOICE",1,1000;break;
case Job_Dancer:
	bonus bLongAtkRate,10; bonus2 bSkillAtk,"DC_THROWARROW",300; bonus4 bAutoSpellOnSkill,"DC_THROWARROW","DC_WINKCHARM",1,1000;break;
case Job_Wizard:
	bonus2 bSkillAtk,"WZ_EARTHSPIKE",40; bonus2 bVariableCastrate,"WZ_EARTHSPIKE",-25; bonus4 bAutoSpellOnSkill,"WZ_HEAVENDRIVE","WZ_EARTHSPIKE",5,2500; bonus2 bSubEle,Ele_Neutral,15;break;
case Job_Sage:
	bonus2 bSkillAtk,"MG_THUNDERSTORM",40; bonus2 bVariableCastrate,"MG_THUNDERSTORM",-10; bonus bLongAtkDef,15; bonus2 bSkillAtk,"MG_NAPALMBEAT",40;break;
case Job_Blacksmith:
	bonus bSplashRange,1; bonus bBaseAtk,50; bonus2 bSubEle,Ele_Neutral,15; bonus2 bSubEle,Ele_Fire,15; bonus2 bSkillAtk,"MC_MAMMONITE",20;break;
case Job_Alchemist:
	bonus2 bSkillAtk,"AM_ACIDTERROR",20; bonus2 bSkillAtk,"AM_DEMONSTRATION",20; bonus2 bAddMonsterDropItem,929,2500;break;
case Job_Assassin:
	bonus bAspdRate,5; bonus bCritAtkRate,20; bonus2 bIgnoreDefClassRate,Class_Normal,25; bonus2 bSkillAtk,"AS_SPLASHER",25;break;
}
return;
}


then here's the item_db

20507,C_Poring_Bag,Costume Poring Bag,4,0,,0,,0,,0,0xFFFFFFFF,63,2,8192,,1,0,16,{ callfunc "itembonus",BaseJob; },{},{}

 

Edited by Haruka Mayumi
  • Upvote 2

Share this post


Link to post
Share on other sites
  • 0

Thanks it works like a magic.. can I ask one more favor? How to make player could inflict a certain negative status when using the skill? ex: Rogue use backstab may inflict stun.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this