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