Kurofly Posted May 13, 2015 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 283 Reputation: 31 Joined: 07/08/14 Last Seen: January 15, 2022 Share Posted May 13, 2015 Hello rA! I'm trying to make a pet return to its egg and I couldn't seem to find any command that could be useful to me. So I started to look for a source function and I found one * Return a pet to it's egg. * @param sd : player requesting * @param pd : pet requesting * @return 1 */ static int pet_return_egg(struct map_session_data *sd, struct pet_data *pd) { struct item tmp_item; unsigned char flag = 0; pet_lootitem_drop(pd,sd); memset(&tmp_item,0,sizeof(tmp_item)); tmp_item.nameid = pd->petDB->EggID; tmp_item.identify = 1; tmp_item.card[0] = CARD0_PET; tmp_item.card[1] = GetWord(pd->pet.pet_id,0); tmp_item.card[2] = GetWord(pd->pet.pet_id,1); tmp_item.card[3] = pd->pet.rename_flag; if((flag = pc_additem(sd,&tmp_item,1,LOG_TYPE_OTHER))) { clif_additem(sd,0,0,flag); map_addflooritem(&tmp_item,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } pd->pet.incubate = 1; unit_free(&pd->bl,CLR_OUTSIGHT); status_calc_pc(sd,SCO_NONE); sd->status.pet_id = 0; return 1; } But I have no idea how to call this function from a script Could someone give me a hint on how to make script commands or just on how to call a source function? That'd be very nice Quote Link to comment Share on other sites More sharing options...
Kurofly Posted May 18, 2015 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 283 Reputation: 31 Joined: 07/08/14 Last Seen: January 15, 2022 Author Share Posted May 18, 2015 May I ask why this topic is marked solved? Quote Link to comment Share on other sites More sharing options...
kn16 Posted May 20, 2015 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 28 Reputation: 10 Joined: 04/18/15 Last Seen: June 19, 2015 Share Posted May 20, 2015 May I ask why this topic is marked solved? without explanation: i suppose there's a bug in moderator function Quote Link to comment Share on other sites More sharing options...
Emistry Posted May 20, 2015 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2372 Joined: 10/28/11 Last Seen: Yesterday at 05:23 PM Share Posted May 20, 2015 my bad, overlooked the topic title. https://rathena.org/board/topic/101779-source-request-makeegg-returns-pet-id/ Quote Link to comment Share on other sites More sharing options...
Kurofly Posted May 20, 2015 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 283 Reputation: 31 Joined: 07/08/14 Last Seen: January 15, 2022 Author Share Posted May 20, 2015 No problem it's also my bad to have used a similar title. Quote Link to comment Share on other sites More sharing options...
Question
Kurofly
Hello rA!
I'm trying to make a pet return to its egg and I couldn't seem to find any command that could be useful to me.
So I started to look for a source function and I found one
But I have no idea how to call this function from a script
Could someone give me a hint on how to make script commands or just on how to call a source function? That'd be very nice
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.