Jump to content
  • 0

ElementProof Potions and other elemental resistance items


Dragonis1701

Question


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  96
  • Reputation:   7
  • Joined:  05/25/12
  • Last Seen:  

I wanted to make the elementproof potions a player acquires from the Plasma card similar to as if the player had a card that set their armor to that element. SC_Armor_Element gives a player bonus2 bsubele +75 for three minutes. This has worked fine so far but I ran into a bit of a hiccup. If a player has another bsubele boost, such as Valk Shield's +20, instead of it being an 80%  reduction in damage, it is a 95% reduction in damage from that element. Is there a way to easily have SC_Armor_element set an armor as a temporary element or is there no way around it? I experimented before with it and tried to get the potion to set an armor element for a set period of time but didn't succeed in my attempts. I would succeed in getting the potion to set the element but the element would not return to normal after the potion wore off.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 1

  • Group:  Developer
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   45
  • Joined:  08/14/12
  • Last Seen:  

There's a scroll for holy armor, you might be able to use that.

http://ratemyserver.net/item_db.php?item_id=14540&ird=0&small=1&back=1

 

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  96
  • Reputation:   7
  • Joined:  05/25/12
  • Last Seen:  

4 hours ago, nitrous said:

There's a scroll for holy armor, you might be able to use that.

http://ratemyserver.net/item_db.php?item_id=14540&ird=0&small=1&back=1

 

 

That works perfectly. Is there a way to make it so that, if the player is equipped with X element, for example fire, and then uses a fireproof potion, that the player's element becomes fire level 2?

 

Edit: Nevermind. I figured it out. ?

Edited by Dragonis1701
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  51
  • Reputation:   7
  • Joined:  04/13/12
  • Last Seen:  

On 11/6/2019 at 4:47 AM, Dragonis1701 said:

That works perfectly. Is there a way to make it so that, if the player is equipped with X element, for example fire, and then uses a fireproof potion, that the player's element becomes fire level 2?

 

Edit: Nevermind. I figured it out. ?

You must state share on the forums what is the answer to your question. even if its you the original poster who figured it out.

Thank you have a nice day.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  96
  • Reputation:   7
  • Joined:  05/25/12
  • Last Seen:  

On 11/22/2019 at 7:48 AM, tribal0306 said:

You must state share on the forums what is the answer to your question. even if its you the original poster who figured it out.

Thank you have a nice day.

Sure. I just had the use script check if the player has a specific card equipped when you use the item. So, if you use a fire elemental resistance potion, I have it check if the player has a pasana card in their armor when they use it. Looks like this:

12118,Resist_Fire,Fireproof Potion,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if(getequipcardid(EQI_ARMOR,0) == 4099) { sc_start4 SC_ELEMENTALCHANGE,180000,2,Ele_Fire,1,0; } else { sc_start4 SC_ELEMENTALCHANGE,180000,1,Ele_Fire,1,0; } },{},{}
12119,Resist_Water,Coldproof Potion,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if(getequipcardid(EQI_ARMOR,0) == 4089) { sc_start4 SC_ELEMENTALCHANGE,180000,2,Ele_Water,1,0; } else { sc_start4 SC_ELEMENTALCHANGE,180000,1,Ele_Water,1,0; } },{},{}
12120,Resist_Earth,Earthproof Potion,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if(getequipcardid(EQI_ARMOR,0) == 4101) { sc_start4 SC_ELEMENTALCHANGE,180000,2,Ele_Earth,1,0; } else { sc_start4 SC_ELEMENTALCHANGE,180000,1,Ele_Earth,1,0; } },{},{}
12121,Resist_Wind,Thunderproof Potion,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if(getequipcardid(EQI_ARMOR,0) == 4098) { sc_start4 SC_ELEMENTALCHANGE,180000,2,Ele_Wind,1,0; } else { sc_start4 SC_ELEMENTALCHANGE,180000,1,Ele_Wind,1,0; } },{},{}

For those thinking it might be exploitable for people to wear a fire armor, use a potion and then armor switch to get the benefit without the drawback of losing the armor card, I have added in pc.c:

status_change_end(&sd->bl, SC_ELEMENTALCHANGE, INVALID_TIMER);

under:

if (sd->status.inventory[n].equip & EQP_ARMOR) {

 

 

  • Upvote 2
Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

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

×
×
  • Create New...