• 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!

[10.90 + Cast] Tfs 1.2 (custom modifications) + Reward Chest

Lundrial

lundrial:getTitle()
Joined
Apr 15, 2014
Messages
142
Reaction score
103
Location
Chile
This is the second version of my custom sources, I spent all day trying to make djarek's cast system work on 10.90 and I finally did it

Using the latest tfs 1.2 sources as today: 14/12/15
Modifications:
See my other post
--How to use the reward chest--
Add this flag to the monster:
<flag rewardchest="1" />

You can also set a drop to be unique, that way only the person that did the most damage will get this item. example:

<item id="5903" chance="100000" uniquedrop="1" /><!-- ferumbras' hat -->

--How to use the cast system--
YOU NEED TO OPEN PORT 7173
!cast -password goes here- // Start cast if you leave it blank you will cast without password
!stopcast // stops casting your gameplay
to enter a player's cast you need to login without account name

Special thanks:
Tfs 1.2 Developers
@MatheusMkalo for the Reward Chest System
@zbizu for the GuildLeaders Channel script
@fish04k for the actionid 10 unmoveable function
@Printer for the 2 added functions
Djarek for the cast system

Link on Mega

I'm not sure if I'll be able to help you with all the bugs, I only did small tests and im pretty bad anyways, but I'll try
 

Attachments

  • tfs 1.2 10.90 + cast.rar
    3.5 MB · Views: 479 · VirusTotal
Last edited by a moderator:
you give me too much credit, I just rewrote an old script to 1.2, it took me like 5 min
 
This is the second version of my custom sources, I spent all day trying to make djarek's cast system work on 10.90 and I finally did it

Using the latest tfs 1.2 sources as today: 14/12/15
Modifications:
See my other post
--How to use the reward chest--
Add this flag to the monster:
<flag rewardchest="1" />

You can also set a drop to be unique, that way only the person that did the most damage will get this item. example:

<item id="5903" chance="100000" uniquedrop="1" /><!-- ferumbras' hat -->

--How to use the cast system--
YOU NEED TO OPEN PORT 7173
!cast -password goes here- // Start cast if you leave it blank you will cast without password
!stopcast // stops casting your gameplay
to enter a player's cast you need to login without account name

Special thanks:
Tfs 1.2 Developers
@MatheusMkalo for the Reward Chest System
@zbizu for the GuildLeaders Channel script
@fish04k for the actionid 10 unmoveable function
@Printer for the 2 added functions
Djarek for the cast system

Link on Mega

I'm not sure if I'll be able to help you with all the bugs, I only did small tests and im pretty bad anyways, but I'll try

Well you should really try using @Non Sequitur 's reward chest for this.

Check it out here: https://github.com/otland/forgottenserver/pull/1628/commits

Mine is just a hacky fix and some modifications of cbrm's code, this one has pagination and it does calculate heals/damage taken/damage done to calculate the participation.
 
Well you should really try using @Non Sequitur 's reward chest for this.

Check it out here: https://github.com/otland/forgottenserver/pull/1628/commits

Mine is just a hacky fix and some modifications of cbrm's code, this one has pagination and it does calculate heals/damage taken/damage done to calculate the participation.

I tried and it resulted in a lot of bugs that were out of my understanding, the only reward chest system I managed to make work "properly" was yours in any case, people is free to do anything they want with this sources and they can replace yours with a fixed version of the one you mentioned, I don't really know if your system can still be improved but it works.
 
What you changed to make cast work?
 
What you changed to make cast work?
Added the premium byte/store link in protocolgamebase in the sendaddcreature part, 2 other codes in the caster login so I don't debug when trying to login without account and the hexadecimal value in the cast channel definition because it was causing the npc channel not to open when you greet an npc, it is working now tho
 
Added the premium byte/store link in protocolgamebase in the sendaddcreature part, 2 other codes in the caster login so I don't debug when trying to login without account and the hexadecimal value in the cast channel definition because it was causing the npc channel not to open when you greet an npc, it is working now tho

So you didnt changed adddummycreature and syncknowcreatures?

2 other codes in the caster login so I don't debug when trying to login without account

Can you please specify 2 other codes. Im curious.
 
