PewN Posted August 26, 2012 Posted August 26, 2012 Suggestion multiple countitem if(countitem( 23200,23201,23202 ) <= 1){ just like isequippedcnt
malufett Posted August 26, 2012 Posted August 26, 2012 Serves no purpose, I vote no. +1 unless official servers created npc/quest where it requires counting items regardless of type to suffice required amount of items.....
kyeme Posted August 26, 2012 Posted August 26, 2012 il suggest "countitem(<item id>)" for cartlist and storage list
Emistry Posted August 26, 2012 Posted August 26, 2012 il suggest "countitem(<item id>)" for cartlist and storage list instead of using countitem() for cartlist / storage list....i would prefer getcartlist; getstoragelist; just like how this work... getinventorylist; but still doesnt serve much purpose.....would be useless to add as rAthena command here.....
Mystery Posted August 26, 2012 Posted August 26, 2012 Well.. the multiple countitem would be sorta good. It will lessen lines of scripts from creating multiple countitem lines in a script D: or one massive long line of multiple if(countitem asfasf < fasf) || (countitem fnaskfm < fkasfk)) etc. xD
Euphy Posted August 26, 2012 Posted August 26, 2012 ^ That's what arrays and loops are for, silly Mystsrs. Any additional source code would just loop through the arguments anyway. 1
Mystery Posted August 26, 2012 Posted August 26, 2012 ^ That's what arrays and loops are for, silly Mystsrs. Any additional source code would just loop through the arguments anyway. LOL xD Yes Arrays can be used but I'm only thinking for those who aren't so highly skilled :<
PewN Posted August 27, 2012 Author Posted August 27, 2012 Well.. the multiple countitem would be sorta good. It will lessen lines of scripts from creating multiple countitem lines in a script D: or one massive long line of multiple if(countitem asfasf < fasf) || (countitem fnaskfm < fkasfk)) etc. xD yup. it! and so we can do a max deadly combo on charms etc
Emistry Posted August 27, 2012 Posted August 27, 2012 max deadly combo has been discussed alot in both eA and rA both forum also got it's solution.... beside there is several way for doing this...so why do we need a "extra" when the current method work the same... you can just simple create a function in your server with this.. function script CountCombo { for( set .@i,0; .@i < getargcount(); set .@i,.@i + 1 ) if( countitem( getarg(.@i) ) ) set .@found,.@found + countitem( getarg(.@i) ); return .@found; } Dont know why the name CountItem2 didnt work.... maybe it is a keyword that's reserved... in the npc script...just do something like this if( CountCombo( 607,608,609,610,611 ) > 2 ){ overall.... -1 for create another CountItem2 script command .... 1
malufett Posted August 27, 2012 Posted August 27, 2012 Well.. the multiple countitem would be sorta good. It will lessen lines of scripts from creating multiple countitem lines in a script D: or one massive long line of multiple if(countitem asfasf < fasf) || (countitem fnaskfm < fkasfk)) etc. xD but the suggested script command is still not suitable with this kind of situation... for example: I need to count 5 apples and 10 oranges.. so I will use countitem( apples, oranges ) but what if I have 14 oranges and 1 apple?? see kinda useless... but in reality countitem(apples) >= 5 && countitem(oranges) >= 15 however if we will do counteitem(apples,5,oranges,15) but same it not worth it in purpose.. maybe you could suggest like checkitem(apples, oranges) that it will return the overall number of items regardless the individual quantity..just like saying I need apples and oranges that when add it will give me a result of 15..
PewN Posted August 27, 2012 Author Posted August 27, 2012 but for those super high rate server! we are using 2 items . like 5 Poring Coin and 5 TCG Cards 5 Myth Coins
Euphy Posted September 1, 2013 Posted September 1, 2013 It's been over a year with no up-votes. Marking as "rejected".
Recommended Posts