Jump to content
  • 0

can i request script evolution pet?


kangfredy

Question


  • Group:  Members
  • Topic Count:  112
  • Topics Per Day:  0.03
  • Content Count:  388
  • Reputation:   4
  • Joined:  05/01/12
  • Last Seen:  

hello :) excuse me..i have some idea in Ragnarok.

can u help me to make npc for like my idea??

request_zps57bbf85a.jpg

- firstly i want to make pet egg :v wkwkwkwk..

- and then in in this npc (if level 150) need item and random get next egg. :)

-and again :) until ultimate pet.

can you help me to make npc like this?and by the way..in Ragnarok enable to make pet can leveling??

:bump:

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  77
  • Reputation:   3
  • Joined:  06/06/13
  • Last Seen:  

I'm using Annie's pet evolution script. However, after I have lvl 99 poring and Loyal intimacy, the NPC does not detect it as a pet that pass the evolving requirement. It seems that the sql query does not read by the npc?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

update this script

http://www.eathena.ws/board/index.php?showtopic=243843

prontera,159,178,5    script    ksjdfskf3    100,{
   if ( petstat(PET_CLASS) ) {
       mes "please return your pet into egg state to continue";
       close;
   }
   mes "select a choice";
   next;
   select "pick an egg", "list all eggs in your inventory", "list all friendly pets in your inventory";
   if ( @menu == 1 ) {
       .@s = select( .menu$ ) -1;
       makepet .pet_id[.@s];
       mes "you just got "+ getitemname( 9001 + .@s );
       close;
   }
   else if ( @menu == 2 ) {
       getinventorylist;
       for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
           if ( @inventorylist_card1[.@i] == -256 ) {
               dispbottom " ============= ";
               dispbottom "Pet ID : "+( .@id = @inventorylist_card2[.@i] + ( ( @inventorylist_card2[.@i] >= 0 )? 0 : 1 << 16 ) + @inventorylist_card3[.@i] * ( 1 << 16 ) ); // formula to calculate the pet ID that has inside in your inventory
               dispbottom "Pet egg : "+ getitemname( @inventorylist_id[.@i] );
               query_sql "select class, level, equip from pet where pet_id = "+ .@id, .@class, .@level, .@equipped;
               dispbottom "Pet class : "+ getmonsterinfo( .@class, 0 );
               dispbottom "Pet level : "+ .@level;
               dispbottom "Pet equipped : "+( ( .@equipped )? "Yes" : "No" );
           }
       }
   }
   else if ( @menu == 3 ) {
       .@nb = query_sql( "select pet_id, egg_id, class, level, equip from pet where char_id = "+ getcharid(0), .@pet_id, .@egg_id, .@class, .@level, .@equipped );
       for ( .@i = 0; .@i < .@nb; .@i++ ) {
           if ( countitem2( .@egg_id, 1, 0, 0, -256, ( ( .@pet_id % ( 1 << 16 ) - ( .@remainder15 = .@pet_id % ( 1 << 15 ) ) < ( 1 << 15 ) )? .@remainder15 : ( .@remainder15 - ( 1 << 15 ) ) ), .@pet_id >> 16, 0 ) ) { // reversing the formula of pet ID from your inventory
               dispbottom " ============= ";
               dispbottom "Pet ID : "+ .@pet_id[.@i];
               dispbottom "Pet egg : "+ getitemname( .@egg_id[.@i] );
               dispbottom "Pet class : "+ getmonsterinfo( .@class[.@i], 0 );
               dispbottom "Pet level : "+ .@level[.@i];
               dispbottom "Pet equipped : "+( ( .@equipped[.@i] )? "Yes" : "No" );
           }
       }        
   }
   close;
OnInit:
   setarray .pet_id, 1002, 1113, 1031, 1063, 1049, 1011, 1042, 1035, 1167, 1107, 1052, 1014, 1077, 1019, 1056, 1057, 1023, 1026, 1110, 1170, 1029, 1155, 1109, 1101, 1188, 1200, 1275, 1815, 1245; // copy from pet_db.txt
   while ( .pet_id[.@i] ) {
       .pet_name$[.@i] = getmonsterinfo( .pet_id[.@i], 0 );
       .@i++;
   }
   .menu$ = implode( .pet_name$, ":" );
   end;
}

one hell crazy script, don't feel like expanding anymore at the moment

try figure out yourself 1st

the point here is, after list out every eggs in your inventory,

talk to this npc, and create a menu list with those eggs that has reached level150 ( can retrieve by query_sql )

