Jump to content
Kuroe

race_resist

Recommended Posts

race_resist


A simple plugin that adds race_resist() into your emulator (Checks race resist of a player).

//===== Description ==========================================
//= Checks how much resistance a character has to a particular
// race.
//
//= race_resist(<type>{, <account id>});
//= E.g. race_resist(RC_Player);
//= E.g. race_resist(RC_Player, getcharid(CHAR_ID_ACCOUNT));

Its just actually a rip off plugin from @bWolfie's check_resist() plugin full credits goes to him.


 

Edited by Kuroe

Share this post


Link to post
Share on other sites

not working

I equip a 'Secular_Mission' ItemID 2127, and expecting it to list all as 25,

prontera,155,185,5	script	kjhdsfks	1_F_MARIA,{
	for ( .@i = RC_Formless; .@i <= RC_Player; ++.@i )
		dispbottom race_resist(.@i) +"";
	end;
}

but it display all in 0 instead

a few places are wrong in your plugin, but are actually correct in wolfie's version

 

1. the constant case-sensitivity
wolfie's constants are correct, but yours are wrong
should follow the constants.md file, not the source file
https://github.com/HerculesWS/Hercules/blob/stable/doc/constants.md#elements

### Elements

- `Ele_Neutral`: 0
- `Ele_Water`: 1
- `Ele_Earth`: 2
- `Ele_Fire`: 3
- `Ele_Wind`: 4
- `Ele_Poison`: 5
- `Ele_Holy`: 6
- `Ele_Dark`: 7
- `Ele_Ghost`: 8
- `Ele_Undead`: 9
- `Ele_All`: 255

### Races

- `RC_Formless`: 0
- `RC_Undead`: 1
- `RC_Brute`: 2
- `RC_Plant`: 3
- `RC_Insect`: 4
- `RC_Fish`: 5
- `RC_Demon`: 6
- `RC_DemiHuman`: 7
- `RC_Angel`: 8
- `RC_Dragon`: 9
- `RC_Player`: 10
- `RC_Boss`: 11
- `RC_NonBoss`: 12
- `RC_NonDemiHuman`: 14
- `RC_NonPlayer`: 15
- `RC_DemiPlayer`: 16
- `RC_NonDemiPlayer`: 17
- `RC_All`: 255

 

2. your plugin stop at RC_Player, which is 10, but I tested with 'Secular_Mission' which has
Script: <" bonus2 bSubRace, RC_All, 25; ">
RC_ALL is 255 ... lol

Share this post


Link to post
Share on other sites
1 hour ago, AnnieRuru said:

not working

I equip a 'Secular_Mission' ItemID 2127, and expecting it to list all as 25,


prontera,155,185,5	script	kjhdsfks	1_F_MARIA,{
	for ( .@i = RC_Formless; .@i <= RC_Player; ++.@i )
		dispbottom race_resist(.@i) +"";
	end;
}

but it display all in 0 instead

a few places are wrong in your plugin, but are actually correct in wolfie's version

 

1. the constant case-sensitivity
wolfie's constants are correct, but yours are wrong
should follow the constants.md file, not the source file
https://github.com/HerculesWS/Hercules/blob/stable/doc/constants.md#elements


### Elements

- `Ele_Neutral`: 0
- `Ele_Water`: 1
- `Ele_Earth`: 2
- `Ele_Fire`: 3
- `Ele_Wind`: 4
- `Ele_Poison`: 5
- `Ele_Holy`: 6
- `Ele_Dark`: 7
- `Ele_Ghost`: 8
- `Ele_Undead`: 9
- `Ele_All`: 255

### Races

- `RC_Formless`: 0
- `RC_Undead`: 1
- `RC_Brute`: 2
- `RC_Plant`: 3
- `RC_Insect`: 4
- `RC_Fish`: 5
- `RC_Demon`: 6
- `RC_DemiHuman`: 7
- `RC_Angel`: 8
- `RC_Dragon`: 9
- `RC_Player`: 10
- `RC_Boss`: 11
- `RC_NonBoss`: 12
- `RC_NonDemiHuman`: 14
- `RC_NonPlayer`: 15
- `RC_DemiPlayer`: 16
- `RC_NonDemiPlayer`: 17
- `RC_All`: 255

 

