Jump to content

Recommended Posts

Posted (edited)

skill.c

add a new function.

void DOTASWAPfu (struct block_list *src, struct block_list *bl)
{
int x=0, y=0;
x=src->x;
y=src->y;
unit_movepos(src, bl->x, bl->y, 1, 1);
clif_slide(src,bl->x,bl->y);
unit_movepos(bl, x, y, 1, 1);
clif_slide(bl,x,y);
clif_specialeffect(bl,34,AREA);
clif_specialeffect(src,34,AREA);
return;
}

add

int skill_castend_nodamage_id (struct block_list *src, struct bl...

{
...
case MER_BLESSING:
 if (dstsd != NULL && tsc->data[sC_CHANGEUNDEAD]) {
  skill_attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag);
  break;
 }
case DOTASWAP: //add
 DOTASWAPfu(src,bl); //add
 clif_skill_nodamage(src,bl,skillid,skilllv,0); //add
 break; //add
case PR_SLOWPOISON:
case PR_IMPOSITIO:
case PR_LEXAETERNA:
case PR_SUFFRAGIUM:
...

skill.h

add

enum e_skill {
DOTASWAP = 996, //add
NV_BASIC = 1,

Client

http://goo.gl/BJ0uB

db\skill_db,txt

996,9,6,1,0,0x1,0,1,0,yes,0,0,0,magic,0,  DOTASWAP,DOTASWAP

db\skill_require_db.txt

996,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 //DOTASWAP

data\lua files\skillinfoz\skillid.lua

DOTASWAP = 996,

data\lua files\skillinfoz\skillinfolist.lua

[sKID.DOTASWAP] = {
 "DOTASWAP";
 SkillName = "DOTASWAP",
},

Edited by goddameit
  • Upvote 8
  • Like 1
Posted (edited)

skill.c: In function âskill_castend_damage_idâ:
skill.c:3712: error: duplicate case value
skill.c:3287: error: previously used here
skill.c:3722: error: duplicate case value
skill.c:3529: error: previously used here
skill.c: In function âskill_castend_nodamage_idâ:
skill.c:4997: warning: implicit declaration of function âDOTASWAPfuâ
skill.c:5090: error: duplicate case value
skill.c:4902: error: previously used here
skill.c:5550: error: duplicate case value
skill.c:4975: error: previously used here
skill.c:5700: error: duplicate case value
skill.c:5659: error: previously used here
skill.c:6366: error: duplicate case value
skill.c:5092: error: previously used here
skill.c: At top level:
skill.c:13515: warning: conflicting types for âDOTASWAPfuâ
skill.c:4997: warning: previous implicit declaration of âDOTASWAPfuâ was here
skill.c: In function âskill_stasis_checkâ:
skill.c:16713: error: duplicate case value
skill.c:16703: error: previously used here
make[1]: *** [obj_sql/skill.o] Error 1
make[1]: Leaving directory `/eathena/src/map'
make: *** [map_sql] Error 2

How to solve that?

and now the server wont start :)

Also this: skill.c: In function âskill_castend_nodamage_idâ:

skill.c:4995: error: âDOTASWAPâ undeclared (first use in this function)
skill.c:4995: error: (Each undeclared identifier is reported only once
skill.c:4995: error: for each function it appears in.)
skill.c:4996: warning: implicit declaration of function âDOTASWAPfuâ
skill.c: At top level:
skill.c:17193: warning: conflicting types for âDOTASWAPfuâ
skill.c:4996: warning: previous implicit declaration of âDOTASWAPfuâ was here
make[1]: *** [obj_sql/skill.o] Error 1
make[1]: Leaving directory `/eathena/src/map'
make: *** [map_sql] Error 2

Edited by Emistry
Wrapped Content with Code / Codebox
Posted

You're only supposed to add the parts with //add commented, it looks like you copied the entire codebox.

case DOTASWAP: //add
 DOTASWAPfu(src,bl); //add
 clif_skill_nodamage(src,bl,skillid,skilllv,0); //add
 break;

^That's the only part necessary, the rest of it is there just to tell you where to put it. If you want to get rid of the implicit declaration warnings, you could always just add a function prototype in skill.h, but it's not a huge deal...

@Cephaler: From how it looks, it seems it'll work on players. You could even give mobs the skill.

@Goddameit:

This is pretty awesome, I love it.

Posted · Hidden by Emistry, February 25, 2012 - Useless Post with just a single word "Rampage" on it.
Hidden by Emistry, February 25, 2012 - Useless Post with just a single word "Rampage" on it.

Rampage!

  • 3 weeks later...
Posted

edit skill_db.txt

//id,range,hit,inf,element,nk,splash,max,list_num,castcancel,cast_defence_rate,inf2,maxcount,skill_type,blow_count,name,description

as you can see the second column is RANGE

Posted

i got error how can i fix this

src\map\skill.c(4984): warning C4013: 'DOTASWAPfu' undefined; assuming extern returning int

src\map\skill.c(13330): error C2371: 'DOTASWAPfu' : redefinition; different basic types

  • 2 weeks later...
Posted (edited)

where i need to add this code???

void DOTASWAPfu (struct block_list *src, struct block_list *bl)
{
int x=0, y=0;
x=src->x;
y=src->y;
unit_movepos(src, bl->x, bl->y, 1, 1);
clif_slide(src,bl->x,bl->y);
unit_movepos(bl, x, y, 1, 1);
clif_slide(bl,x,y);
clif_specialeffect(bl,34,AREA);
clif_specialeffect(src,34,AREA);
return;
}

i mean where in skill.c

Edited by oyamu
  • 2 months later...
Posted

i got error how can i fix this

src\map\skill.c(4984): warning C4013: 'DOTASWAPfu' undefined; assuming extern returning int

src\map\skill.c(13330): error C2371: 'DOTASWAPfu' : redefinition; different basic types

have same errors.

Posted

This swap skill has an official version in the Kagero/Oboro skill tree. The name of the skill is Illusion - Attraction. The LimitRO version has 1 second cast time (that can be reduced)... but I'm not sure if it's official (the coder claims he has source data or maybe a kRO player).

Just mentioning it.

Posted

Well i have a little problem :) Emperium can be swap too how can i prevent this ?

And also my server is currently having no cast delay how can i put some delay on this Swap skills using source code?

Posted

Well i have a little problem :) Emperium can be swap too how can i prevent this ?

And also my server is currently having no cast delay how can i put some delay on this Swap skills using source code?

you can disable the skill on GVG maps

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...