Jump to content
  • 0

PvP announce for Homunculus


kyeme

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  164
  • Reputation:   12
  • Joined:  03/08/12
  • Last Seen:  

Can i have pvp script when you killed by homunculus (if the killer is homunculus) that announce in map "You have been killed by Homunculus +Homunculus Name+"

Thank you in advance. :)

Edited by kyeme
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  164
  • Reputation:   12
  • Joined:  03/08/12
  • Last Seen:  

Help ~ :)

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

try this...

not sure is it return Homunculus as killerrid when a homunculus killed character.

OnPCDieEvent:
if( killerrid > 6000 && killerrid <= 6052 )
   announce "A Homunculus killed you.",0;
end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  164
  • Reputation:   12
  • Joined:  03/08/12
  • Last Seen:  

try this...

not sure is it return Homunculus as killerrid when a homunculus killed character.

OnPCDieEvent:
if( killerrid > 6000 && killerrid <= 6052 )
announce "A Homunculus killed you.",0;
end;

Not Working :(

This script is from (credits to) ~AnnieRuru~ .

If the killer is a Homunculus, I want to announce like: announce "Homunculus Vanilmirth has pawned Kyeme.",0;

- script PvP -1,{
OnInit:
// Config
set .sound, 0; // soundeffect : 0 - disable, 1 - play soundeffect to all players on map, 2 - play soundeffect to an area around the killer, 3 - play soundeffect to killer only
set .announce, 1; // announce to : 0 - global, 1 - map
set .announcemap, 0; // announce the map name in the announcement ? : 0 - off, 1 - on
set .announcekill, 1; // announce who pawn who's head : 0 - off, 1 - on
set .msg_die, 0; // show message who kill you when die : 0 - off, 1 - on
set .msg_kill, 0; // show message you kill who when killed someone : 0 - off, 1 - on
set .gmnokill, 60; // GMs are not suppose to kill players. A GM with <this number> level or higher will do nothing. IF set to 60, GM60 and above kill any player will not get anything : 0 - off
set .killone, 1;
set .killtwo, 2;
set .killingspree, 3;
set .dominating, 4;
set .megakill, 5;
set .unstoppable, 6;
set .wickedsick, 7;
set .monsterkill, 8;
set .godlike, 9;
set .holyshit, 10;
set .continue, 1; // after beyond-godlike, every <this number> kills will make announcement again
setarray .maptrigger$, // only these maps will trigger this script
 "pvp_y_1-2"; // uncomment this to allow load all maps
// Config ends ------------------------------------------------------------------------------------------
// to prevent bug happen
if ( .announce < 0 || .announce > 1 ) set .announce, 0;
if ( .continue < 1 ) set .continue, 1;
if ( .gmnokill <= 0 ) set .gmnokill, 100;
set .maptriggersize, getarraysize(.maptrigger$);
end;
// script start.
OnPCKillEvent:
//if ( getgmlevel() >= .gmnokill ) end;
getmapxy .@map$, .@x, .@y, 0;
if ( .maptrigger$ != "all" ) {
 for ( set .@i, 0; .@i < .maptriggersize; set .@i, .@i +1 ) {
  if ( .@map$ == .maptrigger$[.@i] ) break;
 }
 if ( .@i == .maptriggersize ) end;
}
attachrid killedrid;
if ( killerrid != getcharid(3) && ( .msg_die || .msg_kill ) ) {
 if ( .msg_die ) message strcharinfo(0),"You have been killed by "+ rid2name(killerrid);
 if ( .msg_kill ) message rid2name(killerrid),"You just killed "+ strcharinfo(0);
}
attachrid killerrid;
set @PlayersKilledStreak, @PlayersKilledStreak +1 ;
if ( @PlayersKilledStreak == .killone )
 setarray .@streakname$,"killone.wav"," ";
else if ( @PlayersKilledStreak == .killtwo )
 setarray .@streakname$,"killtwo.wav"," ";
else if ( @PlayersKilledStreak == .killingspree )
 setarray .@streakname$,"killingspree.wav","(Killing Spree)";
else if ( @PlayersKilledStreak == .dominating )
 setarray .@streakname$,"dominating.wav","(Dominating)";
else if ( @PlayersKilledStreak == .megakill )
 setarray .@streakname$,"megakill.wav","(Mega Kill)";
else if ( @PlayersKilledStreak == .unstoppable )
 setarray .@streakname$,"unstoppable.wav","(Unstoppable)";
else if ( @PlayersKilledStreak == .wickedsick )
 setarray .@streakname$,"wickedsick.wav","(Wicked Sick)";
else if ( @PlayersKilledStreak == .monsterkill )
 setarray .@streakname$,"monsterkill.wav","(Monster Kill)";
else if ( @PlayersKilledStreak == .godlike )
 setarray .@streakname$,"godlike.wav","(Godlike)";
else if ( @PlayersKilledStreak >= .holyshit && ( (@PlayersKilledStreak - .holyshit) % .continue == 0 ) )
 setarray .@streakname$,"holyshit.wav","(Beyond Godlike)",". Someone Kill "+( (sex)?"him":"her" ) +"!";
if ( .@streakname$[1] != "" ) {
  announce strcharinfo(0) +" ["+ @PlayersKilledStreak +"] has pawned "+ rid2name(killedrid) +"'s head! "+ .@streakname$[1] +" "+( (.announcemap)?("at "+ .@map$):"") + .@streakname$[2],16|.announce,0x00FF00;
  }
attachrid killedrid;
if ( @PlayersKilledStreak >= .holyshit )
 set .@streakname$,"Beyond Godlike";
else if ( @PlayersKilledStreak >= .godlike )
 set .@streakname$,"Godlike";
else if ( @PlayersKilledStreak >= .monsterkill )
 set .@streakname$,"Monster Kill";
else if ( @PlayersKilledStreak >= .wickedsick )
 set .@streakname$,"Wicked Sick";
else if ( @PlayersKilledStreak >= .unstoppable )
 set .@streakname$,"Unstoppable";
else if ( @PlayersKilledStreak >= .megakill )
 set .@streakname$,"Mega kill";
else if ( @PlayersKilledStreak >= .dominating )
 set .@streakname$,"Dominating";
else if ( @PlayersKilledStreak >= .killingspree )
 set .@streakname$,"Killing Spree";
if ( @PlayersKilledStreak >= .killingspree && killerrid == getcharid(3) )
 announce strcharinfo(0) +" has ended "+( (sex)?"him":"her" )+" own "+ .@streakname$ +"["+ @PlayersKilledStreak +"] "+( (.announcemap)?("at "+ .@map$):""),16|.announce,0x00FF00;
else if ( @PlayersKilledStreak >= .killingspree )
 announce rid2name(killerrid) +" has ended "+ strcharinfo(0) +"'s "+ .@streakname$ +"["+ @PlayersKilledStreak +"] "+( (.announcemap)?("at "+ .@map$):""),16|.announce,0x00FF00;
 set @PlayersKilledStreak,0;
 end;
OnPCLoginEvent:
if ( .maptrigger$ != "all" ) end;
OnPCLoadMapEvent:
set @PlayersKilledStreak,0;
end;
}

Help please~

Edited by kyeme
Please use [CODEBOX] or Attachments for long contents.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  164
  • Reputation:   12
  • Joined:  03/08/12
  • Last Seen:  

Bumpness~~ :) Help pls

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

cannot

map\pc.c

	switch (src->type) {
case BL_MOB:
........
break;
case BL_PET: //Pass on to master...
	src = &((TBL_PET*)src)->msd->bl;
break;
case BL_HOM:
	src = &((TBL_HOM*)src)->master->bl;
break;
case BL_MER:
	src = &((TBL_MER*)src)->master->bl;
break;
}

if (src && src->type == BL_PC)
{
	struct map_session_data *ssd = (struct map_session_data *)src;
	pc_setparam(ssd, SP_KILLEDRID, sd->bl.id);
	npc_script_event(ssd, NPCE_KILLPC);

all the killedrid and killerrid GID is passed to the master, namely

BL_MOB: by *clone or *summon

BL_PET: pet that can kill like mini-baphomet

BL_HOM: homunculus

BL_MER: mercenary

if you want to work that you have to define another variable like killerrid2 and change a few files here and there in the source ...

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  164
  • Reputation:   12
  • Joined:  03/08/12
  • Last Seen:  

Ohhh :( .. anyway thanks for the information Ms. AnnieRuru and thanks for your PVP ladder script :) Nice to see you here in rAthena /no1

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