WhatFT Posted March 28, 2013 Posted March 28, 2013 - script Sample -1,{ OnInit: set .Delay,180; end; OnPCKillEvent: if( @Delay < gettimetick(2) ){ set .@Amount,rand(1,4); set #CASHPOINTS,#CASHPOINTS + .@Amount; dispbottom "Gained "+.@Amount+" Cash Point. Total = "+#CASHPOINTS+" Cash Points."; if( .Delay ) set @Delay,gettimetick(2) + .Delay; } end; } Can anyone help me add something on this script? This PvP Point Script will only work @ cell_game Thanks for Emistry for sharing this in his thread.. Quote
Thanna Posted March 28, 2013 Posted March 28, 2013 (edited) try this - script Sample -1,{ OnInit: set .Delay,180; setarray $PVPMAPS1$[0],"cell_game"; //you can add more maps here end; OnPCKillEvent: if (getcharid(0)) for(set .@i,0; .@i < getarraysize($PVPMAPS1$); set .@i,.@i+1) { if(strcharinfo(3) == $PVPMAPS1$[.@i]) { if( @Delay < gettimetick(2) ){ set .@Amount,rand(1,4); set #CASHPOINTS,#CASHPOINTS + .@Amount; dispbottom "Gained "+.@Amount+" Cash Point. Total = "+#CASHPOINTS+" Cash Points."; if( .Delay ) set @Delay,gettimetick(2) + .Delay; } end; } Edited March 28, 2013 by Thanna Quote
Emistry Posted March 28, 2013 Posted March 28, 2013 OnPCKillEvent: if( strcharinfo(3) != "cell_game" ) end; @Thanna it's a bad habit and not suggested to use permanent global variable on this kind of settings. the script itself doesnt need any permanent global variable to save the data.... Quote
WhatFT Posted March 28, 2013 Author Posted March 28, 2013 OnPCKillEvent: if( strcharinfo(3) != "cell_game" ) end; @Thanna it's a bad habit and not suggested to use permanent global variable on this kind of settings. the script itself doesnt need any permanent global variable to save the data.... Sorry but where will I put this Emistry? Quote
Emistry Posted March 28, 2013 Posted March 28, 2013 below OnPCKillEvent if( strcharinfo(3) != "cell_game" ) end; Quote
Question
WhatFT
Can anyone help me add something on this script?
Thanks for Emistry for sharing this in his thread..
4 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.