Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/22/18 in all areas

  1. We can use CTRL+H for unmount/mount horse, but when we are riding a costume mount, we get an error if we try to use CTRL+H. So if you wanna be able to use it just follow this guide: cmd_general.cpp Go to function ACMD(do_user_horse_ride) Replace the if block (ch->GetMountVnum()) With this code: if (ch->GetMountVnum()) { LPITEM item = ch->GetWear(WEAR_COSTUME_MOUNT); if (item && item->IsRideItem()) ch->UnequipItem(item); if (ch->UnEquipSpecialRideUniqueItem()) { ch->RemoveAffect(AFFECT_MOUNT); ch->RemoveAffect(AFFECT_MOUNT_BONUS); } //ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ÀÌ¹Ì Å»°ÍÀ» ÀÌ¿ëÁßÀÔ´Ï´Ù.")); return; }
    2 points
  2. M2 Download Center Download Here ( Internal ) Description: When you craft a item the bonuses from the old item will be transferred(saved). ### Cube.cpp //Search : this->gold = 0; //Add after : #ifdef ENABLE_CUBE_RENEWAL this->allowCopyAttr = false; #endif //Search: else TOKEN("gold") { cube_data->gold = value1; } //Add after : #ifdef ENABLE_CUBE_RENEWAL else TOKEN("allow_copy") { cube_data->allowCopyAttr = (value1 == 1 ? true : false); } #endif //Search in : bool Cube_make (LPCHARACTER ch) LPITEM new_item; Add after : #ifdef ENABLE_CUBE_RENEWAL DWORD copyAttr[ITEM_ATTRIBUTE_MAX_NUM][2]; #endif //Search : CUBE_VALUE *reward_value = cube_proto->reward_value(); //Add after: #ifdef ENABLE_CUBE_RENEWAL for (int i=0; i<CUBE_MAX_NUM; ++i) { if (NULL==items[i]) continue; if (items[i]->GetType() == ITEM_WEAPON || items[i]->GetType() == ITEM_ARMOR) { bool hasElement = false; for (int j = 0; j < cube_proto->item.size(); ++j) { if(cube_proto->item[j].vnum == items[i]->GetVnum()) { hasElement = true; break; } } if(hasElement == false) continue; for (int a = 0; a < ITEM_ATTRIBUTE_MAX_NUM; a++) { copyAttr[a][0] = items[i]->GetAttributeType(a); copyAttr[a][1] = items[i]->GetAttributeValue(a); } break; } continue; } #endif //Search: new_item = ch->AutoGiveItem(reward_value->vnum, reward_value->count); //Add after: #ifdef ENABLE_CUBE_RENEWAL if (cube_proto->allowCopyAttr == true && copyAttr != NULL) { new_item->ClearAttribute(); for (int a = 0; a < ITEM_ATTRIBUTE_MAX_NUM; a++) { new_item->SetForceAttribute(a, copyAttr[a][0], copyAttr[a][1]); } } #endif ###cube.h //Search in : struct CUBE_DATA int percent; unsigned int gold; //Add after : #ifdef ENABLE_CUBE_RENEWAL bool allowCopyAttr; #endif ###service.h /Add: #define ENABLE_CUBE_RENEWAL Example in cube.txt section npc 20378 item 11299 1 item 30509 10 item 30516 10 item 30514 10 allow_copy 1 reward 20000 1 gold 100000 percent 60 end
    1 point
  3. The code which you tried is called Python Inner Functions, and for use it you have to declare it inside of another function and call it. Delete it and put this: root/game.py #Search for: self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight()) # Add after: ### START OF REGISTER ENVIRONMENT BASED ON SERVER TIME self.environmentInfoDict = { 4: 'd:/ymir work/environment/metin2_map_n_flame_dragon_01.msenv', 8: 'd:/ymir work/environment/mtthunder.msenv', 12: 'd:/ymir work/environment/bayblacksand.msenv', 16: 'd:/ymir work/environment/capedragonhead.msenv', 20: 'd:/ymir work/environment/snowm02.msenv', 22: 'd:/ymir work/environment/trent02.msenv' } environmentHour = (app.GetGlobalTimeStamp() / 60) / 60 % 24 if environmentHour in self.environmentInfoDict: environmentFileName = self.environmentInfoDict.get(environmentHour, constInfo.ENVIRONMENT_NIGHT) if app.IsExistFile(environmentFileName): background.RegisterEnvironmentData(0, environmentFileName) background.SetEnvironmentData(0) else: dbg.TraceError('Cannot find environment file (name: {:s})'.format(environmentFileName)) ### END OF REGISTER ENVIRONMENT BASED ON SERVER TIME
    1 point
  4. Since many are looking for it, this should be the release in question. I probably made some changes but I do not remember... [Hidden Content]
    1 point
  5. Hi there, Here a solution to hide all the useless error of Granny. Open UserInterface.cpp from UserInterface, after have doing the tutorial search: void GrannyError(granny_log_message_type Type, and comment the contents like it: //static void GrannyError(granny_log_message_type Type, // granny_log_message_origin Origin, // char const* File, // granny_int32x Line, // char const* Message, // void * UserData) //{ // TraceError("GRANNY: %s", Message); //} and a little down: // granny_log_callback Callback; // Callback.Function = GrannyError; // Callback.UserData = 0; // GrannySetLogCallback(&Callback); return 1; Regards, Vamos.
    1 point
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.