SpaceAlex Posted October 7, 2005 Share Posted October 7, 2005 The other 30% of the code: 00000BE6 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 00000BEE 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000BF4 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 00000BFC 04 03 000003E9 CONSTI 000003E9 00000C02 0B 20 EQUALII 00000C04 1F 00 0000000C JZ off_00000C10 00000C0A 1D 00 000002B7 JMP off_00000EC1 00000C10 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 00000C18 04 03 000003EA CONSTI 000003EA 00000C1E 0B 20 EQUALII 00000C20 1F 00 0000000C JZ off_00000C2C 00000C26 1D 00 0000029B JMP off_00000EC1 00000C2C 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 00000C34 04 03 000003EB CONSTI 000003EB 00000C3A 0B 20 EQUALII 00000C3C 1F 00 0000000C JZ off_00000C48 00000C42 1D 00 0000027F JMP off_00000EC1 00000C48 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 00000C50 04 03 000003EC CONSTI 000003EC 00000C56 0B 20 EQUALII 00000C58 1F 00 0000000C JZ off_00000C64 00000C5E 1D 00 00000263 JMP off_00000EC1 00000C64 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 00000C6C 04 03 000003ED CONSTI 000003ED 00000C72 0B 20 EQUALII 00000C74 1F 00 0000000C JZ off_00000C80 00000C7A 1D 00 00000247 JMP off_00000EC1 00000C80 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 00000C88 04 03 000003EE CONSTI 000003EE 00000C8E 0B 20 EQUALII 00000C90 1F 00 000001C1 JZ off_00000E51 00000C96 04 06 00000000 CONSTO 00000000 00000C9C 05 00 0032 01 ACTION GetMaxHitPoints(0032), 01 00000CA1 04 06 00000000 CONSTO 00000000 00000CA7 05 00 0031 01 ACTION GetCurrentHitPoints(0031), 01 00000CAC 15 20 SUBII 00000CAE 04 03 00000096 CONSTI 00000096 00000CB4 0E 20 GTII 00000CB6 1F 00 00000195 JZ off_00000E4B 00000CBC 04 04 00000000 CONSTF 0.000000 00000CC2 05 00 0224 00 ACTION GetFirstPC(0224), 00 00000CC7 05 00 0052 00 ACTION EffectResurrection(0052), 00 00000CCC 04 03 00000000 CONSTI 00000000 00000CD2 05 00 00DC 04 ACTION ApplyEffectToObject(00DC), 04 00000CD7 04 04 40A00000 CONSTF 5.000000 00000CDD 05 00 02F7 01 ACTION NoClicksFor(02F7), 01 00000CE2 02 06 RSADDO 00000CE4 04 06 00000000 CONSTO 00000000 00000CEA 05 00 0024 01 ACTION GetLastAttacker(0024), 01 00000CEF 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 00000CF7 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000CFD 05 00 0009 00 ACTION ClearAllActions(0009), 00 00000D02 2C 10 00000244 00000008 STORE_STATE 10, 00000244, 00000008 00000D0C 1D 00 0000000E JMP off_00000D1A 00000D12 1E 00 000001B7 JSR fn_00000EC9 00000D18 20 00 RETN 00000D1A 04 04 3E99999A CONSTF 0.300000 00000D20 05 00 0007 02 ACTION DelayCommand(0007), 02 00000D25 04 03 00000005 CONSTI 00000005 00000D2B 04 06 00000000 CONSTO 00000000 00000D31 05 00 019C 02 ACTION ChangeToStandardFaction(019C), 02 00000D36 2C 10 00000244 00000008 STORE_STATE 10, 00000244, 00000008 00000D40 1D 00 00000012 JMP off_00000D52 00000D46 05 00 0224 00 ACTION GetFirstPC(0224), 00 00000D4B 05 00 0036 01 ACTION CancelCombat(0036), 01 00000D50 20 00 RETN 00000D52 04 04 3F000000 CONSTF 0.500000 00000D58 05 00 0007 02 ACTION DelayCommand(0007), 02 00000D5D 2C 10 00000244 00000008 STORE_STATE 10, 00000244, 00000008 00000D67 1D 00 00000021 JMP off_00000D88 00000D6D 04 03 00000000 CONSTI 00000000 00000D73 04 05 0005 str CONSTS "Jolee" 00000D7C 05 00 00C8 02 ACTION GetObjectByTag(00C8), 02 00000D81 05 00 0036 01 ACTION CancelCombat(0036), 01 00000D86 20 00 RETN 00000D88 04 04 3F000000 CONSTF 0.500000 00000D8E 05 00 0007 02 ACTION DelayCommand(0007), 02 00000D93 2C 10 00000244 00000008 STORE_STATE 10, 00000244, 00000008 00000D9D 1D 00 00000022 JMP off_00000DBF 00000DA3 04 03 00000000 CONSTI 00000000 00000DA9 04 05 0006 str CONSTS "Juhani" 00000DB3 05 00 00C8 02 ACTION GetObjectByTag(00C8), 02 00000DB8 05 00 0036 01 ACTION CancelCombat(0036), 01 00000DBD 20 00 RETN 00000DBF 04 04 3F000000 CONSTF 0.500000 00000DC5 05 00 0007 02 ACTION DelayCommand(0007), 02 00000DCA 2C 10 00000244 00000008 STORE_STATE 10, 00000244, 00000008 00000DD4 1D 00 00000013 JMP off_00000DE7 00000DDA 04 06 00000000 CONSTO 00000000 00000DE0 05 00 0036 01 ACTION CancelCombat(0036), 01 00000DE5 20 00 RETN 00000DE7 04 04 3F000000 CONSTF 0.500000 00000DED 05 00 0007 02 ACTION DelayCommand(0007), 02 00000DF2 2C 10 00000244 00000008 STORE_STATE 10, 00000244, 00000008 00000DFC 1D 00 0000000D JMP off_00000E09 00000E02 05 00 02C6 00 ACTION ClearAllEffects(02C6), 00 00000E07 20 00 RETN 00000E09 04 04 3F000000 CONSTF 0.500000 00000E0F 05 00 0007 02 ACTION DelayCommand(0007), 02 00000E14 2C 10 00000244 00000008 STORE_STATE 10, 00000244, 00000008 00000E1E 1D 00 00000016 JMP off_00000E34 00000E24 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 00000E2C 1E 00 00000156 JSR fn_00000F82 00000E32 20 00 RETN 00000E34 04 04 3F19999A CONSTF 0.600000 00000E3A 05 00 0007 02 ACTION DelayCommand(0007), 02 00000E3F 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000E45 1D 00 00000006 JMP off_00000E4B 00000E4B 1D 00 00000076 JMP off_00000EC1 00000E51 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 00000E59 04 03 000003EF CONSTI 000003EF 00000E5F 0B 20 EQUALII 00000E61 1F 00 0000000C JZ off_00000E6D 00000E67 1D 00 0000005A JMP off_00000EC1 00000E6D 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 00000E75 04 03 000003F0 CONSTI 000003F0 00000E7B 0B 20 EQUALII 00000E7D 1F 00 0000000C JZ off_00000E89 00000E83 1D 00 0000003E JMP off_00000EC1 00000E89 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 00000E91 04 03 000003F1 CONSTI 000003F1 00000E97 0B 20 EQUALII 00000E99 1F 00 0000000C JZ off_00000EA5 00000E9F 1D 00 00000022 JMP off_00000EC1 00000EA5 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 00000EAD 04 03 000003F2 CONSTI 000003F2 00000EB3 0B 20 EQUALII 00000EB5 1F 00 0000000C JZ off_00000EC1 00000EBB 1D 00 00000006 JMP off_00000EC1 00000EC1 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000EC7 20 00 RETN 00000EC9 04 03 00000001 CONSTI 00000001 00000ECF 19 03 NEGI 00000ED1 05 00 000D 01 ACTION SetPartyLeader(000D), 01 00000ED6 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000EDC 2C 10 00000244 00000000 STORE_STATE 10, 00000244, 00000000 00000EE6 1D 00 0000000D JMP off_00000EF3 00000EEC 05 00 02C6 00 ACTION ClearAllEffects(02C6), 00 00000EF1 20 00 RETN 00000EF3 05 00 0224 00 ACTION GetFirstPC(0224), 00 00000EF8 05 00 0006 02 ACTION AssignCommand(0006), 02 00000EFD 2C 10 00000244 00000000 STORE_STATE 10, 00000244, 00000000 00000F07 1D 00 0000000D JMP off_00000F14 00000F0D 05 00 02C6 00 ACTION ClearAllEffects(02C6), 00 00000F12 20 00 RETN 00000F14 04 03 00000000 CONSTI 00000000 00000F1A 04 05 0005 str CONSTS "Jolee" 00000F23 05 00 00C8 02 ACTION GetObjectByTag(00C8), 02 00000F28 05 00 0006 02 ACTION AssignCommand(0006), 02 00000F2D 2C 10 00000244 00000000 STORE_STATE 10, 00000244, 00000000 00000F37 1D 00 0000000D JMP off_00000F44 00000F3D 05 00 02C6 00 ACTION ClearAllEffects(02C6), 00 00000F42 20 00 RETN 00000F44 04 03 00000000 CONSTI 00000000 00000F4A 04 05 0006 str CONSTS "Juhani" 00000F54 05 00 00C8 02 ACTION GetObjectByTag(00C8), 02 00000F59 05 00 0006 02 ACTION AssignCommand(0006), 02 00000F5E 04 03 00000004 CONSTI 00000004 00000F64 05 00 023F 01 ACTION RemovePartyMember(023F), 01 00000F69 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000F6F 04 03 00000005 CONSTI 00000005 00000F75 05 00 023F 01 ACTION RemovePartyMember(023F), 01 00000F7A 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000F80 20 00 RETN 00000F82 04 05 000A str CONSTS "v_useforce" 00000F90 05 00 002E 01 ACTION PlaySound(002E), 01 00000F95 04 03 00000000 CONSTI 00000000 00000F9B 03 01 FFFFFFF8 0004 CPTOPSP FFFFFFF8, 0004 00000FA3 04 03 0000001A CONSTI 0000001A 00000FA9 05 00 01F5 03 ACTION ActionCastFakeSpellAtObject(01F5), 03 00000FAE 2C 10 00000244 00000004 STORE_STATE 10, 00000244, 00000004 00000FB8 1D 00 00000035 JMP off_00000FED 00000FBE 04 04 00000000 CONSTF 0.000000 00000FC4 04 03 00000000 CONSTI 00000000 00000FCA 05 00 0241 01 ACTION GetPartyMemberByIndex(0241), 01 00000FCF 04 03 00000000 CONSTI 00000000 00000FD5 04 03 000003F9 CONSTI 000003F9 00000FDB 05 00 00B4 02 ACTION EffectVisualEffect(00B4), 02 00000FE0 04 03 00000000 CONSTI 00000000 00000FE6 05 00 00DC 04 ACTION ApplyEffectToObject(00DC), 04 00000FEB 20 00 RETN 00000FED 04 04 3ECCCCCD CONSTF 0.400000 00000FF3 05 00 0007 02 ACTION DelayCommand(0007), 02 00000FF8 2C 10 00000244 00000004 STORE_STATE 10, 00000244, 00000004 00001002 1D 00 0000003E JMP off_00001040 00001008 04 04 00000000 CONSTF 0.000000 0000100E 04 03 00000000 CONSTI 00000000 00001014 04 05 0005 str CONSTS "Jolee" 0000101D 05 00 00C8 02 ACTION GetObjectByTag(00C8), 02 00001022 04 03 00000000 CONSTI 00000000 00001028 04 03 000003F9 CONSTI 000003F9 0000102E 05 00 00B4 02 ACTION EffectVisualEffect(00B4), 02 00001033 04 03 00000000 CONSTI 00000000 00001039 05 00 00DC 04 ACTION ApplyEffectToObject(00DC), 04 0000103E 20 00 RETN 00001040 04 04 3ECCCCCD CONSTF 0.400000 00001046 05 00 0007 02 ACTION DelayCommand(0007), 02 0000104B 2C 10 00000244 00000004 STORE_STATE 10, 00000244, 00000004 00001055 1D 00 0000003F JMP off_00001094 0000105B 04 04 00000000 CONSTF 0.000000 00001061 04 03 00000000 CONSTI 00000000 00001067 04 05 0006 str CONSTS "Juhani" 00001071 05 00 00C8 02 ACTION GetObjectByTag(00C8), 02 00001076 04 03 00000000 CONSTI 00000000 0000107C 04 03 000003F9 CONSTI 000003F9 00001082 05 00 00B4 02 ACTION EffectVisualEffect(00B4), 02 00001087 04 03 00000000 CONSTI 00000000 0000108D 05 00 00DC 04 ACTION ApplyEffectToObject(00DC), 04 00001092 20 00 RETN 00001094 04 04 3ECCCCCD CONSTF 0.400000 0000109A 05 00 0007 02 ACTION DelayCommand(0007), 02 0000109F 2C 10 00000244 00000004 STORE_STATE 10, 00000244, 00000004 000010A9 1D 00 0000003A JMP off_000010E3 000010AF 04 04 3DCCCCCD CONSTF 0.100000 000010B5 04 03 00000000 CONSTI 00000000 000010BB 05 00 0241 01 ACTION GetPartyMemberByIndex(0241), 01 000010C0 04 03 00000000 CONSTI 00000000 000010C6 04 06 00000000 CONSTO 00000000 000010CC 05 00 00D5 01 ACTION GetLocation(00D5), 01 000010D1 05 00 010D 02 ACTION EffectForcePushTargeted(010D), 02 000010D6 04 03 00000001 CONSTI 00000001 000010DC 05 00 00DC 04 ACTION ApplyEffectToObject(00DC), 04 000010E1 20 00 RETN 000010E3 04 04 3F000000 CONSTF 0.500000 000010E9 05 00 0007 02 ACTION DelayCommand(0007), 02 000010EE 2C 10 00000244 00000004 STORE_STATE 10, 00000244, 00000004 000010F8 1D 00 00000043 JMP off_0000113B 000010FE 04 04 3DCCCCCD CONSTF 0.100000 00001104 04 03 00000000 CONSTI 00000000 0000110A 04 05 0005 str CONSTS "Jolee" 00001113 05 00 00C8 02 ACTION GetObjectByTag(00C8), 02 00001118 04 03 00000000 CONSTI 00000000 0000111E 04 06 00000000 CONSTO 00000000 00001124 05 00 00D5 01 ACTION GetLocation(00D5), 01 00001129 05 00 010D 02 ACTION EffectForcePushTargeted(010D), 02 0000112E 04 03 00000001 CONSTI 00000001 00001134 05 00 00DC 04 ACTION ApplyEffectToObject(00DC), 04 00001139 20 00 RETN 0000113B 04 04 3F000000 CONSTF 0.500000 00001141 05 00 0007 02 ACTION DelayCommand(0007), 02 00001146 2C 10 00000244 00000004 STORE_STATE 10, 00000244, 00000004 00001150 1D 00 00000044 JMP off_00001194 00001156 04 04 3DCCCCCD CONSTF 0.100000 0000115C 04 03 00000000 CONSTI 00000000 00001162 04 05 0006 str CONSTS "Juhani" 0000116C 05 00 00C8 02 ACTION GetObjectByTag(00C8), 02 00001171 04 03 00000000 CONSTI 00000000 00001177 04 06 00000000 CONSTO 00000000 0000117D 05 00 00D5 01 ACTION GetLocation(00D5), 01 00001182 05 00 010D 02 ACTION EffectForcePushTargeted(010D), 02 00001187 04 03 00000001 CONSTI 00000001 0000118D 05 00 00DC 04 ACTION ApplyEffectToObject(00DC), 04 00001192 20 00 RETN 00001194 04 04 3F000000 CONSTF 0.500000 0000119A 05 00 0007 02 ACTION DelayCommand(0007), 02 0000119F 2C 10 00000244 00000004 STORE_STATE 10, 00000244, 00000004 000011A9 1D 00 00000040 JMP off_000011E9 000011AF 04 05 0000 str CONSTS "" 000011B3 04 05 0000 str CONSTS "" 000011B7 04 05 0000 str CONSTS "" 000011BB 04 05 0000 str CONSTS "" 000011BF 04 05 0000 str CONSTS "" 000011C3 04 05 0000 str CONSTS "" 000011C7 04 03 00000001 CONSTI 00000001 000011CD 04 03 00000000 CONSTI 00000000 000011D3 04 03 00000000 CONSTI 00000000 000011D9 04 05 0000 str CONSTS "" 000011DD 05 00 0224 00 ACTION GetFirstPC(0224), 00 000011E2 05 00 00CC 0B ACTION ActionStartConversation(00CC), 0B 000011E7 20 00 RETN 000011E9 04 04 3F800000 CONSTF 1.000000 000011EF 05 00 0007 02 ACTION DelayCommand(0007), 02 000011F4 1B 00 FFFFFFFC MOVSP FFFFFFFC 000011FA 20 00 RETN If anyone is willing to decomplie this long code, i would be very greatful (hey, it's all i can offer for now ). If not, no hard feelings. I understand that it might be a little too long. Link to comment Share on other sites More sharing options...
stoffe Posted October 7, 2005 Share Posted October 7, 2005 I would like a KOTOR 1 script decomplied aswell. I figured i would just post the code in this thread instead of starting my own. Because the code is so long i'll have to make two posts. k_punk_bast_ud2.ncs: // ST: k_punk_bast_ud2.nss #include "k_inc_generic" #include "k_inc_utility" void ResetPlayerParty(); void FakeWaveAndTalk(object oAttacker); void main() { int nUser = GetUserDefinedEventNumber(); if(nUser == 1001) { // OnHeartbeat } else if(nUser == 1002) { // OnPerceive } else if(nUser == 1003) { // OnCombatRound } else if(nUser == 1004) { // OnDialogue } else if(nUser == 1005) { // OnAttacked } else if(nUser == 1006) { // OnDamaged if (GetMaxHitPoints(OBJECT_SELF) - GetCurrentHitPoints(OBJECT_SELF) > 150) { ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), GetFirstPC()); NoClicksFor(5.0); object oAttacker = GetLastAttacker(OBJECT_SELF); ClearAllActions(); DelayCommand(0.3, ResetPlayerParty()); ChangeToStandardFaction(OBJECT_SELF, STANDARD_FACTION_NEUTRAL); DelayCommand(0.5, CancelCombat(GetFirstPC())); DelayCommand(0.5, CancelCombat(GetObjectByTag("Jolee"))); DelayCommand(0.5, CancelCombat(GetObjectByTag("Juhani"))); DelayCommand(0.5, CancelCombat(OBJECT_SELF)); DelayCommand(0.5, ClearAllEffects()); DelayCommand(0.6, FakeWaveAndTalk(oAttacker)); } } else if(nUser == 1007) { // OnDeath } else if(nUser == 1008) { // OnDisturbed } else if(nUser == 1009) { // OnBlocked } else if(nUser == 1010) { // OnSpellCastAt } } void ResetPlayerParty() { SetPartyLeader(NPC_PLAYER); AssignCommand(GetFirstPC(), ClearAllEffects()); AssignCommand(GetObjectByTag("Jolee"), ClearAllEffects()); AssignCommand(GetObjectByTag("Juhani"), ClearAllEffects()); RemovePartyMember(NPC_JOLEE); RemovePartyMember(NPC_JUHANI); } void FakeWaveAndTalk(object oAttacker) { PlaySound("v_useforce"); ActionCastFakeSpellAtObject(FORCE_POWER_FORCE_WAVE, oAttacker); DelayCommand(0.4, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_FORCE_WAVE), GetPartyMemberByIndex(0))); DelayCommand(0.4, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_FORCE_WAVE), GetObjectByTag("Jolee"))); DelayCommand(0.4, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_FORCE_WAVE), GetObjectByTag("Juhani"))); DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectForcePushTargeted(GetLocation(OBJECT_SELF)), GetPartyMemberByIndex(0), 0.1)); DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectForcePushTargeted(GetLocation(OBJECT_SELF)), GetObjectByTag("Jolee"), 0.1)); DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectForcePushTargeted(GetLocation(OBJECT_SELF)), GetObjectByTag("Juhani"), 0.1)); DelayCommand(1.0, ActionStartConversation(GetFirstPC(), "", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)); } Link to comment Share on other sites More sharing options...
SpaceAlex Posted October 7, 2005 Share Posted October 7, 2005 Doesn't look so long anymore. Thanks. You're being really helpful around here. Link to comment Share on other sites More sharing options...
Darth_Pavel Posted October 27, 2005 Share Posted October 27, 2005 I'd also like to request a decompile, and also some things pointed out. The script: k_pkor_jorstunmu.ncs 00000008 42 000006C3 T 000006C3 0000000D 1E 00 00000008 JSR fn_00000015 00000013 20 00 RETN 00000015 02 03 RSADDI 00000017 04 03 00000000 CONSTI 00000000 0000001D 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 00000025 1B 00 FFFFFFFC MOVSP FFFFFFFC 0000002B 02 03 RSADDI 0000002D 04 03 00000001 CONSTI 00000001 00000033 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 0000003B 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000041 02 03 RSADDI 00000043 04 03 00000002 CONSTI 00000002 00000049 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 00000051 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000057 02 03 RSADDI 00000059 04 03 00000003 CONSTI 00000003 0000005F 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 00000067 1B 00 FFFFFFFC MOVSP FFFFFFFC 0000006D 02 03 RSADDI 0000006F 04 03 00000004 CONSTI 00000004 00000075 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 0000007D 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000083 02 03 RSADDI 00000085 04 03 00000005 CONSTI 00000005 0000008B 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 00000093 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000099 02 03 RSADDI 0000009B 04 03 00000006 CONSTI 00000006 000000A1 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 000000A9 1B 00 FFFFFFFC MOVSP FFFFFFFC 000000AF 02 03 RSADDI 000000B1 04 03 00000007 CONSTI 00000007 000000B7 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 000000BF 1B 00 FFFFFFFC MOVSP FFFFFFFC 000000C5 02 03 RSADDI 000000C7 04 03 00000008 CONSTI 00000008 000000CD 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 000000D5 1B 00 FFFFFFFC MOVSP FFFFFFFC 000000DB 02 03 RSADDI 000000DD 04 03 00000009 CONSTI 00000009 000000E3 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 000000EB 1B 00 FFFFFFFC MOVSP FFFFFFFC 000000F1 02 03 RSADDI 000000F3 04 03 0000000A CONSTI 0000000A 000000F9 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 00000101 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000107 02 03 RSADDI 00000109 04 03 0000000B CONSTI 0000000B 0000010F 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 00000117 1B 00 FFFFFFFC MOVSP FFFFFFFC 0000011D 02 03 RSADDI 0000011F 04 03 0000000C CONSTI 0000000C 00000125 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 0000012D 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000133 02 03 RSADDI 00000135 04 03 0000000D CONSTI 0000000D 0000013B 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 00000143 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000149 02 03 RSADDI 0000014B 04 03 0000000E CONSTI 0000000E 00000151 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 00000159 1B 00 FFFFFFFC MOVSP FFFFFFFC 0000015F 02 03 RSADDI 00000161 04 03 0000000F CONSTI 0000000F 00000167 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 0000016F 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000175 02 03 RSADDI 00000177 04 03 00000010 CONSTI 00000010 0000017D 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 00000185 1B 00 FFFFFFFC MOVSP FFFFFFFC 0000018B 02 03 RSADDI 0000018D 04 03 00000011 CONSTI 00000011 00000193 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 0000019B 1B 00 FFFFFFFC MOVSP FFFFFFFC 000001A1 02 03 RSADDI 000001A3 04 03 00000012 CONSTI 00000012 000001A9 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 000001B1 1B 00 FFFFFFFC MOVSP FFFFFFFC 000001B7 02 03 RSADDI 000001B9 04 03 00000013 CONSTI 00000013 000001BF 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 000001C7 1B 00 FFFFFFFC MOVSP FFFFFFFC 000001CD 02 03 RSADDI 000001CF 04 03 0000044C CONSTI 0000044C 000001D5 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 000001DD 1B 00 FFFFFFFC MOVSP FFFFFFFC 000001E3 02 03 RSADDI 000001E5 04 03 00000006 CONSTI 00000006 000001EB 19 03 NEGI 000001ED 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 000001F5 1B 00 FFFFFFFC MOVSP FFFFFFFC 000001FB 02 03 RSADDI 000001FD 04 03 00000005 CONSTI 00000005 00000203 19 03 NEGI 00000205 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 0000020D 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000213 02 03 RSADDI 00000215 04 03 00000004 CONSTI 00000004 0000021B 19 03 NEGI 0000021D 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 00000225 1B 00 FFFFFFFC MOVSP FFFFFFFC 0000022B 02 03 RSADDI 0000022D 04 03 00000002 CONSTI 00000002 00000233 19 03 NEGI 00000235 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 0000023D 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000243 02 03 RSADDI 00000245 04 03 00000001 CONSTI 00000001 0000024B 19 03 NEGI 0000024D 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 00000255 1B 00 FFFFFFFC MOVSP FFFFFFFC 0000025B 02 03 RSADDI 0000025D 04 03 00000000 CONSTI 00000000 00000263 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 0000026B 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000271 2A 00 SAVEBP 00000273 1E 00 00000010 JSR fn_00000283 00000279 2B 00 RESTOREBP 0000027B 1B 00 FFFFFF94 MOVSP FFFFFF94 00000281 20 00 RETN 00000283 02 06 RSADDO 00000285 04 06 00000000 CONSTO 00000000 0000028B 05 00 0018 01 ACTION GetArea(0018), 01 00000290 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 00000298 1B 00 FFFFFFFC MOVSP FFFFFFFC 0000029E 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 000002A6 05 00 01AA 01 ACTION MusicBackgroundStop(01AA), 01 000002AB 2C 10 0000006C 00000004 STORE_STATE 10, 0000006C, 00000004 000002B5 1D 00 00000015 JMP off_000002CA 000002BB 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 000002C3 05 00 01AE 01 ACTION MusicBattlePlay(01AE), 01 000002C8 20 00 RETN 000002CA 04 04 3DCCCCCD CONSTF 0.100000 000002D0 05 00 0007 02 ACTION DelayCommand(0007), 02 000002D5 02 06 RSADDO 000002D7 05 00 0224 00 ACTION GetFirstPC(0224), 00 000002DC 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 000002E4 1B 00 FFFFFFFC MOVSP FFFFFFFC 000002EA 02 06 RSADDO 000002EC 04 03 00000000 CONSTI 00000000 000002F2 04 05 000C str CONSTS "kor38b_mekel" 00000302 05 00 00C8 02 ACTION GetObjectByTag(00C8), 02 00000307 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 0000030F 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000315 02 06 RSADDO 00000317 04 03 00000001 CONSTI 00000001 0000031D 05 00 0241 01 ACTION GetPartyMemberByIndex(0241), 01 00000322 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 0000032A 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000330 02 06 RSADDO 00000332 04 03 00000000 CONSTI 00000000 00000338 04 05 0010 str CONSTS "k38b_way_player1" 0000034C 05 00 00C8 02 ACTION GetObjectByTag(00C8), 02 00000351 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 00000359 1B 00 FFFFFFFC MOVSP FFFFFFFC 0000035F 02 12 RSADDLOC 00000361 03 01 FFFFFFF8 0004 CPTOPSP FFFFFFF8, 0004 00000369 05 00 00D5 01 ACTION GetLocation(00D5), 01 0000036E 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 00000376 1B 00 FFFFFFFC MOVSP FFFFFFFC 0000037C 02 06 RSADDO 0000037E 04 03 00000002 CONSTI 00000002 00000384 05 00 0241 01 ACTION GetPartyMemberByIndex(0241), 01 00000389 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 00000391 1B 00 FFFFFFFC MOVSP FFFFFFFC 00000397 02 06 RSADDO 00000399 04 03 00000000 CONSTI 00000000 0000039F 04 05 0010 str CONSTS "k38b_way_player2" 000003B3 05 00 00C8 02 ACTION GetObjectByTag(00C8), 02 000003B8 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 000003C0 1B 00 FFFFFFFC MOVSP FFFFFFFC 000003C6 02 12 RSADDLOC 000003C8 03 01 FFFFFFF8 0004 CPTOPSP FFFFFFF8, 0004 000003D0 05 00 00D5 01 ACTION GetLocation(00D5), 01 000003D5 01 01 FFFFFFF8 0004 CPDOWNSP FFFFFFF8, 0004 000003DD 1B 00 FFFFFFFC MOVSP FFFFFFFC 000003E3 05 00 00CD 00 ACTION ActionPauseConversation(00CD), 00 000003E8 2C 10 0000006C 00000024 STORE_STATE 10, 0000006C, 00000024 000003F2 1D 00 0000000D JMP off_000003FF 000003F8 05 00 0009 00 ACTION ClearAllActions(0009), 00 000003FD 20 00 RETN 000003FF 03 01 FFFFFFE0 0004 CPTOPSP FFFFFFE0, 0004 00000407 05 00 0006 02 ACTION AssignCommand(0006), 02 0000040C 2C 10 0000006C 00000024 STORE_STATE 10, 0000006C, 00000024 00000416 1D 00 0000001F JMP off_00000435 0000041C 04 04 41F00000 CONSTF 30.000000 00000422 04 04 3F800000 CONSTF 1.000000 00000428 04 03 00000016 CONSTI 00000016 0000042E 05 00 0028 03 ACTION ActionPlayAnimation(0028), 03 00000433 20 00 RETN 00000435 03 01 FFFFFFE0 0004 CPTOPSP FFFFFFE0, 0004 0000043D 05 00 0006 02 ACTION AssignCommand(0006), 02 00000442 03 01 FFFFFFE4 0004 CPTOPSP FFFFFFE4, 0004 0000044A 05 00 002A 01 ACTION GetIsObjectValid(002A), 01 0000044F 1F 00 00000066 JZ off_000004B5 00000455 2C 10 0000006C 00000024 STORE_STATE 10, 0000006C, 00000024 0000045F 1D 00 0000000D JMP off_0000046C 00000465 05 00 0009 00 ACTION ClearAllActions(0009), 00 0000046A 20 00 RETN 0000046C 03 01 FFFFFFE4 0004 CPTOPSP FFFFFFE4, 0004 00000474 05 00 0006 02 ACTION AssignCommand(0006), 02 00000479 2C 10 0000006C 00000024 STORE_STATE 10, 0000006C, 00000024 00000483 1D 00 0000001F JMP off_000004A2 00000489 04 04 41F00000 CONSTF 30.000000 0000048F 04 04 3F800000 CONSTF 1.000000 00000495 04 03 00000016 CONSTI 00000016 0000049B 05 00 0028 03 ACTION ActionPlayAnimation(0028), 03 000004A0 20 00 RETN 000004A2 03 01 FFFFFFE4 0004 CPTOPSP FFFFFFE4, 0004 000004AA 05 00 0006 02 ACTION AssignCommand(0006), 02 000004AF 1D 00 00000006 JMP off_000004B5 000004B5 03 01 FFFFFFE8 0004 CPTOPSP FFFFFFE8, 0004 000004BD 05 00 002A 01 ACTION GetIsObjectValid(002A), 01 000004C2 1F 00 0000007C JZ off_0000053E 000004C8 03 01 FFFFFFF0 0004 CPTOPSP FFFFFFF0, 0004 000004D0 03 01 FFFFFFE4 0004 CPTOPSP FFFFFFE4, 0004 000004D8 1E 00 000000FC JSR fn_000005D4 000004DE 2C 10 0000006C 00000024 STORE_STATE 10, 0000006C, 00000024 000004E8 1D 00 0000000D JMP off_000004F5 000004EE 05 00 0009 00 ACTION ClearAllActions(0009), 00 000004F3 20 00 RETN 000004F5 03 01 FFFFFFE8 0004 CPTOPSP FFFFFFE8, 0004 000004FD 05 00 0006 02 ACTION AssignCommand(0006), 02 00000502 2C 10 0000006C 00000024 STORE_STATE 10, 0000006C, 00000024 0000050C 1D 00 0000001F JMP off_0000052B 00000512 04 04 41F00000 CONSTF 30.000000 00000518 04 04 3F800000 CONSTF 1.000000 0000051E 04 03 00000016 CONSTI 00000016 00000524 05 00 0028 03 ACTION ActionPlayAnimation(0028), 03 00000529 20 00 RETN 0000052B 03 01 FFFFFFE8 0004 CPTOPSP FFFFFFE8, 0004 00000533 05 00 0006 02 ACTION AssignCommand(0006), 02 00000538 1D 00 00000006 JMP off_0000053E 0000053E 03 01 FFFFFFF4 0004 CPTOPSP FFFFFFF4, 0004 00000546 05 00 002A 01 ACTION GetIsObjectValid(002A), 01 0000054B 1F 00 0000007C JZ off_000005C7 00000551 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 00000559 03 01 FFFFFFF0 0004 CPTOPSP FFFFFFF0, 0004 00000561 1E 00 00000073 JSR fn_000005D4 00000567 2C 10 0000006C 00000024 STORE_STATE 10, 0000006C, 00000024 00000571 1D 00 0000000D JMP off_0000057E 00000577 05 00 0009 00 ACTION ClearAllActions(0009), 00 0000057C 20 00 RETN 0000057E 03 01 FFFFFFF4 0004 CPTOPSP FFFFFFF4, 0004 00000586 05 00 0006 02 ACTION AssignCommand(0006), 02 0000058B 2C 10 0000006C 00000024 STORE_STATE 10, 0000006C, 00000024 00000595 1D 00 0000001F JMP off_000005B4 0000059B 04 04 41F00000 CONSTF 30.000000 000005A1 04 04 3F800000 CONSTF 1.000000 000005A7 04 03 00000016 CONSTI 00000016 000005AD 05 00 0028 03 ACTION ActionPlayAnimation(0028), 03 000005B2 20 00 RETN 000005B4 03 01 FFFFFFF4 0004 CPTOPSP FFFFFFF4, 0004 000005BC 05 00 0006 02 ACTION AssignCommand(0006), 02 000005C1 1D 00 00000006 JMP off_000005C7 000005C7 05 00 00CE 00 ACTION ActionResumeConversation(00CE), 00 000005CC 1B 00 FFFFFFDC MOVSP FFFFFFDC 000005D2 20 00 RETN 000005D4 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 000005DC 05 00 002A 01 ACTION GetIsObjectValid(002A), 01 000005E1 22 03 NOTI 000005E3 1F 00 00000012 JZ off_000005F5 000005E9 1D 00 000000D2 JMP off_000006BB 000005EF 1D 00 00000006 JMP off_000005F5 000005F5 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 000005FD 05 00 0031 01 ACTION GetCurrentHitPoints(0031), 01 00000602 04 03 00000001 CONSTI 00000001 00000608 0F 20 LTII 0000060A 1F 00 0000004E JZ off_00000658 00000610 04 04 00000000 CONSTF 0.000000 00000616 03 01 FFFFFFF8 0004 CPTOPSP FFFFFFF8, 0004 0000061E 05 00 0052 00 ACTION EffectResurrection(0052), 00 00000623 04 03 00000000 CONSTI 00000000 00000629 05 00 00DC 04 ACTION ApplyEffectToObject(00DC), 04 0000062E 04 04 00000000 CONSTF 0.000000 00000634 03 01 FFFFFFF8 0004 CPTOPSP FFFFFFF8, 0004 0000063C 04 03 00000001 CONSTI 00000001 00000642 05 00 004E 01 ACTION EffectHeal(004E), 01 00000647 04 03 00000000 CONSTI 00000000 0000064D 05 00 00DC 04 ACTION ApplyEffectToObject(00DC), 04 00000652 1D 00 00000006 JMP off_00000658 00000658 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 00000660 04 03 00000001 CONSTI 00000001 00000666 05 00 00A2 02 ACTION SetCommandable(00A2), 02 0000066B 2C 10 0000006C 00000008 STORE_STATE 10, 0000006C, 00000008 00000675 1D 00 0000000D JMP off_00000682 0000067B 05 00 0009 00 ACTION ClearAllActions(0009), 00 00000680 20 00 RETN 00000682 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 0000068A 05 00 0006 02 ACTION AssignCommand(0006), 02 0000068F 2C 10 0000006C 00000008 STORE_STATE 10, 0000006C, 00000008 00000699 1D 00 00000015 JMP off_000006AE 0000069F 03 01 FFFFFFF8 0004 CPTOPSP FFFFFFF8, 0004 000006A7 05 00 00D6 01 ACTION ActionJumpToLocation(00D6), 01 000006AC 20 00 RETN 000006AE 03 01 FFFFFFFC 0004 CPTOPSP FFFFFFFC, 0004 000006B6 05 00 0006 02 ACTION AssignCommand(0006), 02 000006BB 1B 00 FFFFFFF8 MOVSP FFFFFFF8 000006C1 20 00 RETN This is what I've got down. From looking at nwscript.nss, this could get a little weird. /* ? */ #include "k_inc_debug" void main() { object oArea = GetArea(OBJECT_SELF); MusicBackgroundStop(oArea); DelayCommand(0.1, MusicBattlePlay(oArea)); object oPC = GetFirstPC(); object oMek = GetObjectByTag("kor38b_mekel"); object oBud1 = GetPartyMemberByIndex(1); object oWav1 = GetObjectByTag("k38b_way_player1"); location lwav1 = GetLocation(oWav1); object oBud2 = GetPartyMemberByIndex(2); object oWav2 = GetObjectByTag("k38b_way_player2"); location lwav2 = GetLocation(oWav2); ActionPauseConversation(); AssignCommand(/* ? */, ClearAllActions()); AssignCommand(/* Mekel? */, ActionPlayAnimation(ANIMATION_LOOPING_DANCE/* WTF?!? */, 1.0, 30.0)); AssignCommand(/* PC? */, ActionPlayAnimation(ANIMATION_LOOPING_DANCE/* ??? */, 1.0, 30.0)); } From there, I'm completely stumped. EDIT: Thanks stoffe. Link to comment Share on other sites More sharing options...
stoffe Posted October 27, 2005 Share Posted October 27, 2005 I'd also like to request a decompile, and also some things pointed out. The script: k_pkor_jorstunmu.ncs #include "k_inc_utility" void RaiseAndJump(object oTarget, location lLoc); void main() { object oArea = GetArea(OBJECT_SELF); MusicBackgroundStop(oArea); DelayCommand(0.1, MusicBattlePlay(oArea)); object oPC = GetFirstPC(); object oMekel = GetObjectByTag("kor38b_mekel"); object oParty1 = GetPartyMemberByIndex(1); object oWP1 = GetObjectByTag("k38b_way_player1"); location lWP1 = GetLocation(oWP1); object oParty2 = GetPartyMemberByIndex(2); object oWP2 = GetObjectByTag("k38b_way_player2"); location lWP2 = GetLocation(oWP2); ActionPauseConversation(); AssignCommand(oPC, ClearAllActions()); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_SLEEP, 1.0, 30.0)); if (GetIsObjectValid(oMekel)) { AssignCommand(oMekel, ClearAllActions()); AssignCommand(oMekel, ActionPlayAnimation(ANIMATION_LOOPING_SLEEP, 1.0, 30.0)); } if (GetIsObjectValid(oParty1)) { RaiseAndJump(oParty1, lWP1); AssignCommand(oParty1, ClearAllActions()); AssignCommand(oParty1, ActionPlayAnimation(ANIMATION_LOOPING_SLEEP, 1.0, 30.0)); } if (GetIsObjectValid(oParty2)) { RaiseAndJump(oParty2, lWP2); AssignCommand(oParty2, ClearAllActions()); AssignCommand(oParty2, ActionPlayAnimation(ANIMATION_LOOPING_SLEEP, 1.0, 30.0)); } ActionResumeConversation(); } void RaiseAndJump(object oTarget, location lLoc) { if (!GetIsObjectValid(oTarget)) return; if (GetCurrentHitPoints(oTarget) < 1) { ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), oTarget); ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(1), oTarget); } SetCommandable(TRUE, oTarget); AssignCommand(oTarget, ClearAllActions()); AssignCommand(oTarget, ActionJumpToLocation(lLoc)); } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.