Jump to content
  • 0

Hunting Mission Script Error


Rebel

Question


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  436
  • Reputation:   31
  • Joined:  02/19/12
  • Last Seen:  

I have this error when I use the Hunting Mission Script..

160evq9.jpg

Link to comment
Share on other sites

12 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

I'm pretty sure the C_MUL error is come from this line ...

    set .@Base_Exp, #Mission_Count*.@j[.Quests+1]/5;
   set .@Job_Exp, #Mission_Count*.@j[.Quests+2]/5;

so #Mission_Count is 48, and .@j[.Quests+1] is 2147483647 ....

and .@j[.Quests+1] comes from here, which should be responsible for the C_ADD error

        set .@j[.Quests+1], .@j[.Quests+1]+strmobinfo(6,.@j[.@i]);
       set .@j[.Quests+2], .@j[.Quests+2]+strmobinfo(7,.@j[.@i]);

ok mystery solve


    for(set .@i,0; .@i<.Quests; set .@i,.@i+1) {
       set .@j[.@i], getd("Mission"+.@i);
       set .@j[.Quests], .@j[.Quests]+strmobinfo(3,.@j[.@i]);
       set .@j[.Quests+1], .@j[.Quests+1]+strmobinfo(6,.@j[.@i]);
       set .@j[.Quests+2], .@j[.Quests+2]+strmobinfo(7,.@j[.@i]);
       mes " > "+Chk(getd("Mission"+.@i+"_"),#Mission_Count)+strmobinfo(1,.@j[.@i])+" ("+getd("Mission"+.@i+"_")+"/"+#Mission_Count+")^000000";
   }

   // Reward formulas:
   set .@Mission_Points, 3+(.@j[.Quests]/.Quests/6);
   set .@Base_Exp, #Mission_Count*.@j[.Quests+1]/5;
   set .@Job_Exp, #Mission_Count*.@j[.Quests+2]/5;
   set .@Zeny, #Mission_Count*.Quests*.@j[.@i]*.Multiplier;

]

