Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 Help
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 01.07.2009, 11:54   #1
Renobizarro
Guest
 
Posts: n/a
Default another ai question

i have some items in this way:


item1

item2

item3

item4

item5

itemN+1


so... i wanna made a "For" to not made a IF for each item


i mean...


for( i1 = 1; i1 <= 50; i1++ )

{

if(myself::OwnItemCount(talker, @item+i1 ) > 0)

{do something}

}


instead to do:


if(myself::OwnItemCount(talker, @item1 ) > 0)

{do something}

elseif(myself::OwnItemCount(talker, @item2 ) > 0)

{do something}

elseif(myself::OwnItemCount(talker, @item3 ) > 0)

{do something}

elseif(myself::OwnItemCount(talker, @item4 ) > 0)

{do something}

elseif(myself::OwnItemCount(talker, @item5 ) > 0)

{do something}

elseif(myself::OwnItemCount(talker, @item6 ) > 0)

{do something}

else

{do something else....}


got it? how to do that?


i have no server to test for now... and i don't wanna made mistakes...

Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 07-01-2009, 11:54 AM. Открыть источник.
 
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:32.