Jump to content

Adjust zeny_from_mobs rates v.1.1


Cydh

Recommended Posts


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

Information

if we set zeny_from_mobs on conf/battle/monster.conf.

zeny_from_mobs: yes

It makes player will gets zeny when mob is killed, but we can adjust how much zeny they can get, right?

This mod will allows you to adjust the zeny gained from killed mobs. You can decide the normal zeny rate from normal mobs also for boss mobs. You can adjust juts like db/mob_item_ratio.txt



Configuration files

  • conf/battle/monster_zeny.conf

    // [Cydh]
    // Stuck with current zeny rate too slow? Adjust it!    (Note 2)
    // Default is 100 = 100% = 1x = normal
    //   200 = 200% = 2x
    //   1000 = 1000% = 10x
    // Min. rate is 1 = 0.01%
    // Max. rate is set at mob.h, MAX_ZENY_FROM_MOBS_RATES's default is 1000000 = 1,000,000% = 10,000x
    // More adjustement can be met on mob_zeny_db.txt
    zeny_from_mobs_rate: 100
    zeny_from_boss_rate: 100

  • db/mob_zeny_db.txt

    // =============================================
    // Zeny from mobs adjustements by [Cydh]
    // [email protected]
    // =============================================
    // Structure:
    //         MonsterID,Zeny[,Rate]
    // ---------------------------------------------
    // MonsterID:
    //     - Look at mob_db.txt
    // ---------------------------------------------
    // Zeny:
    //     - Normal zeny gained by player when monster killed
    //     - Values:
    //        -1            =    Zeny will gained based on normal calculation on mob.c
    //        0            =    Monster will not drops the zeny
    //        1             =    1z is minimum zeny amount that will be gained
    //        1000000000    =    1,000,000,000z is Maximum zeny amount that will be gained
    //     Notes:
    //         - If you set this, normal zeny calculation will be ignored
    //         - Actually, the maximum zeny gained is decided on MAX_ZENY on mmo.h
    // ---------------------------------------------
    // Rate (Optional):
    //     - Percentage of zeny rate like on drops.conf
    //     - Values:
    //        0            =    Left the rate calculation based on zeny_from_mobs_rate for normal mobs and zeny_from_boss_rate for boss mobs
    //        1            =    Minimum zeny rate, means 1% = 0.01x
    //        100            =    Normal zeny rate, means 100% = 1x. 1000 = 1000% = 10x
    //        1000000        =    Maximum zeny rate, means 1,000,000% = 10,000x.
    //     Notes:
    //         - If this is set, will ignore rate on zeny_from_mobs_rate/zeny_from_boss_rate
    //         - Actually maximum rate is set on mob.h, MAX_ZENY_FROM_MOBS_RATES same like as zeny_from_mobs_rate/zeny_from_boss_rate amount
    // =============================================
    // Examples:
    // 1002,0                    -> Poring NEVER drops zeny, even you set the rate here, it will be ignored! (e.g. 1002,0,1000)
    // 1002,-1,1000                -> Poring drops zeny based on normal calculation then the zeny gained is multiplied 10x (because the rate is set here 1000)
    // 1002,1000                -> Poring has normal 1,000z. Player will get the zeny based on rate on zeny_from_mobs_rate (e.g 100), will gained 1,000z
    // 1002,1000,1000            -> Poring has normal 1,000z. Player will get the 10,000z (1000 * 10%). zeny_from_mobs_rate is ignored!
    // 1002,-1                    -> LOL useless!!
    // 1002,-1,0                -> LMAO useless!! Just like above. Better don't write this line. It means normal calculation
    // 1002,0,1000000            -> ROFL useless!!

Compability

The latest version is running well on
svn17101 svn17133 svn17163.
If you try this on your server and got error/problem, or need it for lower svn, just post it here, or maybe eAthena or 3CeAM, send me a PM.



Screenshots

Download
v.1.1 zeny_from_mobs-v.1.1-rA-svn17163.patch

-> Change the zeny calculation on mob.c.
-> Ready for svn17163

  • v.1.0

    zeny_from_mobs-v.1.0-rA-svn17133.patch

    -> Change and add, zeny calculation on mob.c
    -> Add, mob_zeny_db.txt as mob's zeny refrences
    -> Change, monster_zeny.conf infos
    -> Change, some mirror things
    -> Ready for svn17133

  • Rev. 1

    zeny_from_mobs_rates-rA-svn17128_rev1.patch

    -> Fix the function, previous is add zeny not adjust the rate. The first purpose is adjust the not add, just like title said
    -> Ready for svn17128

    +            // Adjust zeny drop rates. [Cydh]
    +            if(md->status.mode&MD_BOSS)
    +                zeny = zeny*battle_config.zeny_from_boss_rate/100;
    +            else
    +                zeny = zeny*battle_config.zeny_from_mobs_rate/100;

  • Initial release 

    zeny_from_mobs_rates-rA-svn17101.patch

    +            // Add zeny drop rate from monsters [Cydh]
    +            if(md->status.mode&MD_BOSS)
    +                zeny += zeny * battle_config.zeny_from_boss_rate / 100;
    +            else
    +                zeny += zeny * battle_config.zeny_from_mobs_rate / 100;


