Jump to content
  • 0

Help with Script


gnashxalex

Question


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.01
  • Content Count:  52
  • Reputation:   1
  • Joined:  08/19/18
  • Last Seen:  

-    script    MVP_Announce    -1,{
OnNPCKillEvent:
    if (getmonsterinfo(killedrid,MOB_MVPEXP) != 0)
        if (getcharid(1))
            announce "El MVP ("+ getmonsterinfo(killedrid,MOB_NAME)+") ha sido asesinado por '"+ strcharinfo(0) +"' de la party '"+ strcharinfo(1) +"'.",bc_yellow|bc_all;
        else
            announce "El MVP ("+ getmonsterinfo(killedrid,MOB_NAME)+") ha sido asesinado por '"+ strcharinfo(0) +"'.",bc_yellow|bc_all;
    end;
}

can someone help me to announce only on mvps official spawn map?
and add map on the announce, thanks. ?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

-	script	jklasdf	-1,{
OnInit:
    setarray .mobid, 1002, 1001;
    setarray .map$, "prt_fild08", "prontera";
    end;

OnNPCKillEvent:
    .@index = inarray(.mobid[0], killedrid );
    if ( strcharinfo(3) == .map$[.@index] ) {
		announce strcharinfo(0) +""+ ( strcharinfo(1) ? " of party "+ strcharinfo(1):"" ) +" has killed "+ getmonsterinfo(killedrid,MOB_NAME)+" at "+ strcharinfo(3), bc_all;
    }
	end;
}

list down all mvps and match the maplist corresponding to the spawn id. This may cause trouble on mvp with multiple spawn maps like Atroce but will help you at least (untested).

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  398
  • Reputation:   246
  • Joined:  07/04/19
  • Last Seen:  

mapannounce "prontera","El MVP ("+ getmonsterinfo(killedrid,MOB_NAME)+") ha sido asesinado por '"+ strcharinfo(0) +"' de la party '"+ strcharinfo(1) +"'.", bc_map;

 

just edit the "prontera"

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.01
  • Content Count:  52
  • Reputation:   1
  • Joined:  08/19/18
  • Last Seen:  

On 11/19/2019 at 12:01 PM, BeWan said:

mapannounce "prontera","El MVP ("+ getmonsterinfo(killedrid,MOB_NAME)+") ha sido asesinado por '"+ strcharinfo(0) +"' de la party '"+ strcharinfo(1) +"'.", bc_map;

 

just edit the "prontera"

i mean announce only when the mvp is killed in his official map
or
announce "El MVP ("+ getmonsterinfo(killedrid,MOB_NAME)+") ha sido asesinado por '"+ strcharinfo(0) +"' de la party '"+ strcharinfo(1) +"'The MvP was in Map "x".",bc_yellow|bc_all;

Any help is greatly appreciated, thanks

On 11/19/2019 at 4:05 PM, Mabuhay said:

-	script	jklasdf	-1,{
OnInit:
    setarray .mobid, 1002, 1001;
    setarray .map$, "prt_fild08", "prontera";
    end;

OnNPCKillEvent:
    .@index = inarray(.mobid[0], killedrid );
    if ( strcharinfo(3) == .map$[.@index] ) {
		announce strcharinfo(0) +""+ ( strcharinfo(1) ? " of party "+ strcharinfo(1):"" ) +" has killed "+ getmonsterinfo(killedrid,MOB_NAME)+" at "+ strcharinfo(3), bc_all;
    }
	end;
}

list down all mvps and match the maplist corresponding to the spawn id. This may cause trouble on mvp with multiple spawn maps like Atroce but will help you at least (untested).

I will try it and tell you what happens

How can I put the name inside?

Example

[cookie] has killed 'Poring" at 'prt_fild08'

With that it would be perfect, I have time trying but it gives error; /


I have about 30 minutes trying but in all the ways I've tried it gives me an error
PD: now its working how i want, Thanks Mabuhay and BeWan

error.png
Now i will see what happen with the atroces 

tried many ways with the problem with atroce still nothing.

On 11/19/2019 at 4:05 PM, Mabuhay said:

list down all mvps and match the maplist corresponding to the spawn id. This may cause trouble on mvp with multiple spawn maps like Atroce but will help you at least (untested).

Here you were right the simplest solution I see is to create several atroce with different IDs or what do you suggest?

Edited by gnashxalex
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...