Jump to content
  • 0

Help! Party point distribution


unsiren

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  01/08/12
  • Last Seen:  

System to get points by killing monsters
 
I want to share with all of your party points
 
function	script	get_mobp	{	
	// 몬스터 레벨 가져오기
	set @a,getmonsterinfo(getarg(0),MOB_LV); 

	if (getmonsterinfo(getarg(0),MOB_NAME)=="보물상자"){	message strcharinfo(0),"* 몹 포인트 : 해당 몬스터는 획득 불가 몬스터 입니다.";	end;	}
	
	set @rnd,rand(10,10);

	set @r,@rnd*$@RATE/10;

	set @b,BaseLevel-10;
	
	if (@a>@ {
		// 몬스터 레벨이 더 크면
		if((@a-BaseLevel)<4) {	set @tr,rand(0,2);	set @p,(@a*@r)*@tr;	}
		else { set @p,(@a*@r)*((@a-BaseLevel)/4);	}

		//10만점 제한 x 500점 제한
		if(@p>500) {	set @p,500;	}

	}

	else if(@a<@{
		// 베이스 레벨이 더 크면
		// 차이 정도 채크
		if((@b-@a)>40) {	
			// 레벨차 20 이상 이면 무조건 0 ~ 2
			set @p,rand(0,10)/5;
		}
		else if((@b-@a)>40) {
			// 레벨차 20 이상 이면 무조건 0 ~ 2
			set @p,rand(0,10)/5;
		}
		else if((@b-@a)>40) {
			// 레벨차 20 이상 이면 무조건 0 ~ 2
			set @p,rand(0,10)/5;
		}
		// 차이가 10 이하 이면
		else if((@b-@a)>40) {
			// 레벨차 20 이상 이면 무조건 0 ~ 2
			set @p,rand(0,10)/5;
		}
		else {
			set @p,(@a*@r);
		}

		set @p, @p;
	}

	// 파티 체크하기 ★
	if(getcharid(1) > 0) {
		if(@p > 0) {
			getpartymember(getcharid(1));
			set @MP_PartyCount, $@partymembercount;
			set @p, @p / @MP_PartyCount;
			if(@p < 1) set @p, 1;
		}
	}

	// 지급하기
	set MOBP,MOBP+(@p*$@GRATE);

	set @CL,(@b-@a);
	set @RCL,(BaseLevel-@a);

	if(getgmlevel()>=80){	
		message strcharinfo(0),"* Debug : 몹레벨 - "+@a+" , 레벨차 - "+@CL+" ("+@RCL+") , 확률 : [룰렛]-"+@rnd+" [배율]-"+$@RATE+"배 [결과]-"+(@rnd*$@RATE)+","+(@rnd*$@RATE/10000);
		message strcharinfo(0),"* Debug : 기본 획득 -"+@p+" , 지급배율 - "+$@GRATE+" 최종획득 - "+(@p*$@GRATE)+"점";
	}

	// 유저에게 메시지보이기
	if(@p>0){	message strcharinfo(0),"* 몹 포인트 : "+@p+"점 획득, 현재 총 ["+MOBP+"]점";	}
	
	// 잭팟 호출
	if (@P>0){ 
		// 획득 포인트가 있을때만.
		callfunc "check_jp",(@p*$@GRATE),@a;
	}

	end;
}

 

Edited by unsiren
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...