Jump to content
  • 0

Help script. Detect dead level in pvp


kiova

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  59
  • Reputation:   0
  • Joined:  09/02/12
  • Last Seen:  

Hello ^ ^.

I need help with a NPC, basically what I want to do is if I kill a player who is under level 80, no point of me.

Here I leave what I have:

if (.mapas_pvp$[.@c] == strcharinfo(3))

if (getcharid(0,rid2name(killerrid)) && BaseLevel <= 80 ) {

close;

}

set #PuntosPvp,#PuntosPvp + 1;

I've tried everything and can not find a way.

A greeting and thanks.

Link to comment
Share on other sites

10 answers to this question

Recommended Posts


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

try this...

OnPCKillEvent:
set .@KillerAID,getcharid(3);
if( attachrid(killedrid) )
if( BaseLevel >= 80 )
 if( attachrid(.@KillerAID) ){
  set #PuntosPvp,#PuntosPvp + 1;
  dispbottom "Gained 1 Point when killed Character Level 80 or Above.";
 }
end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  59
  • Reputation:   0
  • Joined:  09/02/12
  • Last Seen:  

not work. I try to kill a lvl 80 char lower and I'm not about and if I kill one superior either. Any solution?

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:  

it work fine for me...

i use a character with level 103 killed a character with level 80 ....and i gain point...

if i killed level 80 below character. ...i gain nothing...

be8mU.jpg

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  59
  • Reputation:   0
  • Joined:  09/02/12
  • Last Seen:  

OnPcKillEvent: // Sumamos los puntos al matar a alguien

if (.MapaActivado) {

for (set .@c, 0; .@c < getarraysize(.mapas_pvp$); set .@c, .@c + 1)

if (.mapas_pvp$[.@c] == strcharinfo(3))

if( attachrid(killedrid) )

if( BaseLevel >= 80 )

if( attachrid(.@KillerAID) )

set #PuntosPvp,#PuntosPvp + 1;

} else

set #PuntosPvp,#PuntosPvp + 1;

if(#PuntosPvp==$Campeon){

dispbottom "BONUs! Has llegado a " + #PuntosPvp + " Puntos así que te mereces un pequeño premio. ";

warp .mapa_bonus$,.x_bonus,.y_bonus;

end;

}

dispbottom "Has ganado un punto , ahora tienes " + #PuntosPvp + ". Sigue así.";

end;

I have to be doing something wrong, that does not work, so I have the script

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

OnPcKillEvent: // Sumamos los puntos al matar a alguien
if (.MapaActivado) {
for (set .@c, 0; .@c < getarraysize(.mapas_pvp$); set .@c, .@c + 1)
 if (.mapas_pvp$[.@c] == strcharinfo(3) && attachrid(killedrid) )
   if( BaseLevel >= 80 )
 if( attachrid(.@KillerAID) ){
  set #PuntosPvp,#PuntosPvp + 1;
  break;
 }
if(#PuntosPvp==$Campeon){
 dispbottom "BONUs! Has llegado a " + #PuntosPvp + " Puntos así que te mereces un peque?o premio. ";
 warp .mapa_bonus$,.x_bonus,.y_bonus;
 end;
}
}
dispbottom "Has ganado un punto , ahora tienes " + #PuntosPvp + ". Sigue así.";
end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  59
  • Reputation:   0
  • Joined:  09/02/12
  • Last Seen:  

error map server

[Error]: script_rid2sd: fatal error ! player not attached!

[Debug]: Function: getcharid (1 parameter):

[Debug]: Data: number value=3

[Debug]: Source (NPC): pvp (invisible/not on a map)

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:  

show ur full script....

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:  

OnPCKillEvent:
set .@KillerAID,getcharid(3);  <------------------------------------

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  59
  • Reputation:   0
  • Joined:  09/02/12
  • Last Seen:  

ohhhh thank you very much and works XD

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