and exchange it with another egg

Edited by AnnieRuru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  112
  • Topics Per Day:  0.03
  • Content Count:  388
  • Reputation:   4
  • Joined:  05/01/12
  • Last Seen:  

tq AnnieRUru... i think it's crazy script...>.<

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

after I rethink again, I don't think you can make this kind of script

so I did it then ...

prontera,156,178,5	script	ldfhsdfkljs	100,{
if ( petstat(PET_CLASS) ) {
	mes "please return your pet into egg state to continue";
	close;
}
getinventorylist;
for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
	if ( @inventorylist_card1[.@i] == -256 ) {
		query_sql "select class, level, equip, name from pet where pet_id = "+( .@id = @inventorylist_card2[.@i] + ( ( @inventorylist_card2[.@i] >= 0 )? 0 : 1 << 16 ) + @inventorylist_card3[.@i] * ( 1 << 16 ) ), .@class, .@level, .@equipped, .@name$;
		.@menu$ = .@menu$ +"^0000FF"+ .@name$ +" ^00CC00{"+ getmonsterinfo( .@class, 0 ) +"} ^000000["+ .@level +"] ^FF0000"+( ( .@equipped )? "*equipped" : "" )+":";
		.@pet_id[.@c] = .@id;
		.@egg_id[.@c] = @inventorylist_id[.@i];
		.@pet_name$[.@c] = .@name$;
		.@pet_class[.@c] = .@class;
		.@pet_level[.@c] = .@level;
		.@pet_equipped[.@c] = .@equipped;
		.@c++;
	}
}
if ( !.@c ) {
	mes "your inventory doesn't have any pet egg";
	close;
}
mes "select which pet that you want it to evolve";
next;
.@s = select( .@menu$ ) -1;
mes "selected : "+ .@pet_name$[.@s];
mes "level : "+ .@pet_level[.@s];
mes "equipped : "+( ( .@pet_equipped[.@s] )? "Yes" : "No" );
next;
if ( .@pet_level[.@s] < .min_level ) {
	mes "this pet doesn't meet the level requirement";
	close;
}
if ( .@pet_equipped[.@s] ) {
	mes "please unequip this pet accesory to continue";
	close;
}
if ( !getd( ".pet"+ .@pet_class[.@s] ) ) {
	mes "this pet cannot evolve any further";
	close;
}
delitem2 .@egg_id[.@s], 1, 1, 0, 0, -256, ( .@pet_id[.@s] % ( 1 << 16 ) - ( .@remainder15 = .@pet_id[.@s] % ( 1 << 15 ) ) < ( 1 << 15 ) )? .@remainder15 : ( .@remainder15 - ( 1 << 15 ) ), .@pet_id[.@s] >> 16, 0;
makepet .@get_pet_id = getd( ".pet"+ .@pet_class[.@s] +"["+ rand( getarraysize( getd( ".pet"+ .@pet_class[.@s] ) ) ) +"]" );
mes "your "+ .@pet_name$[.@c] +" has reborn into "+ getmonsterinfo( .@get_pet_id, 0 );
mes "please rename your pet ~";
close;
OnInit:
.min_level = 80; // minimum level 80 to change pet egg

setarray getd( ".pet"+ 1002 ), 1113, 1031; // poring can evolve into drops or poporing
setarray getd( ".pet"+ 1011 ), 1042; // chonchon can evolve into steel chonchon
// add more as needed
end;
}

well, I supposed can mark this as solved

btw you can play around with \conf\battle\pet.conf

// Pet leveling system. Use 0 to disable (default).

// When enabled, a pet's level is a fixed % of the master's. (Note 2)

// If 200%, pet has double level, if 50% pet has half your level, etc.

pet_lv_rate: 100

just like this is enough I guess
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  112
  • Topics Per Day:  0.03
  • Content Count:  388
  • Reputation:   4
  • Joined:  05/01/12
  • Last Seen:  

but AnnieRu where i can config item to change pet?

i just see config evolution pet.

setarray getd( ".pet"+ 1002 ), 1113, 1031; // poring can evolve into drops or poporing setarray getd( ".pet"+ 1011 ), 1042; // chonchon can evolve into steel chonchon
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

    setarray getd( ".pet"+ 1002 ), 1113, 1031; // poring can evolve into drops or poporing
   setarray getd( ".pet"+ 1011 ), 1042; // chonchon can evolve into steel chonchon
   // add more as needed

this is the part to change pet :ani_swt3:

