Jump to content
  • 0

PvP Points ...


Question

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

4 answers to this question

Recommended Posts

Posted (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 by Thanna
Posted
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....

Posted
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?

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...