Jump to content

  •  

Thunderbolt

Member Since 15 Feb 2013
Offline Last Active Jun 04 2017 02:25 PM
-----

#29693 PK area

Posted by Thunderbolt on 23 February 2014 - 05:15 PM

rAthena script.

 

Work on ra 17420 (PvP Cell)

 

 

Battle config

 

+// Addon Cell PVP [Ize]+// Enable Deathmatch for cell pvp+// Default: 0+// 0 = No+// 1 = Yes+cellpvp_deathmatch: 1++// Delay player alive deathmatch for cell pvp+// Default: 1000 (1 secand)+cellpvp_deathmatch_delay: 1000++// When player is dead recovery HP/SP Rate for cell pvp+// Default: 100 (recovery 100%)+deathmatch_hp_rate: 100+deathmatch_sp_rate: 100++// Enable buff when player is dead for cell pvp+// Default: 1+// 0 = No+// 1 = Yes+// Request core npc files use name "deathmatch_core"+cellpvp_autobuff: yes++// Can atk player in party+// Default: 1+// 0 = No+// 1 = Yes+cellpvp_party_enable: no++// Can atk player in guild+// Default: 1+// 0 = No+// 1 = Yes+cellpvp_guild_enable: no++// When player move to cell pvp is delay walk out cooldown+// Default: 5000 (5 secand)+cellpvp_walkout_delay: 5000+

 


Auto Buff Npc script and pvp cell setting (x,y)

 

 

-	script	CELLPVP	-1,{OnInit:	setcell "morocc",143,113,157,103,cell_pvp,1;	end;	}-	script	deathmatch_core	-1,{	callfunc("pvp_scstart");	end;}function	script	pvp_scstart	{	sc_start SC_INC_AGI,120000,5;	sc_start SC_BLESSING,120000,5;	sc_start SC_MAGNIFICAT,120000,3;}

 

 


Download :Attached File  cell_pvp_v1.6.diff   20.39K   210 downloads

 

Credit ea-th

 

 

someone convert this to herc please




#23528 this kind of pet evolution will be cool

Posted by Thunderbolt on 21 December 2013 - 10:12 PM

Can you convert script ?

/src/map/mapreg_sql.c

find

CODE
static int script_autosave_mapreg(int tid, unsigned int tick, int id, intptr data)
{
if( mapreg_dirty )
script_save_mapreg();

return 0;
}



add this

CODE
static int pethatch_eggsearch(int tid, unsigned int 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 0;

i = pc_search_inventory(sd,data);
pet_select_egg(sd,i);

return 0;
}



find

CODE
add_timer_func_list(script_autosave_mapreg, "script_autosave_mapreg");



add this

CODE
add_timer_func_list(pethatch_eggsearch, "pethatch_eggsearch");




/src/map/script.c
find

CODE
// declarations that were supposed to be exported from npc_chat.c
#ifdef PCRE_SUPPORT
BUILDIN_FUNC(defpattern);
BUILDIN_FUNC(activatepset);
BUILDIN_FUNC(deactivatepset);
BUILDIN_FUNC(deletepset);
#endif



add this

CODE
BUILDIN_FUNC(pethatch)
{
TBL_PC *sd;
int pet_id;

sd=script_rid2sd(st);
if (!sd)
return 0;

if(sd->status.pet_id)
return 0;

pet_id = search_petDB_index(script_getnum(st,2), 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);
}

return 0;
}

BUILDIN_FUNC(petremove)
{
TBL_PC *sd;

sd=script_rid2sd(st);
if (!sd)
return 0;

if(!sd->status.pet_id)
return 0;

unit_free(&sd->pd->bl,0);
intif_delete_petdata(sd->status.pet_id);
sd->status.pet_id = 0;

return 0;
}



find

CODE
BUILDIN_DEF(setcell,"siiiiii"),



add this

CODE
BUILDIN_DEF(pethatch,"i"),
BUILDIN_DEF(petremove,""),



find

CODE
"OnPCJobLvUpEvent",



add this

CODE
"OnPCJobLvUpEvent",
"OnPetEvolveEvent",




/src/map/pet.c
find

CODE
clif_pet_food(sd,pd->petDB->FoodID,1);



add this

CODE
if(pd->pet.intimate == 1000)
npc_script_event(sd, NPCE_PETEVOLVE);




/src/map/npc.h
find

CODE
NPCE_KILLNPC,



add this

CODE
NPCE_PETEVOLVE,




/src/map/script.h
find

CODE
const char *joblvup_event_name;



add this

CODE
const char *pet_evolved_event_name;




/src/map/npc.c
find

CODE
{"Kill NPC Event",script_config.kill_mob_event_name},



add this

CODE
{"Pet Evolution Event",script_config.pet_evolved_event_name},



#8242 R>>>@costume by greenbox

Posted by Thunderbolt on 16 June 2013 - 06:15 PM

http://rathena.org/b...nd-costumeitem/