Q1
How and what should I add into this script to make it keep the current and active pet from being shown like in the attached picture?
as you can see in the attached picture there is only Poring Egg and Bapho Jr. Egg in the inventory
but why inside script the menu showing lori ruri which is the currently active pet???
what

Q2
has this >>bonusautoscript<< changed into >> autobonus << ?
https://rathena.org/board/topic/94175-item-script-not-working-something-wrong-help-plz/
How and what should I add into this script to make it keep the current and active pet from being shown like in the attached picture?
as you can see in the attached picture there is only Poring Egg and Bapho Jr. Egg in the inventory
but why inside script the menu showing lori ruri which is the currently active pet???
deletearray(.@PlayerEggList);
getinventorylist();
for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
//for ( .@x = 0; .@x < .@petEggNamesize ; .@x++ ) {
.@x = 0;
.@petEggNamesize = getarraysize(.@petEggName);
while (.@x < .@petEggNamesize) {
.@x++;
if ( @inventorylist_id[.@i] == .@petEggName[.@x] ) {
setarray .@PlayerEggList[getarraysize(.@PlayerEggList)] , .@petEggName[.@x] ;
}
}
}
mes ( "Player has " + ( getarraysize(.@PlayerEggList) - 1 ) + " available egg for trade") ;
// compare is a success
.@menu$ = "+&Sort&Count&Item&Name+&^FF0000Quit^000000:";
.@x = getarraysize(.@PlayerEggList);
for ( .@c = 0; .@c < .@x; .@c = .@c + 1 ) {
if ( .@PlayerEggList != 0 ) {
if ( countitem ( .@PlayerEggList[.@c] ) > 0 ) {
// dispbottom ( " .@c "+ .@c + " .@PlayerEggList " + .@PlayerEggList[.@c] + " "+ getitemname(.@PlayerEggList[.@c]) );
.@menu$ += .@c + " " + countitem(.@PlayerEggList[.@c] ) + " " + getitemname(.@PlayerEggList[.@c]) + " :";
// .@menu$ += .@c + " " + getitemname(.@PlayerEggList[.@c])+ " ( have "+countitem(.@PlayerEggList[.@c] ) + " ) :" ;
}
}
}
.@i = select(.@menu$)-1;
if ( .@i > getarraysize(.@PlayerEggList) ) {
dispbottom ( " Dont mess with bug or I bug you! " ) ;
close2;
end;
}
if ( .@i != 0 ) {
mes (" .@i " + .@i );
.@EggItemId = .@PlayerEggList[.@i];
.@EggCount = countitem(.@PlayerEggList[.@i] );
delitem ( .@EggItemId, .@EggCount ) ;
makepet ( .@EggItemId );
mes ( " Exchanged :: " + .@EggCount + " of " + .@EggItemId ) ;
}
if ( .@i == 0 ) {
mes (" .@i " + .@i );
}
getinventorylist();
for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
//for ( .@x = 0; .@x < .@petEggNamesize ; .@x++ ) {
.@x = 0;
.@petEggNamesize = getarraysize(.@petEggName);
while (.@x < .@petEggNamesize) {
.@x++;
if ( @inventorylist_id[.@i] == .@petEggName[.@x] ) {
setarray .@PlayerEggList[getarraysize(.@PlayerEggList)] , .@petEggName[.@x] ;
}
}
}
mes ( "Player has " + ( getarraysize(.@PlayerEggList) - 1 ) + " available egg for trade") ;
// compare is a success
.@menu$ = "+&Sort&Count&Item&Name+&^FF0000Quit^000000:";
.@x = getarraysize(.@PlayerEggList);
for ( .@c = 0; .@c < .@x; .@c = .@c + 1 ) {
if ( .@PlayerEggList != 0 ) {
if ( countitem ( .@PlayerEggList[.@c] ) > 0 ) {
// dispbottom ( " .@c "+ .@c + " .@PlayerEggList " + .@PlayerEggList[.@c] + " "+ getitemname(.@PlayerEggList[.@c]) );
.@menu$ += .@c + " " + countitem(.@PlayerEggList[.@c] ) + " " + getitemname(.@PlayerEggList[.@c]) + " :";
// .@menu$ += .@c + " " + getitemname(.@PlayerEggList[.@c])+ " ( have "+countitem(.@PlayerEggList[.@c] ) + " ) :" ;
}
}
}
.@i = select(.@menu$)-1;
if ( .@i > getarraysize(.@PlayerEggList) ) {
dispbottom ( " Dont mess with bug or I bug you! " ) ;
close2;
end;
}
if ( .@i != 0 ) {
mes (" .@i " + .@i );
.@EggItemId = .@PlayerEggList[.@i];
.@EggCount = countitem(.@PlayerEggList[.@i] );
delitem ( .@EggItemId, .@EggCount ) ;
makepet ( .@EggItemId );
mes ( " Exchanged :: " + .@EggCount + " of " + .@EggItemId ) ;
}
if ( .@i == 0 ) {
mes (" .@i " + .@i );
}
what

Q2
has this >>bonusautoscript<< changed into >> autobonus << ?
https://rathena.org/board/topic/94175-item-script-not-working-something-wrong-help-plz/
Last edited by a moderator: