Jump to content
  • 0

Help script. Detect dead level in pvp


Question

Posted

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.

10 answers to this question

Recommended Posts

Posted

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;

Posted

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

Posted
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

Posted

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;

Posted

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)

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...