Sign in to follow this  
Followers 0
Kuroe

race_resist

4 posts in this topic

Posted (edited)

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0