if you want to add more, like desert wolf babe can change into baphomet jr. or deviruchi

    setarray getd( ".pet"+ 1107 ), 1101, 1109;

read your \db\pet_db.txt ...

// [b]MobID[/b],Name,JName,LureID,[b]EggID[/b]
1002,PORING,Poring,619,9001, ...
1113,DROPS,Drops,620,9002, ...
1031,POPORING,Poporing,621,9003, ...
1063,LUNATIC,Lunatic,622,9004, ...
1049,PICKY,Picky,623,9005, ...
1011,CHONCHON,ChonChon,624,9006, ...
1042,STEEL_CHONCHON,Steel ChonChon,625,9007, ...
1035,HUNTER_FLY,Hunter Fly,626,9008, ...
1167,SAVAGE_BABE,Savage Babe,627,9009, ...
1107,DESERT_WOLF_B,Baby Desert Wolf,628,9010, ...
1052,ROCKER,Rocker,629,9011, ...
1014,SPORE,Spore,630,9012, ...
1077,POISON_SPORE,Poison Spore,631,9013, ...
1019,PECOPECO,PecoPeco,632,9014, ...
1056,SMOKIE,Smokie,633,9015, ...
1057,YOYO,Yoyo,634,9016, ...
1023,ORK_WARRIOR,Orc Warrior,635,9017, ...
1026,MUNAK,Munak,636,9018, ...
1110,DOKEBI,Dokebi,637,9019, ...
1170,SOHEE,Sohee,638,9020, ...
1029,ISIS,Isis,639,9021, ...
1155,PETIT,Petite,640,9022, ...
1109,DEVIRUCHI,Deviruchi,641,9023, ...
1101,BAPHOMET_,Baphomet Jr.,642,9024, ...
1188,BON_GUN,Bon Gun,659,9025, ...
1200,ZHERLTHSH,Zealotus,660,9026, ...
1275,ALICE,Alice,661,9027, ...
1815,EVENT_RICECAKE,Rice Cake,0,9028, ...
1245,GOBLINE_XMAS,Christmas Goblin,12225,9029, ...

I use mob ID instead of egg ID

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  112
  • Topics Per Day:  0.03
  • Content Count:  388
  • Reputation:   4
  • Joined:  05/01/12
  • Last Seen:  

no AnnieRu >.<

like this

http://imageshack.us.../782wr.jpg/sr=1

post-4328-0-47145500-1357926078_thumb.jpg

nah where's i can get seting item for evolution pet? /ok

but tq for all.. /no1 need for development

Edited by kangfredy
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

oh you mean need another item to make

poring egg + { 1 item } --> drops egg / poporing egg

try this

prontera,156,178,5    script    ldfhsdfkljs    100,{
   if ( petstat(PET_CLASS) ) {
       mes "please return your pet into egg state to continue";
       close;
   }
   getinventorylist;
   for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
       if ( @inventorylist_card1[.@i] == -256 ) {
           query_sql "select class, level, equip, name from pet where pet_id = "+( .@id = @inventorylist_card2[.@i] + ( ( @inventorylist_card2[.@i] >= 0 )? 0 : 1 << 16 ) + @inventorylist_card3[.@i] * ( 1 << 16 ) ), .@class, .@level, .@equipped, .@name$;
           .@menu$ = .@menu$ +"^0000FF"+ .@name$ +" ^00CC00{"+ getmonsterinfo( .@class, 0 ) +"} ^000000["+ .@level +"] ^FF0000"+( ( .@equipped )? "*equipped" : "" )+":";
           .@pet_id[.@c] = .@id;
           .@egg_id[.@c] = @inventorylist_id[.@i];
           .@pet_name$[.@c] = .@name$;
           .@pet_class[.@c] = .@class;
           .@pet_level[.@c] = .@level;
           .@pet_equipped[.@c] = .@equipped;
           .@c++;
       }
   }
   if ( !.@c ) {
       mes "your inventory doesn't have any pet egg";
       close;
   }
   mes "select which pet that you want it to evolve";
   next;
   .@s = select( .@menu$ ) -1;
   mes "selected : "+ .@pet_name$[.@s];
   mes "level : "+ .@pet_level[.@s];
   mes "equipped : "+( ( .@pet_equipped[.@s] )? "Yes" : "No" );
   if ( getd( ".pet"+ .@pet_class[.@s] ) )
       mes "require : "+ getitemname( getd( ".pet"+ .@pet_class[.@s] ) );
   next;
   if ( !getd( ".pet"+ .@pet_class[.@s] ) ) {
       mes "this pet cannot evolve any further";
       close;
   }
   if ( .@pet_level[.@s] < .min_level ) {
       mes "this pet doesn't meet the level requirement";
       close;
   }
   if ( .@pet_equipped[.@s] ) {
       mes "please unequip this pet accesory to continue";
       close;
   }
   if ( !countitem( getd( ".pet"+ .@pet_class[.@s] ) ) ) {
       mes "you need "+ getitemname( getd( ".pet"+ .@pet_class[.@s] ) ) +" to evolve this pet";
       close;
   }
   delitem  getd( ".pet"+ .@pet_class[.@s] ), 1;
   delitem2 .@egg_id[.@s], 1, 1, 0, 0, -256, ( .@pet_id[.@s] % ( 1 << 16 ) - ( .@remainder15 = .@pet_id[.@s] % ( 1 << 15 ) ) < ( 1 << 15 ) )? .@remainder15 : ( .@remainder15 - ( 1 << 15 ) ), .@pet_id[.@s] >> 16, 0;
   makepet .@get_pet_id = getd( ".pet"+ .@pet_class[.@s] +"["+ rand( 1, getarraysize( getd( ".pet"+ .@pet_class[.@s] ) ) -1 ) +"]" );
   mes "your "+ .@pet_name$[.@c] +" has reborn into "+ getmonsterinfo( .@get_pet_id, 0 );
   mes "please rename your pet ~";
   close;
