Jump to content
  • 0

Item_db Issue


sabuross

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  30
  • Reputation:   11
  • Joined:  02/20/13
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

is there any error appear on your map server after your reload your itemdb?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  30
  • Reputation:   11
  • Joined:  02/20/13
  • Last Seen:  

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 by sabuross
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

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 by Brynner
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  30
  • Reputation:   11
  • Joined:  02/20/13
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

4302,Tao_Gunka_Card,Tao Gunka Card,6,20,,10,,,,,,,,16,,,,,{ if(BaseClass==Job_Swordman)bonus bMaxHPrate,100; bonus bDefRate,-50; bonus bMdefRate,-50; },{},{}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  30
  • Reputation:   11
  • Joined:  02/20/13
  • Last Seen:  

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)?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

im not sure if its gonna work? try to take a look on this changes.

 

http://trac.rathena.org/search?q=%28BaseClass

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:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

oh i see. because the doc/ included on the revision is incomplete. there is no sample or explanation included inside.

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:  

How is it incomplete? The constants are clearly defined with a sample script included. o.o

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

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.

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:  

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.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  30
  • Reputation:   11
  • Joined:  02/20/13
  • Last Seen:  

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; } },{},{}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

 

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.

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:  

Brynner, it's already in the /doc/ directory.

trunk/doc/script_commands.txt

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...