harley Posted February 23, 2017 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 17 Reputation: 1 Joined: 11/08/14 Last Seen: November 25, 2022 Share Posted February 23, 2017 (edited) The normal Pvp Points that player recieve is 1 when he killed someone,Can someone know how to make a floating rate for +PVPPOINTS+ "Pvp Points", and make x5 Reward points. On Monday to Sunday to 12am,3pm,6pm,9pm.. Thanks for Advance Edited February 23, 2017 by harley Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted February 23, 2017 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1632 Joined: 03/26/12 Last Seen: April 15 Share Posted February 23, 2017 Hint: Use On<time> labels to set a multiplier e.g. $PVPPointsRate and then add it to the code where the points are calculated: - script floatingpvp -1,{ $PVPPOINTSRATE = 1; OnMinute00: if (gettime(DT_DAYOFWEEK)==SATURDAY && gettime(DT_HOUR)==3){ $PVPPOINTSRATE = 5; } } Then your code would contain something like OnPCKillEvent: PVPPOINTS = PVPPOINTS + (1 * $PVPPOINTSRATE); Quote Link to comment Share on other sites More sharing options...
0 harley Posted February 24, 2017 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 17 Reputation: 1 Joined: 11/08/14 Last Seen: November 25, 2022 Author Share Posted February 24, 2017 (edited) 10 hours ago, Akkarin said: Hint: Use On<time> labels to set a multiplier e.g. $PVPPointsRate and then add it to the code where the points are calculated: - script floatingpvp -1,{ $PVPPOINTSRATE = 1; OnMinute00: if (gettime(DT_DAYOFWEEK)==SATURDAY && gettime(DT_HOUR)==3){ $PVPPOINTSRATE = 5; } } Then your code would contain something like OnPCKillEvent: PVPPOINTS = PVPPOINTS + (1 * $PVPPOINTSRATE); i use this script..where will i put the + (1 * $PVPPOINTSRATE); ? thanks - script mypvppoints -1,{ OnInit: bindatcmd "pvppoints",strnpcinfo(3)+"::OnAtcommand"; end; OnAtcommand: dispbottom "[ PvP Points ] : Your PvP Points: "+PvPPoints; end; } - script check player -1,{ OnPCLoginEvent: if(!PvPPoints) { PvPPoints = 0; PvPWarning = 0; } end; } - script PvPPointTimer -1,{ OnTimerStart: sleep2 90000; PvPFlag = 0; end; } - script PvP Points -1,{ OnPCKillEvent: for (set @i,0; @i < getarraysize(.Open_Maps$); set @i,@i+1) if( strcharinfo(3) == .Open_Maps$[@i] ) { if(PvPFlag && (killedrid == PrevKilled)) { PvPWarning += 1; if(PvPWarning >= .cons_kill_count) { PvPPoints -= .deducted_points; callsub L_PointCheck,PvPPoints; dispbottom "You've lost "+.deducted_points+" PvP Points."; dispbottom "You now have "+PvPPoints+" Points."; PvPWarning = 0; callsub Timer; } PvPPoints += .added_points; dispbottom "You've been awarded "+.added_points+" PvP Point."; dispbottom "You now have "+PvPPoints+" Points."; Timer: awake "PvPPointTimer"; PvPFlag = 1; doevent "PvPPointTimer::OnTimerStart"; end; } if ( killedrid == getcharid(3) ) { PvPPoints -= .deducted_points; callsub L_PointCheck,PvPPoints; dispbottom "You've lost "+.deducted_points+" PvP Point."; dispbottom "You now have "+PvPPoints+" Points."; end; } callsub AddPoint; attachrid(killedrid); PvPPoints -= .deducted_points; callsub L_PointCheck,PvPPoints; dispbottom "You've lost "+.deducted_points+" PvP Point."; dispbottom "You now have "+PvPPoints+" Points."; detachrid; AddPoint: PvPPoints += .added_points; dispbottom "You've been awarded "+.added_points+" PvP Point."; dispbottom "You now have "+PvPPoints+" Points."; PrevKilled = killedrid; PvPFlag = 1; doevent "PvPPointTimer::OnTimerStart"; end; L_PointCheck: if(getarg(0) < 0) PvPPoints = 0; return; end; } OnInit: // Put the map you want to enable the PvP Points ( only for Option 1 ) setarray .Open_Maps$[0],"guild_vs3","geffen","morocc","prontera"; set .cons_kill_count,5; // count consecutive kill in the same player ( Default 5 ) set .deducted_points,5; // deducted points in killing the same player ( Default 5 ) set .added_points,1; // Added Points when killing ( Default 3 ) end; } Edited February 24, 2017 by Akkarin Use codebox in future. Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted February 24, 2017 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1632 Joined: 03/26/12 Last Seen: April 15 Share Posted February 24, 2017 AddPoint: PvPPoints = PvPPoints + (.added_points * $PVPPOINTSRATE); dispbottom "You've been awarded "+ (.added_points * $PVPPOINTSRATE) +" PvP Point."; Untested. Quote Link to comment Share on other sites More sharing options...
0 harley Posted February 24, 2017 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 17 Reputation: 1 Joined: 11/08/14 Last Seen: November 25, 2022 Author Share Posted February 24, 2017 11 hours ago, Akkarin said: Hint: Use On<time> labels to set a multiplier e.g. $PVPPointsRate and then add it to the code where the points are calculated: 1 hour ago, Akkarin said: AddPoint: PvPPoints = PvPPoints + (.added_points * $PVPPOINTSRATE); dispbottom "You've been awarded "+ (.added_points * $PVPPOINTSRATE) +" PvP Point."; Untested. en your code would contain something like OnPCKillEvent: PVPPOINTS = PVPPOINTS + (1 * $PVPPOINTSRATE); I tried this. no error.. and the floating script. the time here is 11:30 oc in the morning.. a change Onminute:00 to 1135.. but no effect on rates.. Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted March 18, 2017 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted March 18, 2017 - script pvp_point -1,{ OnInit: bindatcmd "pvppoints",strnpcinfo(3)+"::OnAtcommand"; end; OnMinute: if ( gettime(3) % 3 == 0 ) { .pvp_point_rate = 5; } else { .pvp_point_rate = 1; } announce "PVP Point Rate = "+.pvp_point_rate+"x", bc_all; end; OnAtcommand: dispbottom "[ PvP Points ] : Total "+PvPPoints+" Point(s)"; end; OnPCKillEvent: if ( killedrid != getcharid(3) ) { PvPPoints += ( 1 * .pvp_point_rate ); dispbottom "[ PvP Points ] +"+( 1 * .pvp_point_rate )+". Total "+PvPPoints+" Point(s)"; } end; } Quote Link to comment Share on other sites More sharing options...
Question
harley
The normal Pvp Points that player recieve is 1 when he killed someone,Can someone know how to make a floating rate for +PVPPOINTS+ "Pvp Points", and make x5 Reward points. On Monday to Sunday to 12am,3pm,6pm,9pm.. Thanks for Advance
Edited by harleyLink to comment
Share on other sites
5 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.