Jump to content
  • 0

Hunting Mission with party and individual quest


Question

12 answers to this question

Recommended Posts

Posted (edited)

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
Posted (edited)

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
Posted

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

Posted (edited)

-.-; 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
Posted (edited)

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
Posted

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.

Posted
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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...