Jump to content
  • 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

Recommended Posts

  • 0

 

people of rAthena

 

wrong forum. :D

Edited by vBrenth

Share this post


Link to post
Share on other sites
  • 0

I do see your problem though:

if (.@mapa$ != "pvp_n_1-5,guild_vs2,pvp_n_1-3")

Here you are checking for a map called "pvp_n_1-5,guild_vs2,pvp_n_1-3", not for 3 different maps.

 

Try replacing by:

if (.@mapa$ != "pvp_n_1-5" && .@mapa$ != "guild_vs2" && .@mapa$ != "pvp_n_1-3")

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

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

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.