PapaZola Posted March 23, 2013 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
Emistry Posted March 23, 2013 Posted March 23, 2013 OnNPCKillEvent: if( killedrid == 2200 || killedrid == 2201 ){ getitem 607,1; getitem 7539,1; } end; Quote
frenzmu06 Posted March 23, 2013 Posted March 23, 2013 how about when a party kills a mob (ex. boss) every party member will get item "itemID".. Quote
Emistry Posted March 23, 2013 Posted March 23, 2013 getpartymember getcharid(1),2; for( .@i = 0; .@i < $@partymembercount; .@i++ ) getitem 607,1,$@partymemberaid[.@i]; end; Quote
frenzmu06 Posted March 23, 2013 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
frenzmu06 Posted March 31, 2013 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
Euphy Posted March 31, 2013 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
Emistry Posted March 31, 2013 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
Euphy Posted March 31, 2013 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
frenzmu06 Posted March 31, 2013 Posted March 31, 2013 thanks mr.tyranitar & Emistry for always helping @off emistry can you check your Advanced Stylist (read my last post) Quote
Capuche Posted March 31, 2013 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
mrlongshen Posted March 31, 2013 Posted March 31, 2013 wah. if we want to see many mob. so have to write many ? killedrid == 2200 || killedrid == 2201 Quote
Capuche Posted March 31, 2013 Posted March 31, 2013 wah. if we want to see many mob. so have to write many ? killedrid == 2200 || killedrid == 2201 Yes Quote
frenzmu06 Posted April 1, 2013 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
Emistry Posted April 1, 2013 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
Capuche Posted April 1, 2013 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
frenzmu06 Posted April 1, 2013 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
Capuche Posted April 1, 2013 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
frenzmu06 Posted April 1, 2013 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
Capuche Posted April 1, 2013 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
frenzmu06 Posted April 1, 2013 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
Capuche Posted April 1, 2013 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
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
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.