External download links


 

**If you guys like this, rate this post and give me rep +1 haha**

**Originally writed by me [Cydh], if you ever seen/meet same mod like this, I never got it that why I made this**

**CMIIW**

Edited by Cydh
  • Upvote 1
Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

thx bro. currently using it :)



bro why i got this error ?

 

 

[Error]: pc_getzeny: Obtaining negative Zeny (zeny=-17674422, account_id=2000059, char_id=150218).
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

thx bro. currently using it :)

bro why i got this error ?

 

 

[Error]: pc_getzeny: Obtaining negative Zeny (zeny=-17674422, account_id=2000059, char_id=150218).

how can you get that error?

Don't give negative value. :v

--- Edit

update rev.1, fix the zeny calculation

Edited by Cydh
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

Feb 18, 2013: v.1.0 released

Feb 27, 2013: v.1.1 released

Edited by Cydh
Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  924
  • Reputation:   166
  • Joined:  04/05/13
  • Last Seen:  

I don't know how to patch this, I try to merge/apply patch for my Server Folder.

got this 

 

xxczxczxczx.jpg

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

which svn do you use?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  924
  • Reputation:   166
  • Joined:  04/05/13
  • Last Seen:  

I do not know It's say unknown version

 

 

xczczcx.jpg

Edited by kaninhot004
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

/omg

what's time you did last update? estimate it.  /hmm

 

so, just patch it manually.

(*)look at patch file -> find the correct line -> copy-paste -> back to (*)

Edited by Cydh
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  924
  • Reputation:   166
  • Joined:  04/05/13
  • Last Seen:  

arghh! forgive me I just beginner.

 

Let's me try again.

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

arghh! forgive me I just beginner.

 

Let's me try again.

sometimes, if patching using software doesn't work, need patch it manually. :(

Link to comment
Share on other sites

  • 8 months later...

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  187
  • Reputation:   7
  • Joined:  09/04/12
  • Last Seen:  

so many error in this scr code now...

 