OnInit:
   .min_level = 80; // minimum level 80 to change pet egg

   //    array getd( ... + <require pet egg> ), <require item>, <random pet egg 1>, <random pet egg 2> ....
   setarray getd( ".pet"+ 1002 ), 501, 1113, 1031; // poring pet(1002) with red pot(501) can evolve into drops(1113) or poporing(1031)
   setarray getd( ".pet"+ 1011 ), 502, 1042; // chonchon(1011) with orange pot(502) can evolve into steel chonchon(1042)
   // add more as needed
   end;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  112
  • Topics Per Day:  0.03
  • Content Count:  388
  • Reputation:   4
  • Joined:  05/01/12
  • Last Seen:  

tq annie.. :) but just one item?

// array getd( ... + <require pet egg> ), <require item>, <random pet egg 1>, <random pet egg 2> ....

Edited by kangfredy
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

you have started to test my patience <.<

next time better explain as detailed as possible in your 1st post

prontera,156,178,5	script	ldfhsdfkljs	100,{
if ( petstat(PET_CLASS) ) {
	mes "please return your pet into egg state to continue";
	close;
}
getinventorylist;
for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
	if ( @inventorylist_card1[.@i] == -256 ) {
		query_sql "select class, level, equip, name from pet where pet_id = "+( .@id = @inventorylist_card2[.@i] + ( ( @inventorylist_card2[.@i] >= 0 )? 0 : 1 << 16 ) + @inventorylist_card3[.@i] * ( 1 << 16 ) ), .@class, .@level, .@equipped, .@name$;
		.@menu$ = .@menu$ +"^0000FF"+ .@name$ +" ^00CC00{"+ getmonsterinfo( .@class, 0 ) +"} ^000000["+ .@level +"] ^FF0000"+( ( .@equipped )? "*equipped" : "" )+":";
		.@pet_id[.@c] = .@id;
		.@egg_id[.@c] = @inventorylist_id[.@i];
		.@pet_name$[.@c] = .@name$;
		.@pet_class[.@c] = .@class;
		.@pet_level[.@c] = .@level;
		.@pet_equipped[.@c] = .@equipped;
		.@c++;
	}
}
if ( !.@c ) {
	mes "your inventory doesn't have any pet egg";
	close;
}
mes "select which pet that you want it to evolve";
next;
.@s = select( .@menu$ ) -1;
mes "selected : "+ .@pet_name$[.@s];
mes "level : "+ .@pet_level[.@s];
mes "equipped : "+( ( .@pet_equipped[.@s] )? "Yes" : "No" );
if ( getd( ".petr"+ .@pet_class[.@s] ) ) {
	mes "require :-";
	.@size = getarraysize( getd( ".petr"+ .@pet_class[.@s] ) );
	for ( .@i = 0; .@i < .@size; .@i += 2 )
		mes getd( ".petr"+ .@pet_class[.@s] +"["+( .@i +1 )+"]" )+"x "+ getitemname( getd( ".petr"+ .@pet_class[.@s] +"["+ .@i +"]" ) );
}
next;
if ( !getd( ".pet"+ .@pet_class[.@s] ) ) {
	mes "this pet cannot evolve any further";
	close;
}
if ( .@pet_level[.@s] < .min_level ) {
	mes "this pet doesn't meet the level requirement";
	close;
}
if ( .@pet_equipped[.@s] ) {
	mes "please unequip this pet accesory to continue";
	close;
}
if ( getd( ".petr"+ .@pet_class[.@s] ) ) {
	.@size = getarraysize( getd( ".petr"+ .@pet_class[.@s] ) );
	for ( .@i = 0; .@i < .@size; .@i += 2 ) {
		if ( countitem( getd( ".petr"+ .@pet_class[.@s] +"["+ .@i +"]" ) ) < getd( ".petr"+ .@pet_class[.@s] +"["+( .@i +1 )+"]" ) ) {
			mes "you need "+ getd( ".petr"+ .@pet_class[.@s] +"["+( .@i +1 )+"]" ) +"x "+ getitemname( getd( ".petr"+ .@pet_class[.@s] +"["+ .@i +"]" ) ) +" to evolve this pet";
			close;
		}
	}
	for ( .@i = 0; .@i < .@size; .@i += 2 )
		delitem getd( ".petr"+ .@pet_class[.@s] +"["+ .@i +"]" ), getd( ".petr"+ .@pet_class[.@s] +"["+( .@i +1 )+"]" );
}
delitem2 .@egg_id[.@s], 1, 1, 0, 0, -256, ( .@pet_id[.@s] % ( 1 << 16 ) - ( .@remainder15 = .@pet_id[.@s] % ( 1 << 15 ) ) < ( 1 << 15 ) )? .@remainder15 : ( .@remainder15 - ( 1 << 15 ) ), .@pet_id[.@s] >> 16, 0;
makepet .@get_pet_id = getd( ".pet"+ .@pet_class[.@s] +"["+ rand( getarraysize( getd( ".pet"+ .@pet_class[.@s] ) ) ) +"]" );
mes "your "+ .@pet_name$[.@c] +" has reborn into "+ getmonsterinfo( .@get_pet_id, 0 );
mes "please rename your pet ~";
close;
OnInit:
.min_level = 80; // minimum level 80 to change pet egg
//	setarray getd( ".petr"+ <require pet egg> ), <require itemID 1>, <require item require 1>, <require itemID 2>, <require item require 2>, ...
setarray getd( ".petr"+ 1002 ), 501,1, 502,2, 503,10;
setarray getd( ".petr"+ 1011 ), 512,5, 513,8, 514,20;

