race_resist

Kuroe

New member
Messages
23
Points
0
Github
Kuroes
Emulator







View File

race_resist




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

Code:
//===== 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.







 
Last edited by a moderator:
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

 
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

 
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


 
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

 
Last edited by a moderator:
Back
Top