Jump to content

  •  

Photo

PVP points Floating rate


  • Please log in to reply
3 replies to this topic

#1 harley

harley

    Newbie

  • Members
  • Pip
  • 2 posts
  • Github:Gmley

Posted 23 February 2017 - 09:42 PM

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



#2 Alayne

Alayne

    Advanced Member

  • Members
  • PipPipPip
  • 213 posts

Posted 24 February 2017 - 09:33 AM

Well I think I can, but the explanations are a bit messy.

You want basically a pvppoint count, 1 point per kill on normal time, but 5 point per kill on particular hour range, right?

Which range exactly? Specific per days?



#3 harley

harley

    Newbie

  • Members
  • Pip
  • 2 posts
  • Github:Gmley

Posted 24 February 2017 - 02:49 PM

Well I think I can, but the explanations are a bit messy.

You want basically a pvppoint count, 1 point per kill on normal time, but 5 point per kill on particular hour range, right?

Which range exactly? Specific per days?

Oh i'm sorry i forgot to paste the script.. yes you're right,, normal time player recieves 1 points per kill, and it will multiple by 5 on patircular hour range.. 12pm to 12.30 pm,3 to 3,30 pm,6 to 6,30pm,9 to 9,30pm and 12am to 12,30am.. I saw a script adn it's really great because it has anti kill or abuse..but i don't know how to add a floating rate.. it's so complicated..or if you can0t make an easy script that easy to understand.. (credit to real owner). 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,30; // deducted points in killing the same player ( Default 5 )
set .added_points,3; // Added Points when killing ( Default 3 )
end;
}



#4 Alayne

Alayne

    Advanced Member

  • Members
  • PipPipPip
  • 213 posts

Posted 27 February 2017 - 07:10 AM

Here you go.

Couldn't test it now, but it should work.

 

-    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;
}
		
OnClock1200:
	set .added_points, .advPvpPoint;
	end;
	
OnClock1230:
	set .added_points, .basePvpPoint;
	end;
	
OnClock1500:
	set .added_points, .advPvpPoint;
	end;
	
OnClock1530:
	set .added_points, .basePvpPoint;
	end;
	
OnClock1800:
	set .added_points, .advPvpPoint;
	end;
	
OnClock1830:
	set .added_points, .basePvpPoint;
	end;
	
OnClock2100:
	set .added_points, .advPvpPoint;
	end;
	
OnClock2130:
	set .added_points, .basePvpPoint;
	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,30; // deducted points in killing the same player ( Default 5 )
	set .basePvpPoint, 1;
	set .advPvpPoint, 1;
	set .added_points, .basePvpPoint;
end;
}

Is the initial script one of yours? Cause there's strange positions for some label...I didn't touch anything to prevent any "additionnal error", but not sure this one'll work...






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users


This topic has been visited by 15 user(s)