ocelote Posted February 22, 2012 Posted February 22, 2012 (edited) Emperium arena 20sec - 1 TCG Card sorry for my English thx for Agasper SRC: goto ea/src/map/battle.c find int battle_check_target( struct block_list *src, struct block_list *target,int flag) turn below and find case BL_MOB: а там уже { struct mob_data *md = BL_CAST(BL_MOB, t_bl); after add : struct map_session_data *sd; sd = BL_CAST(BL_PC, s_bl); if(t_bl->type==BL_MOB && ((TBL_MOB*)target)->class_== 1288 && pc_readregistry((TBL_PC*)s_bl,"emp_own",3)==1) return 0; in 1 line down we will see: if( !((agit_flag || agit2_flag) && map[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id ) change it for this: if( !((agit_flag || agit2_flag || map[m].flag.gvg ) && map[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id ) turn below and find case BL_MOB: Again, too,are doingwhat is writtenabove. DB : goto ea/db/castle_db.txt and add 34,prt_fild08,Pront,OnBreak,1 // Crystal RO : Pront NPC : // = Emperium // = for Crystal RO // = by Ocelote - script EmpInitOo -1,{ OnInit: donpcevent "EmpSpawnIn::OnSpawn"; end; } - script EmpSpawnIn -1,{ OnSpawn: killmonsterall "prt_fild08"; set $OwneR$, "Emperium"; announce "[Emperium] : Emperium arena in prt_fild08!",bc_all; // = spawn : monster "prt_fild08",169,348,"Crystal emp: ["+$OwneR$+"]",1288,1,"BreakEmperium::OnBreak"; end; } prt_fild08,0,0,0 script BreakEmperium -1,{ OnBreak: set $OwneR$,strcharinfo(0); set emp_own,1; monster "prt_fild08",169,348,"Crystal emp: ["+$OwneR$+"]",1288,1,"BreakEmperium::OnBreak"; announce "[Emperium] : ["+$OwneR$+"] own location [prt_fild08]",bc_all; initnpctimer; end; OnTimer20000: if($OwneR$ == "") { donpcevent "EmpSpawnIn::OnSpawn"; end; } if(!getcharid(0,$OwneR$)) { set emp_own,0; stopnpctimer; donpcevent "EmpSpawnIn::OnSpawn"; } else { attachrid(getcharid(3,$OwneR$)); getmapxy $emperium$,.@x,.@y,0; if($emperium$ == "prt_fild08") { getitem 7227,1; initnpctimer; end; } } OnInit: } - script EmperiumBreakerOo -1,{ OnPCLogoutEvent: if(strcharinfo(0) == $OwneR$) { set emp_own,0; announce "[Emperium] : "+strcharinfo(0)+" logout game, Emperium spawn again!",bc_all; donpcevent "EmpSpawnIn::OnSpawn"; stopnpctimer; end; } end; } - script EmperiumDieOo -1,{ OnPCDieEvent: if(emp_own > 0) set emp_own,0; end; } prt_fild08 mapflag gvg_castle prt_fild08 mapflag gvg empbreak.txt Edited February 23, 2012 by ocelote 1 Quote
Arcenciel Posted February 22, 2012 Posted February 22, 2012 Please put your script in a txt file and add it as an attachment instead of a codebox. Quote
fbrulz Posted October 1, 2012 Posted October 1, 2012 can u please explain what exactly the script does? Quote
Kichi Posted February 22, 2013 Posted February 22, 2013 (edited) some one make plis make this diff, more easily to read EDIT The emperium can't be attacked, since i restart the server Edited February 22, 2013 by Kichi Quote
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.