Jump to content
  • 0

PVP Cash Points with anti-spamming


Question

Posted

map is prontera, and all pvp and gvg maps

player 1 killed player 2

player 1 will gain random cash point from 1-4

player 1 will see in dispbottom how much cashpoint he gained from killing player 2 and will also display how much cashpoint he got overall

player 1 will have a 3minute cooldown before he can gain cashpoints when killing player 2 again

player 1 will have a dispbottom that says the remaining time to gain cashpoints from killing player 2

thank you :D

12 answers to this question

Recommended Posts

Posted

try this

- 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;
}

Posted

yes ..it should...as long as 3Ceam using the same variable...

beside...whether it work or not...just copy the script and run it in your server then you will know it work or not....

Posted

try this

- 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;
}

 

 

the map server says:
post-19908-0-09732700-1386329349_thumb.png
so how should this be fixed? 
/hmm
Posted

try this

- 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;
}

Hi Emistry thanks for this how will i trigger this on designated map only (example on prt_fild01) thank you!

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