the 1st line for ( set.@i,0 ....

means, loop through all the quest available,

then it reach these 2 lines

        set .@j[.Quests+1], .@j[.Quests+1]+strmobinfo(6,.@j[.@i]);
       set .@j[.Quests+2], .@j[.Quests+2]+strmobinfo(7,.@j[.@i]);

which this part is responsible to gives the experience points

and this part is overflow with C_ADD

I think there's 2 ways to have this experience point to overflow

1st is, you have set too many .Quest

post out your configuration part, this one

    set .Delay,12;        // Quest delay, in hours (0 to disable).
   set .Quests,4;        // Number of subquests per quest (increases rewards).
   set .Party,3;        // Party options: 0 (exclude party kills), 1 (include party kills), 2 (same map only), 3 (screen area only)
   set .Multiplier,60;    // Multiplier for Zeny reward calculation.
   setarray .Count[0],    // Min and max monsters per subquest (increases rewards).
       40,70;

2nd is, you have custom mobs which gives insane experience points that met the query_sql that I made for euphy ... ( aww .shhit XD )

that is inside mob_db table ....

seriously, you should put all your custom mob into mob_db2 table, not mob_db table

EDIT:

SELECT id, iname, exp FROM mob_db WHERE left(Sprite, 4) != 'meta' AND left(Sprite, 2) != 'E_' AND ~Mode & 32 AND EXP > 0 AND MVP1id = 0 AND DropCardid > 4000 AND DropCardid < 5000 AND ID < 2000 order by exp desc;

just tested

the highest exp mob that met this requirement is Howard Alt-Eisen, ID 1636 which gives 10854 exp

officially this can't be overflow

EDIT2:

I think a quick fix is to add

where exp < 11000

in that condition ....

Edited by AnnieRuru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  436
  • Reputation:   31
  • Joined:  02/19/12
  • Last Seen:  

Thanks for the quick response AnnieRuru..

Anyway I am using the Latest Hunting Mission Script and I don't edit anything in the script..

also all of my custom mobs are placed in mob_db2.txt ..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

SELECT id, iname, exp FROM mob_db WHERE left(Sprite, 4) != 'meta' AND left(Sprite, 2) != 'E_' AND ~Mode & 32 AND EXP > 0 AND MVP1id = 0 AND DropCardid > 4000 AND DropCardid < 5000 AND ID < 2000 order by exp desc;

try this in your sql database and see is the top one is Howard Alt-Eisen ?

select id, iname, exp from mob_db order by exp desc;

even this tells me the top one is Ragunta which gives 9,999,999 exp only

I have doubt about this 494,000,000 ...

is there any mob that really gives so much exp ?

http://rathena.org/board/topic/64394-%E2%9C%B0-euphys-scripts-%E2%9C%B0/page__st__380#entry148492

seems to be different cases

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  436
  • Reputation:   31
  • Joined:  02/19/12
  • Last Seen:  

Hmm..so it seems that the EXP is giving me problem.. can i ask how can i remove the exp reward? so the reward will be only Zeny and Mission Points..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

you have to ask euphy xD

I only interested in bug hunting

euphy is still an active member, so I don't want to edit his script unnecessary

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:  

The EXP calculations take your server rates into consideration, so they'll overflow if your rates are too high. Just delete all those lines to remove EXP rewards.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

so I guess both wrong

its the strmobinfo does adjust the rate of exp given from conf\exp.conf

hmm ... if this is the case,

I think a proper fix should be reverse back the formula that's automatically given by strmobinfo

example like,

this script reverse the formula back into original exp given

dispbottom getmonsterinfo( 1002, 3 ) / ( getbattleflag("base_exp_rate") / 100 );

and at the config, admin can set this script gives the exp adjustment that DOES NOT base on exp.conf...

EDIT:

getmonsterinfo( 1002, 3 ) / ( getbattleflag("base_exp_rate") / 100 ) * .exp_rate

something like this I guess

EDIT2:

oh btw,

don't use getexp script command

that command is only use in official rathena script

(yeah you as a developer should always use this command for official scripts)

however in this scripting section where we do freelance scripting

we usually do set baseexp, baseexp + xxx ...

because getexp command can be adjusted from conf ... which is not intended for custom scripts

but its your choice btw

EDIT3:

nope, if admin set "quest_exp_rate" to 200,

although your script shows 2,000

but exp reward becomes 4000 because you used getexp command

Edited by AnnieRuru
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 think I'll keep it as-is, because most servers are not SHR and the automatic EXP rates (without a modifier, like I did with Zeny) are pretty standard, with no need to do extra configuration. For the same reason, I like getexp since it automatically adjusts to server rates.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  62
  • Reputation:   2
  • Joined:  10/17/12
  • Last Seen:  

@Euphy, Which best minimum until max rates for those hunting System?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

if you are not going to do it, then I will =/

monster_hunting_euphy2.txt

because the server that I'm hired in is a SHR server,

so I just post it here and also use it in my server

@Rebel

see this line

set .baseexprate, getbattleflag("base_exp_rate"); // adjustment for base exp rate. For SHR server, set this to a lower number. 100 means x1

with default setting like this, it is adjusted to server rate ( which do the same like original script behavior )

but if set this to 1000, this will get 10x exp, overwriting the exp.conf setting

Edited by AnnieRuru
  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  436
  • Reputation:   31
  • Joined:  02/19/12
  • Last Seen:  

if you are not going to do it, then I will =/

monster_hunting_euphy2.txt

because the server that I'm hired in is a SHR server,

so I just post it here and also use it in my server

@Rebel

see this line

set .baseexprate, getbattleflag("base_exp_rate"); // adjustment for base exp rate. For SHR server, set this to a lower number. 100 means x1

with default setting like this, it is adjusted to server rate ( which do the same like original script behavior )

but if set this to 1000, this will get 10x exp, overwriting the exp.conf setting

Thank you for the help! /no1

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:  

Annie: Oh, so that's what you meant. ._. Not sure why I didn't realize what you were saying - I should've scripted that myself, sorry about that. I uploaded v1.2b with those modifications:

-        set .@j[.Quests+1], .@j[.Quests+1]+strmobinfo(6,.@j[.@i]);
-        set .@j[.Quests+2], .@j[.Quests+2]+strmobinfo(7,.@j[.@i]);
+        set .@j[.Quests+1], .@j[.Quests+1]+(strmobinfo(6,.@j[.@i])/(getbattleflag("base_exp_rate")/100)*.Modifier[0]);
+        set .@j[.Quests+2], .@j[.Quests+2]+(strmobinfo(7,.@j[.@i])/(getbattleflag("job_exp_rate")/100)*.Modifier[1]);

-    set .@Zeny, #Mission_Count*.Quests*.@j[.@i]*.Multiplier;
+    set .@Zeny, #Mission_Count*.Quests*.@j[.@i]*.Modifier[2];

-    getexp .@Base_Exp,.@Job_Exp;
+    set BaseExp, BaseExp+.@Base_Exp;
+    set JobExp, JobExp+.@Job_Exp;

-    set .Multiplier,60;    // Multiplier for Zeny reward calculation.
+    setarray .Modifier[0],    // Multipliers for Base Exp, Job Exp, and Zeny rewards.
+        getbattleflag("base_exp_rate")/100,getbattleflag("job_exp_rate")/100,60;

You didn't change the 'getexp' in your version, btw. xD

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