Jump to content

Бонус карт


Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   1
  • Joined:  01/13/12
  • Last Seen:  

Подскажите пожалуйста как сделать что-бы работало только определенное количество карт в одной вещи ?

Допустим если вставить 3 танатос карты в одно оружие, то работать будут только 2 ? Напримере данной карты:

4399,Thanatos_Card,Memory of Thanatos Card,6,20,,10,,,,,,,,2,,,,,{ bonus bMaxHPrate,5; bonus bMatkRate,10; bonus bAtkRate,10; bonus bDef,-15; bonus bFlee,-15; },{},{}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  407
  • Reputation:   159
  • Joined:  11/18/11
  • Last Seen:  

Я конечно не проверял, но попробуй... должно работать

// callfunc "GetCardCount",<CARD_ID>;

// Пример, если у игрока в каком либо предмете вставлены 3 карты Танатоса

// и мы хотим ограничиться 2-мя картами, то пишем.

// callfunc "GetCardCount",4399;

// 4399,(...),{ if(callfunc("GetCardCount",4399) < 3) { тут код } },{},{}


function script GetCardCount {

getinventorylist;

for(set .@a,0; .@a < getarraysize(@inventorylist_id); set .@a,.@a+1){
if(@inventorylist_card1[.@a] == getarg(0)) set .@b,.@b+1;
else if(@inventorylist_card2[.@a] == getarg(0)) set .@b,.@b+1;
else if(@inventorylist_card3[.@a] == getarg(0)) set .@b,.@b+1;
else if(@inventorylist_card4[.@a] == getarg(0)) set .@b,.@b+1;
}

deletearray @inventorylist_id[0],getarraysize(@inventorylist_id);
deletearray @inventorylist_amount[0],getarraysize(@inventorylist_amount);
deletearray @inventorylist_equip[0],getarraysize(@inventorylist_equip);
deletearray @inventorylist_refine[0],getarraysize(@inventorylist_refine);
deletearray @inventorylist_identify[0],getarraysize(@inventorylist_identify);
deletearray @inventorylist_attribute[0],getarraysize(@inventorylist_attribute);
deletearray @inventorylist_card1[0],getarraysize(@inventorylist_card1);
deletearray @inventorylist_card2[0],getarraysize(@inventorylist_card2);
deletearray @inventorylist_card3[0],getarraysize(@inventorylist_card3);
deletearray @inventorylist_card4[0],getarraysize(@inventorylist_card4);
deletearray @inventorylist_expire[0],getarraysize(@inventorylist_expire);

return .@b;
}

Edited by Lilith
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   1
  • Joined:  01/13/12
  • Last Seen:  

Нет, работает больше 2-х карт.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  106
  • Reputation:   3
  • Joined:  01/01/12
  • Last Seen:  

В скрипте вещи, первые скобки.

THAN заменить на Айди Танатос Карты к примеру.

  • if (isequipped(THAN)) { bonus bInt,0; }
  • if (isequipped(THAN) ==2) { bonus bInt,-25; }

и т.д.

Edited by Oxxy
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   1
  • Joined:  01/13/12
  • Last Seen:  

[Error]: Loading NPC file: npc/flower/GetCardCount.txt

script error on npc/flower/GetCardCount.txt line 7

parse_simpleexpr: unmatch ')'

2 :

3 : getinventorylist;

4 :

5 : for(set .@a,0; .@a < getarraysize(@inventorylist_id); set .@a,.@a+1){

6 : if (isequipped(4399)) { bonus bAllStats,5; bonus bMaxHPrate,5; bonus bM

atkRate,10; bonus bAtkRate,10; bonus bDef,-15; bonus bFlee,-15; };

* 7 : if(iseequipped'('4399) ==2) { bonus bAllStats,-5; bonus bMaxHPrate,-5;

bonus bMatkRate,-10; bonus bAtkRate,-10; bonus bDef,-15; bonus bFlee,-15; };

8 : if(@inventorylist_card1[.@a] == getarg(0)) set .@b,.@b+1;

