Jump to content

Question

Posted (edited)

Here's my Script :


- <tab> script <tab> KillRewards <tab> -1,{

OnPCKillEvent:
if( killedrid == getcharid(3) ) end;  // anti-suicide, can remove
getmapxy (.@map$, .@x, .@y, 0);
if( .@map$ == "guild_vs3")
		set #CASHPOINTS, #CASHPOINTS + 5;		// Cash Points
	dispbottom "Gained 5 Cash Points.	  Total = " + #CASHPOINTS;
end;
}

how to add more maps for the kill system ? and add a delay of 1 minute for every person killed .

Thank You

SlashGeeGee

Edited by SlashGeeGee

3 answers to this question

Recommended Posts

Posted (edited)

Try this

Note: 300 = 5 mins

-	script	YOURPVPCASHPOINT	-1,{

OnPCKillEvent:
set @cashpkilldelay, 300; //Kill delay for same person in seconds

if(@cashpkillid != killedrid || @cashpkilltime + @cashpkilldelay < gettimetick(2)) {
	set #CASHPOINTS, #CASHPOINTS + 1;
	set @cashpkillid, killedrid;
	set @cashpkilltime, gettimetick(2);
	dispbottom "you gained 1 cash point";
}
end;
}

Sorry about this script i forgot that it has no certain map for kill system .but you can still modify this script i gave you

Edited by Lelouch
Posted (edited)

May be like this with map array ?

-	   script  YOURPVPCASHPOINT		-1,{
OnInit:
setarray .mappk$[0],"mapname1","mapname2","mapname3",...,"mapnamex";
set @cashpkilldelay, 300; //Delay

OnPCKillEvent:
getmapxy (.@map$, .@x, .@y, 0);
for(set .@i,0; .@i < (getarraysize(.mappk$)); set .@i,.@i+1) {
if(.@map$ ==  .mappk$[.@i]) {
	if(@cashpkillid != killedrid || @cashpkilltime + @cashpkilldelay < gettimetick(2)) {
			set #CASHPOINTS, #CASHPOINTS + 1;
			set @cashpkillid, killedrid;
			set @cashpkilltime, gettimetick(2);
			dispbottom "you gained 1 cash point";
	}
}
}
end;
}

I didn't test it yet and I'm not pro at this point -.- try and edit by yourself

Edited by gertrude
Posted

try this.

http://upaste.me/017b3951032a4d6

if your players able to abuse it by relogging to reset the delay count...then you just change the variable for delay into character permanent variable.

but if you are using short delay..i think it is okay..since not all players are willing to keep relog after killed a character to gain 1 points.

@gertrude

remember to end the process of OnInit...otherwise it might return some error after you loaded it.


if(@cashpkillid != killedrid || @cashpkilltime + @cashpkilldelay < gettimetick(2)) {

and i think it is better to use && instead of ||

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