Jump to content
  • 0

I really need your help


zmref

Question


  • Group:  Members
  • Topic Count:  148
  • Topics Per Day:  0.03
  • Content Count:  299
  • Reputation:   6
  • Joined:  06/14/12
  • Last Seen:  

Well no one is answering my script request, There's no one can commit help.

Is this correct?

Description:

+30 flee, +5 mdef, skill teleport

45% neutral resist

7% resist all other elements

if +7 refine additional +1% water resist

if +8 refine additional +1% water resist

if +9 refine additional +1% water resist

if +10 refine additional +5% neutral resist

Summary of +10 refine:

+30 flee, +5 mdef, skill teleport

50% neutral resist

10% all other resist

{bonus2 bSubEle,0,45; bonus2 bSubEle,1,7; bonus2 bSubEle,2,7; bonus2 bSubEle,3,7; bonus2 bSubEle,4,7; bonus2 bSubEle,5,7; bonus2 bSubEle,6,7; bonus2 bSubEle,7,7; bonus2 bSubEle,8,7; bonus2 bSubEle,9,7; bonus bmdef,5; bonus bFlee,30; skill "AL_TELEPORT",1; bonus bUnbreakableGarment,0; if(getrefine()==7) {bonus2 bSubEle,1,1} if(getrefine()==8) {bonus2 bSubEle,1,1} if(getrefine()==9) {bonus2 bSubEle,1,1} if(getrefine()==10) {bonus2 bSubEle,0,5;}

Edited by zmref
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

That probably because that looks more like a db request than a script request. And your not very specific. You need to give details on exactly what you want to do. You can have items call scripts, but I can't tell from your post.

Peopleperson49

Script:

function script CustomEffect {
bonus bMdef,5;	 //Mdef + 5
bonus bFlee,30;	 //Flee + 30
skill 26,1;	 //Teleport Skill
bonus bUnbreakableGarment,0;   //Garment cannot be broken.
bonus2 bSubEle,0,45;	//Reduces Neutral Property damage by 45%.
bonus2 bSubEle,1,7;	//Reduces Water Property damage by 7%.
bonus2 bSubEle,2,7;	//Reduces Earth Property damage by 7%.
bonus2 bSubEle,3,7;	//Reduces Fire Property damage by 7%.
bonus2 bSubEle,4,7;	//Reduces Wind Property damage by 7%.
bonus2 bSubEle,5,7;	//Reduces Poison Property damage by 7%.
bonus2 bSubEle,6,7;	//Reduces Holy Property damage by 7%.
bonus2 bSubEle,7,7;	//Reduces Dark Property damage by 7%.
bonus2 bSubEle,8,7;	//Reduces Spirit Property damage by 7%.
bonus2 bSubEle,9,7;	//Reduces Undead Property damage by 7%.
if(getrefine()>=7) { bonus2 bSubEle,1,1 } //Reduces Water Property damage by 1%.
if(getrefine()>=8) { bonus2 bSubEle,1,1 } //Reduces Water Property damage by 1%.
if(getrefine()>=9) { bonus2 bSubEle,1,1 } //Reduces Water Property damage by 1%.
if(getrefine()>=10) { bonus2 bSubEle,0,5; } //Reduces Neutral Property damage by 5%.
}

Item_db2:

XXXX,Garment,Garment,5,1000,,200,,4,,0,0xFFFFFFFF,7,2,4,,0,1,0,{ callfunc "CustomEffect"; },{},{}

Edited by peopleperson49
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  148
  • Topics Per Day:  0.03
  • Content Count:  299
  • Reputation:   6
  • Joined:  06/14/12
  • Last Seen:  

That probably because that looks more like a db request than a script request. And your not very specific. You need to give details on exactly what you want to do. You can have items call scripts, but I can't tell from your post.

Peopleperson49

Script:

function script CustomEffect {
bonus bMdef,5;	 //Mdef + 5
bonus bFlee,30;	 //Flee + 30
skill 26,1;	 //Teleport Skill
bonus bUnbreakableGarment,0;   //Garment cannot be broken.
bonus2 bSubEle,0,45;	//Reduces Neutral Property damage by 45%.
bonus2 bSubEle,1,7;	//Reduces Water Property damage by 7%.
bonus2 bSubEle,2,7;	//Reduces Earth Property damage by 7%.
bonus2 bSubEle,3,7;	//Reduces Fire Property damage by 7%.
bonus2 bSubEle,4,7;	//Reduces Wind Property damage by 7%.
bonus2 bSubEle,5,7;	//Reduces Poison Property damage by 7%.
bonus2 bSubEle,6,7;	//Reduces Holy Property damage by 7%.
bonus2 bSubEle,7,7;	//Reduces Dark Property damage by 7%.
bonus2 bSubEle,8,7;	//Reduces Spirit Property damage by 7%.
bonus2 bSubEle,9,7;	//Reduces Undead Property damage by 7%.
if(getrefine()>=7) { bonus2 bSubEle,1,1 } //Reduces Water Property damage by 1%.
if(getrefine()>=8) { bonus2 bSubEle,1,1 } //Reduces Water Property damage by 1%.
if(getrefine()>=9) { bonus2 bSubEle,1,1 } //Reduces Water Property damage by 1%.
if(getrefine()>=10) { bonus2 bSubEle,0,5; } //Reduces Neutral Property damage by 5%.
}

Item_db2:

XXXX,Garment,Garment,5,1000,,200,,4,,0,0xFFFFFFFF,7,2,4,,0,1,0,{ callfunc "CustomEffect"; },{},{}

Sorry it's an item script

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

I would not put that much code in an item onequip section of the item_db2. I would just make it an actual script like I did for you in my pervious post. The garmet is a default item just to show you how to use it if you didn't know which you will put in your item_db2. When they equip the item it will do this exact script just as if the code was in the item_db2 onequip section.

Peopleperson49

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  148
  • Topics Per Day:  0.03
  • Content Count:  299
  • Reputation:   6
  • Joined:  06/14/12
  • Last Seen:  

I would not put that much code in an item onequip section of the item_db2. I would just make it an actual script like I did for you in my pervious post. The garmet is a default item just to show you how to use it if you didn't know which you will put in your item_db2. When they equip the item it will do this exact script just as if the code was in the item_db2 onequip section.

Peopleperson49

thanks, I just want to know if my script is correct?

and why not put these much codes?, are there issues?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

There aren't any problems with having lots of code in item scripts. I'd suggest doing that instead of calling a function whenever possible, so that the script will actually load with the item (this way you don't have to reload scripts and item database when making changes).

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

I agree completely Euphy, but the script that is asked for has 17 different items including some of them are refine conditional. It makes for a very long entry in the item_db2 and sql tables. For that I suggest using a function. If it were just a few bonuses I would suggest using the item_db2.

Peopleperson49

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...