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

Guild War System - Pure OTServ 0.6.3/OTHire

Status
Not open for further replies.

Nottinghster

Tibia World RPG Developer
Joined
Oct 24, 2007
Messages
1,570
Solutions
6
Reaction score
437
Location
Brazil - Rio de Janeiro
GitHub
Nottinghster
Hello OTLanders!

I've added Guild War system to my source code (otserv_svn 0.6.3 - version 7.72) and I have fixed some things and now works 99,9% (skulls system, frags and other things), the 0,1% is a weird problem: THE MESSAGE SENT TO GUILD CHANNEL !!!

(Opponent XXX of the YYY was killed by ZZZ - The new score is 123:321 frags (limit 500)) --> THAT KIND OF MESSAGE

Everytime that I kill an enemy and the guild channel is opened, the server crash, the reason: I REALLY DON'T KNOW !!!

Here's the code about sending the messages
Code:
//Send message to channels
std::stringstream msg;
msg << "Opponent " << player->getName() << " of the " << enemy->getName() << " was killed by " << kmsg <<
". The new score is " << frags << ":" << enemyFrags << " frags (limit " << it->second.fragLimit << ").";
guild->broadcastMessage(SPEAK_CHANNEL_R1, msg.str());

msg.str("");
msg << "Guild member " << player->getName() << " was killed by " << kmsg << " of the " << guild->getName() <<
". The new score is " << enemyFrags << ":" << frags << " frags (limit " << it->second.fragLimit << ").";
enemy->broadcastMessage(SPEAK_CHANNEL_R1, msg.str());

if(it->second.finished){
//Send final war messages
msg.str("");
msg << "Congratulations! You have won the war against " << enemy->getName() <<
" with " << frags << " frags.";
guild->broadcastMessage(SPEAK_CHANNEL_R1, msg.str());

msg.str("");
msg << "You have lost the war against " << guild->getName() <<
". They have reached the limit of " << frags << " frags.";
enemy->broadcastMessage(SPEAK_CHANNEL_R1, msg.str());

Here's the broadcastMessage function:
Code:
void Guild::broadcastMessage(SpeakClasses type, const std::string& msg) const
{
ChatChannel* channel = g_chat.getGuildChannel(getId());
if(channel) //Channel doesn't necessarily exists
channel->sendInfo(type, msg);
}

Someone can help me with that ?
Thank you guys !!!

--------------------- EDIT -------------------------

After checking the code for some time, I finally fixed, please some MOD, can close the thread ;)
 
Last edited:
wasn't you the guy sell ot things for money? =0
wasn't you the guy who claims to have a "perfect" old times OT? =0
wasn't you the guy who charges money from people asking for help? =0
wasn't you the guy who changes minimal bits in scripts/src and claims its entire ownership? =0

I may be mistaken but I'm pretty sure that you are :p so unless you are going to release this system to the community and not going to sell it, I recommend that people think twice before helping you...

btw here in Brazil they teach in primary school that the past of "send" is "sent" and not "sended" kkk
 
wasn't you the guy sell ot things for money? =0
wasn't you the guy who claims to have a "perfect" old times OT? =0
wasn't you the guy who charges money from people asking for help? =0
wasn't you the guy who changes minimal bits in scripts/src and claims its entire ownership? =0

I may be mistaken but I'm pretty sure that you are :p so unless you are going to release this system to the community and not going to sell it, I recommend that people think twice before helping you...

btw here in Brazil they teach in primary school that the past of "send" is "sent" and not "sended" kkk

Hahaha that btw was great xD
 
wasn't you the guy sell ot things for money? =0
wasn't you the guy who claims to have a "perfect" old times OT? =0
wasn't you the guy who charges money from people asking for help? =0
wasn't you the guy who changes minimal bits in scripts/src and claims its entire ownership? =0

I may be mistaken but I'm pretty sure that you are :p so unless you are going to release this system to the community and not going to sell it, I recommend that people think twice before helping you...

btw here in Brazil they teach in primary school that the past of "send" is "sent" and not "sended" kkk

1, 2 , 3 ,4 --> Answer is NO !!

Why you love me ?
All that hate is because I didn't help you in the past or something like that ?
If yes, forgive me :)

And yes, I help alot of people, and for your surprise, for free, it's my hobby ;)

In all my threads, posts, you attack me for no reason, I'm not asking for your help, seriously, grow up man !!
 
Last edited:
Status
Not open for further replies.
Back
Top