Jump to content
  • 0

Hunting Mission with party and individual quest


mightyryan

Question


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  69
  • Reputation:   2
  • Joined:  10/03/12
  • Last Seen:  

Hi,is it possible to add party quest for hunting mission? same reward from the individual one

here is the script: http://pastebin.com/jU576hJS

bump

bump

Edited by mightyryan
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:  

monster_hunting_euphy.txt

~~ no offense to Euphy ~~

oh yeah the party killing stuff is direct rip from my own mission board script

EDIT and Reupload : fix if the killer doesn't take any monster hunting quest before, all party members can't get the count

EDIT2:

oh pls remove

#Mission_delay = gettimetick(2);

at the beginning of the script =x

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


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  69
  • Reputation:   2
  • Joined:  10/03/12
  • Last Seen:  

thanks much!!!!!!!!!!!! i am waiting for this! finally! Is it possible to only allow if the party members have only a gap of 1-20levels

Edited by mightyryan
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:  

that long long condition down there

replace with this

    } else {
       .@killedrid = killedrid;
       getmapxy .@map1$, .@x1, .@y1, 0;
       .@origin_level = baselevel;
       getpartymember getcharid(1), 1;
       getpartymember getcharid(1), 2;
       while ( .@j < $@partymembercount ) {
           if ( isloggedin( $@partymemberaid[.@j], $@partymembercid[.@j] ) ) {
               attachrid $@partymemberaid[.@j];
          	 if ( #Mission_Count && Mission1 && sqrt( pow( .@origin_level - baselevel, 2 ) ) <= 20 && hp > 0 ) { // shit I forgot to add dead check
                   getmapxy .@map2$, .@x2, .@y2, 0;
                   if ( .@map1$ == .@map2$ && distance( .@x1, .@y1, .@x2, .@y2 ) <= 30 ) {
                       .@i = 0;
                       while ( .@i < .Quests ) {
                           if ( strmobinfo( 1, .@killedrid ) == strmobinfo( 1, getd("Mission"+.@i) ) ) {
                               if ( getd("Mission"+ .@i +"_") < #Mission_Count) {
                                   dispbottom "[Hunting Mission] Killed "+( set( getd("Mission"+ .@i +"_"), getd("Mission"+ .@i +"_") +1 ) )+" of "+#Mission_Count+" "+strmobinfo(1,.@killedrid)+".";
                                   break;
                               }
                           }
                           .@i++;
                       }
                   }
               }
           }
           .@j++;
       }
   }

will trigger only with party levels within 20 range

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:  

Thanks AnnieRuru, I had no idea an SQL query could do that... (and I was still using the txt database :3)

Added a new version with those features included: http://rathena.org/board/topic/64394-%E2%9C%B0-euphys-scripts-%E2%9C%B0/page__st__380#entry149188

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

-.-; I bet 95% of the scripters alive now wouldn't have thought of using sql that way. Though, that does prove useful even for my disguise event npc, i could litterally remove the black list array, and use that command, with some edits, to make sure it blocks all mobs that aren't normally spawned.

Just missing, checks for monsters with: ' G_ ', ' EVENT_ ', and the infamous ' DREAM_METAL '.

Edited by GmOcean
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:  

G_ and EVENT_ has been countered with dropcardid 4001~4999 check

Dream metal has been countered with ~mode & 32 check (not a boss monster)

set .Party,3;// Party options: 0 (exclude party kills), 1 (include party kills), 2 (same map only), 3 (screen area only)

about screen area, the number 30 is just because I like that number XD

the actual screen area is actually getbattleflag("area_size")

I tried use that before on a live server and got people complain it doesn't work, no idea how ( 3 years ago )

that's why I use a fix number

you can try getbattleflag("area_size") *2 ... or something, perhaps ?

its your script anyway

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


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Ahh, i didn't see the card_id part, however, i ignored the boss monster check only because, i was trying to relate it to the disguise npc.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Looking forward to see GmOcean's updates :P

Btw, are your update intended to stop those NPC monster appears? (Smoking Orc and etc)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Well, if i were to produce an update for the disguise event, then using Annie's sql code, i could limit all of those annoying monster's that just appear in our db because kro can't make up their minds lol.

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:  

I bet 95% of the scripters alive now wouldn't have thought of using sql that way.
want to show you another trick ?

query_sql("SELECT `name`,CAST(`value` AS SIGNED) FROM `global_reg_value` LEFT JOIN `char` ON `global_reg_value`.char_id = `char`.char_id WHERE `global_reg_value`.str = 'Mission_Total' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 5",.@name$,.@val);

this line, I don't like table join either

select char_id as abc, ( select name from `char` where char_id = abc ), value from global_reg_value where str = 'PC_DIE_COUNTER' order by cast(value as signed) desc limit 5;

topic

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

SQL optimization

- try to avoid using JOIN table if possible

the sql will always join both tables together before it start its calculation

- cast( value as signed ) used twice in that script

you might not notice it, but to optimized sql performance, try to avoid having too many commands

well ... I think that's all about his script

replace into runs slower than insert into / update, so its fine

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  125
  • Reputation:   2
  • Joined:  08/27/12
  • Last Seen:  

love this script! using this on my server ;D

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:  

Thanks a lot, Annie. :>

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