xeross
-
Posts
36 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Content Type
Profiles
Bug Tracker
Wiki
Release Notes
Forums
Downloads
Blogs
Events
Posts posted by xeross
-
-
Congratulations on the milestone and all the amazing work.
-
TytytytytytytytyTytytytytytytytyTytytytytytytytyTytytytytytytytyTytytytytytytytyTytytytytytytytyTytytytytytytytyTyty
tytytytytytyTytytytytytytytyTytytytytytytytyTytytytytytytytyTytytytytytytytyTytytytytytytytyTytytytytytytytyTytytyty
tytytytyTytytytytytytytyTytytytytytytytyTytytytytytytytyTytytytytytytytyTytytytytytytyty.
Thanks for this, FInally support, finally udb will make a 3.0.3 database, begone Frozen Database
-
you should be able to move when auto shooting when you auto attack you can also move.
But does anyone know where this piece of code is ?
-
Hey,
I want to fix this error someone gets when auto shooting, if they try to use a skill they get: another action is in progress, i want to know where this get's handled so i can add a check for auto-shoot etc.
-
thanks i'll try that
-
i now have
void World::SendBroadcast() { std::string msg; int nextid; QueryResult *result; if(nextid != 0) { QueryResult *result = WorldDatabase.PQuery("SELECT `text`, `next` FROM `autobroadcast` WHERE `id` = %u", nextid); } else { QueryResult *result = WorldDatabase.PQuery("SELECT `text`, `next` FROM `autobroadcast` ORDER BY RAND() LIMIT 1"); } if(!result) return; nextid = result->Fetch()[1].GetUInt8(); msg = result->Fetch()[0].GetString(); delete result; static uint32 abcenter = 0; abcenter = sConfig.GetIntDefault("AutoBroadcast.Center", 0); if(abcenter == 0) { sWorld.SendWorldText(LANG_AUTO_BROADCAST, msg.c_str()); sLog.outString("AutoBroadcast: '%s'",msg.c_str()); } if(abcenter == 1) { WorldPacket data(SMSG_NOTIFICATION, (msg.size()+1)); data << msg; sWorld.SendGlobalMessage(&data); sLog.outString("AutoBroadcast: '%s'",msg.c_str()); } if(abcenter == 2) { sWorld.SendWorldText(LANG_AUTO_BROADCAST, msg.c_str()); WorldPacket data(SMSG_NOTIFICATION, (msg.size()+1)); data << msg; sWorld.SendGlobalMessage(&data); sLog.outString("AutoBroadcast: '%s'",msg.c_str()); } }
But i wonder if nextid will be saved till the next function call so that the correct message will be selected
-
I am working on an announcer script and i have the following.
void World::SendBroadcast() { std::string msg; int nextid; if(nextid != 0) { QueryResult *result = WorldDatabase.PQuery("SELECT `text`, `next` FROM `autobroadcast` WHERE `id` = %u", nextid); } else { QueryResult *result = WorldDatabase.PQuery("SELECT `text`, `next` FROM `autobroadcast` ORDER BY RAND() LIMIT 1"); } if(!result) return; nextid = result->Fetch()[1].GetInt(); msg = result->Fetch()[0].GetString(); delete result; static uint32 abcenter = 0; abcenter = sConfig.GetIntDefault("AutoBroadcast.Center", 0); if(abcenter == 0) { sWorld.SendWorldText(LANG_AUTO_BROADCAST, msg.c_str()); sLog.outString("AutoBroadcast: '%s'",msg.c_str()); } if(abcenter == 1) { WorldPacket data(SMSG_NOTIFICATION, (msg.size()+1)); data << msg; sWorld.SendGlobalMessage(&data); sLog.outString("AutoBroadcast: '%s'",msg.c_str()); } if(abcenter == 2) { sWorld.SendWorldText(LANG_AUTO_BROADCAST, msg.c_str()); WorldPacket data(SMSG_NOTIFICATION, (msg.size()+1)); data << msg; sWorld.SendGlobalMessage(&data); sLog.outString("AutoBroadcast: '%s'",msg.c_str()); } }
All calls timers etc are configured properly, this is based on an announcer i found.
However i get the following errors
2>..\\..\\src\\game\\World.cpp(2629) : error C2065: 'result' : undeclared identifier 2>..\\..\\src\\game\\World.cpp(2631) : error C2065: 'result' : undeclared identifier 2>..\\..\\src\\game\\World.cpp(2631) : error C2227: left of '->Fetch' must point to class/struct/union/generic type 2> type is ''unknown-type'' 2>..\\..\\src\\game\\World.cpp(2631) : error C2228: left of '.GetInt' must have class/struct/union 2>..\\..\\src\\game\\World.cpp(2632) : error C2065: 'result' : undeclared identifier 2>..\\..\\src\\game\\World.cpp(2632) : error C2227: left of '->Fetch' must point to class/struct/union/generic type 2> type is ''unknown-type'' 2>..\\..\\src\\game\\World.cpp(2632) : error C2228: left of '.GetString' must have class/struct/union 2>..\\..\\src\\game\\World.cpp(2633) : error C2065: 'result' : undeclared identifier 2>..\\..\\src\\game\\World.cpp(2633) : error C2541: 'delete' : cannot delete objects that are not pointers
I think i did something wrong with nextit, it needs to be saved for the next function call so it gets the correct message from mysql, how would i accomplish this ?
Thanks for your time, Xeross
-
Hey,
Im working on a script myself atm and i need to put a variable into a query i have the following code :
QueryResult *result = WorldDatabase.PQuery("SELECT `text`, `next` FROM `autobroadcast` WHERE `id` = %u", nextid);
Now i want to know what do the %u etc mean and how do i use them properly.
The variable nextid has been set btw.
Also i've assigned nextid to be a uint32 but it will never reach a number higher then 32 or so what is the best variable type to use for it ?
Thanks for your time, Xeross
-
Hey,
I have a vote reward system i made but it was for ascent i now need to convert it for mangos.
How would i do this does anyone have an example of a script that can insert mail into the game or a vote reward system that does this.
Or can someone point me in the right direction ?
Thanks for your time, Xeross
-
isnt multithreading faster in general
Announcer Script Crashes
in OldC / C++
Posted
Hey,
I've got the following announcer script(Modified by me)
the sql table:
Somehow it crashes on
Can anyone help me with fixing this ?
Thanks for your time, Xeross