Jump to content

Home

Decompile script request


Achilles

Recommended Posts

Hello,

 

It's been a while since I've been active in this part of LF, so I'm not sure if there are very many people who still assist with this type of request.

 

I am asking for help with the following scripts:

 

202TEL

a_stockstore_01.ncs

a_stockstore_02.ncs

a_stockstore_03.ncs

 

301NAR

a_stock_oondar.ncs

 

403DXN

a_stock_kex.ncs

 

501OND

a_stock_margar.ncs

 

502OND

a_stock_geg.ncs

 

602DAN

a_stock_adum.ncs

 

They are all "compare_fail" via the Team Gizka resource and my own efforts to run them through DeNCS don't fare much better :(

 

Any assistance would be greatly appreciated. Thanks in advance!

Link to comment
Share on other sites

Hello,

 

It's been a while since I've been active in this part of LF, so I'm not sure if there are very many people who still assist with this type of request.

 

I am asking for help with the following scripts:

 

202TEL

a_stockstore_01.ncs

a_stockstore_02.ncs

a_stockstore_03.ncs

 

301NAR

a_stock_oondar.ncs

 

403DXN

a_stock_kex.ncs

 

501OND

a_stock_margar.ncs

 

502OND

a_stock_geg.ncs

 

602DAN

a_stock_adum.ncs

 

They are all "compare_fail" via the Team Gizka resource and my own efforts to run them through DeNCS don't fare much better :(

 

Any assistance would be greatly appreciated. Thanks in advance!

 

I can't really help with the Scripting, I've given up trying to understand it for the moment (I have directed Stoffe, here who is usually the scripting genuis who turns up in threads like this :)) The Stoffe did say to me; "Can probably be done The Hard Way by analyzing the parsed bytecode by hand"

 

Depending on what your trying to do, the .utc for the shops can be edited to add items if your wanting to get items ingame via shop?

Link to comment
Share on other sites

I can't really help with the Scripting, I've given up trying to understand it for the moment (I have directed Stoffe, here who is usually the scripting genuis who turns up in threads like this :)) The Stoffe did say to me; "Can probably be done The Hard Way by analyzing the parsed bytecode by hand"

 

Thank you for doing so. Based on what I *think* I saw in the TG files, I suspect that most of the code is include files and the scripts themselves are relatively simple. I'm keeping my fingers crossed.

 

Depending on what your trying to do, the .utc for the shops can be edited to add items if your wanting to get items ingame via shop?
Yeah, unfortunately for what I'm trying to do, that won't work :(;)

 

Adding stuff to inventories is easy. Getting stores to play nice with customized random loot...not so much.

 

PS: I thought I should mention that I checked the source code for USM just in case they included it there. No luck.

Link to comment
Share on other sites

Thank you for doing so.

 

No worries, sorry I can't help in any other way; I'm sure Stoffe will post in here in due course.

 

PS: I thought I should mention that I checked the source code for USM just in case they included it there. No luck.

 

It maybe worth dropping D3 a PM as IIRC she did the random loot scripts for USM, so shem maybe of some help, though she's busy so not sure she will be checking Holowan, so you maybe better dropping her a PM on the subject.

Link to comment
Share on other sites

No worries, sorry I can't help in any other way; I'm sure Stoffe will post in here in due course.

 

I appreciate the assistance.

 

It maybe worth dropping D3 a PM as IIRC she did the random loot scripts for USM, so shem maybe of some help, though she's busy so not sure she will be checking Holowan, so you maybe better dropping her a PM on the subject.

 

Good idea. I might do that as well.

Link to comment
Share on other sites

I am asking for help with the following scripts:

 

202TEL

a_stockstore_01.ncs

a_stockstore_02.ncs

a_stockstore_03.ncs

 

Here are versions of those 3 that don't fail comparing :) I'll have a look at the others later today when I have more time.

 

a_stockstore_01.nss

#include "k_inc_utility"
#include "k_inc_treasure"
#include "k_inc_treas_k2"



void main() {
   if (GetLocalBoolean(OBJECT_SELF, 58) == FALSE) {
       SetLocalBoolean(OBJECT_SELF, 58, TRUE);

       int iItemLevel;
       int iPos;
       int iQuantity = 1;

       string sItemName = GetTreasureNormal(Random(15) + 1, 100);
       CreateItemOnObject(sItemName, GetObjectByTag("m_202_001"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 245);
       CreateItemOnObject(sItemName, GetObjectByTag("m_202_001"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 100);
       CreateItemOnObject(sItemName, GetObjectByTag("m_202_001"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 200);
       CreateItemOnObject(sItemName, GetObjectByTag("m_202_001"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 200);
       CreateItemOnObject(sItemName, GetObjectByTag("m_202_001"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 300);
       CreateItemOnObject(sItemName, GetObjectByTag("m_202_001"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 300);
       CreateItemOnObject(sItemName, GetObjectByTag("m_202_001"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 400);
       CreateItemOnObject(sItemName, GetObjectByTag("m_202_001"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 400);
       CreateItemOnObject(sItemName, GetObjectByTag("m_202_001"), iQuantity);

       iItemLevel;
       while ((iItemLevel < 25)) {
           {
               string sItem = GetTreasureNormal(iItemLevel, 0);
               if (iItemLevel < 10) {
                   iQuantity = (Random(2) + 1);
               }
               else {
                   iQuantity = 1;
               }

               if ((iPos = FindSubString(sItem, "[")) >= 0) {
                   iQuantity = StringToInt(GetSubString(sItem, (iPos + 1), 4));
                   sItemName = GetSubString(sItem, 0, iPos);
               }
               else {
                   sItemName = sItem;
               }

               CreateItemOnObject(sItemName, GetObjectByTag("m_202_001"), iQuantity);
           }
           iItemLevel++;
       }
   }
}


 

a_stockstore_02.nss

#include "k_inc_utility"
#include "k_inc_treasure"
#include "k_inc_treas_k2"

void main() {
   if (GetLocalBoolean(OBJECT_SELF, 59) == FALSE) {
       SetLocalBoolean(OBJECT_SELF, 59, TRUE);

       int iItemLevel = 15;
       int iPos;
       int iQuantity = 1;
       string sItemName;

       GetTreasureNormal((Random(15) + 1), 240);
       CreateItemOnObject("a_medium_05", GetObjectByTag("m_202_002"), 1);
       CreateItemOnObject("a_belt_10",   GetObjectByTag("m_202_002"), 1);
       CreateItemOnObject("a_glove_07",  GetObjectByTag("m_202_002"), 1);
       CreateItemOnObject("u_m_edge_05", GetObjectByTag("m_202_002"), 1);
       CreateItemOnObject("u_r_targ_04", GetObjectByTag("m_202_002"), 1);
       CreateItemOnObject("w_brifle_13", GetObjectByTag("m_202_002"), 1);

       iItemLevel;
       while ((iItemLevel < 22)) {
           {
               string sItem = GetTreasureNormal(iItemLevel, 0);
               if ((iPos = FindSubString(sItem, "[")) >= 0) {
                   iQuantity = StringToInt(GetSubString(sItem, (iPos + 1), 4));
                   sItemName = GetSubString(sItem, 0, iPos);
               }
               else {
                   sItemName = sItem;
               }
               CreateItemOnObject(sItemName, GetObjectByTag("m_202_002"), iQuantity);
           }
           iItemLevel += 1;
       }
   }
}

 

a_stockstore_03.nss

#include "k_inc_utility"
#include "k_inc_treasure"
#include "k_inc_treas_k2"

void main() {
   if ((GetLocalBoolean(OBJECT_SELF, 58) == FALSE)) {
       SetLocalBoolean(OBJECT_SELF, 58, TRUE);

       int iItemLevel;
       int j;
       int iAmount = 1;

       string sItemName = GetTreasureNormal(Random(25) + 1, 245);
       CreateItemOnObject(sItemName, GetObjectByTag("m_202_003"), iAmount);
       sItemName = GetTreasureNormal(Random(15) + 1, 100);
       CreateItemOnObject(sItemName, GetObjectByTag("m_202_003"), iAmount);
       sItemName = GetTreasureNormal(Random(15) + 1, 100);
       CreateItemOnObject(sItemName, GetObjectByTag("m_202_003"), iAmount);
       sItemName = GetTreasureNormal(Random(15) + 1, 200);
       CreateItemOnObject(sItemName, GetObjectByTag("m_202_003"), iAmount);
       sItemName = GetTreasureNormal(Random(15) + 1, 200);
       CreateItemOnObject(sItemName, GetObjectByTag("m_202_003"), iAmount);
       sItemName = GetTreasureNormal(Random(15) + 1, 300);
       CreateItemOnObject(sItemName, GetObjectByTag("m_202_003"), iAmount);
       sItemName = GetTreasureNormal(Random(15) + 1, 300);
       CreateItemOnObject(sItemName, GetObjectByTag("m_202_003"), iAmount);
       sItemName = GetTreasureNormal(Random(15) + 1, 400);
       CreateItemOnObject(sItemName, GetObjectByTag("m_202_003"), iAmount);
       sItemName = GetTreasureNormal(Random(15) + 1, 400);
       CreateItemOnObject(sItemName, GetObjectByTag("m_202_003"), iAmount);

        iItemLevel;
        while (iItemLevel < 15) {
           {
               string sItem = GetTreasureNormal(iItemLevel, 0);
               if (iItemLevel < 10) {
                   iAmount = (Random(2) + 1);
               }
               else {
                   iAmount = 1;
               }

               if ((j = FindSubString(sItem, "[")) >= 0) {
                   iAmount = StringToInt(GetSubString(sItem, j + 1, 4));
                   sItemName = GetSubString(sItem, 0, j);
               }
               else {
                   sItemName = sItem;
               }
               CreateItemOnObject(sItemName, GetObjectByTag("m_202_003"), iAmount);
           }
           iItemLevel = (iItemLevel + 2);
       }
   }
}

Link to comment
Share on other sites

301NAR

a_stock_oondar.ncs

 

403DXN

a_stock_kex.ncs

 

501OND

a_stock_margar.ncs

 

502OND

a_stock_geg.ncs

 

602DAN

a_stock_adum.ncs

 

a_stock_oondar.nss

#include "k_inc_utility"
#include "k_inc_treasure"
#include "k_inc_treas_k2"

// NOTE!
// GetTreasureNormal() compiled into this script did not fully match corresponding function in
// the k_inc_treas_k2 file. OEI has probably forgotten to recompile it after modifying the
// include file with a bugfix.  Include file had checks added to skip Itemlevel 6 lightsabers,
// since those templates do not exist. 


void main() {
   if (GetLocalBoolean(OBJECT_SELF, 58) == FALSE) {
       SetLocalBoolean(OBJECT_SELF, 58, TRUE);

       int iItemLevel;
       int iPos;
       int iQuantity = 1;

       string sItemName;
       CreateItemOnObject(GetTreasureNormal(Random(15) + 1, 100), GetObjectByTag("OondarStore"), iQuantity);
       CreateItemOnObject(GetTreasureNormal(Random(22) + 1, 100), GetObjectByTag("OondarStore"), iQuantity);
       CreateItemOnObject(GetTreasureNormal(Random(22) + 1, 100), GetObjectByTag("OondarStore"), iQuantity);
       CreateItemOnObject(GetTreasureNormal(Random(15) + 1, 200), GetObjectByTag("OondarStore"), iQuantity);
       CreateItemOnObject(GetTreasureNormal(Random(15) + 1, 300), GetObjectByTag("OondarStore"), iQuantity);
       CreateItemOnObject(GetTreasureNormal(Random(15) + 1, 400), GetObjectByTag("OondarStore"), iQuantity);

       iItemLevel;
       while ((iItemLevel < 25)) {
           {
               string sItem = GetTreasureNormal(iItemLevel, 0);
               if (iItemLevel < 10) {
                   iQuantity = (Random(2) + 1);
               }
               else {
                   iQuantity = 1;
               }

               if ((iPos = FindSubString(sItem, "[")) >= 0) {
                   iQuantity = StringToInt(GetSubString(sItem, (iPos + 1), 4));
                   sItemName = GetSubString(sItem, 0, iPos);
               }
               else {
                   sItemName = sItem;
               }
               CreateItemOnObject(sItemName, GetObjectByTag("OondarStore"), iQuantity);
           }
           iItemLevel = iItemLevel + 2;
       }
   }
}

 

 

a_stock_kex.nss

#include "k_inc_utility"
#include "k_inc_treasure"
#include "k_inc_treas_k2"

// NOTE!
// GetTreasureNormal() compiled into this script did not fully match corresponding function in
// the k_inc_treas_k2 file. OEI has probably forgotten to recompile it after modifying the
// include file with a bugfix.  Include file had checks added to skip Itemlevel 6 lightsabers,
// since those templates do not exist. 


void main() {
   if (GetLocalBoolean(OBJECT_SELF, 58) == FALSE) {
       SetLocalBoolean(OBJECT_SELF, 58, TRUE);

       int iItemLevel = 2;
       int iPos;
       int iQuantity = 1;
       string sItemName;
       iItemLevel;

       while (iItemLevel < 21) {
           {
               string sItem = GetTreasureNormal(iItemLevel + Random(2), 0);
               if (iItemLevel < 10) {
                   iQuantity = Random(2) + 1;
               }
               else {
                   iQuantity = 1;
               }

               if ((iPos = FindSubString(sItem, "[")) >= 0) {
                   iQuantity = StringToInt(GetSubString(sItem, iPos + 1, 4));
                   sItemName = GetSubString(sItem, 0, iPos);
               }
               else {
                   sItemName = sItem;
               }

               CreateItemOnObject(sItemName, GetObjectByTag("kexsstore"), iQuantity);
           }
           iItemLevel = iItemLevel + 2;
       }
   }
}

 

 

a_stock_margar.nss

#include "k_inc_utility"
#include "k_inc_treasure"
#include "k_inc_treas_k2"

// NOTE!
// GetTreasureNormal() compiled into this script did not fully match corresponding function in
// the k_inc_treas_k2 file. OEI has probably forgotten to recompile it after modifying the
// include file with a bugfix.  Include file had checks added to skip Itemlevel 6 lightsabers,
// since those templates do not exist. 


void main() {
   if (GetLocalBoolean(OBJECT_SELF, 58) == FALSE) {
       SetLocalBoolean(OBJECT_SELF, 58, TRUE);
       int iItemLevel = 8;
       int iPos;
       int iQuantity = 1;

       string sItemName = GetTreasureNormal(Random(5) + 5, 300);
       CreateItemOnObject(sItemName, GetObjectByTag("margar_store"), iQuantity);
       sItemName = GetTreasureNormal(Random(5) + 10, 300);
       CreateItemOnObject(sItemName, GetObjectByTag("margar_store"), iQuantity);
       sItemName = GetTreasureNormal(Random(24) + 1, 320);
       CreateItemOnObject(sItemName, GetObjectByTag("margar_store"), iQuantity);
       sItemName = GetTreasureNormal(Random(5) + 15, 320);
       CreateItemOnObject(sItemName, GetObjectByTag("margar_store"), iQuantity);
       sItemName = GetTreasureNormal(Random(5) + 15, 330);
       CreateItemOnObject(sItemName, GetObjectByTag("margar_store"), iQuantity);
       sItemName = GetTreasureNormal(Random(10) + 10, 330);
       CreateItemOnObject(sItemName, GetObjectByTag("margar_store"), iQuantity);
       sItemName = GetTreasureNormal(Random(10) + 10, 330);
       CreateItemOnObject(sItemName, GetObjectByTag("margar_store"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 210);
       CreateItemOnObject(sItemName, GetObjectByTag("margar_store"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 220);
       CreateItemOnObject(sItemName, GetObjectByTag("margar_store"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 230);
       CreateItemOnObject(sItemName, GetObjectByTag("margar_store"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 200);
       CreateItemOnObject(sItemName, GetObjectByTag("margar_store"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 400);
       CreateItemOnObject(sItemName, GetObjectByTag("margar_store"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 400);
       CreateItemOnObject(sItemName, GetObjectByTag("margar_store"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 400);
       CreateItemOnObject(sItemName, GetObjectByTag("margar_store"), iQuantity);

       iItemLevel;
       while ((iItemLevel < 25)) {
           {
               string sItem = GetTreasureNormal(iItemLevel + Random(2), 100);
               if (iItemLevel < 10) {
                   iQuantity = (Random(2) + 1);
               }
               else {
                   iQuantity = 1;
               }

               if ((iPos = FindSubString(sItem, "[")) >= 0) {
                   iQuantity = StringToInt(GetSubString(sItem, iPos + 1, 4));
                   sItemName = GetSubString(sItem, 0, iPos);
               }
               else {
                   sItemName = sItem;
               }

               CreateItemOnObject(sItemName, GetObjectByTag("margar_store"), iQuantity);
           }
           iItemLevel = iItemLevel + 2;
       }
   }
}

 

 

a_stock_geg.nss

#include "k_inc_utility"
#include "k_inc_treasure"
#include "k_inc_treas_k2"

// NOTE!
// GetTreasureNormal() compiled into this script did not fully match corresponding function in
// the k_inc_treas_k2 file. OEI has probably forgotten to recompile it after modifying the
// include file with a bugfix.  Include file had checks added to skip Itemlevel 6 lightsabers,
// since those templates do not exist. 


void main() {
   if (GetLocalBoolean(OBJECT_SELF, 58) == FALSE) {
       SetLocalBoolean(OBJECT_SELF, 58, TRUE);

       int iItemLevel;
       int iPos;
       int iQuantity = 1;
       string sItem;
       string sItemName;
       iItemLevel;

       while (iItemLevel < 20) {
           if (iItemLevel > 10) {
               sItem = GetTreasureNormal(iItemLevel, 400);
           }
           else {
               sItem = GetTreasureNormal(iItemLevel, 0);
           }
           if ((iPos = FindSubString(sItem, "[")) >= 0) {
               iQuantity = StringToInt(GetSubString(sItem, (iPos + 1), 4));
               sItemName = GetSubString(sItem, 0, iPos);
           }
           else {
               sItemName = sItem;
           }

           CreateItemOnObject(sItemName, GetObjectByTag("store_geg"), iQuantity);
           iItemLevel++;
       }
   }
}

 

 

a_stock_adum.nss

#include "k_inc_utility"
#include "k_inc_treasure"
#include "k_inc_treas_k2"

// NOTE!
// GetTreasureNormal() compiled into this script did not fully match corresponding function in
// the k_inc_treas_k2 file. OEI has probably forgotten to recompile it after modifying the
// include file with a bugfix.  Include file had checks added to skip Itemlevel 6 lightsabers,
// since those templates do not exist. 


void main() {
   if (GetLocalBoolean(OBJECT_SELF, 58) == FALSE) {
       SetLocalBoolean(OBJECT_SELF, 58, TRUE);

       int iItemLevel;
       int iPos;
       int iQuantity = 1;

       string sItemName = GetTreasureNormal(Random(15) + 1, 110);
       CreateItemOnObject(sItemName, GetObjectByTag("store_adum"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 120);
       CreateItemOnObject(sItemName, GetObjectByTag("store_adum"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 130);
       CreateItemOnObject(sItemName, GetObjectByTag("store_adum"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 200);
       CreateItemOnObject(sItemName, GetObjectByTag("store_adum"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 200);
       CreateItemOnObject(sItemName, GetObjectByTag("store_adum"), iQuantity);
       sItemName = GetTreasureNormal(Random(20) + 1, 310);
       CreateItemOnObject(sItemName, GetObjectByTag("store_adum"), iQuantity);
       sItemName = GetTreasureNormal(Random(20) + 1, 320);
       CreateItemOnObject(sItemName, GetObjectByTag("store_adum"), iQuantity);
       sItemName = GetTreasureNormal(Random(20) + 1, 330);
       CreateItemOnObject(sItemName, GetObjectByTag("store_adum"), iQuantity);
       sItemName = GetTreasureNormal(Random(20) + 1, 300);
       CreateItemOnObject(sItemName, GetObjectByTag("store_adum"), iQuantity);
       sItemName = GetTreasureNormal(Random(20) + 1, 300);
       CreateItemOnObject(sItemName, GetObjectByTag("store_adum"), iQuantity);
       sItemName = GetTreasureNormal(Random(20) + 1, 300);
       CreateItemOnObject(sItemName, GetObjectByTag("store_adum"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 400);
       CreateItemOnObject(sItemName, GetObjectByTag("store_adum"), iQuantity);
       sItemName = GetTreasureNormal(Random(15) + 1, 400);
       CreateItemOnObject(sItemName, GetObjectByTag("store_adum"), iQuantity);

       iItemLevel;
       while (iItemLevel < 21) {
           {
               string sItem = GetTreasureNormal(iItemLevel, 100);
               if (iItemLevel < 10) {
                   iQuantity = (Random(2) + 1);
               }
               else {
                   iQuantity = 1;
               }

               if ((iPos = FindSubString(sItem, "[")) >= 0) {
                   iQuantity = StringToInt(GetSubString(sItem, (iPos + 1), 4));
                   sItemName = GetSubString(sItem, 0, iPos);
               }
               else {
                   sItemName = sItem;
               }

               CreateItemOnObject(sItemName, GetObjectByTag("store_adum"), iQuantity);
           }
           iItemLevel++;
       }
   }
}

 

 

a_stock_daraala.nss

#include "k_inc_utility"
#include "k_inc_treasure"
#include "k_inc_treas_k2"

void main() {
   if (GetLocalBoolean(OBJECT_SELF, 58) == FALSE) {
       SetLocalBoolean(OBJECT_SELF, 58, TRUE);

       int iItemLevel = 6;
       int iPos;
       int iQuantity = 1;

       string sItemName = GetTreasureNormal((Random(5) + 5), 440);
       CreateItemOnObject(sItemName, GetObjectByTag("store_daraala"), iQuantity);
       sItemName = GetTreasureNormal(Random(5) + 9, 440);
       CreateItemOnObject(sItemName, GetObjectByTag("store_daraala"), iQuantity);
       sItemName = GetTreasureNormal(Random(5) + 13, 440);
       CreateItemOnObject(sItemName, GetObjectByTag("store_daraala"), iQuantity);
       sItemName = GetTreasureNormal(Random(5) + 13, 244);
       CreateItemOnObject(sItemName, GetObjectByTag("store_daraala"), iQuantity);
       sItemName = GetTreasureNormal(Random(5) + 13, 244);
       CreateItemOnObject(sItemName, GetObjectByTag("store_daraala"), iQuantity);

       iItemLevel;
       while ((iItemLevel < 21)) {
           {
               string sItem = GetTreasureNormal(iItemLevel, 240);
               if (iItemLevel < 10) {
                   iQuantity = Random(2) + 1;
               }
               else {
                   iQuantity = 1;
               }

               if ((iPos = FindSubString(sItem, "[")) >= 0) {
                   iQuantity = StringToInt(GetSubString(sItem, (iPos + 1), 4));
                   sItemName = GetSubString(sItem, 0, iPos);
               }
               else {
                   sItemName = sItem;
               }

               CreateItemOnObject(sItemName, GetObjectByTag("store_daraala"), iQuantity);
           }

           iItemLevel++;
       }
   }
}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...