goddameit Posted February 2, 2012 Group: Members Topic Count: 60 Topics Per Day: 0.01 Content Count: 562 Reputation: 219 Joined: 11/22/11 Last Seen: August 3, 2024 Share Posted February 2, 2012 (edited) 2/3 chance plant the Critical stickybombhttp://i.imgur.com/2oqnr.jpgDownload Source CodeSTICKYBOMB.rarDownload .GRFSTICKYBOMB.grfdb\\mob_db2.txt 2127,SOCCER_BALL,stickbomb,stickbomb,1,2000,0,0,0,1,0,0,0,0,1,1,1,1,1,1,1,1,0,3,86,0x0040,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 db\\mob_avail.txt 2127,1792 data\\lua files\\skillinfoz\\skillid.lua STICKYBOMB = 999, STICKYBOMBBOMB = 998, data\\lua files\\skillinfoz\\skillinfolist.lua [sKID.STICKYBOMB] = { "STICKYBOMB"; SkillName = "STICKYBOMB", MaxLv = 10, SpAmount = { 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 }, }, [sKID.STICKYBOMBBOMB] = { "STICKYBOMBBOMB"; SkillName = "STICKYBOMBBOMB", }, battle.c http://pastebin.com/....php?i=5VizNY5gFind this function. int battle_calc_damage(struct block_l... go to the end. status_damage(src, s_bl, damage, 0, clif_damage(s_bl, s_bl, gettick(), 500, 500, damage, -1, 0, 0), 0); return ATK_NONE; } } } return damage; } add damage=stickybombdamage(src, bl, damage); top the return damage; and add new function int stickybombdamage(struct block_list *src, struct block_list *bl, int damage) { int _far=0, i=0; if(src->sbp==bl->sbp) return 0; for(i=0;i<=MAX_STICKYBOMB;i++) if(src->stickbomb[i]!=-1) break; if(i==MAX_STICKYBOMB) damage = damage*3; else { _far = distance_xy(src->x,src->y,bl->x,bl->y)+1; _far = _far >= 10 ? 10 : _far ; damage = damage/_far; } return damage; } map.c http://pastebin.com/....php?i=aKRM2P9V pc_makesavestatus(sd); pc_clean_skilltree(sd); chrif_save(sd,1); unit_free_pc(sd); killstickybmob(sd,0); //Add return 0; map.h http://pastebin.com/....php?i=UuyR67YF struct block_list { struct block_list *next,*prev; int id, sbp; //Add short m,x,y; enum bl_type type; int stickbomb[MAX_STICKYBOMB]; //Add }; mmo.h #define MAX_STICKYBOMB 8 //Add pc.c http://pastebin.com/....php?i=H2zxukgJAdd this function. void killstickybmob(struct map_session_data* sd, int t) { struct block_list *mb = NULL; int i=0; if(sd==NULL) return; for(;i <= MAX_STICKYBOMB ;i++) { mb=map_id2bl(sd->bl.stickbomb[i]); if(mb!=NULL) if(!t) status_kill(mb); else unit_skilluse_id(mb, mb->id, 173, 1); else continue; } return; } pc.hAdd this define. void killstickybmob(struct map_session_data* sd, int t); skill.c http://pastebin.com/....php?i=4dGTqDriAdd this function. void _STICKYBOMB(struct block_list *src, struct block_list *bl, int skillid, int skilllv) { int _x=0, _y=0, i=0, id=0; struct block_list *mb = NULL; switch(unit_getdir(bl)) { case 0: _x = 0; _y = 1; break; case 1: _x = -1; _y = 1; break; case 2: _x = -1; _y = 0; break; case 3: _x = -1; _y = -1; break; case 4: _x = 0; _y = -1; break; case 5: _x = 1; _y = -1; break; case 6: _x = 1; _y = 0; break; case 7: _x = 1; _y = 1; break; } _x = _x*(skilllv-1); _y = _y*(skilllv-1); clif_skill_nodamage(src,bl,skillid,skilllv,0); id=mob_once_spawn(BL_CAST(BL_PC, src),src->m,src->x+_x,src->y+_y,"StickBomb",2127,1,""); src->sbp++; if(src->sbp==MAX_STICKYBOMB) src->sbp=0; mb=map_id2bl(src->stickbomb[src->sbp]); if(mb!=NULL) unit_skilluse_id(mb, mb->id, 173, 1); src->stickbomb[src->sbp]=id; mb=map_id2bl(src->stickbomb[src->sbp]); mb->sbp=src->id; if(rand()%3) { for(i=0;i<MAX_STICKYBOMB;i++) mb->stickbomb[i]=-1; clif_specialeffect(mb, 47,AREA); }else for(i=0;i<MAX_STICKYBOMB;i++) mb->stickbomb[i]=0; return; } Go to this function int skill_castend_nodamage_id find this case SM_ENDURE: and add below case STICKYBOMB: _STICKYBOMB(src, bl, skillid, skilllv); break; case STICKYBOMBBOMB: clif_skill_nodamage(src,bl,skillid,skilllv,0); killstickybmob(map_id2sd(src->id),1); break; skill.h enum e_skill { STICKYBOMB = 999, //Add STICKYBOMBBOMB = 998, //Add NV_BASIC = 1, db\\skill_cast_db.txt 999,0,0,1000:1500:2000:2500:3000:3500:4000:4500:5000:5500,0,0,0 //Add db\\skill_require_db.txt 999,0,0,10,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //STICKYBOMB //Add 998,0,0,10,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //STICKYBOMBBOMB //Add Edited December 8, 2012 by goddameit 8 Quote Link to comment Share on other sites More sharing options...
Chronos Posted February 3, 2012 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 85 Reputation: 11 Joined: 11/06/11 Last Seen: January 28, 2013 Share Posted February 3, 2012 You always releasing Awesome events scripts . great job btw Quote Link to comment Share on other sites More sharing options...
Petey Pablo Posted April 30, 2012 Group: Members Topic Count: 152 Topics Per Day: 0.03 Content Count: 569 Reputation: 11 Joined: 11/24/11 Last Seen: March 7, 2022 Share Posted April 30, 2012 how to add this to xray? coz i dont have lua files. only tab files. xD Quote Link to comment Share on other sites More sharing options...
zmref Posted July 24, 2012 Group: Members Topic Count: 148 Topics Per Day: 0.03 Content Count: 299 Reputation: 6 Joined: 06/14/12 Last Seen: March 30, 2013 Share Posted July 24, 2012 (edited) · Hidden by Emistry, July 24, 2012 - Useless Post with a single word of "asdf" Hidden by Emistry, July 24, 2012 - Useless Post with a single word of "asdf" asdf Edited July 24, 2012 by zmref Link to comment
PewN Posted July 30, 2012 Group: Members Topic Count: 209 Topics Per Day: 0.04 Content Count: 892 Reputation: 27 Joined: 12/09/11 Last Seen: April 16, 2016 Share Posted July 30, 2012 is this working on latest rathena svn? Quote Link to comment Share on other sites More sharing options...
Skorm Posted June 3, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted June 3, 2013 (edited) Kinda make sure you change a few things. Skill.c id=mob_once_spawn(BL_CAST(BL_PC, src),src->m,src->x+_x,src->y+_y,"StickBomb",2127,1,"", SZ_SMALL, AI_NONE); Also change all skilllv, skillid to skill_lv, skill_id. Map.hWhere it says add "int id, sbp;" what he actually means is replace "int id;" with "int id, sbp; //Add" struct block_list { struct block_list *next,*prev; int id, sbp; //Add int16 m,x,y; enum bl_type type; int stickbomb[MAX_STICKYBOMB]; //Add }; In Battle.cHe means place "damage=stickybombdamage(src, bl, damage);" one line above the return damage; above: /*========================================== * Calculates BG related damage adjustments. *------------------------------------------*/ In other words. if( element == ELE_FIRE || element == ELE_WATER ) pc_overheat(sd,element == ELE_FIRE ? 1 : -1); } } damage=stickybombdamage(src, bl, damage); //Add return damage; } /*========================================== * Calculates BG related damage adjustments. *------------------------------------------*/ Problem with the part for damage though needs some kind of restriction or nulls all damage. If you're applying the mob into an sqldb use this: INSERT INTO `ragnarok`.`mob_db2` (`ID`, `Sprite`, `kName`, `iName`, `LV`, `HP`, `SP`, `EXP`, `JEXP`, `Range1`, `ATK1`, `ATK2`, `DEF`, `MDEF`, `STR`, `AGI`, `VIT`, `INT`, `DEX`, `LUK`, `Range2`, `Range3`, `Scale`, `Race`, `Element`, `Mode`, `Speed`, `aDelay`, `aMotion`, `dMotion`, `MEXP`, `MVP1id`, `MVP1per`, `MVP2id`, `MVP2per`, `MVP3id`, `MVP3per`, `Drop1id`, `Drop1per`, `Drop2id`, `Drop2per`, `Drop3id`, `Drop3per`, `Drop4id`, `Drop4per`, `Drop5id`, `Drop5per`, `Drop6id`, `Drop6per`, `Drop7id`, `Drop7per`, `Drop8id`, `Drop8per`, `Drop9id`, `Drop9per`, `DropCardid`, `DropCardper`) VALUES ('2127', 'SOCCER_BALL', 'stickbomb', 'stickbomb', '1', '2000', '0', '0', '0', '1', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '0', '3', '86', '256', '1', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'); And for renewal db. db/skill_cast_db.txt //stickybomb 999,0,0,1000:1500:2000:2500:3000:3500:4000:4500:5000:5500,0,0,0,-1 //Add For some reason not included but needed. db/skill_db.txt 999,0,6,4,0,0x1,0,10,1,no,0,0,0,weapon,0, STICKYBOMB,Detention Sphere 998,0,6,4,0,0x1,0,10,1,no,0,0,0,weapon,0, STICKYBOMBBOMB,Activate Sphere Hope that helps in adding this cool skill by goddameit. . Edited June 4, 2013 by Skorm Quote Link to comment Share on other sites More sharing options...
Skorm Posted June 6, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted June 6, 2013 (edited) Sorry for double post but I just wanted to add a few things that I thought would improve this skill and make it a little more practical.In battle.cReplace damage=stickybombdamage(src, bl, damage); With if(skill_id == NPC_SELFDESTRUCTION && status_get_class(src)==1792) { damage=stickybombdamage(src, bl, damage); } In skill.cSearch for any of these lines: case NPC_SELFDESTRUCTION: //Self Destruction hits everyone in range (allies+enemies) //Except for Summoned Marine spheres on non-versus maps, where it's just enemy. Right below you will find: i = ((!md || md->special_state.ai == 2) && !map_flag_vs(src->m))? BCT_ENEMY:BCT_ALL; Replace With: if(md->special_state.ai == 2 && !map_flag_vs(src->m)){ i=BCT_ENEMY; } else if( md->class_==2127 && !map_flag_vs(src->m)){ i=BCT_NOENEMY; } else { i=BCT_ALL; } I'm not the best at source coding but this will disable the characters from attacking other players outside of pvp with this skill.In skill.c Replace: void _STICKYBOMB(struct block_list *src, struct block_list *bl, int skillid, int skilllv) { int _x=0, _y=0, i=0, id=0; struct block_list *mb = NULL; switch(unit_getdir(bl)) { case 0: _x = 0; _y = 1; break; case 1: _x = -1; _y = 1; break; case 2: _x = -1; _y = 0; break; case 3: _x = -1; _y = -1; break; case 4: _x = 0; _y = -1; break; case 5: _x = 1; _y = -1; break; case 6: _x = 1; _y = 0; break; case 7: _x = 1; _y = 1; break; } _x = _x*(skilllv-1); _y = _y*(skilllv-1); clif_skill_nodamage(src,bl,skillid,skilllv,0); id=mob_once_spawn(BL_CAST(BL_PC, src),src->m,src->x+_x,src->y+_y,"StickBomb",2127,1,""); src->sbp++; if(src->sbp==MAX_STICKYBOMB) src->sbp=0; mb=map_id2bl(src->stickbomb[src->sbp]); if(mb!=NULL) unit_skilluse_id(mb, src->stickbomb[src->sbp], 173, 1); src->stickbomb[src->sbp]=id; mb=map_id2bl(src->stickbomb[src->sbp]); mb->sbp=src->id; if(rand()%3) { for(i=0;i<MAX_STICKYBOMB;i++) mb->stickbomb[i]=-1; clif_specialeffect(mb, 47,AREA); }else for(i=0;i<MAX_STICKYBOMB;i++) mb->stickbomb[i]=0; return; } With: void _STICKYBOMB(struct block_list *src, struct block_list *bl, int skill_id, int skill_lv) { char output[128]; int _x=0, _y=0, i=0, id=0; struct block_list *mb = NULL; switch(unit_getdir(bl)) { case 0: _x = 0; _y = 1; break; case 1: _x = -1; _y = 1; break; case 2: _x = -1; _y = 0; break; case 3: _x = -1; _y = -1; break; case 4: _x = 0; _y = -1; break; case 5: _x = 1; _y = -1; break; case 6: _x = 1; _y = 0; break; case 7: _x = 1; _y = 1; break; } _x = _x*(skill_lv-1); _y = _y*(skill_lv-1); clif_skill_nodamage(src,bl,skill_id,skill_lv,0); sprintf(output, "(%s)StickBomb", status_get_name(src)); id=mob_once_spawn(BL_CAST(BL_PC, src),src->m,src->x+_x,src->y+_y,output,2127,1,"", SZ_SMALL, AI_NONE); src->sbp++; if(src->sbp==MAX_STICKYBOMB) src->sbp=0; mb=map_id2bl(src->stickbomb[src->sbp]); if(mb!=NULL) unit_skilluse_id(mb, src->stickbomb[src->sbp], 173, 1); src->stickbomb[src->sbp]=id; mb=map_id2bl(src->stickbomb[src->sbp]); mb->sbp=src->id; if(rand()%3) { for(i=0;i<MAX_STICKYBOMB;i++) mb->stickbomb[i]=-1; clif_specialeffect(mb, 47,AREA); }else for(i=0;i<MAX_STICKYBOMB;i++) mb->stickbomb[i]=0; return; } This will put the username on the exploding ball so everyone knows who's who! The last thing to add to this skill so it's usable on servers is some kind of attachment to the mob, because right now when you attack with the skill it just thinks the monster is killing other monsters. Master_id might work not really sure. That or adding some kind of condition to the damage function and allowing it to be called.Thanks again for this awesome script! Edited June 6, 2013 by Skorm Quote Link to comment Share on other sites More sharing options...
Lil Troll Posted August 5, 2013 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 276 Reputation: 24 Joined: 07/06/13 Last Seen: April 19, 2014 Share Posted August 5, 2013 (edited) EDIT: FIXED In skill.c changed: skilllv, skillid > skill_lv, skill_id. now: case STICKYBOMB: _STICKYBOMB(src, bl, skill_lv,skill_id); break; case STICKYBOMBBOMB: clif_skill_nodamage(src,bl,skill_lv,skill_id,0); killstickybmob(map_id2sd(src->id),1); break; Hi skorm, errors appearing on me. skill.c: In function ‘skill_castend_nodamage_id’: skill.c:6119: error: ‘skillid’ undeclared (first use in this function) skill.c:6119: error: (Each undeclared identifier is reported only once skill.c:6119: error: for each function it appears in.) skill.c:6119: error: ‘skilllv’ undeclared (first use in this function) make[1]: *** [obj_sql/skill.o] Error 1 make[1]: Leaving directory `/root/Desktop/trunk/src/map' make: *** [map_sql] Error 2 Edited August 5, 2013 by Lil Troll Quote Link to comment Share on other sites More sharing options...
Skorm Posted August 5, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted August 5, 2013 Hi skorm, errors appearing on me. skill.c: In function ‘skill_castend_nodamage_id’: skill.c:6119: error: ‘skillid’ undeclared (first use in this function) skill.c:6119: error: (Each undeclared identifier is reported only once skill.c:6119: error: for each function it appears in.) skill.c:6119: error: ‘skilllv’ undeclared (first use in this function) make[1]: *** [obj_sql/skill.o] Error 1 make[1]: Leaving directory `/root/Desktop/trunk/src/map' make: *** [map_sql] Error 2 Try changing the variables skillid and skilllv to skill_id and skill_lv respectively. They change depending on what source you're using. Quote Link to comment Share on other sites More sharing options...
Lil Troll Posted August 6, 2013 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 276 Reputation: 24 Joined: 07/06/13 Last Seen: April 19, 2014 Share Posted August 6, 2013 (edited) Help how to fix this? Edited August 6, 2013 by Lil Troll Quote Link to comment Share on other sites More sharing options...
Skorm Posted August 6, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted August 6, 2013 Help how to fix this? It looks like I made some changes to the skill db after I posted that. 999,5,6,2,0,0x02,2,10,1:1:1:1:1:1:1:2:3:5,yes,0,0x0080,5,weapon,1,STICKYBOMB,Detention Sphere The other one should be the same but different skill id and name. Quote Link to comment Share on other sites More sharing options...
Lil Troll Posted August 6, 2013 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 276 Reputation: 24 Joined: 07/06/13 Last Seen: April 19, 2014 Share Posted August 6, 2013 (edited) I used the one you gave Sir what error is this? Edited August 6, 2013 by Lil Troll Quote Link to comment Share on other sites More sharing options...
Skorm Posted August 6, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted August 6, 2013 (edited) I used the one you gave Sir what error is this? Oops that might've been a test one I had left in comments. You're getting that because it isn't a skill that can be targeted. 999,-1,6,1,-1,0x40,0,10,1,no,0,0,0,weapon,0,STICKYBOMB,Detention Sphere Look at the skill_db text if you need more assistance for setting skills up. 04 inf (0- passive, 1- enemy, 2- place, 4- self, 16- friend, 32- trap) Edited August 6, 2013 by Skorm Quote Link to comment Share on other sites More sharing options...
Deity Posted August 23, 2013 Group: Members Topic Count: 54 Topics Per Day: 0.01 Content Count: 93 Reputation: 0 Joined: 03/04/12 Last Seen: October 23, 2016 Share Posted August 23, 2013 (edited) awesome thanks! Edited August 23, 2013 by Skymomo Quote Link to comment Share on other sites More sharing options...
karazu Posted October 14, 2013 Group: Members Topic Count: 57 Topics Per Day: 0.01 Content Count: 374 Reputation: 5 Joined: 03/09/12 Last Seen: June 19, 2018 Share Posted October 14, 2013 Tortoise patch Diff please hehe... Quote Link to comment Share on other sites More sharing options...
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.