Jump to content
  • 0

Cash distribution to obtain a complete monster party members to What should I do?


unsiren

Question


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

Cash distribution to obtain a complete monster party members to What should I do?
 
-	script	GetLevelCash	-1,{
OnNPCKillEvent:
	set @CashChance, 80;
	set @CashMaxLevel, 99;
	set @CashBalance, getmonsterinfo(killedrid,1) - baselevel;
	set @CashRandMax, (@CashMaxLevel * 20) + (@CashBalance * (@CashMaxLevel / 5));
	set @CashChance, (@CashMaxLevel * @CashChance / 50);
	if(rand(@CashRandMax) > @CashChance) end;
	set @CashAmount, rand(0,baselevel+@CashBalance);
	if(@CashAmount <= 3) set @CashAmount, rand(1,3);
	set @CashBonus, rand(1,100);
	
	if(getcharid(1) > 0) {
		if(@CashAmount > 0) {
			getpartymember(getcharid(1));
			set @CP_PartyCount, $@partymembercount;
			set @CashAmount, @CashAmount / @CP_PartyCount;
			if(@CashAmount < 1) set @CashAmount, 1;
		}
	}
	set #CASHPOINTS, #CASHPOINTS + @CashAmount;
	dispbottom "[CASH]  : " + @CashAmount + "	   [Cash : " + #CASHPOINTS + "]";
	specialeffect2 583;
	set @CashChance, 0;
	set @CashMaxLevel, 0;
	set @CashBalance, 0;
	set @CashAmount, 0;
	end;
}

 

Edited by Capuche
Script in [Code]
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Make a loop with $@partymembercount and use attachrid to give the points to the party member

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