diff options
Diffstat (limited to 'npc')
-rw-r--r-- | npc/003-13/arnea.txt | 72 | ||||
-rw-r--r-- | npc/functions/honor.txt | 2 | ||||
-rw-r--r-- | npc/functions/util.txt | 5 |
3 files changed, 42 insertions, 37 deletions
diff --git a/npc/003-13/arnea.txt b/npc/003-13/arnea.txt index 79cd7cfca..4b37d3c85 100644 --- a/npc/003-13/arnea.txt +++ b/npc/003-13/arnea.txt @@ -68,19 +68,19 @@ L_Manage: 'udt_Int=readparam2(bInt); 'udt_Dex=readparam2(bDex); 'udt_Luk=readparam2(bLuk); - 'udt_Dly=readbattleparam(getcharid(3), UDT_ADELAY); - 'udt_Rng=readbattleparam(getcharid(3), UDT_ATKRANGE); + 'udt_Dly=battleparam(UDT_ADELAY); + 'udt_Rng=battleparam(UDT_ATKRANGE); // Save (b)ase data 'udt_bhp=MaxHp; - 'udt_bAtk1=readbattleparam(getcharid(3), UDT_ATKMIN); - 'udt_bAtk2=readbattleparam(getcharid(3), UDT_ATKMAX); - 'udt_bMatk=readbattleparam(getcharid(3), UDT_MATKMAX); - 'udt_bDef=readbattleparam(getcharid(3), UDT_DEF); - 'udt_bMdef=readbattleparam(getcharid(3), UDT_MDEF); - 'udt_bHit=readbattleparam(getcharid(3), UDT_HIT); - 'udt_bFlee=readbattleparam(getcharid(3), UDT_FLEE); - 'udt_bCrit=readbattleparam(getcharid(3), UDT_CRIT); + 'udt_bAtk1=battleparam(UDT_ATKMIN); + 'udt_bAtk2=battleparam(UDT_ATKMAX); + 'udt_bMatk=battleparam(UDT_MATKMAX); + 'udt_bDef=battleparam(UDT_DEF); + 'udt_bMdef=battleparam(UDT_MDEF); + 'udt_bHit=battleparam(UDT_HIT); + 'udt_bFlee=battleparam(UDT_FLEE); + 'udt_bCrit=battleparam(UDT_CRIT); // Save (p)rogression data 'udt_php='udt_bhp/5; @@ -94,19 +94,19 @@ L_Manage: 'udt_pCrit='udt_bCrit/10; /* - .@a1=readbattleparam(getcharid(3), UDT_ATKRANGE); - .@a2=readbattleparam(getcharid(3), UDT_ATKMIN); - .@a3=readbattleparam(getcharid(3), UDT_ATKMAX); - .@d1=readbattleparam(getcharid(3), UDT_DEF); - .@d2=readbattleparam(getcharid(3), UDT_MDEF); - .@c1=readbattleparam(getcharid(3), UDT_HIT); - .@c2=readbattleparam(getcharid(3), UDT_FLEE); - .@m1=readbattleparam(getcharid(3), UDT_MATKMIN); - .@m2=readbattleparam(getcharid(3), UDT_MATKMAX); - .@m3=readbattleparam(getcharid(3), UDT_ELETYPE); - .@s1=readbattleparam(getcharid(3), UDT_STR); - .@s2=readbattleparam(getcharid(3), UDT_ADELAY); - .@s3=readbattleparam(getcharid(3), UDT_DMOTION); + .@a1=battleparam(UDT_ATKRANGE); + .@a2=battleparam(UDT_ATKMIN); + .@a3=battleparam(UDT_ATKMAX); + .@d1=battleparam(UDT_DEF); + .@d2=battleparam(UDT_MDEF); + .@c1=battleparam(UDT_HIT); + .@c2=battleparam(UDT_FLEE); + .@m1=battleparam(UDT_MATKMIN); + .@m2=battleparam(UDT_MATKMAX); + .@m3=battleparam(UDT_ELETYPE); + .@s1=battleparam(UDT_STR); + .@s2=battleparam(UDT_ADELAY); + .@s3=battleparam(UDT_DMOTION); debugmes "Unit Data %d (Str %d)", getcharid(3), .@s1; debugmes "Atk (%d~%d) Range %d", .@a2, .@a3, .@a1; @@ -177,33 +177,33 @@ OnUDTUpdate: // Check for possible cheats, and update default values OnVerify: - if (readbattleparam(getcharid(3), UDT_ATKRANGE) > 'udt_Rng) - 'udt_Rng=readbattleparam(getcharid(3), UDT_ATKRANGE); + if (battleparam(UDT_ATKRANGE) > 'udt_Rng) + 'udt_Rng=battleparam(UDT_ATKRANGE); - if (readbattleparam(getcharid(3), UDT_ATKMAX) > 'udt_bAtk1) { - 'udt_bAtk1=readbattleparam(getcharid(3), UDT_ATKMIN); - 'udt_bAtk2=readbattleparam(getcharid(3), UDT_ATKMAX); + if (battleparam(UDT_ATKMAX) > 'udt_bAtk1) { + 'udt_bAtk1=battleparam(UDT_ATKMIN); + 'udt_bAtk2=battleparam(UDT_ATKMAX); 'udt_pAtk1='udt_bAtk1/10; 'udt_pAtk2='udt_bAtk2/10; } - if (readbattleparam(getcharid(3), UDT_DEF) > 'udt_bDef) { - 'udt_bDef=readbattleparam(getcharid(3), UDT_DEF); + if (battleparam(UDT_DEF) > 'udt_bDef) { + 'udt_bDef=battleparam(UDT_DEF); 'udt_pDef='udt_bDef/5; } - if (readbattleparam(getcharid(3), UDT_MDEF) > 'udt_bMdef) { - 'udt_bMdef=readbattleparam(getcharid(3), UDT_MDEF); + if (battleparam(UDT_MDEF) > 'udt_bMdef) { + 'udt_bMdef=battleparam(UDT_MDEF); 'udt_pMdef='udt_bMdef/5; } - if (readbattleparam(getcharid(3), UDT_MATKMAX) > 'udt_bMatk) { - 'udt_bMatk=readbattleparam(getcharid(3), UDT_MATKMAX); + if (battleparam(UDT_MATKMAX) > 'udt_bMatk) { + 'udt_bMatk=battleparam(UDT_MATKMAX); 'udt_pMatk='udt_bMatk/5; } - if (readbattleparam(getcharid(3), UDT_ADELAY) < 'udt_bDly) - 'udt_bDly=readbattleparam(getcharid(3), UDT_DELAY); + if (battleparam(UDT_ADELAY) < 'udt_bDly) + 'udt_bDly=battleparam(UDT_DELAY); addtimer 5000, instance_npcname(.name$)+"::OnVerify"; end; diff --git a/npc/functions/honor.txt b/npc/functions/honor.txt index e09f6b02f..5ab2e42c8 100644 --- a/npc/functions/honor.txt +++ b/npc/functions/honor.txt @@ -13,7 +13,7 @@ function script get_BR { // attachrid() and detachrid() // readbattleparam(.@rid) - // Load + // Or rather: battleparam() if (attachrid(.@rid)) { .@br+=BaseLevel; } else { diff --git a/npc/functions/util.txt b/npc/functions/util.txt index ad74c75ae..d829c4524 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -835,6 +835,11 @@ function script mercrank { } } +// alias to readbattleparam(getcharid(3), ?? ) +function script battleparam { + return readbattleparam(getcharid(3), getarg(0)); +} + // gettimeparam(GETTIME_X) // Returns the number of seconds/minutes/hours/days/months/years since 01/01/1970 function script gettimeparam { |