Jump to content
  • 0

src pet evo warning show when re-compile


saovarott159

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   1
  • Joined:  10/06/16
  • Last Seen:  

Hello guys ... help me please

             Modify script.c when re-compile warning show.

script.c

===================================================================
src/map/script.c
===================================================================

    script_pushint(st, storage_premiumStorage_load(sd, stor_id, script_getnum(st, 3)));
    return SCRIPT_CMD_SUCCESS;
}

+//=======================================================
+// Pet Evolution
+//=======================================================
+static int pethatch_eggsearch(int tid, int64 tick, int id, int data){
+    struct block_list *bl = map_id2bl(id);
+    struct map_session_data *sd = map_id2sd(id);
+    int i;
+
+    if(!sd)
+        return false;
+
+    i = pc_search_inventory(sd,data);
+    pet_select_egg(sd,i);
+
+    return true;
+}
+
+BUILDIN_FUNC(pethatch)
+{
+    TBL_PC *sd;
+    int id,pet_id;
+    id=script_getnum(st,2);
+    sd=script_rid2sd(st);
+
+    if (!sd)
+        return false;
+
+    if(sd->status.pet_id)
+        return false;
+
+    pet_id = search_petDB_index(id, PET_CLASS);
+    if(pet_id < 0)
+        script_pushint(st,0);
+    else {
+        sd->catch_target_class = pet_db[pet_id].class_;
+        intif_create_pet(sd->status.account_id, sd->status.char_id,
+            (short)pet_db[pet_id].class_,
+            (short)mob_db(pet_db[pet_id].class_)->lv,
+            (short)pet_db[pet_id].EggID, 0,
+            (short)pet_db[pet_id].intimate,
+            100, 0, 1, pet_db[pet_id].jname);
+        add_timer_func_list(pethatch_eggsearch, "pethatch_eggsearch");
+        add_timer(gettick() + 1000, pethatch_eggsearch, sd->bl.id, pet_db[pet_id].EggID);
+    }
+
+    return true;
+}
+
+BUILDIN_FUNC(petremove)
+{
+    TBL_PC *sd;
+
+    sd=script_rid2sd(st);
+    if (!sd)
+        return false;
+
+    if(!sd->status.pet_id)
+        return false;
+
+    unit_free(&sd->pd->bl,CLR_OUTSIGHT);
+    intif_delete_petdata(sd->status.pet_id);
+    sd->status.pet_id = 0;
+
+    return true;
+}

#include "../custom/script.inc"

===================================================================
    // WoE TE
    BUILDIN_DEF(agitstart3,""),
    BUILDIN_DEF(agitend3,""),
    BUILDIN_DEF(agitcheck3,""),
    BUILDIN_DEF(gvgon3,"s"),
    BUILDIN_DEF(gvgoff3,"s"),

    // Pet Evo
    BUILDIN_DEF(pethatch,"i"),
    BUILDIN_DEF(petremove,""),

#include "../custom/script_def.inc"

===================================================================

struct Script_Config script_config = {
    1, // warn_func_mismatch_argtypes
    1, 65535, 2048, //warn_func_mismatch_paramnum/check_cmdcount/check_gotocount
    0, INT_MAX, // input_min_value/input_max_value
    // NOTE: None of these event labels should be longer than <NAME_LENGTH> characters
    "OnPCDieEvent", //die_event_name
    "OnPCKillEvent", //kill_pc_event_name
    "OnNPCKillEvent", //kill_mob_event_name
    "OnPCLoginEvent", //login_event_name
    "OnPCLogoutEvent", //logout_event_name
    "OnPCLoadMapEvent", //loadmap_event_name
    "OnPCBaseLvUpEvent", //baselvup_event_name
    "OnPCJobLvUpEvent", //joblvup_event_name
+    "OnPetEvolveEvent", //pet_evolved_event_name
    "OnPCStatCalcEvent", //stat_calc_event_name
    "OnTouch_",    //ontouch_name (runs on first visible char to enter area, picks another char if the first char leaves)
    "OnTouch",    //ontouch2_name (run whenever a char walks into the OnTouch area)
    "OnWhisperGlobal",    //onwhisper_event_name (is executed when a player sends a whisper message to the NPC)
};

 

aE3v6U.JPG

 

 

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  308
  • Reputation:   24
  • Joined:  11/26/12
  • Last Seen:  

Yes help us we have the same situation and if i do the revert too many error even fresh download what could be the problem?

i did not edit any of those

rathena.JPG

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   1
  • Joined:  10/06/16
  • Last Seen:  

On 1/24/2017 at 3:10 AM, chatterboy said:

Yes help us we have the same situation and if i do the revert too many error even fresh download what could be the problem?

i did not edit any of those

rathena.JPG

/sob/sob

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