kiova Posted September 28, 2012 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 59 Reputation: 0 Joined: 09/02/12 Last Seen: October 19, 2013 Share Posted September 28, 2012 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. Quote Link to comment Share on other sites More sharing options...
Emistry Posted September 28, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 19 hours ago Share Posted September 28, 2012 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; Quote Link to comment Share on other sites More sharing options...
kiova Posted September 28, 2012 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 59 Reputation: 0 Joined: 09/02/12 Last Seen: October 19, 2013 Author Share Posted September 28, 2012 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? Quote Link to comment Share on other sites More sharing options...
Emistry Posted September 28, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 19 hours ago Share Posted September 28, 2012 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... Quote Link to comment Share on other sites More sharing options...
kiova Posted September 28, 2012 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 59 Reputation: 0 Joined: 09/02/12 Last Seen: October 19, 2013 Author Share Posted September 28, 2012 OnPcKillEvent: // Sumamos los puntos al matar a alguienif (.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 Quote Link to comment Share on other sites More sharing options...
Emistry Posted September 28, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 19 hours ago Share Posted September 28, 2012 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; Quote Link to comment Share on other sites More sharing options...
kiova Posted September 28, 2012 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 59 Reputation: 0 Joined: 09/02/12 Last Seen: October 19, 2013 Author Share Posted September 28, 2012 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) Quote Link to comment Share on other sites More sharing options...
Emistry Posted September 28, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 19 hours ago Share Posted September 28, 2012 show ur full script.... Quote Link to comment Share on other sites More sharing options...
kiova Posted September 28, 2012 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 59 Reputation: 0 Joined: 09/02/12 Last Seen: October 19, 2013 Author Share Posted September 28, 2012 I'll attached PuntosPvp.txt Quote Link to comment Share on other sites More sharing options...
Emistry Posted September 28, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 19 hours ago Share Posted September 28, 2012 OnPCKillEvent: set .@KillerAID,getcharid(3); <------------------------------------ Quote Link to comment Share on other sites More sharing options...
kiova Posted September 28, 2012 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 59 Reputation: 0 Joined: 09/02/12 Last Seen: October 19, 2013 Author Share Posted September 28, 2012 ohhhh thank you very much and works XD Quote Link to comment Share on other sites More sharing options...
Question
kiova
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:
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.