Jump to content
  • 0

About PVP Drop Skull


Jayz

Question


  • Group:  Members
  • Topic Count:  58
  • Topics Per Day:  0.01
  • Content Count:  395
  • Reputation:   53
  • Joined:  07/24/12
  • Last Seen:  

Its possible if yes how can you do it please

about pvp drop skull because i have problem on pvp drop skull some of my player is farming skull

so i want 2-3 skulls from a player in a day, you are not allowed to get anymore skulls from the player even if you have killed him/her. Once 24 hours has passed, the limit will reset back to 0 therefore enabling you to collect 2-3 skulls from that player again.

Example: You have collected the 3rd skull from a player in around 5:00 PM

You must wait for the next day in the exact time to be able to collect the skulls from that player again

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

a new technique has been found in this topic, by abusing SQL table to save the kills

so this will effectively break the limit of player data storage, rendering it unlimited

/*
create table last_pvp_kill (
id int(11) unsigned primary key auto_increment,
killercid int(11) unsigned not null,
killedcid int(11) unsigned not null,
count smallint(6) unsigned,
key (killercid),
key (killedcid)
) engine = innodb;
*/

-	script	jfhdksfjhsk	-1,{
OnClock0000:
query_sql "truncate last_pvp_kill;";
end;
OnPCKillEvent:
if ( killedrid == getcharid(3) ) end;
if ( query_sql( "select count from last_pvp_kill where killercid = "+( .@killercid = getcharid(0) )+" and killedcid = "+( .@killedcid = getcharid( 0, rid2name( killedrid ) ) ), .@count ) ) { // check if the user is in the list
	if ( .@count == .max_skull ) {
		dispbottom "you have reach the max amount of skull for that player today";
		end;
	}
	query_sql "update last_pvp_kill set count = count +1 where killercid = "+ .@killercid +" and killedcid = "+ .@killedcid;
}
else
	query_sql "insert into last_pvp_kill values ( null, "+ .@killercid +", "+ .@killedcid +", 1 )"; // insert into table
getitem2 7420, 1,1,0,0, 254, 0, .@killedcid % ( 1 << 16 ), .@killedcid >> 16;
end;
OnInit:
.max_skull = 3;
end;
}

  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

You will have to turn off skull_drops from battle config and uses a script engine to do this.

Use a base of AnnieRuru's script here and add some last_skull global variable time check.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

I rather do something like this

-	script	blah	-1,{
OnPCKillEvent:
set .@counttopunish, 3; // 3 times kill in same minute = OUT
if ( killedrid == getcharid(3) ) end;
attachrid killedrid;
.@charid = getcharid(0);
attachrid killerrid;
setd "@count"+ gettime(2) +"_"+ killedrid, getd( "@count"+ gettime(2) +"_"+ killedrid ) +1;
if ( getd( "@count"+ gettime(2) +"_"+ killedrid ) < .@counttopunish )
	getitem2 7420, 1,1,0,0, 254, 0, .@charid % pow(2,16), .@charid / pow(2,16);
else {
	announce strcharinfo(0) +", Stop killing "+ rid2name(killedrid) +" !!!", 0;
	warp "Save", 0,0;
}
end;
}

http://www.eathena.w...ype=post&id=334

... hmm ... this script is seriously unoptimized ...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  58
  • Topics Per Day:  0.01
  • Content Count:  395
  • Reputation:   53
  • Joined:  07/24/12
  • Last Seen:  

i want 3 skulls from a player in a day, you are not allowed to get anymore skulls from the player even if you have killed him/her. Once 24 hours has passed

Edited by Zack-
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

-	script	kasdhkasdjhsd	-1,{
OnPCKillEvent:
if ( pvp_skull_limit_day != atoi( gettimestr("%Y%m%d", 9) ) ) {
	pvp_skull_limit_day = atoi( gettimestr("%Y%m%d", 9) );
	pvp_skull_limit_collect = 0;
}
if ( killedrid == getcharid(3) || pvp_skull_limit_collect >= 3 ) end;
attachrid killedrid;
.@charid = getcharid(0);
attachrid killerrid;
getitem2 7420, 1,1,0,0, 254, 0, .@charid % pow(2,16), .@charid / pow(2,16);
pvp_skull_limit_collect++;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  58
  • Topics Per Day:  0.01
  • Content Count:  395
  • Reputation:   53
  • Joined:  07/24/12
  • Last Seen:  

yeah now working but.. this is imposible to make it every player? have only 3 skull per player not all player

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  205
  • Reputation:   19
  • Joined:  10/12/12
  • Last Seen:  

OnPCKillEvent:

attachrid killerrid;

Not 100% sure, but if I remember correctly, OnPCKillEvent just create 'killedrid' variable, as 'killerrid = getcharid(3)'.

Anyway, better to store it to avoid any kind of problem :P

.@killer = getcharid(3);
attachrid killedrid;
// Do stuff
attachrid .@killer;

Edited by Ryokem
Link to comment
Share on other sites


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

yeah now working but.. this is imposible to make it every player? have only 3 skull per player not all player

erm...i dont think it's a good way to do it using npc script if you want to limit all player with 3 skull..

because it will required to create / save alot data using variable for each player he/she killed ..

imagine if your server everyday having 100 player killing each other...about 20,000 ( AID + Count ) variable is needed ...O.O

anyway you can try this..

http://pastebin.com/raw.php?i=1pBA4HBM

by default only limited to 3 players....

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Why not simply create a check that blocks the (3 times) defeated character from entering the PVP room? So you won't need to save the variables just like Emistry has said.

Link to comment
Share on other sites


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

Why not simply create a check that blocks the (3 times) defeated character from entering the PVP room? So you won't need to save the variables just like Emistry has said.

too bad to say that alot players will bombard you if you use this method..xD

haha because they cant enter the PVP Room after they die for 3 times or more... LOL...

player love pvp...but not restricted from PVP area haha ~

so, this idea wont work ~ xD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Yes you're right, that way won't work /ok

Or why not add a price to the PVP room entry? The entry price can be set at skull's sell price (original/overcharged).

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  58
  • Topics Per Day:  0.01
  • Content Count:  395
  • Reputation:   53
  • Joined:  07/24/12
  • Last Seen:  

yeah now working but.. this is imposible to make it every player? have only 3 skull per player not all player

erm...i dont think it's a good way to do it using npc script if you want to limit all player with 3 skull..

because it will required to create / save alot data using variable for each player he/she killed ..

imagine if your server everyday having 100 player killing each other...about 20,000 ( AID + Count ) variable is needed ...O.O

anyway you can try this..

http://pastebin.com/raw.php?i=1pBA4HBM

by default only limited to 3 players....

Thanks its working now

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