//	setarray getd( ".pet"+ <require pet egg> ), <random pet egg 1>, <random pet egg 2> ....
setarray getd( ".pet"+ 1002 ), 1113, 1031; // poring pet(1002) can evolve into drops(1113) or poporing(1031)
setarray getd( ".pet"+ 1011 ), 1042; // chonchon(1011) can evolve into steel chonchon(1042)
// add more as needed
end;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  112
  • Topics Per Day:  0.03
  • Content Count:  388
  • Reputation:   4
  • Joined:  05/01/12
  • Last Seen:  

tq sloved :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  96
  • Reputation:   1
  • Joined:  03/07/12
  • Last Seen:  

Hello, Update script.

How to check petfriendly for evolution pet,

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  403
  • Reputation:   245
  • Joined:  12/17/11
  • Last Seen:  

Hello, Update script.

How to check petfriendly for evolution pet,

 

http://rathena.org/wiki/Getpetinfo

 

Not my section, but I happen to have a script somewhere with this check.
To check for max loyalty:
 
if( getpetinfo(3) < 1000){
mes "It appears that your current pet did not reach a full loyalty state.";
mes "Your pets current intimacy is [ ^0000FF"+getpetinfo(3)+"^000000 / 1000 ]";
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

its better to use constant to debug the script easier

and the intimacy is actually >900

 

http://rathena.org/board/topic/91000-make-this-query-check-on-1000-pet-intimacy/?p=237899

an updated script is already provided over there in post#2

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   76
  • Joined:  06/13/13
  • Last Seen:  

its better to use constant to debug the script easier

and the intimacy is actually >900

 

http://rathena.org/board/topic/91000-make-this-query-check-on-1000-pet-intimacy/?p=237899

an updated script is already provided over there in post#2

 

Ms. Annie how about  ' configurabe chance ', like to get ' random egg pet 1 ' it will be 80 % and the failing chance to evolve, if the evolution failed it will make the original pet ( before go through evolution npc ) intimate value will be reduced to 0.

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

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