Jump to content
  • 0

OnNPCKillEvent attach party member


Question

Posted

Just few questions with tr0n's questboard, not sure how to do this yet it's too advanced for me :[

For this part, I'd like to add attach party member's ID so they can go mission together?

OnNPCKillEvent:
if(h_run!=1) end;
for(set .@i, 1; .@i < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@i,.@i+2){
 if(killedrid==getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]")){
  set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]");
  if(getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")>=getd("."+currentquest$+"_huntingmob["+.@i+"]")) end;
  setd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount", getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+1);
  // dispbottom getd("."+currentquest$+"_huntingname$")+": ["+strmobinfo(1,.@currentmob)+"] ("+ getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+"/"+getd("."+currentquest$+"_huntingmob["+.@i+"]")+")";
  announce getd("." + currentquest$ + "_huntingname$") + " - " + strmobinfo(1,.@currentmob) + " [" + getd(currentquest$ + "_" + .@currentmob + "_" + .@i + "_killcount") + "/" + getd("." + currentquest$ + "_huntingmob[" + .@i + "]") + "]",bc_self;
  end;
 }
 continue;
}
end;

And this part, I want to add a quick IF statement to check if condition met became green ^0000FF.


for( set .@j, 0; .@j < getarraysize(getd("."+ currentquest$ + "_collectionitem")); set .@j,.@j+2) {
mes "^FF0000"+getitemname(getd("."+currentquest$+"_collectionitem["+.@j+"]"))+" - "+countitem(getd("."+currentquest$+"_collectionitem["+.@j+"]"))+"/"+getd("."+currentquest$+"_collectionitem["+(.@j+1)+"]")+" ea.^000000";
}

2 answers to this question

Recommended Posts

Posted

well party member adding isn't entirely TOO complicated, but there becomes a LOT of checks involved...

I suggest look at getpartymember; and attachrid

the problem however, is that you will also need to make sure you check getmapxy() and you can even then do the vicinity of the player near the person who killed the monster...

aka, they must be within 50 cells away or w/e ... or even on the same map!

http://ea.dj-yhn.com/index.php?c=getpartymember

http://ea.dj-yhn.com/index.php?c=attachrid

http://ea.dj-yhn.com/index.php?c=getmapxy

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