1>..\src\map\atcommand.c(7109): warning C4003: not enough actual parameters for macro 'msg_txt'
1>..\src\map\atcommand.c(7109): warning C4047: 'function' : 'map_session_data *' differs in levels of indirection from 'int'
1>..\src\map\atcommand.c(7109): warning C4024: 'map_msg_txt' : different types for formal and actual parameter 1
1>..\src\map\atcommand.c(7109): error C2059: syntax error : ')'
1>..\src\map\atcommand.c(7114): warning C4003: not enough actual parameters for macro 'msg_txt'
1>..\src\map\atcommand.c(7114): warning C4047: 'function' : 'map_session_data *' differs in levels of indirection from 'int'
1>..\src\map\atcommand.c(7114): warning C4024: 'map_msg_txt' : different types for formal and actual parameter 1
1>..\src\map\atcommand.c(7114): error C2059: syntax error : ')'
1>..\src\map\atcommand.c(7119): warning C4003: not enough actual parameters for macro 'msg_txt'
1>..\src\map\atcommand.c(7119): warning C4047: 'function' : 'map_session_data *' differs in levels of indirection from 'int'
1>..\src\map\atcommand.c(7119): warning C4024: 'map_msg_txt' : different types for formal and actual parameter 1
1>..\src\map\atcommand.c(7119): error C2059: syntax error : ')'
1>..\src\map\atcommand.c(7128): error C2143: syntax error : missing ';' before 'type'
1>..\src\map\atcommand.c(7131): error C2143: syntax error : missing ';' before 'type'
1>..\src\map\atcommand.c(7132): error C2143: syntax error : missing ';' before 'type'
1>..\src\map\atcommand.c(7133): error C2143: syntax error : missing ';' before 'type'
1>..\src\map\atcommand.c(7137): error C2065: 'mob_name' : undeclared identifier
1>..\src\map\atcommand.c(7140): error C2065: 'mob_id' : undeclared identifier
1>..\src\map\atcommand.c(7140): error C2065: 'mob_name' : undeclared identifier
1>..\src\map\atcommand.c(7140): warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int'
1>..\src\map\atcommand.c(7140): warning C4024: 'atoi' : different types for formal and actual parameter 1
1>..\src\map\atcommand.c(7141): error C2065: 'mob_id' : undeclared identifier
1>..\src\map\atcommand.c(7141): error C2065: 'mob_name' : undeclared identifier
1>..\src\map\atcommand.c(7141): warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int'
1>..\src\map\atcommand.c(7141): warning C4024: 'mobdb_searchname' : different types for formal and actual parameter 1
1>..\src\map\atcommand.c(7142): error C2065: 'mob_id' : undeclared identifier
1>..\src\map\atcommand.c(7142): error C2065: 'mob_id' : undeclared identifier
1>..\src\map\atcommand.c(7143): error C2065: 'mob_name' : undeclared identifier
1>..\src\map\atcommand.c(7148): error C2065: 'mob_id' : undeclared identifier
1>..\src\map\atcommand.c(7153): error C2065: 'mob_id' : undeclared identifier
1>..\src\map\atcommand.c(7153): error C2065: 'mob_name' : undeclared identifier
1>..\src\map\atcommand.c(7153): warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int'
1>..\src\map\atcommand.c(7153): warning C4024: 'atoi' : different types for formal and actual parameter 1
1>..\src\map\atcommand.c(7153): error C2065: 'mob_id' : undeclared identifier
1>..\src\map\atcommand.c(7154): error C2065: 'mob_name' : undeclared identifier
1>..\src\map\atcommand.c(7154): warning C4047: 'function' : 'char *' differs in levels of indirection from 'int'
1>..\src\map\atcommand.c(7154): warning C4024: 'strcpy' : different types for formal and actual parameter 1
1>  battleground.c
1>..\src\map\atcommand.c(7154): error C2065: 'mob_id' : undeclared identifier
1>..\src\map\atcommand.c(7158): error C2065: 'mob_name' : undeclared identifier
1>..\src\map\atcommand.c(7161): error C2065: 'it' : undeclared identifier
1>..\src\map\atcommand.c(7161): warning C4047: '=' : 'int' differs in levels of indirection from 's_mapiterator *'
1>..\src\map\atcommand.c(7164): error C2065: 'it' : undeclared identifier
1>..\src\map\atcommand.c(7164): warning C4047: 'function' : 's_mapiterator *' differs in levels of indirection from 'int'
1>..\src\map\atcommand.c(7164): warning C4024: 'mapit_next' : different types for formal and actual parameter 1
1>..\src\map\atcommand.c(7170): error C2065: 'mob_id' : undeclared identifier
1>..\src\map\atcommand.c(7170): error C2065: 'mob_id' : undeclared identifier
1>..\src\map\atcommand.c(7177): error C2065: 'number' : undeclared identifier
1>..\src\map\atcommand.c(7178): error C2065: 'number' : undeclared identifier
1>..\src\map\atcommand.c(7180): error C2065: 'it' : undeclared identifier
1>..\src\map\atcommand.c(7180): warning C4047: 'function' : 's_mapiterator *' differs in levels of indirection from 'int'
1>..\src\map\atcommand.c(7180): warning C4024: 'mapit_free' : different types for formal and actual parameter 1
1>..\src\map\atcommand.c(7735): warning C4003: not enough actual parameters for macro 'msg_txt'
1>..\src\map\atcommand.c(7735): warning C4047: 'function' : 'map_session_data *' differs in levels of indirection from 'int'
1>..\src\map\atcommand.c(7735): warning C4024: 'map_msg_txt' : different types for formal and actual parameter 1
1>..\src\map\atcommand.c(7735): error C2059: syntax error : ')'
1>..\src\map\atcommand.c(9819): error C2065: 'atcommand_showmobs' : undeclared identifier
1>..\src\map\atcommand.c(9819): warning C4047: 'initializing' : 'AtCommandFunc' differs in levels of indirection from 'int'
 
 
can update this scr code for last rathena? thanks. /panic
Link to comment
Share on other sites

  • 5 months later...

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  82
  • Reputation:   2
  • Joined:  05/13/12
  • Last Seen:  

tried it on 3ceam and it didn't work, oh well, could u make some time a patch to work with 3ceam?

 

put it in your to-do list

 

http://pservero.com/zeny_from_mobs_rate-adjust-zeny-amount-from-killed-monsters-free-code/

 

u already have he link for it lol

 

Edit: the wait is over, this trick works just fine:

 

http://www.eathena.ws/board/index.php?showtopic=213167

 

works ok with eathena and 3ceam.

Edited by Atomiq
Link to comment
Share on other sites

  • 4 years later...

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  715
  • Reputation:   83
  • Joined:  01/05/12
  • Last Seen:  

Any updates for this?

P.S. : Maybe you can also add VIP support? like for example increase 50 to 100% gained zeny if you are a VIP.

Edited by Lelouch vi Britannia
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
Reply to this topic...

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