![]() |
[Share] NPC Buff
This npc buff routine was added to my gatekeeper class so ill post it as such. You can set the skills you want the npc to cast in the npcdata file as you will see in the example below. then all you need to do is make an html file that passes a link to the buff number with the buff name of the buff you set in the npcdata file. also make sure the npc you use has plenty of mana and good mana regen... also needs to have a nice fast cast speed but not too fast or youll fill your server screen up with dbspeed errors(not that it really matters).
duante |
Gatekeeper AI Code
Code:
class teleporter : default_npc |
Here you can see a sample npc data entry for a buffing npc... as you can see he has his own individual buff list here which can be set completely different per npc you want to use.
duante Code:
npc_begin teleporter 7080 [clavier] level=70 exp=4296345xx.xx5 acquire_exp_rate=0.4 undying=1 can_be_attacked=0 acquire_sp=40 race=human sex=female temper=100 safe_height=100 org_jump=15 skill_list={@s_full_magic_defence} magic_list={} max_item=80 item_make_list={} corpse_make_list={} additional_make_list={} additional_make_multi_list={} slot_chest=[] slot_rhand=[] slot_lhand=[] base_attack_type=fist base_can_penetrate=0 base_attack_range=40 base_damage_range={0;0;80;120} base_rand_dam=30 str=40 int=21 dex=30 wit=75 con=43 men=10 hp_increase=40 mp_increase=100 org_hp_regen=7.5 org_mp_regen=100 ground_low={80;0;10} ground_high={120;-30;30} underwater_low={50;0;10} underwater_high={0;0;30} fly_low={0;0;10} fly_high={0;-30;30} float_low={0;0;10} float_high={0;-30;30} org_earshot=100 sight={0;0;2500;120;5} agro_range=1000 org_hp=24xx.xx818899627 org_mp=10000 base_defend=2xx.xx597408024 base_magic_attack=4xx.xx4627426724 base_magic_defend=2xx.xx8467292763 base_physical_attack=6xx.xx3725587608 physical_hit_modify=4.75 physical_avoid_modify=0 base_attack_speed=253 base_reuse_delay=0 base_critical=4 magic_use_speed_modify=0 status={normal} align=-4900 collision_radius=8 collision_height=25 category={} clan={} clan_help_range=300 guild={} pledge={} pledge_leader=0 alliance={} alliance_leader=0 ignore_clan_list={} ruler=0 ruling_domain={} npc_ai={[clavier];{[fnHi] = [clavier001.htm]};{[fnYouAreChaotic] = [clavier003.htm]};{[SelfBuff1]=@s_might3};{[SelfBuff2]=@s_shield3};{[SelfBuff3]=@s_focus3};{[SelfBuff4]=@s_wind_walk2};{[SelfBuff5]=@s_guidance3};{[SelfBuff6]=@s_agility3};{[SelfBuff7]=@s_arcane_acumen2};{[SelfBuff8]=@s_empower3};{[SelfBuff9]=@s_haste2};{[SelfBuff10]=@s_death_whisper3};{[SelfBuff11]=@s_holy_weapon1};{[SelfBuff12]=@s_mental_aegis};{[SelfBuff13]=@s_magic_barrier2};{[SelfBuff14]=@s_bless_the_body6};{[SelfBuff15]=@s_bless_the_soul6};{[SelfBuff16]=@s_regeneration3};{[SelfBuff17]=@s_berserker_spirit2};{[SelfBuff18]=@s_freezing_skin3};{[SelfBuff19]=@s_bless_shield6};{[SelfBuff20]=@s_auqa_resist3}} corpse_time=7 no_sleep_mode=0 npc_end |
Sample HTM Files...
not_enough_adena.htm Code:
<html>Code:
<html><body><center>Code:
<html> |
This has to be my favorite add-on....
|
Great! Now just add a limit on the level in which these will work, example, only level 20 and below, and make it free, and we have 100% newbie guide! nice work!
|
Nice one!
Oso |
i believe this is the code for checking a level:
Code:
class teleporter : default_npc Code:
<html> |
Quote:
duante |
cool things. now there is no limit to make custodians that buff C3 clan hall / castles buff :)
|
Quote:
|
the htm files must be indexed in any file as geodata ?
im trying to learn ai.obj... help me to understand code, any guide? |
Digital already posted some great info on ai.obj
|
Quote:
|
| All times are GMT. The time now is 15:40. |