Jump to content
  • 0
Sign in to follow this  
utofaery

H>how to I keep this active pet from getting listed??

Question

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

Spoiler


                    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 ); 
                    }

 

 

what

Error.png

 

 

Q2

has this  >>bonusautoscript<<  changed into >> autobonus << ?

https://rathena.org/board/topic/94175-item-script-not-working-something-wrong-help-plz/

Edited by utofaery

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

https://rathena.org/board/topic/91000-make-this-query-check-on-1000-pet-intimacy/?do=findComment&comment=237899

my last pet evolution script, ask the player to return their pet into egg state to continue

or you can use getpetinfo(1) and remove the one you are currently owning

Spoiler

function	script	MobID2PetID	{
	switch ( getarg(0) ) {
		case PORING: return Poring_Egg;
		case DROPS: return Drops_Egg;
		case POPORING: return Poporing_Egg;
		case LUNATIC: return Lunatic_Egg;
		case PICKY: return Picky_Egg;
		case CHONCHON: return Chonchon_Egg;
		case STEEL_CHONCHON: return Steel_Chonchon_Egg;
		case HUNTER_FLY: return Hunter_Fly_Egg;
		case SAVAGE_BABE: return Savage_Bebe_Egg;
		case DESERT_WOLF_B: return Baby_Desert_Wolf_Egg;
		case ROCKER: return Rocker_Egg;
		case SPORE: return Spore_Egg;
		case POISON_SPORE: return Poison_Spore_Egg;
		case PECOPECO: return PecoPeco_Egg;
		case SMOKIE: return Smokie_Egg;
		case YOYO: return Yoyo_Egg;
		case ORK_WARRIOR: return Orc_Warrior_Egg;
		case MUNAK: return Munak_Egg;
		case DOKEBI: return Dokkaebi_Egg;
		case SOHEE: return Sohee_Egg;
		case ISIS: return Isis_Egg;
		case PETIT: return Green_Petite_Egg;
		case DEVIRUCHI: return Deviruchi_Egg;
//		case BAPHOMET_: return Bapho_Jr._Egg;
		case BON_GUN: return Bongun_Egg;
		case ZHERLTHSH: return Zherlthsh_Egg;
		case ALICE: return Alice_Egg;
		case EVENT_RICECAKE: return Rice_Cake_Egg;
		case GOBLINE_XMAS: return Santa_Goblin_Egg;
		case CHUNG_E: return Chung_E_Egg;
		case ECLIPSE_P: return Spring_Rabbit_Egg;
		case GOBLIN_1: return Knife_Goblin_Egg;
		case GOBLIN_2: return Flail_Goblin_Egg;
		case GOBLIN_4: return Hammer_Goblin_Egg;
		case DELETER_: return Red_Deleter_Egg;
		case DIABOLIC: return Diabolic_Egg;
		case WANDER_MAN: return Wanderer_Egg;
		case P_CHUNG_E: return New_Year_Doll_Egg;
		case GOLEM: return Golem_Egg;
		case MARIONETTE: return Marionette_Egg;
		case MEDUSA: return Medusa_Egg;
		case WHISPER: return Whisper_Egg;
		case GOBLIN_LEADER: return Goblin_Leader_Egg;
		case SUCCUBUS: return Succubus_Egg;
		case INCUBUS: return Incubus_Egg;
		case NIGHTMARE_TERROR: return Nightmare_Terror_Egg;
		case SHINOBI: return Shinobi_Egg;
		case MIYABI_NINGYO: return Miyabi_Ningyo_Egg;
		case WICKED_NYMPH: return Wicked_Nymph_Egg;
		case STONE_SHOOTER: return Stone_Shooter_Egg;
		case DULLAHAN: return Dullahan_Egg;
		case LOLI_RURI: return Loli_Ruri_Egg;
		case CIVIL_SERVANT: return Civil_Servant_Egg;
		case LEAF_CAT: return Leaf_Cat_Egg;
		case BACSOJIN_: return Bacsojin_Egg;
		case IMP: return Imp_Egg;
//		case E_CRAMP: return Mystic_Leaf_Cat_Ball; ?????
//		case E_HYDRA: return Mystic_Leaf_Cat_Ball; ?????
//		case LITTLE_PORING: return Novice_Poring_Egg;
	}
}

outdated, I made this very long time ago and needs update

 

Q2, yes

Share this post


Link to post
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
Answer this question...

×   Pasted as rich text.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.