Snippet Rhisis' Trail for Retail V21.2

Welcome to our Community
Wanting to join the rest of our members? Feel free to sign up today.
Sign up

Fliperworld

Contributor
Contributor
Joined
Jun 14, 2024
Messages
138
Solutions
18
Reaction score
98
Points
43
I'm using the define "FIX_FLIPERWORLD_MISSING_NPC_DIALOGS" for my convenience, change it to whatever name you think is best for your project.

Put this define in your commondefine:
#define FIX_FLIPERWORLD_MISSING_NPC_DIALOGS

Project WordDialog:

1- Add missing option to npc:
Open NpcScript.cpp
Search for "int g_nKeys[] = {"
Below "866," add:
Hey There!
Please login and(or) register to see this awesome content today.
missing.png

2-Create the missing functions and definitions:
Hey There!
Please login and(or) register to see this awesome content today.

Project WorldServer:
Hey There!
Please login and(or) register to see this awesome content today.

Hey There!
Please login and(or) register to see this awesome content today.

Hey There!
Please login and(or) register to see this awesome content today.


stone1.pngResult.png
 
I'm not entirely sure why you took retail code "SCRIPT_ENTER_INSTANCEDUNGEON" and redefined it to FIX_FLIPERWORLD_MISSING_NPC_DIALOGS and half the time your calling for both lol.

The real define is SCRIPT_ENTER_INSTANCEDUNGEON and included in the 21.2 source lol.

Not sure why people take defines and take credit as there own, also this is a copypasta from another site from another respected dev @Ssam lol

No hate really, hope this guide helps someone.
 
  • Like
Reactions: Ssam
I'm not entirely sure why you took retail code "SCRIPT_ENTER_INSTANCEDUNGEON" and redefined it to FIX_FLIPERWORLD_MISSING_NPC_DIALOGS and half the time your calling for both lol.

The real define is SCRIPT_ENTER_INSTANCEDUNGEON and included in the 21.2 source lol.

Not sure why people take defines and take credit as there own, also this is a copypasta from another site from another respected dev @Ssam lol

No hate really, hope this guide helps someone.

I'm not redefining SCRIPT_ENTER_INSTANCEDUNGEON, I found some NPC dialogs missing, with a warning in the logs, and that's why I created a define to include what was missing...
To locate myself in what I add, I create defines for codes that I've created.
I use this to find my way around since I don't use git/branches and the like for small projects for personal use.

Now why did I choose to use the 2 defines in the directives?
With just SCRIPT_ENTER_INSTANCEDUNGEON , CNpcScript::maew_enterredrobeman_2() will show an error due to the lack of key 1812... So FIX_FLIPERWORLD_MISSING_NPC_DIALOGS that I was already using for other parts served to complement.

With this, the options in the NPC appear, but it already gives an error in CNpcScript::maew_enterredrobeman_1812() due to the lack of ChkPartyLowLevel and EnterInstanceDungeon , always returning false.

With that I implemented what was missing, but only in the parts where the SCRIPT_ENTER_INSTANCEDUNGEON directive was active... I didn't touch the part where it is inactive. So since I needed both directives, I used them.

So no, I didn't rename the directive, and I also didn't copy anything from other sites/users, I just created the definitions using the standard format of the other functions already in the version.

As for the Lua part, I just searched the internet for the dungeon's requirements, added it to the script along with the mid/boss in the place where they should probably appear.
 
I'm not redefining SCRIPT_ENTER_INSTANCEDUNGEON, I found some NPC dialogs missing, with a warning in the logs, and that's why I created a define to include what was missing...
To locate myself in what I add, I create defines for codes that I've created.
I use this to find my way around since I don't use git/branches and the like for small projects for personal use.

Now why did I choose to use the 2 defines in the directives?
With just SCRIPT_ENTER_INSTANCEDUNGEON , CNpcScript::maew_enterredrobeman_2() will show an error due to the lack of key 1812... So FIX_FLIPERWORLD_MISSING_NPC_DIALOGS that I was already using for other parts served to complement.

With this, the options in the NPC appear, but it already gives an error in CNpcScript::maew_enterredrobeman_1812() due to the lack of ChkPartyLowLevel and EnterInstanceDungeon , always returning false.

With that I implemented what was missing, but only in the parts where the SCRIPT_ENTER_INSTANCEDUNGEON directive was active... I didn't touch the part where it is inactive. So since I needed both directives, I used them.

So no, I didn't rename the directive, and I also didn't copy anything from other sites/users, I just created the definitions using the standard format of the other functions already in the version.

As for the Lua part, I just searched the internet for the dungeon's requirements, added it to the script along with the mid/boss in the place where they should probably appear.
Every line under 2 literally is
Hey There!
Please login and(or) register to see this awesome content today.

Again, not sure why you are including yourself or taking credit for RETAIL code. ^

That define works in both dialog and world server without issues actually.

Pssst: I took part in the 21.2 C17 VS22 upgrade. :coffee:

So again it's not really your code except maybe 1 or 2 fixes u pulled undefined from retail, yet you threw your define in front of it for no reason really except clout.
 
  • Like
Reactions: Thaibboy
Every line under 2 literally is
Hey There!
Please login and(or) register to see this awesome content today.

Again, not sure why you are including yourself or taking credit for RETAIL code. ^

That define works in both dialog and world server without issues actually.

Pssst: I took part in the 21.2 C17 VS22 upgrade. :coffee:

So again it's not really your code except maybe 1 or 2 fixes u pulled undefined from retail, yet you threw your define in front of it for no reason really except clout.

The reason was not influence, but rather the order I used to solve my problem.
When talking to the NPC, I was getting an error about the text key being missing.Since there wasn't a define for this, I implemented my own.
I looked for the code that wrote the error, I used stack trace to locate what called the error in log function, I saw that there were no declared directives, I used mine for editing convenience... I continued mitigating the following errors... I fell in part it used the SCRIPT_ENTER_INSTANCEDUNGEON directive. As I would have to edit this part, I added it to my directive to find me later, just pasting it next to mine. Changing the code of the SCRIPT_ENTER_INSTANCEDUNGEON directive directly without a git system or similar could make me forget where I had changed something, so I simply pasted the directive I was using in the parts where I changed something and kept it that way (I literally copy and pasted the #if /#endif integer in all parts where there would be editing, since I was too lazy to type my define with the ugly and giant name).

To post, I just located my directive, and pasted it as it was in my local project.

I'm sorry if the order of the directives influences anything about credits, it wasn't my intention.If you think it's better, I can replace all the lines "#if defined(FIX_FLIPERWORLD_MISSING_NPC_DIALOGS) && defined(SCRIPT_ENTER_INSTANCEDUNGEON)" with "#ifdef SCRIPT_ENTER_INSTANCEDUNGEON" in the post.

Just as I posted at the beginning, the directive chosen was just for my convenience while editing my local copy, im not looking for credits, on the contrary, I like to stay anonymous as much as possible.
 
  • Like
Reactions: zOmbie
The reason was not influence, but rather the order I used to solve my problem.
When talking to the NPC, I was getting an error about the text key being missing.Since there wasn't a define for this, I implemented my own.
I looked for the code that wrote the error, I used stack trace to locate what called the error in log function, I saw that there were no declared directives, I used mine for editing convenience... I continued mitigating the following errors... I fell in part it used the SCRIPT_ENTER_INSTANCEDUNGEON directive. As I would have to edit this part, I added it to my directive to find me later, just pasting it next to mine. Changing the code of the SCRIPT_ENTER_INSTANCEDUNGEON directive directly without a git system or similar could make me forget where I had changed something, so I simply pasted the directive I was using in the parts where I changed something and kept it that way (I literally copy and pasted the #if /#endif integer in all parts where there would be editing, since I was too lazy to type my define with the ugly and giant name).

To post, I just located my directive, and pasted it as it was in my local project.

I'm sorry if the order of the directives influences anything about credits, it wasn't my intention.If you think it's better, I can replace all the lines "#if defined(FIX_FLIPERWORLD_MISSING_NPC_DIALOGS) && defined(SCRIPT_ENTER_INSTANCEDUNGEON)" with "#ifdef SCRIPT_ENTER_INSTANCEDUNGEON" in the post.

Just as I posted at the beginning, the directive chosen was just for my convenience while editing my local copy, im not looking for credits, on the contrary, I like to stay anonymous as much as possible.
See i understand and respect this and maybe i was a bit offensive but i am glad you see my point and i also want you to know i do see yours.

Imagine if more people in this scene had constructive dialogs like this :eek:

Either way bro, no hate, i welcome any content.
 
Cant keep it anon when you literally have flipperworld all over it. However, don't get discouraged, The fact you are at least doing things on your own is better than at least 60% of this community. Keep going :)
 
I'm using the define "FIX_FLIPERWORLD_MISSING_NPC_DIALOGS" for my convenience, change it to whatever name you think is best for your project.

Put this define in your commondefine:
#define FIX_FLIPERWORLD_MISSING_NPC_DIALOGS

Project WordDialog:

1- Add missing option to npc:
Open NpcScript.cpp
Search for "int g_nKeys[] = {"
Below "866," add:
Hey There!
Please login and(or) register to see this awesome content today.
View attachment 190

2-Create the missing functions and definitions:
Hey There!
Please login and(or) register to see this awesome content today.

Project WorldServer:
Hey There!
Please login and(or) register to see this awesome content today.

Hey There!
Please login and(or) register to see this awesome content today.

Hey There!
Please login and(or) register to see this awesome content today.
I tried this but I'm stuck here.. even though I have rainbow stone xD been looking for any mistakes I did, I followed all your instructions but I think I might missing something.. I'll check it out :D
 

Attachments

  • 1720813900934.png
    1720813900934.png
    1.6 MB · Views: 21
I tried this but I'm stuck here.. even though I have rainbow stone xD been looking for any mistakes I did, I followed all your instructions but I think I might missing something.. I'll check it out :D
This dialog is called when "EnterInstanceDungeon" returns false;

Check if
"BOOL CInstanceDungeonBase::TeleportToDungeon( FLWSUser* pUser, DWORD dwWorldId, DWORD dwDungeonId, const DWORD dwGuildID, DWORD eDungeonLevel )
"
in _common/InstanceDungeonBase.cpp (WorldServer project) is causing this issue,It took me a long time to discover this here :

1.png

pData->bPartyWarp need be true (called from PartyDungeon.lua ..."SetPartyWarp(1)")

vPos need be : 1416,0,1259.



This part checkw for rainbow stone and finally returns true
2.png

if "pData->nTicketIndex " is -1 or something, check out InstanceDungeonBase.lua.

The c++ source uses "pData->nTicketIndex " , but reads its value from "tDungeon[nIndex].strTicketIndex" 🤨
3.png
 
Last edited:
  • Like
Reactions: Sktzy
This dialog is called when "EnterInstanceDungeon" returns false;

Check if
"BOOL CInstanceDungeonBase::TeleportToDungeon( FLWSUser* pUser, DWORD dwWorldId, DWORD dwDungeonId, const DWORD dwGuildID, DWORD eDungeonLevel )
"
in _common/InstanceDungeonBase.cpp (WorldServer project) is causing this issue,It took me a long time to discover this here :

View attachment 197

pData->bPartyWarp need be true (called from PartyDungeon.lua ..."SetPartyWarp(1)")

vPos need be : 1416,0,1259.



This part checkw for rainbow stone and finally returns true
View attachment 199

if "pData->nTicketIndex " is -1 or something, check out InstanceDungeonBase.lua.

The c++ source uses "pData->nTicketIndex " , but reads its value from "tDungeon[nIndex].strTicketIndex" 🤨
View attachment 200
Hmm.. This is weird. Upon checking mine, I don't see any issue or difference.. could be it the way I compile the source, lib or the way I define names :unsure:. also I notice when I add WorldDialog source, whenever i put #ifdef names, it doesnt read it even if it is define in versioncommon.. I need to remove the #ifdef & #endif to make what i input there, readable. btw thankyou verymuch :) I'll figure this out on why it does that xD
 
Last edited:
Hmm.. This is weird. Upon checking mine, I don't see any issue or difference.. could be it the way I compile the source or the way I define names :unsure:
If there are no errors/warnings in the logs files regarding the ChkPartyLowLevel or EnterInstanceDungeon functions ,
you probably did everything right in the C++ part.

IS the "BOOL CInstanceDungeonBase::TeleportToDungeon" being called?
 
  • Like
Reactions: Sktzy
If there are no errors/warnings in the logs files regarding the ChkPartyLowLevel or EnterInstanceDungeon functions ,
you probably did everything right in the C++ part.

IS the "BOOL CInstanceDungeonBase::TeleportToDungeon" being called?
I think its not being called, cauz whenever i click the button in dialog that triggers teleport, it doesn't do anything and get a dialog message I need 5 rainbow stone. even though I have more than 5 xD Here's my error log btw
 

Attachments

  • 1720840842583.png
    1720840842583.png
    41.3 KB · Views: 9
I think its not being called, cauz whenever i click the button in dialog that triggers teleport, it doesn't do anything and get a dialog message I need 5 rainbow stone. even though I have more than 5 xD Here's my error log btw

As you can see in NpcScript.txt , the dialog message that you recieve is at line 1817(0 based index...) of you WorldDialog.txt, triggered because EnterInstanceDungeon is returning 0.
1.png

Attach your WorldServer to visual studio, to see what is happening...
Hey There!
Please login and(or) register to see this awesome content today.

Post edited: Reason - Wrapped into a Spoiler tag
 
Last edited:
  • Love
Reactions: Sktzy
There is a small error in the Lua implementation, fixed in the first post. Thanks to @Sktzy for pointing out that the Rainbow Stone was not being consumed.

SetTicketIndex uses a String, not a int.
 
  • Love
Reactions: Sktzy