• 0
garro

Help with npc ranking

Question

Good evening, I have this pvp npc that I have modified, I take help since if I put a single map, the if I throw the option that says disbottom you have killed X in pvp, but if I put several maps I do not I can not help it with my error, thank you.

 

 

pvp2.txt

Edited by garro

Share this post


Link to post
Share on other sites

6 answers to this question

  • 0

 

people of rAthena

 

wrong forum. :D

Edited by vBrenth

Share this post


Link to post
Share on other sites
  • 0

The disbottom has killed so many, but not as I should enter the pvp room and not throw it, example I'm going to prontera, alberta and appears.

Share this post


Link to post
Share on other sites
  • 0

The issue is if you are duplicating an NPC (i.e. multiple NPCs running same script), every time OnPCKillEvent/DieEvent is triggered, it will activate for all NPCs. This script very messy, hard to read for me so don't know what's going on.

 

But something like this is an example. The following script would cause the script to run 5 times - 1 original and 4 duplicates.

 

 

-    script    Kill Announce    FAKE_NPC,{

OnPCKillEvent:
    announce("" + strcharinfo(PC_NAME) + " killed somebody.", bc_all);
    end;

}

prontera,150,150,3    duplicate(Kill Announce)    Kill Announce#1    FAKE_NPC
payon,150,150,3    duplicate(Kill Announce)    Kill Announce#2    FAKE_NPC
izlude,150,150,3    duplicate(Kill Announce)    Kill Announce#3    FAKE_NPC
alberta,150,150,3    duplicate(Kill Announce)    Kill Announce#4    FAKE_NPC

 

You can edit it like such so it would only announce when killed somebody on your same map.

 

 

-    script    Kill Announce#template    FAKE_NPC,{

OnPCKillEvent:
    if (strnpcinfo(NPC_NAME_HIDDEN) == "template")
        end;

    if (strnpcinfo(NPC_MAP) != strcharinfo(PC_MAP))
        end;
    
    announce("" + strcharinfo(PC_NAME) + " killed somebody.", bc_all);
    end;

}

prontera,150,150,3    duplicate(Kill Announce)    Kill Announce#1    FAKE_NPC
payon,150,150,3    duplicate(Kill Announce)    Kill Announce#2    FAKE_NPC
izlude,150,150,3    duplicate(Kill Announce)    Kill Announce#3    FAKE_NPC
alberta,150,150,3    duplicate(Kill Announce)    Kill Announce#4    FAKE_NPC

 

Idk if this is helpful ,just thought i would put it out there

Edited by True Zeal

Share this post


Link to post
Share on other sites
  • 0

Thanks I had to change script better and I found this one that is better, but I am having a problem with the ranking, I kill someone in pvp_n_1-5 and it tells me the death in the ranking but I kill another in guild_vs2 and it does not tell me can you help me

Thanks I had to change script better and I found this one that is better, but I am having a problem with the ranking, I kill someone in pvp_n_1-5 and it tells me the death in the ranking but I kill another in guild_vs2 and it does not tell me can you help me

pvp2.txt

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now