9 : else if(@inventorylist_card2[.@a] == getarg(0)) set .@b,.@b+1;

10 : else if(@inventorylist_card3[.@a] == getarg(0)) set .@b,.@b+1;

11 : else if(@inventorylist_card4[.@a] == getarg(0)) set .@b,.@b+1;

12 : }


function script GetCardCount {

getinventorylist;

for(set .@a,0; .@a < getarraysize(@inventorylist_id); set .@a,.@a+1){
if (isequipped(4399)) { bonus bAllStats,5; bonus bMaxHPrate,5; bonus bMatkRate,10; bonus bAtkRate,10; bonus bDef,-15; bonus bFlee,-15; };
if (iseequipped(4399) ==2) { bonus bAllStats,-5; bonus bMaxHPrate,-5; bonus bMatkRate,-10; bonus bAtkRate,-10; bonus bDef,-15; bonus bFlee,-15; };
if(@inventorylist_card1[.@a] == getarg(0)) set .@b,.@b+1;
else if(@inventorylist_card2[.@a] == getarg(0)) set .@b,.@b+1;
else if(@inventorylist_card3[.@a] == getarg(0)) set .@b,.@b+1;
else if(@inventorylist_card4[.@a] == getarg(0)) set .@b,.@b+1;
}

deletearray @inventorylist_id[0],getarraysize(@inventorylist_id);
deletearray @inventorylist_amount[0],getarraysize(@inventorylist_amount);
deletearray @inventorylist_equip[0],getarraysize(@inventorylist_equip);
deletearray @inventorylist_refine[0],getarraysize(@inventorylist_refine);
deletearray @inventorylist_identify[0],getarraysize(@inventorylist_identify);
deletearray @inventorylist_attribute[0],getarraysize(@inventorylist_attribute);
deletearray @inventorylist_card1[0],getarraysize(@inventorylist_card1);
deletearray @inventorylist_card2[0],getarraysize(@inventorylist_card2);
deletearray @inventorylist_card3[0],getarraysize(@inventorylist_card3);
deletearray @inventorylist_card4[0],getarraysize(@inventorylist_card4);
deletearray @inventorylist_expire[0],getarraysize(@inventorylist_expire);

return .@b;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  407
  • Reputation:   159
  • Joined:  11/18/11
  • Last Seen:  

Забудь мой скрипт.

4399,Thanatos_Card,Memory of Thanatos Card,6,20,,10,,,,,,,,2,,,,,{ if(isequippedcnt(4399) < 3) { bonus bMaxHPrate,5; bonus bMatkRate,10; bonus bAtkRate,10; bonus bDef,-15; bonus bFlee,-15; } },{},{}

НО в таком случае если карты 3 и более, то никакой эффект не проявляется...

Вероятно тут нужна модификация исходников.

  • Upvote 3
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   1
  • Joined:  01/13/12
  • Last Seen:  

Спасибо, пусть будет хоть так.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  106
  • Reputation:   3
  • Joined:  01/01/12
  • Last Seen:  

Infarkt, читай внимательнее, я написал в код ВЕЩИ, а не в скрипт.

Link to comment
Share on other sites

  • 5 months later...

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  25
  • Reputation:   2
  • Joined:  12/25/11
  • Last Seen:  

Мое решение: http://rus-ea.ru/for...posts&p=165#165

Сейчас не могу опробовать, но хотел бы узнать, верно или нет :)

Edited by Evil
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  407
  • Reputation:   159
  • Joined:  11/18/11
  • Last Seen:  

Проверил на поринге - работает.

4001,Poring_Card,Poring Card,6,20,,10,,,,,,,,16,,,,,{ d+=1; if( d < 2) { bonus bLuk,2; bonus bFlee2,1; } if (isequippedcnt(4001) == d ) {d = 0;} },{},{}

Хорошая смекалка ;)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  25
  • Reputation:   2
  • Joined:  12/25/11
  • Last Seen:  

Спасибо.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...