Jump to content
  • 0

Hot Time PVP Cashpoint


JoshXp

Question


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  124
  • Reputation:   0
  • Joined:  01/21/13
  • Last Seen:  

Hello Guys,

i wanna ask,

i have this script from : https://rathena.org/board/topic/62890-pvp-points-system/?p=98453
 

- script PvP_System -1,{

OnPCKillEvent:

if(strcharinfo(3) != "pvp_y_1-2") end;

if(@LastKilled == killedrid) end;

set .@Killer,getcharid(3);

set .@Killed,killedrid;

detachrid;

if(attachrid(.@Killed)){

if(#CASHPOINTS){

  dispbottom "You Lost 1 Cash Point from "+rid2name(.@Killer);

  set #CASHPOINTS,#CASHPOINTS-1;

  emotion e_sob,1;

  detachrid;

  if(attachrid(.@Killer)){

   dispbottom "You Gained 1 Cash Points from "+rid2name(.@Killed);

   emotion e_meh,1;

   set #CASHPOINTS,#CASHPOINTS+1;

   set @LastKilled,.@Killed;

   attachnpctimer;

   initnpctimer;

  }

} else {

  emotion e_sob,1;

  detachrid;

  if(attachrid(.@Killer)){

   dispbottom "Sorry no cash points on the "+rid2name(.@Killed);

   emotion e_meh,1;

   set @LastKilled,.@Killed;

   attachnpctimer;

   initnpctimer;

  }

}

}

end;

OnTimer180000:

set @LastKilled,0;

stopnpctimer;

detachnpctimer;

end;

}

but, i want to on specific day and time it will be increase from kill +1 into kill +5...

it can ??

 

Thank's

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  88
  • Reputation:   10
  • Joined:  01/15/16
  • Last Seen:  

Try with this, but its not tested

- script PvP_System -1,{
OnPCKillEvent:
  if(strcharinfo(3) != "pvp_y_1-2") end;
  if(@LastKilled == killedrid) end;
  set .@Killer,getcharid(3);
  set .@Killed,killedrid;
  detachrid;
  if(attachrid(.@Killed)){
    if(#CASHPOINTS){
      if(.hothour){
        dispbottom "You Lost 5 Cash Point from "+rid2name(.@Killer);
        set #CASHPOINTS,#CASHPOINTS-5;
      }
      else{
        dispbottom "You Lost 1 Cash Point from "+rid2name(.@Killer);
        set #CASHPOINTS,#CASHPOINTS-1;
      }
      emotion e_sob,1;
      detachrid;
      if(attachrid(.@Killer)){
        if(.hothour)
          dispbottom "You gained 5 Cash Points from "+rid2name(.@Killed);
        else
          dispbottom "You Gained 1 Cash Points from "+rid2name(.@Killed);
        emotion e_meh,1;
        if(.hothour)
          #CASHPOINTS += 5;
        else
         set #CASHPOINTS,#CASHPOINTS+1;
        set @LastKilled,.@Killed;
        attachnpctimer;
        initnpctimer;
      }
    } 
    else {
      emotion e_sob,1;
      detachrid;
      if(attachrid(.@Killer)){
       dispbottom "Sorry no cash points on the "+rid2name(.@Killed);
       emotion e_meh,1;
       set @LastKilled,.@Killed;
       attachnpctimer;
       initnpctimer;
      }
    }
  }
  end;
OnTimer180000:
  set @LastKilled,0;
  stopnpctimer;
  detachnpctimer;
  end;

  OnSun1700:
    .hothour = 1;
    announce "The PVP HOT Hour has begin.",0;
    end;
  OnSun1800:
    .hothour = 0;
    announce "The PVP HOT Hour has finish.",0;
    end;
}

PD: I put the day Sunday at 17:00, but you can change it in the end to the day and hour that you want, and the second one, (sunday at 18:00 its when you turn off this)

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  124
  • Reputation:   0
  • Joined:  01/21/13
  • Last Seen:  

Try with this, but its not tested

- script PvP_System -1,{
OnPCKillEvent:
  if(strcharinfo(3) != "pvp_y_1-2") end;
  if(@LastKilled == killedrid) end;
  set .@Killer,getcharid(3);
  set .@Killed,killedrid;
  detachrid;
  if(attachrid(.@Killed)){
    if(#CASHPOINTS){
      if(.hothour){
        dispbottom "You Lost 5 Cash Point from "+rid2name(.@Killer);
        set #CASHPOINTS,#CASHPOINTS-5;
      }
      else{
        dispbottom "You Lost 1 Cash Point from "+rid2name(.@Killer);
        set #CASHPOINTS,#CASHPOINTS-1;
      }
      emotion e_sob,1;
      detachrid;
      if(attachrid(.@Killer)){
        if(.hothour)
          dispbottom "You gained 5 Cash Points from "+rid2name(.@Killed);
        else
          dispbottom "You Gained 1 Cash Points from "+rid2name(.@Killed);
        emotion e_meh,1;
        if(.hothour)
          #CASHPOINTS += 5;
        else
         set #CASHPOINTS,#CASHPOINTS+1;
        set @LastKilled,.@Killed;
        attachnpctimer;
        initnpctimer;
      }
    } 
    else {
      emotion e_sob,1;
      detachrid;
      if(attachrid(.@Killer)){
       dispbottom "Sorry no cash points on the "+rid2name(.@Killed);
       emotion e_meh,1;
       set @LastKilled,.@Killed;
       attachnpctimer;
       initnpctimer;
      }
    }
  }
  end;
OnTimer180000:
  set @LastKilled,0;
  stopnpctimer;
  detachnpctimer;
  end;

  OnSun1700:
    .hothour = 1;
    announce "The PVP HOT Hour has begin.",0;
    end;
  OnSun1800:
    .hothour = 0;
    announce "The PVP HOT Hour has finish.",0;
    end;
}

PD: I put the day Sunday at 17:00, but you can change it in the end to the day and hour that you want, and the second one, (sunday at 18:00 its when you turn off this)

 

so, if i want to change the day is

OnSun1700 with like OnMon and another right ?

and how about the cash point is added only when A kill B but B didn't get lose point at all ?

i'll try it :D

 

 

edit----

 

i use another one script :

 

- script PVPPOINTS -1,{
OnPCKillEvent:
getmapxy.@map$,.@x,.@y,0;
if(getcharid(3)==killedrid) end;
if(.@map$ != "pvp_y_1-2") end;

set .@player1, getcharid(3);
set .@player2, killedrid;

attachrid(.@player2);
set .@player2points, #CASHPOINTS;
if(.@player2points) {
  set #CASHPOINTS, #CASHPOINTS - 1;
  dispbottom "You Lost 1 Cash Point from "+rid2name(killerrid);
}
  emotion e_sob,1;

attachrid(.@player1);
if(.@player2points) {
  set #CASHPOINTS, #CASHPOINTS + 1;
  dispbottom "You Gained 1 Cash Points from "+rid2name(killedrid);
}
else
  dispbottom "Sorry no cash points on the "+rid2name(killedrid);
  emotion e_meh,1;
end;
}

Didn't work.

i have try OnSat1300 and another but didnt get +1 or +5 :D

Thanks

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