sabuross Posted March 24, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 30 Reputation: 11 Joined: 02/20/13 Last Seen: August 7, 2021 Share Posted March 24, 2013 Whenever I edit the item_db for item script, the effect works but it turns all my misc items into apples for some reason. For example, I edit the Tao Gunka Card effect to let's say 50% HP increase. I save it and then @reloaditemdb, the effect works but all my misc items are apples. Anyway to solve this? Thanks. Quote Link to comment Share on other sites More sharing options...
Brynner Posted March 24, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1962 Reputation: 202 Joined: 01/08/12 Last Seen: 19 minutes ago Share Posted March 24, 2013 is there any error appear on your map server after your reload your itemdb? Quote Link to comment Share on other sites More sharing options...
sabuross Posted March 24, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 30 Reputation: 11 Joined: 02/20/13 Last Seen: August 7, 2021 Author Share Posted March 24, 2013 (edited) Yeah, like right after I change the effect of Tao Gunka, this happens on map server: http://gyazo.com/2e8ff94aa4a505c79e0d550cf7b08148 Apparently, changing the effect of tao gunka affects a bunch of other items.. This is the script I used for tao gunka 4302,Tao_Gunka_Card,Tao Gunka Card,6,20,,10,,,,,,,,16,,,,,{ if(Class==4060 || Class==4096) { bonus bMaxHPrate,50; } else { bonus bMaxHPrate,100; bonus bDefRate,-50; bonus bMdefRate,-50; } },{},{} Edited March 24, 2013 by sabuross Quote Link to comment Share on other sites More sharing options...
Brynner Posted March 24, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1962 Reputation: 202 Joined: 01/08/12 Last Seen: 19 minutes ago Share Posted March 24, 2013 (edited) that's why it became apple. since tao gunka card has been remove on your database because of the error. if(Class try to change it to iif(BaseClass Edited March 24, 2013 by Brynner Quote Link to comment Share on other sites More sharing options...
sabuross Posted March 24, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 30 Reputation: 11 Joined: 02/20/13 Last Seen: August 7, 2021 Author Share Posted March 24, 2013 Really? Only item script is changed though, item ID and such are still there, but any ideas on how to change it without getting this error? Quote Link to comment Share on other sites More sharing options...
Brynner Posted March 24, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1962 Reputation: 202 Joined: 01/08/12 Last Seen: 19 minutes ago Share Posted March 24, 2013 4302,Tao_Gunka_Card,Tao Gunka Card,6,20,,10,,,,,,,,16,,,,,{ if(BaseClass==Job_Swordman)bonus bMaxHPrate,100; bonus bDefRate,-50; bonus bMdefRate,-50; },{},{} Quote Link to comment Share on other sites More sharing options...
sabuross Posted March 24, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 30 Reputation: 11 Joined: 02/20/13 Last Seen: August 7, 2021 Author Share Posted March 24, 2013 4302,Tao_Gunka_Card,Tao Gunka Card,6,20,,10,,,,,,,,16,,,,,{ if(BaseClass==Job_Swordman)bonus bMaxHPrate,100; bonus bDefRate,-50; bonus bMdefRate,-50; },{},{} Thanks, worked. But if I want it to affect only Rune Knight instead of every swordmans class, then would I write it out as: if(Class==Job_Rune_Knight)? Quote Link to comment Share on other sites More sharing options...
Brynner Posted March 24, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1962 Reputation: 202 Joined: 01/08/12 Last Seen: 19 minutes ago Share Posted March 24, 2013 im not sure if its gonna work? try to take a look on this changes. http://trac.rathena.org/search?q=%28BaseClass Quote Link to comment Share on other sites More sharing options...
Euphy Posted March 24, 2013 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 March 24, 2013 I don't know why your script didn't work; it was fine. Bryner's explanation is incorrect, both Class and BaseClass are valid variables. See script_commands.txt for further explanation. Class - Character's job. BaseClass - The character's 1-1 'normal' job, regardless of Upper value. For example, this will return Job_Acolyte for Acolyte, Priest/Monk, High Priest/Champion, and Arch Bishop/Sura. If the character has not reached a 1-1 class, it will return Job_Novice. Quote Link to comment Share on other sites More sharing options...
Brynner Posted March 24, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1962 Reputation: 202 Joined: 01/08/12 Last Seen: 19 minutes ago Share Posted March 24, 2013 oh i see. because the doc/ included on the revision is incomplete. there is no sample or explanation included inside. Quote Link to comment Share on other sites More sharing options...
Euphy Posted March 24, 2013 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 March 24, 2013 How is it incomplete? The constants are clearly defined with a sample script included. o.o Quote Link to comment Share on other sites More sharing options...
Brynner Posted March 24, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1962 Reputation: 202 Joined: 01/08/12 Last Seen: 19 minutes ago Share Posted March 24, 2013 try to look on the item_db docs then tell me if you find out about any sample or explanation regarding on if(Class or if(Class==Job. then tell me that's was included on the docs. Quote Link to comment Share on other sites More sharing options...
Euphy Posted March 24, 2013 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 March 24, 2013 Some variables are special, that is, they are already defined for you by the scripting engine. You can see the full list somewhere in 'db/const.txt', which is a file you should read, since it also allows you to replace lots of numbered arguments for many commands with easier to read text. The special variables most commonly used are all permanent character-based variables: ... Class - Character's job. Upper - 0 if the character is a normal class, 1 if advanced, 2 if baby. BaseClass - The character's 1-1 'normal' job, regardless of Upper value. For example, this will return Job_Acolyte for Acolyte, Priest/Monk, High Priest/Champion, and Arch Bishop/Sura. If the character has not reached a 1-1 class, it will return Job_Novice. BaseJob - The character's 'normal' job, regardless of Upper value. For example, this will return Job_Acolyte for Acolyte, Baby Acolyte, and High Acolyte. Quote Link to comment Share on other sites More sharing options...
sabuross Posted March 24, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 30 Reputation: 11 Joined: 02/20/13 Last Seen: August 7, 2021 Author Share Posted March 24, 2013 Thanks for the help guys, problem is solved. I made it affect only rune knight by doing what I did before and changing a bit of the script Brynner provided. Script used: 4302,Tao_Gunka_Card,Tao Gunka Card,6,20,,10,,,,,,,,16,,,,,{ if(Class==4060) { bonus bMaxHPrate,10; } else { bonus bMaxHPrate,100; bonus bDefRate,-50; bonus bMdefRate,-50; } },{},{} Quote Link to comment Share on other sites More sharing options...
Brynner Posted March 24, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1962 Reputation: 202 Joined: 01/08/12 Last Seen: 19 minutes ago Share Posted March 24, 2013 Some variables are special, that is, they are already defined for you by the scripting engine. You can see the full list somewhere in 'db/const.txt', which is a file you should read, since it also allows you to replace lots of numbered arguments for many commands with easier to read text. The special variables most commonly used are all permanent character-based variables: ... Class - Character's job. Upper - 0 if the character is a normal class, 1 if advanced, 2 if baby. BaseClass - The character's 1-1 'normal' job, regardless of Upper value. For example, this will return Job_Acolyte for Acolyte, Priest/Monk, High Priest/Champion, and Arch Bishop/Sura. If the character has not reached a 1-1 class, it will return Job_Novice. BaseJob - The character's 'normal' job, regardless of Upper value. For example, this will return Job_Acolyte for Acolyte, Baby Acolyte, and High Acolyte. i think it would be more useful if you also add those 'db/const.txt sample inside docs folder. some of the member here is not a pro. some of it is a beginner who are trying to learn. Quote Link to comment Share on other sites More sharing options...
Euphy Posted March 24, 2013 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 March 24, 2013 Brynner, it's already in the /doc/ directory. trunk/doc/script_commands.txt Quote Link to comment Share on other sites More sharing options...
Question
sabuross
Whenever I edit the item_db for item script, the effect works but it turns all my misc items into apples for some reason.
For example,
I edit the Tao Gunka Card effect to let's say 50% HP increase. I save it and then @reloaditemdb, the effect works but all my misc items are apples.
Anyway to solve this?
Thanks.
Link to comment
Share on other sites
15 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.