PapaZola Posted March 23, 2013 Group: Members Topic Count: 318 Topics Per Day: 0.07 Content Count: 925 Reputation: 33 Joined: 12/05/11 Last Seen: September 20, 2023 Share Posted March 23, 2013 hello how i can make automatic get item on eventory when kill mob example id 2200 & 2201 will get yggdrasil berry & poring coin Quote Link to comment Share on other sites More sharing options...
Emistry Posted March 23, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted March 23, 2013 OnNPCKillEvent: if( killedrid == 2200 || killedrid == 2201 ){ getitem 607,1; getitem 7539,1; } end; Quote Link to comment Share on other sites More sharing options...
PapaZola Posted March 23, 2013 Group: Members Topic Count: 318 Topics Per Day: 0.07 Content Count: 925 Reputation: 33 Joined: 12/05/11 Last Seen: September 20, 2023 Author Share Posted March 23, 2013 thanks emistry Quote Link to comment Share on other sites More sharing options...
frenzmu06 Posted March 23, 2013 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 326 Reputation: 47 Joined: 04/01/12 Last Seen: February 1, 2023 Share Posted March 23, 2013 how about when a party kills a mob (ex. boss) every party member will get item "itemID".. Quote Link to comment Share on other sites More sharing options...
Emistry Posted March 23, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted March 23, 2013 getpartymember getcharid(1),2; for( .@i = 0; .@i < $@partymembercount; .@i++ ) getitem 607,1,$@partymemberaid[.@i]; end; Quote Link to comment Share on other sites More sharing options...
frenzmu06 Posted March 23, 2013 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 326 Reputation: 47 Joined: 04/01/12 Last Seen: February 1, 2023 Share Posted March 23, 2013 - script baklakadung -1,{ OnNPCKillEvent: if( killedrid == 2200 || killedrid == 2201 ){ getpartymember getcharid(1),2; for( .@i = 0; .@i < $@partymembercount; .@i++ ) getitem 607,1,$@partymemberaid[.@i]; } end; } something like this? Quote Link to comment Share on other sites More sharing options...
frenzmu06 Posted March 31, 2013 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 326 Reputation: 47 Joined: 04/01/12 Last Seen: February 1, 2023 Share Posted March 31, 2013 getpartymember getcharid(1),2; for( .@i = 0; .@i < $@partymembercount; .@i++ ) getitem 607,1,$@partymemberaid[.@i]; end; hellow emistry, a little bump from me theres a little problem on the script you gave to me about the party, it gives also items to players which are not on same map as the killed mob, and how can i make it give items only to those who are also alive Quote Link to comment Share on other sites More sharing options...
Euphy Posted March 31, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted March 31, 2013 - script #sample -1,{ OnNPCKillEvent: if (killedrid == 2200 || killedrid == 2201) { set .@map$, strcharinfo(3); getpartymember getcharid(1),2; for (set .@i,0; .@i<$@partymembercount; set .@i,.@i+1) { if (attachrid($@partymemberaid[.@i])) { if (strcharinfo(3) == .@map$ && Hp > 0) getitem 607,1; detachrid; } } } end; } 1 Quote Link to comment Share on other sites More sharing options...
Emistry Posted March 31, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted March 31, 2013 like this will do too.. getpartymember getcharid(1); for( .@i = 0; .@i < $@partymembercount; .@i++ ){ getmapxy( .@map$,.@x,.@y,$@partymembername$[.@i],0 ); if( .@map$ == "map" ){ getitem 607,1,getcharid( 3,$@partymembername$[.@i] ); } } end; Quote Link to comment Share on other sites More sharing options...
Euphy Posted March 31, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted March 31, 2013 @Emistry: There's no way to check if a player is alive without attaching their RID. and how can i make it give items only to those who are also alive Quote Link to comment Share on other sites More sharing options...
frenzmu06 Posted March 31, 2013 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 326 Reputation: 47 Joined: 04/01/12 Last Seen: February 1, 2023 Share Posted March 31, 2013 thanks mr.tyranitar & Emistry for always helping @off emistry can you check your Advanced Stylist (read my last post) Quote Link to comment Share on other sites More sharing options...
Capuche Posted March 31, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted March 31, 2013 @Euphy Your script doesn't prevent multi char with the same account in the party - script #sample -1,{ OnNPCKillEvent: if (killedrid == 2200 || killedrid == 2201) { set .@map$, strcharinfo(3); getpartymember getcharid(1),1; getpartymember getcharid(1),2; for (set .@i,0; .@i<$@partymembercount; set .@i,.@i+1) { if ( isloggedin( $@partymemberaid[.@i],$@partymembercid[.@i] ) ) { attachrid($@partymemberaid[.@i]); if (strcharinfo(3) == .@map$ && Hp > 0) getitem 607,1; detachrid; } } } end; } 1 Quote Link to comment Share on other sites More sharing options...
mrlongshen Posted March 31, 2013 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Share Posted March 31, 2013 wah. if we want to see many mob. so have to write many ? killedrid == 2200 || killedrid == 2201 Quote Link to comment Share on other sites More sharing options...
Capuche Posted March 31, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted March 31, 2013 wah. if we want to see many mob. so have to write many ? killedrid == 2200 || killedrid == 2201 Yes Quote Link to comment Share on other sites More sharing options...
frenzmu06 Posted April 1, 2013 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 326 Reputation: 47 Joined: 04/01/12 Last Seen: February 1, 2023 Share Posted April 1, 2013 @Euphy Your script doesn't prevent multi char with the same account in the party nice one, very keen, that would be very much abused if not checked any potential for this being on the custom script or event script? simple but usefu Quote Link to comment Share on other sites More sharing options...
Emistry Posted April 1, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted April 1, 2013 @Euphy Your script doesn't prevent multi char with the same account in the party i dont think this is needed....it's impossible for you to login 2 characters within the same account at the same times. so, i believe this part can be skipped. wah. if we want to see many mob. so have to write many ? killedrid == 2200 || killedrid == 2201 you can set an array for it. like this http://pastebin.com/raw.php?i=buDg5PJY Quote Link to comment Share on other sites More sharing options...
Capuche Posted April 1, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted April 1, 2013 @Euphy Your script doesn't prevent multi char with the same account in the party i dont think this is needed....it's impossible for you to login 2 characters within the same account at the same times. so, i believe this part can be skipped. It's possible to invite 2 characters of the same account in the same party, sure both of them can't be online at the same time So the script attachrid the same account id twice Quote Link to comment Share on other sites More sharing options...
frenzmu06 Posted April 1, 2013 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 326 Reputation: 47 Joined: 04/01/12 Last Seen: February 1, 2023 Share Posted April 1, 2013 @Euphy Your script doesn't prevent multi char with the same account in the party i dont think this is needed....it's impossible for you to login 2 characters within the same account at the same times. so, i believe this part can be skipped. did i read/get it wrong? i thought Capuche's additional check prevents dual client users from getting more than one item (like single pc, with 2 different account ofcourse playing on same party will only get 1 item) . Quote Link to comment Share on other sites More sharing options...
Capuche Posted April 1, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted April 1, 2013 did i read/get it wrong? i thought Capuche's additional check prevents dual client users from getting more than one item (like single pc, with 2 different account ofcourse playing on same party will only get 1 item) You get wrong. It doesn't prevent dual client, it prevents multi char from the same account in the same party to get multi items Quote Link to comment Share on other sites More sharing options...
frenzmu06 Posted April 1, 2013 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 326 Reputation: 47 Joined: 04/01/12 Last Seen: February 1, 2023 Share Posted April 1, 2013 so checks in acquiring item are now like this? 1. if mob is in the list 2. if the player is on same map as the killed monster 3. if hp>0 (alive) 4. if 2 or more chars (single account) is on same party - prevent from getting two or more items can we add one more check like this? if 2 or more chars/account (single pc) on same party - prevent getting more that one item (priority is the 1st invited) Quote Link to comment Share on other sites More sharing options...
Capuche Posted April 1, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted April 1, 2013 - script #sample -1,{ OnNPCKillEvent: if (killedrid == 2200 || killedrid == 2201) { set .@map$, strcharinfo(3); getpartymember getcharid(1),2; for (set .@i,0; .@i<$@partymembercount; set .@i,.@i+1) { if ( attachrid($@partymemberaid[.@i]) && !compare( .@ip$,getcharip( $@partymemberaid[.@i] ) ) ) { .@ip$ = .@ip$ +"|"+ getcharip();// !! config 15 players max in the party if (strcharinfo(3) == .@map$ && Hp > 0) getitem 607,1; detachrid; } } } end; } + prevent dual account from getting more than 1 item Quote Link to comment Share on other sites More sharing options...
frenzmu06 Posted April 1, 2013 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 326 Reputation: 47 Joined: 04/01/12 Last Seen: February 1, 2023 Share Posted April 1, 2013 - script #sample -1,{ OnNPCKillEvent: if (killedrid == 2200 || killedrid == 2201) { set .@map$, strcharinfo(3); getpartymember getcharid(1),2; for (set .@i,0; .@i<$@partymembercount; set .@i,.@i+1) { if ( attachrid($@partymemberaid[.@i]) && !compare( .@ip$,getcharip( $@partymemberaid[.@i] ) ) ) { .@ip$ = .@ip$ +"|"+ getcharip();// !! config 15 players max in the party if (strcharinfo(3) == .@map$ && Hp > 0) getitem 607,1; detachrid; } } } end; } + prevent dual account from getting more than 1 item last question, so it's ip check? how about if my players are playing on a net cafe (ex: 10 players), only one of them get an item? i only want to prevent dual client users from one single pc to get more than one item. thanks Capuche Quote Link to comment Share on other sites More sharing options...
Capuche Posted April 1, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted April 1, 2013 last question, so it's ip check? how about if my players are playing on a net cafe (ex: 10 players), only one of them get an item? Yes only one of them get an item if they have the same ip i only want to prevent dual client users from one single pc to get more than one item. Sorry I don't know other way than check the ip to prevent dual client with script commands Quote Link to comment Share on other sites More sharing options...
Question
PapaZola
hello how i can make automatic get item on eventory when kill mob example id 2200 & 2201
will get yggdrasil berry & poring coin
Link to comment
Share on other sites
22 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.