magic

All Helbreath Server Source Discussion here.
Post Reply
harry123
just visiting
Posts: 9
Joined: Mon Jul 31, 2006 10:06 am

Post by harry123 »

i got promblem with magic table..

i want to change some spelss to latest magic table

but to do that i need follow the list .. id

so like
magic = 96 Earth-Shock-Wave .
magic = 97 (new spell)

but promblem is when i changed the id

when i cast the spell in game i dont see the magic effect spell works
mana - 250 does dmg..
so i was asking if any 1 knows how to change the magic
effect to right Id

i am not sure if its in source or client

any 1 could help me
thx
:)
kamal
noob
Posts: 19
Joined: Sun Aug 21, 2005 1:42 am

Post by kamal »

harry123 wrote: i got promblem with magic table..

i want to change some spelss to latest magic table

but to do that i need follow the list .. id

so like
magic = 96 Earth-Shock-Wave .
magic = 97 (new spell)

but promblem is when i changed the id

when i cast the spell in game i dont see the magic effect spell works
mana - 250 does dmg..
so i was asking if any 1 knows how to change the magic
effect to right Id

i am not sure if its in source or client

any 1 could help me
thx
:)
you need to code a sprite for it in game.cpp i think its in client sources or maybe HGServer sources not sure
harry123
just visiting
Posts: 9
Joined: Mon Jul 31, 2006 10:06 am

Post by harry123 »

that what i was thinking 2 but where in clien source or hg server source

any 1 could help

thx :)
EvilHit
Loyal fan
Posts: 356
Joined: Sun Jan 16, 2005 3:20 am

Post by EvilHit »

what hg source u usin becuz only some need to b coded in to it
Namesis
Regular
Posts: 88
Joined: Fri Mar 03, 2006 12:53 pm

Post by Namesis »

i have same problem.. i use 2.24d =D
harry123
just visiting
Posts: 9
Joined: Mon Jul 31, 2006 10:06 am

Post by harry123 »

2.24d :unsure:
EvilHit
Loyal fan
Posts: 356
Joined: Sun Jan 16, 2005 3:20 am

Post by EvilHit »

u have to code it in so just use 1 of the magic e.g scan
in magic.h

#define DEF_MAGICTYPE_SCAN 33 // Scan


and then look up DEF_MAGICTYPE_SCAN in game.ccp


and then u have to make a content for it in ur magic.cfg

its pretty easy to do
harry123
just visiting
Posts: 9
Joined: Mon Jul 31, 2006 10:06 am

Post by harry123 »

i think i know what u mean thx
i gonna try this out

---------------edit-----------
stil doesnt works :(
Kiruku
Loyal fan
Posts: 268
Joined: Wed Feb 22, 2006 12:00 pm
Contact:

Post by Kiruku »

simple problem... i fixed it on hbchaos i made new spells :) u need search in client Game.cpp for Case 196 thats esw case ( u should get it 3 times) now Add New case if u want 97 = Esw effect add there after case 196 case 197 and then case 96 and 97 has same spell picture :)
<img src='http://lichtdrache.lima-city.de/helbrea ... aramba.gif' border='0' alt='user posted image' />
harry123
just visiting
Posts: 9
Joined: Mon Jul 31, 2006 10:06 am

Post by harry123 »

cant find the case 196 :S
i looked some other sources same there

any other lines i can find it
Kiruku
Loyal fan
Posts: 268
Joined: Wed Feb 22, 2006 12:00 pm
Contact:

Post by Kiruku »

