zmref Posted September 19, 2012 Group: Members Topic Count: 148 Topics Per Day: 0.03 Content Count: 299 Reputation: 6 Joined: 06/14/12 Last Seen: March 30, 2013 Share Posted September 19, 2012 (edited) 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 September 19, 2012 by zmref Quote Link to comment Share on other sites More sharing options...
Peopleperson49 Posted September 19, 2012 Group: Members Topic Count: 219 Topics Per Day: 0.05 Content Count: 1181 Reputation: 141 Joined: 01/27/12 Last Seen: April 15 Share Posted September 19, 2012 (edited) 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 September 20, 2012 by peopleperson49 Quote Link to comment Share on other sites More sharing options...
zmref Posted September 21, 2012 Group: Members Topic Count: 148 Topics Per Day: 0.03 Content Count: 299 Reputation: 6 Joined: 06/14/12 Last Seen: March 30, 2013 Author Share Posted September 21, 2012 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 Quote Link to comment Share on other sites More sharing options...
Peopleperson49 Posted September 21, 2012 Group: Members Topic Count: 219 Topics Per Day: 0.05 Content Count: 1181 Reputation: 141 Joined: 01/27/12 Last Seen: April 15 Share Posted September 21, 2012 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 Quote Link to comment Share on other sites More sharing options...
zmref Posted September 22, 2012 Group: Members Topic Count: 148 Topics Per Day: 0.03 Content Count: 299 Reputation: 6 Joined: 06/14/12 Last Seen: March 30, 2013 Author Share Posted September 22, 2012 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? Quote Link to comment Share on other sites More sharing options...
Euphy Posted September 22, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted September 22, 2012 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). Quote Link to comment Share on other sites More sharing options...
Peopleperson49 Posted September 22, 2012 Group: Members Topic Count: 219 Topics Per Day: 0.05 Content Count: 1181 Reputation: 141 Joined: 01/27/12 Last Seen: April 15 Share Posted September 22, 2012 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 Quote Link to comment Share on other sites More sharing options...
Question
zmref
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
Edited by zmrefLink to comment
Share on other sites
6 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.