Jump to content
  • 0

All Party Members Received Items


caspa

Question


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

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
Link to comment
Share on other sites

5 answers 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:  

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
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

maybe you can use this as source reference, http://rathena.org/board/topic/56124-package-getitem-map-itemmap/?hl=itemmap

 

**if you concern to modify your source**

Edited by Cydh
Link to comment
Share on other sites


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

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 ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

thank you............... [ solved ]

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