OSIRIS
-
Posts
8 -
Joined
-
Last visited
-
Donations
0.00 GBP
Content Type
Profiles
Bug Tracker
Wiki
Release Notes
Forums
Downloads
Blogs
Events
Posts posted by OSIRIS
-
-
hi all;
i've wroted a script about custom event. and i trying to adding items on player's party. here's the code :
void JustDied(Unit * killer) { Group * killerGroup = ((Player *)killer)->GetGroup(); if (killerGroup) { DoScriptText(SAY_CONGRULATIONS, m_creature, killer); for(GroupReference * itr = killerGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Player * receiver = itr->getSource(); // possible fix crash i think if (!receiver) continue; if (receiver) { // Item bla_bla_bla int32 count = 1; uint32 itemid = ITEM_BLA_BLA_BLA; //now we can add items uint32 noSpaceForCount = 0; // check space and find places ItemPosCountVec dest; uint8 msg = receiver->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemid, count, &noSpaceForCount); if(count == 0 || dest.empty()) continue; Item * item = receiver->StoreNewItem(dest, itemid, true, Item::GenerateItemRandomPropertyId(itemid)); if (count > 0 && item) receiver->SendNewItem(item, count, false, true); else continue; } } } }
server crashed after first player's have taked the item. also there isn't any crashlog about this situation. the server don't give me any crashlog.
anybody have an idea? thanks ..
-
why send fake aura id 62388?
-
yes, it works perfectly
62388 -> is this aura id true?
there isn't any aura or spell on that id.
thanks.
-
i think this solution is not needed.
-
You do this with TMSDK..
http://code.google.com/p/trinmangsdk/
<?php if($_GET['char'] { require_once("tmsdk.include.php"); // CONFIG $_config['mysql_host'] = 'localhost'; $_config['mysql_port'] = 3306; $_config['mysql_user'] = "root"; $_config['mysql_pass'] = ""; $_config['db_char'] = "characters"; // END CONFIG $cdb = new conndb($_config['mysql_host'], $_config['mysql_port'], $_config['mysql_user'], $_config['mysql_pass'], $_config['db_char']); $char = new char($cdb); $guid = $char->getGuid("NAME HERE"); $status = $char->getOnlineStatus($guid); if(!$status) { $home = $char->getHome($guid); $char->setLocation($guid,$home['position_x'],$home['position_y'],$home['position_z'],$home['map']); } else { echo 'Attention: the character is online. Try again later.'; } } else { echo ' <form method="GET"> Character Name: <input type="text" name="char"> <input type="submit" value="Submit"> </form> '; ?>
That should work fine as far as I can tell, however, I wrote it very quickly and.. it probably won't. You can also add a username and password check to if you want to check that the character is being transfered by it's owner.
the revive option certainly NOT POSSIBLE.because u need a webservice or something else.because use .revive charactername command in mangos console.and it will be possible with using webService.
-
Hello, I would like to join the group of developers of mangos, helping to resolve bugs and improving the support.But, I will need help from you :eek:, I work as a C# developer, but never programmed in C++. but the syntax is the same!
How do the source code of the compiler and mangos?
and they're never same i'm a mcpd maybe like you but i've sloged much more classes and/or methods.
-
good job.thanks.
About server crash on my custom script
in OldCore modifications
Posted
anybody help ?