Jump to content
  • 0

Limit Bounty Hunter NPC Abuse


mawjustin

Question


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  121
  • Reputation:   6
  • Joined:  09/26/14
  • Last Seen:  

May I ask for assistance on how to limit Bounty Hunter Abuse?

This script is from @deathscythe13

Player can only be listed in bounty 1x a day.

Kill Streak must be unique Player ID.
Or
Set timer per kill for the same ID.

//made by deathscythe13
-	script	Bounty	-1,{
OnInit:
set $wantedlistlength,10;	// bounty length
set .rewarditem, 50000;	//reward item id
set .killstreak, 10; // kill streak before gets to bounty
end;
OnPCKillEvent:
getmapxy.@map$,.@x,.@y,0;
if(getcharid(3)==killedrid) end;
//if(.@map$ != "guild_vs5") end;

for(set .@i,0; .@i < $wantedlistlength && rid2name(killedrid)!=$wantedlist$[.@i]; set .@i, .@i+1);
if(.@i < $wantedlistlength && rid2name(killedrid)==$wantedlist$[.@i]) {
 set .@price , 3 - (.@i);   // amount of reward (i dunnoe the calc sorry)
 getitem .rewarditem,.@price;  
 dispbottom "You have killed a bounty!";
 for(set .@remove,.@i; .@remove < $wantedlistlength; set .@remove, .@remove+1) {
  set $wantedlist$[.@remove], $wantedlist$[.@remove+1];  
  set $wantedliststreak[.@remove], $wantedliststreak[.@remove+1];  
 }		  
 announce rid2name(killedrid)+" has been removed in the bounty list!",0;	
}
else {
 set killerstreak, killerstreak+1;
 dispbottom "Kill Streak: "+killerstreak;
}


if(killerstreak >= .killstreak) {
 for(set .@i, 0; .@i < $wantedlistlength && $wantedliststreak[.@i] > killerstreak; set .@i, .@i+1);

  if(.@i < $wantedlistlength && killerstreak >= $wantedliststreak[.@i]) {
 for(set .@x ,0; .@x < $wantedlistlength && $wantedlist$[.@x]!=strcharinfo(0); set .@x, .@x+1);
  if(.@x < $wantedlistlength && $wantedlist$[.@x]==strcharinfo(0)) {
   for(set .@already, .@x; .@already < $wantedlistlength; set .@already, .@already+1) {
	set $wantedlist$[.@already], $wantedlist$[.@already+1];
	set $wantedliststreak[.@already], $wantedliststreak[.@already+1];
   }
  }

 for(set .@x, ($wantedlistlength-1); .@x > .@i ; set .@x, .@x-1) {
  set $wantedlist$[.@x], $wantedlist$[.@x-1];
  set $wantedliststreak[.@x], $wantedliststreak[.@x-1];
 }
announce strcharinfo(0)+" is now in bounty list top "+(.@i+1)+"!",0;

set $wantedlist$[.@i], strcharinfo(0);
set $wantedliststreak[.@i], killerstreak;

  }
}

attachrid(killedrid);
if(killerstreak) {
 set killerstreak, 0;
 dispbottom "Your streak has been reset because you died!";
}

end;
}

moc_para01,48,179,3	script	Wanted List	837,{

mes "[^4B0082 Wanted List ^000000]";
mes "Announcement:";
mes "This is the current Wanted List.";
mes "Anyone who can kill any of these";
mes "people will be reward with "+getitemname(50000)+"";
next;
mes "[^4B0082 Wanted List ^000000]";
mes "Current Wanted List";
mes "";
for (set .@i,0; .@i < $wantedlistlength; set .@i, .@i+1) {
 set .@no, .@i+1;
 mes .@no+".) "+$wantedlist$[.@i]+" Streak: "+$wantedliststreak[.@i];
}
next;
mes "[^4B0082 Wanted List ^000000]";
mes "Happy hunting.";
close;
}


 

Edited by mawjustin
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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