Code: Select all

  case 196: // Snoopy: Ajout de Earth-Shock-Wave
  	m_pEffectList[i]->m_mX     = sX*32;
  	m_pEffectList[i]->m_mY     = sY*32;
  	m_pEffectList[i]->m_iErr   = 0;
  	m_pEffectList[i]->m_cMaxFrame   = 30;
  	m_pEffectList[i]->m_dwFrameTime = 25;
  	sAbsX = abs(320 - (sX - m_sViewPointX));
  	sAbsY = abs(240 - (sY - m_sViewPointY));
  	if (sAbsX > sAbsY) sDist = sAbsX;
  	else sDist = sAbsY;
  	sDist = sDist / 32;
  	SetCameraShakingEffect(sDist);
  	break; 


  case 80:
  case 196: // Earth-Shock-Wave
  	cTempFrame = m_pEffectList[i]->m_cFrame;
  	if (cTempFrame < 0) break;
  	dX  = (m_pEffectList[i]->m_mX)  - m_sViewPointX;
  	dY  = (m_pEffectList[i]->m_mY)  - m_sViewPointY;
  	m_pEffectSpr[91]->PutSpriteFast(dX, dY, cTempFrame, dwTime); //Nbe d'arguments modifiés ds la 351....
  	m_pEffectSpr[92]->PutTransSprite(dX, dY, cTempFrame, dwTime);
  	break;

  	cTempFrame = m_pEffectList[i]->m_cFrame;
  	if (cTempFrame < 0) break;
  	dX  = (m_pEffectList[i]->m_mX)  - m_sViewPointX;
  	dY  = (m_pEffectList[i]->m_mY)  - m_sViewPointY;
  	m_pEffectSpr[33]->PutTransSprite_NoColorKey(dX, dY, cTempFrame, dwTime);
  	cTempFrame = m_pEffectList[i]->m_cFrame;
  	if (cTempFrame < 0) cTempFrame = 0;
  	dX  = (m_pEffectList[i]->m_mX)  - m_sViewPointX;
  	dY  = (m_pEffectList[i]->m_mY)  - m_sViewPointY;
  	m_pEffectSpr[29]->PutTransSprite50_NoColorKey(dX, dY, cTempFrame, dwTime);
  break;



  	case 196: // Earth-Shock-Wave
    m_Misc.GetPoint(m_pEffectList[i]->m_mX
    	, m_pEffectList[i]->m_mY
    	, m_pEffectList[i]->m_dX*32
    	, m_pEffectList[i]->m_dY*32
    	, &m_pEffectList[i]->m_mX
    	, &m_pEffectList[i]->m_mY
    	, &m_pEffectList[i]->m_iErr
    	, 40);
    bAddNewEffect(80, m_pEffectList[i]->m_mX + (rand() % 30) - 15, m_pEffectList[i]->m_mY + (rand() % 30) - 15, NULL, NULL, 0, 1);
    bAddNewEffect(80, m_pEffectList[i]->m_mX + (rand() % 20) - 10, m_pEffectList[i]->m_mY + (rand() % 20) - 10, NULL, NULL, 0, 0);
    if (m_pEffectList[i]->m_cFrame >= m_pEffectList[i]->m_cMaxFrame)
    {	delete m_pEffectList[i];
    	m_pEffectList[i] = NULL;
    }else
    {	sAbsX = abs(((m_sViewPointX / 32) + 10) - m_pEffectList[i]->m_dX);
    	sAbsY = abs(((m_sViewPointY / 32) + 7)  - m_pEffectList[i]->m_dY);
    	if (sAbsX > sAbsY) sDist = sAbsX -10;
    	else sDist = sAbsY -10;
    	lPan = -(((m_sViewPointX / 32) + 10) - m_pEffectList[i]->m_dX);
    	PlaySound('E', 1, sDist, lPan);
    }
    break;
thats the 3 cases from esw ...


Edit: i use 3.82 client by snoopy81 diuuuude and cleroth
<img src='http://lichtdrache.lima-city.de/helbrea ... aramba.gif' border='0' alt='user posted image' />
harry123
just visiting
Posts: 9
Joined: Mon Jul 31, 2006 10:06 am

Post by harry123 »

i think i understand so
if i make a case 198


it wil be the spell for like 98= esw??
that correct?

LasTerrenas
just visiting
Posts: 4
Joined: Sat Aug 05, 2006 4:03 am

Post by LasTerrenas »

ya
Kiruku
Loyal fan
Posts: 268
Joined: Wed Feb 22, 2006 12:00 pm
Contact:

Post by Kiruku »

yes case 198 = magic = 98 ESW


Edit: but if u want a second esw u dont need to make new and copy... just make like


case 196: //ESW
case 198: //ESW2

its faster...
<img src='http://lichtdrache.lima-city.de/helbrea ... aramba.gif' border='0' alt='user posted image' />
Jensen
Loyal fan
Posts: 300
Joined: Tue Aug 02, 2005 7:40 am
Location: Illinois, USA
Contact:

Post by Jensen »

Kiruku wrote:
its faster...
and has less code bloat
-><-
Post Reply