Jump to content
  • 0

OnNPCKillEvent attach party member


Bin4ry

Question


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

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";
}

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  615
  • Reputation:   201
  • Joined:  11/09/11
  • Last Seen:  

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

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:  

I think I might have to move to request section, I can't do this :(

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