Jump to content

Recommended Posts

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

:meow:

Posted

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

Posted

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

Posted

^ That's what arrays and loops are for, silly Mystsrs. Any additional source code would just loop through the arguments anyway.

  • Upvote 1
Posted

^ 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 :<

Posted

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 :D

Posted

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

  • Upvote 1
Posted
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..

:meow:

  • 1 year later...
  • Recently Browsing   0 members

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