Jump to content
  • 0

PvP Points ...


WhatFT

Question


  • Group:  Members
  • Topic Count:  142
  • Topics Per Day:  0.03
  • Content Count:  511
  • Reputation:   7
  • Joined:  02/15/12
  • Last Seen:  

- 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..

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  271
  • Reputation:   7
  • Joined:  01/06/12
  • Last Seen:  

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 by Thanna
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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....

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  142
  • Topics Per Day:  0.03
  • Content Count:  511
  • Reputation:   7
  • Joined:  02/15/12
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

below OnPCKillEvent

if( strcharinfo(3) != "cell_game" ) end;
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...