2. your plugin stop at RC_Player, which is 10, but I tested with 'Secular_Mission' which has
Script: <" bonus2 bSubRace, RC_All, 25; ">
RC_ALL is 255 ... lol

Thank you for pointing it out. updated to ver 1.1

Share this post


Link to post
Share on other sites
On 4/11/2019 at 7:02 AM, AnnieRuru said:

not working

I equip a 'Secular_Mission' ItemID 2127, and expecting it to list all as 25,

prontera,155,185,5 script kjhdsfks 1_F_MARIA,{ for ( .@i = RC_Formless; .@i <= RC_Player; ++.@i ) dispbottom race_resist(.@i) +""; end; }


prontera,155,185,5	script	kjhdsfks	1_F_MARIA,{
	for ( .@i = RC_Formless; .@i <= RC_Player; ++.@i )
		dispbottom race_resist(.@i) +"";
	end;
}

but it display all in 0 instead

a few places are wrong in your plugin, but are actually correct in wolfie's version

 

1. the constant case-sensitivity
wolfie's constants are correct, but yours are wrong
should follow the constants.md file, not the source file
https://github.com/HerculesWS/Hercules/blob/stable/doc/constants.md#elements

### Elements - `Ele_Neutral`: 0 - `Ele_Water`: 1 - `Ele_Earth`: 2 - `Ele_Fire`: 3 - `Ele_Wind`: 4 - `Ele_Poison`: 5 - `Ele_Holy`: 6 - `Ele_Dark`: 7 - `Ele_Ghost`: 8 - `Ele_Undead`: 9 - `Ele_All`: 255 ### Races - `RC_Formless`: 0 - `RC_Undead`: 1 - `RC_Brute`: 2 - `RC_Plant`: 3 - `RC_Insect`: 4 - `RC_Fish`: 5 - `RC_Demon`: 6 - `RC_DemiHuman`: 7 - `RC_Angel`: 8 - `RC_Dragon`: 9 - `RC_Player`: 10 - `RC_Boss`: 11 - `RC_NonBoss`: 12 - `RC_NonDemiHuman`: 14 - `RC_NonPlayer`: 15 - `RC_DemiPlayer`: 16 - `RC_NonDemiPlayer`: 17 - `RC_All`: 255


### Elements

- `Ele_Neutral`: 0
- `Ele_Water`: 1
- `Ele_Earth`: 2
- `Ele_Fire`: 3
- `Ele_Wind`: 4
- `Ele_Poison`: 5
- `Ele_Holy`: 6
- `Ele_Dark`: 7
- `Ele_Ghost`: 8
- `Ele_Undead`: 9
- `Ele_All`: 255

### Races

- `RC_Formless`: 0
- `RC_Undead`: 1
- `RC_Brute`: 2
- `RC_Plant`: 3
- `RC_Insect`: 4
- `RC_Fish`: 5
- `RC_Demon`: 6
- `RC_DemiHuman`: 7
- `RC_Angel`: 8
- `RC_Dragon`: 9
- `RC_Player`: 10
- `RC_Boss`: 11
- `RC_NonBoss`: 12
- `RC_NonDemiHuman`: 14
- `RC_NonPlayer`: 15
- `RC_DemiPlayer`: 16
- `RC_NonDemiPlayer`: 17
- `RC_All`: 255

 

2. your plugin stop at RC_Player, which is 10, but I tested with 'Secular_Mission' which has
Script: <" bonus2 bSubRace, RC_All, 25; ">
RC_ALL is 255 ... lol

Yes, bug..

239fLRT.png

Share this post


Link to post
Share on other sites

That's rly helpful for users who can see it at a npc and no longer need to calculate it and for server owner to check if all effects (race or ele resistant) works. U do not longer need to attack with the item and without the item. I will add size and skill resistence too and others like freeze resistance.

 

Thanks

Edited by Rynbef

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.