Jump to content
  • 0

PVP Coins Limit


GM Winter

Question


  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

Goodmorning guys i would to ask how to put limit in this pvp script so it wont be abuse by players 

heres the script:

 

-    script    asdahjhla    -1,{
OnPCKillEvent:
    if ( inarray(.map$, strcharinfo(3)) != -1 ) {
        if ( rand(100) <= .chance && killedrid != getcharid(3) ) {
            getitem 7960, 1;
        }
    }
    end;

OnInit:
    .chance = 100; // chance to get something
    setarray .map$, "pvp_y_1-2"; // map list
}

Thanks in advance 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  68
  • Reputation:   8
  • Joined:  05/12/20
  • Last Seen:  

On 4/15/2021 at 10:11 PM, chadness said:

example i will make the chance 100% sure then they only can get 20 coins per day 

There same ways of doing this. try this
 

-    script    asdahjhla    -1,{
OnPCKillEvent:
	if (countinarray(.map$,strcharinfo(3)) && $pkscore[getcharid(0)] < 21 && rand(100) <= .chance && killedrid != getcharid(3)){
        getitem 7960, 1;
		$pkscore[getcharid(0)]++;
	}
    end;

OnInit:
    .chance = 100; // chance to get something
    setarray .map$, "pvp_y_1-2"; // map list
	end;
OnHour00:
	deletearray($pkscore);
	end;
}

 

Edited by buraquera
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  68
  • Reputation:   8
  • Joined:  05/12/20
  • Last Seen:  

Specify what you want to limit ...?
It may be a delay, or if the dead player is the same as last time ......

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

On 4/16/2021 at 8:11 AM, buraquera said:

Specify what you want to limit ...?
It may be a delay, or if the dead player is the same as last time ......

example i will make the chance 100% sure then they only can get 20 coins per day 

 

On 4/18/2021 at 11:52 PM, buraquera said:

There same ways of doing this. try this
 

-    script    asdahjhla    -1,{
OnPCKillEvent:
	if (countinarray(.map$,strcharinfo(3)) && $pkscore[getcharid(0)] < 21 && rand(100) <= .chance && killedrid != getcharid(3)){
        getitem 7960, 1;
		$pkscore[getcharid(0)]++;
	}
    end;

OnInit:
    .chance = 100; // chance to get something
    setarray .map$, "pvp_y_1-2"; // map list
	end;
OnHour00:
	deletearray($pkscore);
	end;
}

 

thank you i will try it later

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