Last edited by a moderator:
Can you please specify 2 other codes. Im curious.
well I modified getCastingStreamsList to make sure it always displays premium so it ended up like this
Code:
void ProtocolLogin::getCastingStreamsList(const std::string& password, uint16_t version)
{
   //dispatcher thread
   auto output = OutputMessagePool::getOutputMessage();
   addWorldInfo(output, "", password, version, true);

   const auto& casts = ProtocolGame::getLiveCasts();
   output->addByte(casts.size());
   for (const auto& cast : casts) {
     output->addByte(0);
     output->addString(cast.first->getName());
   }
   output->addByte(0);
   output->addByte(g_config.getBoolean(ConfigManager::FREE_PREMIUM));
   output->add<uint32_t>(g_config.getBoolean(ConfigManager::FREE_PREMIUM) ? 0 : (time(nullptr)));
   send(std::move(output));

   disconnect();
}
about syncknowncreatures, what was the problem? im sure the autor said he fixed it and the adddummycreature, is it about the guild emblem debug?, cuz it is not happening to me atleast, they might been using an outdated tfs or didn't put the codes exactly as djarek said

Proof
jsXnNb7.jpg
 
Well I managed to make that reward system work, if anyone is interested pm me and I'll send you the updated sources, ty @MatheusMkalo
 
well I modified getCastingStreamsList to make sure it always displays premium so it ended up like this
Code:
void ProtocolLogin::getCastingStreamsList(const std::string& password, uint16_t version)
{
   //dispatcher thread
   auto output = OutputMessagePool::getOutputMessage();
   addWorldInfo(output, "", password, version, true);

   const auto& casts = ProtocolGame::getLiveCasts();
   output->addByte(casts.size());
   for (const auto& cast : casts) {
     output->addByte(0);
     output->addString(cast.first->getName());
   }
   output->addByte(0);
   output->addByte(g_config.getBoolean(ConfigManager::FREE_PREMIUM));
   output->add<uint32_t>(g_config.getBoolean(ConfigManager::FREE_PREMIUM) ? 0 : (time(nullptr)));
   send(std::move(output));

   disconnect();
}
about syncknowncreatures, what was the problem? im sure the autor said he fixed it and the adddummycreature, is it about the guild emblem debug?, cuz it is not happening to me atleast, they might been using an outdated tfs or didn't put the codes exactly as djarek said

Proof
jsXnNb7.jpg


Have you tried on online server ? Or just localhost
 
Thank you, Lundrial.
I appreciate your contribution <3

Red
 
Have you tried on online server ? Or just localhost
I think only in localhost,
I have made this changes 2~3 months ago, since 10.82
But sometimes I got crashs, like from last receive Byte 0x30, 0x6A and 0x6E.
This changes don't work 100%.
 
I only tried with one person, I can't open ports so it was via hamachi, but I don't think that matters we both could spectate each other forat least 1 hour without problems
 
@Lundrial
What modifications that you did to make the cast work? Here always get debug when I click in "enter game" then press "Ok"
 
well I modified getCastingStreamsList to make sure it always displays premium so it ended up like this
Code:
void ProtocolLogin::getCastingStreamsList(const std::string& password, uint16_t version)
{
   //dispatcher thread
   auto output = OutputMessagePool::getOutputMessage();
   addWorldInfo(output, "", password, version, true);

   const auto& casts = ProtocolGame::getLiveCasts();
   output->addByte(casts.size());
   for (const auto& cast : casts) {
     output->addByte(0);
     output->addString(cast.first->getName());
   }
   output->addByte(0);
   output->addByte(g_config.getBoolean(ConfigManager::FREE_PREMIUM));
   output->add<uint32_t>(g_config.getBoolean(ConfigManager::FREE_PREMIUM) ? 0 : (time(nullptr)));
   send(std::move(output));

   disconnect();
}
about syncknowncreatures, what was the problem? im sure the autor said he fixed it and the adddummycreature, is it about the guild emblem debug?, cuz it is not happening to me atleast, they might been using an outdated tfs or didn't put the codes exactly as djarek said

Proof
jsXnNb7.jpg
@Lundrial
What modifications that you did to make the cast work? Here always get debug when I click in "enter game" then press "Ok"
 
Back
Top