Jump to content
  • 0

About OnNPCKillEvent: Command


Question

Posted

with " OnNPCKillEvent: "

how i can do  special scripts has start on other player in same party ?
ex:
Player Blue kill monster EventMonster;
script start;
> randomitem , item_id;
end;

and i need  script random item has start with [Player Red , Green] has party member of Blue Team 

hmmmmmm
i need OnNPCKillEvent has start effect on party member [Attack Helper, Support , AFK Member without killed monster by self]

 

8 answers to this question

Recommended Posts

  • 0
Posted
On 9/6/2019 at 11:52 AM, Start_ said:

addrid(2);

//Then all member in party will starting line of code here.

EX :
OnNPCKillEvent:

addrid(2);
if (monsterid == 1002) {
rand .@event, (1,3);
if (.@event == 1) { getitem 501,1; end; }

if (.@event == 2) { getitem 502,1; end; }
if (.@event == 3) { getitem 503,1; end; }
end;
}
end;
}


is this ?

and  effect has do on partymem in same map [nothing on other map] 

 

  • 0
Posted
if(killedidrid == 1002){

.@s$ = strcharinfo(3); //Save map name.

addrid(2); //Attach all party members.

if(strcharinfo(3)==.@s$){

getitem 501,1;

end;

}

}

end;

 

  • 0
Posted
On 9/6/2019 at 12:02 PM, Start_ said:

if(killedidrid == 1002){

.@s$ = strcharinfo(3); //Save map name.

addrid(2); //Attach all party members.

if(strcharinfo(3)==.@s$){

getitem 501,1;

end;

}

}

end;

 

THX ?
i'll test this 

nothing on other party member in same map ?

  • 0
Posted (edited)
if(killedidrid == 1002){
    addrid(2); //Attach all party members.
    if(strcharinfo(3) == strcharinfo(3,getcharid(0,getpartyleader(getcharid(1))))){
        getitem 501,1;
        end;
    }
}
end;

 

Edited by Start_
  • 0
Posted
11 minutes ago, Start_ said:

if(killedidrid == 1002){
    addrid(2); //Attach all party members.
    if(strcharinfo(3) == strcharinfo(3,getcharid(0,getpartyleader(getcharid(1))))){
        getitem 501,1;
        end;
    }
}
end;

 


OnNPCKillEvent:

setarray .mobid[0],1000;
    if (killedrid > .mobid[.@c]){
    addrid(2); //Attach all party members
    .@s$ = strcharinfo(3); //Save map name.
    if(strcharinfo(3) == strcharinfo(3,getcharid(0,getpartyleader(getcharid(1))))) {

     getitem 501,1;
        end;
}
        end;
}

 

 

only killed   notthing party member again

  • 0
Posted (edited)

Sorry for not working code.

Just find a way by yourself, Or wait other guys to answer it more clearly.

Edited by Start_
  • 0
Posted (edited)
On 9/6/2019 at 12:43 PM, Start_ said:

sorry for not working code because i'm not free to test it.

Just find a way by yourself, Or wait other guys to answer it more clearly.

That's OK ?
Thank for help ?

---- i can do it's  thank you ?

Edited by coperation

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