• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ NPC's not using linked file for values

Extrodus

|| Blazera.net ||
Premium User
Joined
Dec 22, 2008
Messages
2,724
Solutions
7
Reaction score
534
Location
Canada
Hey there, having some issues with the rune npc's. They are selling runes in different counts then what they are set to in the gen-t-runes-free-s.ndb file.

For example, when going to Xodet and "buy great fireball rune" - he will give you a rune with 4x charges, even though the file says 2x

Code:
"great","fireball","rune" -> Type=3191, Data=2, Amount=1, Price=180

Any ideas?



@Ezzz - submitted it to github as well, so the fix will be posted publicly for the repository :)
Let's keep this updated and working 100%!
Rune NPCs don't use "gen-t-runes-free-s.ndb" values · Issue #12 · TwistedScorpio/Nostalrius (https://github.com/TwistedScorpio/Nostalrius/issues/12)
 
Solution
but you didnt read!
just remove the first part.
this!
C++:
            if (it.charges) {
                data = it.charges;
            }
---
Code:
17:49 You see a spell rune for magic level 9. It's an "adevo grav tera"-spell (1x). 
It weighs 1.20 oz
Code:
"magic","wall","rune" -> Type=3180, Data=1, Amount=1, Price=350, "Do you want to buy a magic wall rune for %P gold?", Topic=1
Hey there, having some issues with the rune npc's. They are selling runes in different counts then what they are set to in the gen-t-runes-free-s.ndb file.

For example, when going to Xodet and "buy great fireball rune" - he will give you a rune with 4x charges, even though the file says 2x

Code:
"great","fireball","rune" -> Type=3191, Data=2, Amount=1, Price=180

Any ideas?



@Ezzz - submitted it to github as well, so the fix will be posted publicly for the repository :)
Let's keep this updated and working 100%!
Rune NPCs don't use "gen-t-runes-free-s.ndb" values · Issue #12 · TwistedScorpio/Nostalrius (https://github.com/TwistedScorpio/Nostalrius/issues/12)
Have you tried changing Data=2 to Data=1?
 
Already answered there: Rune NPCs don't use "gen-t-runes-free-s.ndb" values · Issue #12 · TwistedScorpio/Nostalrius (https://github.com/TwistedScorpio/Nostalrius/issues/12)
anyways this is the solution:
You can remove
C++:
            if (it.charges) {
                data = it.charges;
            }
from behaviourdatabase or change it to something like
C++:
            if (it.charges && (data < static_cast<int32_t>(it.charges))) {
                data = it.charges;
            }
this way if data is lower than the actual rune charges it will create the rune with the correct amount, else it will create the rune with the amount you want.
I dont know if ezz is answering something there but I'm helping with those problems, you can post them here:
joseluis2g/my-nostalrius (https://github.com/joseluis2g/my-nostalrius)
Also this repo got travis and appveyor builds so you can just download them to test.
 
I just moved to Venezuela hence why I haven't been active haha, just give me a few days and I will be back here >:D
I didn't really had added support for custom charges since the purpose was a clone of 7.7 first.
 
I just moved to Venezuela hence why I haven't been active haha, just give me a few days and I will be back here >:D
I didn't really had added support for custom charges since the purpose was a clone of 7.7 first.
ye you told me that so thats why I'm doing some support
 
Already answered there: Rune NPCs don't use "gen-t-runes-free-s.ndb" values · Issue #12 · TwistedScorpio/Nostalrius (https://github.com/TwistedScorpio/Nostalrius/issues/12)
anyways this is the solution:
You can remove
C++:
            if (it.charges) {
                data = it.charges;
            }
from behaviourdatabase or change it to something like
C++:
            if (it.charges && (data < static_cast<int32_t>(it.charges))) {
                data = it.charges;
            }
this way if data is lower than the actual rune charges it will create the rune with the correct amount, else it will create the rune with the amount you want.
I dont know if ezz is answering something there but I'm helping with those problems, you can post them here:
joseluis2g/my-nostalrius (https://github.com/joseluis2g/my-nostalrius)
Also this repo got travis and appveyor builds so you can just download them to test.


Even with the edit it still sells as 4x instead of 2x.
Recompiled, made sure the values were correct and still same results.

When you use adori gran flam is creates a rune with 4x, when I buy from Xodet - it sells 4x, even though the value in the NPC script is 2x.
I want people to be able to buy normal charged runes from the shop, and only able to conjure double charged.

[Solution to the problem]
The fix is actually very simple. What you need to do is modify the charges under "<!-- Attack Rune Spells -->" that way the npc picks up on the item charges.. really strange but hey - it works; and players are still able to conjure double.
 
Last edited:
but you didnt read!
just remove the first part.
this!
C++:
            if (it.charges) {
                data = it.charges;
            }
---
Code:
17:49 You see a spell rune for magic level 9. It's an "adevo grav tera"-spell (1x). 
It weighs 1.20 oz
Code:
"magic","wall","rune" -> Type=3180, Data=1, Amount=1, Price=350, "Do you want to buy a magic wall rune for %P gold?", Topic=1
 
Solution
Sorry to relive this. In case I wanted to sell a container with 20 runes containing a charge each. How could I do it? Because when I do this in MYAAC, it only creates a rune with 20 charges.
 
Back
Top