An essential info site for anyone learning the game. Great community and often very insightful posts.
 
HomeGet StartedSearchRulesRegisterLog in
Share
 

 MAGIA roba vida

Go down 
AuthorMessage
ailyn

ailyn


MAGIA roba vida Empty
PostSubject: MAGIA roba vida   MAGIA roba vida EmptyTue 02 May 2017, 2:34 pm

buenos dias, 

me gustaria saber si alguien podria ayudarme a hacer una magia que robe vida cuando le pegue a los npc seria posible eso?
Back to top Go down
Centuu.-
♡ Game Master
Centuu.-


MAGIA roba vida Empty
PostSubject: Re: MAGIA roba vida   MAGIA roba vida EmptyTue 02 May 2017, 2:48 pm

Ejemplo:

case DEF_NPCTYPE:
m_pNpcList[iNpcH]->m_iHP -= sValue;
m_pClientList[iClientH]->m_iHP += sValue;
break;

Hacer una magia cualquiera y agregarle eso.
Back to top Go down
ailyn

ailyn


MAGIA roba vida Empty
PostSubject: Re: MAGIA roba vida   MAGIA roba vida EmptyTue 02 May 2017, 11:22 pm

si pero eso lo pongo donde? seria bueno saber si es en 

Code:
PlayerMagicHandler

se supone que deberia tener algo como esto, o me equivoco algo que identifique la magia exacta
Code:
xxxxxxxxxxxxxxxx(iClientH, DEF_OWNERTYPE_PLAYER, i, DEF_OWNERTYPE_PLAYER, m_pMagicConfigList[sType]->m_sValue4, m_pMagicConfigList[sType]->m_sValue5, m_pMagicConfigList[sType]->m_sValue6);[size=12][/size]
                        SendEventToNearClient_TypeB(MSGID_EVENT_COMMON, DEF_COMMONTYPE_MAGIC, m_pClientList[iClientH]->m_cMapIndex, m_pClientList[iClientH]->m_sX, m_pClientList[iClientH]->m_sY, m_pClientList[i]->m_sX, m_pClientList[i]->m_sY, (21 + 100), m_pClientList[i]->m_sType);



-------------------------------------------------------------------------------------------------------------





Code:
          case DEF_MAGICTYPE_HPUP_SPOT_NPCTYPE:[size=12][/size]
               m_pMapList[m_pClientList[iClientH]->m_cMapIndex]->GetOwner(&sOwnerH, &cOwnerType, dX, dY);[size=12][/size]
               Effect_Damage_Spot(iClientH, DEF_OWNERTYPE_NPC, sOwnerH, cOwnerType, m_pMagicConfigList[sType]->m_sValue4, m_pMagicConfigList[sType]->m_sValue5, m_pMagicConfigList[sType]->m_sValue6 + iWhetherBonus, TRUE, iMagicAttr);[size=12][/size]
               Effect_HpUp_Spot(iClientH, DEF_OWNERTYPE_PLAYER, sOwnerH, cOwnerType, m_pMagicConfigList[sType]->m_sValue4, m_pMagicConfigList[sType]->m_sValue5, m_pMagicConfigList[sType]->m_sValue6);[size=12][/size]
               break;


Lo hice con este, pero un problema no la roba la hp sino que si te pego te quita vida y te la devuelve xd


Last edited by ailyn on Wed 03 May 2017, 1:14 am; edited 1 time in total
Back to top Go down
Centuu.-
♡ Game Master
Centuu.-


MAGIA roba vida Empty
PostSubject: Re: MAGIA roba vida   MAGIA roba vida EmptyWed 03 May 2017, 11:24 am

Porque tenés que saber qué es iClientH... puede ser iTargetH o iAttackerH... tenés que ver el parámetro, no uses el mismo en todos.
Back to top Go down
ailyn

ailyn


MAGIA roba vida Empty
PostSubject: Re: MAGIA roba vida   MAGIA roba vida EmptyWed 03 May 2017, 6:08 pm

creo que desisto no consigo hacerla me he olvidado totalmente :( :/
Back to top Go down
LifeX
♡ Game Master
LifeX


MAGIA roba vida Empty
PostSubject: Re: MAGIA roba vida   MAGIA roba vida EmptyThu 04 May 2017, 9:39 am

You want a magic that does damage to Target, and increase life to Attacker via magic?


LifeX

[You must be registered and logged in to see this link.]
Back to top Go down
ailyn

ailyn


MAGIA roba vida Empty
PostSubject: Re: MAGIA roba vida   MAGIA roba vida EmptyThu 04 May 2017, 5:07 pm

[You must be registered and logged in to see this link.] wrote:
You want a magic that does damage to Target, and increase life to Attacker via magic?

ejemplo, si te pego con la magia, '' vampire gaze '' lo que deberia de hacer es quitarte vida, y devolverme vida a mi.

ejemplo te pago con la magia un golpe de 200 de vida para ti, de esos 200 de vida que te he sacado deberia recargar la mia con unos 40 puntos de vida. 

segundo ejemplo, hay 10 npc juntos, le tiro la magia saco 200 de vida por cada uno que le pegue, quiere decir que yo regenero 400 de vida al instante.


no tengo video para mostrar pero intentare buscar un video aunque no sea mio.
Back to top Go down
Roazir
Site Admin
Roazir


MAGIA roba vida Empty
PostSubject: Re: MAGIA roba vida   MAGIA roba vida EmptyThu 04 May 2017, 7:35 pm

[You must be registered and logged in to see this link.] does not translate what he has written correctly because he is not using appropriate orthography. Here is the correct translation:


Traducción en Inglés wrote:
If I hit you with the magic lets say "Vampire Gaze", what the magic should do is lower the health of the target and give me a percentage of health in return.

For example; if my character attacks with magic, and your health decreases by 200, of the 200 health you lost, mine should recover with 40 health points.

Second example; There are 10 monsters grouped together. If I use the magic on them and decrease their health by 200 for each of them, it means that I must instantly regenerate 400 health.


[You must be registered and logged in to see this link.] wrote:
You want a magic that does damage to Target, and increase life to Attacker via magic?

Yes.
Back to top Go down
 
MAGIA roba vida
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Join Helbreath :: Main Boards :: Ask the Community-
Jump to: