Jump to content
  • 0

All Party Members Received Items


Question

Posted (edited)

i'd like to have a script where if i kill a poring  all the user in that party (must be on the map where the poring was summoned) will recieve a bronze coin and will also receieve a gold coin but for about 10% chance

so basically its like if i keep killing the poring monster there will be a 10% chance that all the user in the party will get the gold coin eventually.....

Edited by caspa

5 answers to this question

Recommended Posts

Posted (edited)

Okay

-	script	hjkl	-1,{
OnMobDead:
	if( getcharid(1) ) {
		getpartymember( getcharid(1),2 );
		getpartymember( getcharid(1),1 );
		.@map_killer$ = strcharinfo(3);
		.@chance = rand(10);
		for( .@i = 0; .@i < $@partymembercount; .@i++ )
			if( isloggedin( $@partymemberaid[ .@i ],$@partymembercid[ .@i ] ) )
				if( !getmapxy( .@map$, .@x, .@y, 0, rid2name( $@partymemberaid[ .@i ] ) ) && .@map$ == .@map_killer$ ) {
					getitem 501, 1, $@partymemberaid[ .@i ];// put ID bronze coin instead of 501
					if( !.@chance )
						getitem 502, 1, $@partymemberaid[ .@i ];// put ID gold coin
				}
	}
	end;
}

This way the poring must be summon with an NPC

*monster     "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>,"hjkl::OnMobDead";

 

EDIT: it should work with source modifications, sure ;)

Edited by Capuche
Posted

10% chance that all the user in the party will get the gold coin

10% for each player in the party ?

 

Example:

5 players in the party, all player have 10% chance to gain 1 gold coin so the party have 50% chance to gain 1 gold coin or

just 10% chance to gain for the party ?

Posted (edited)

yes........ 10% chance for the whole party....

 

 

 

P 1 -- Killed the poring 

P 2

P 3

P 4

P 5 

p 1 get 1 bronze

p 2 get 1 bronze

p 3 get 1 bronze

p 4 get 1 bronze

p 5 get 1 bronze

then after 10 poring kills

 

the 10% chance occur

 

 

p 1 get 1 bronze & 1 gold coin

p 2 get 1 bronze & 1 gold coin

p 3 get 1 bronze & 1 gold coin

p 4 get 1 bronze & 1 gold coin

p 5 get 1 bronze & 1 gold coin



10% chance that all the user in the party will get the gold coin

10% for each player in the party ?

 

Example:

5 players in the party, all player have 10% chance to gain 1 gold coin so the party have 50% chance to gain 1 gold coin or

just 10% chance to gain for the party ?

Edited by caspa

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...