-
Posts
16 -
Joined
-
Last visited
-
Feedback
0%
About Dumik
Informations
-
Gender
Male
Social Networks
-
Skype
DumikProduction
- Website
Dumik's Achievements
-
Hello everybody, i have a problem with new funtion in error log i have this: char_item.cpp: In member function 'bool CHARACTER::helpCountBeltSpecifyItem(DWORD, int) const': char_item.cpp:6422: error: invalid conversion from 'const CHARACTER* const' to 'CHARACTER*' char_item.cpp:6422: error: initializing argument 1 of 'static bool CBeltInventoryHelper::IsItemInSlotBeltInventory(CHARACTER*, DWORD, int)' this is the function from char_item.cpp int CHARACTER::CountBeltSpecifyItem(DWORD vnum) const { int count = 0; LPITEM item; LPITEM beltItem = GetWear(WEAR_BELT); if (beltItem != NULL) // if belt is equip { for (int i = BELT_INVENTORY_SLOT_START; i < BELT_INVENTORY_SLOT_END; ++i) { if (!helpCountBeltSpecifyItem(vnum, i)) { continue; } else { count += item->GetCount(); } } } return count; } bool CHARACTER::helpCountBeltSpecifyItem(DWORD vnum, int i) const { line 6422 ->if (CBeltInventoryHelper::IsItemInSlotBeltInventory(this, vnum, i)) return true; else return false; } belt_inventory_helper.cpp static bool IsItemInSlotBeltInventory(LPCHARACTER pc, DWORD vnum, int target_cell) { if(pc == NULL) return false; if(vnum == NULL) { pc->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ERROR! [belt_inventory_helper] No vnum specified!")); return false; } if(target_cell == NULL) { pc->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ERROR! [belt_inventory_helper] No target cell specified!")); return false; } LPITEM beltInventoryItem = pc->GetInventoryItem(target_cell); //pc->GetInventoryItem(i) if(beltInventoryItem->GetVnum()) return true; return false; } Thanks for any help
-
Add new function for Quests
Dumik replied to Dumik's topic in Community Support - Questions & Answers
I will try and Thank you a lot -
Add new function for Quests
Dumik replied to Dumik's topic in Community Support - Questions & Answers
It is there any possible how to add possible use SELECT clause? -
Add new function for Quests
Dumik replied to Dumik's topic in Community Support - Questions & Answers
I used existing file questlua_game.cpp -
I want add new function for quests. But when i apply this function to quest nothing happens. Please can you help me? int game_mysql_query(lua_State* L) { LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); SQLMsg *msg; msg = DBManager::instance().DirectQuery(lua_tostring(L, 1)); if (msg->uiSQLErrno != 0) { sys_err("game_mysql_query failed"); return 0; } } { "mysql_query", game_mysql_query }, Quest part: pc.give_item2(game.mysql_query("SELECT login FROM account.account WHERE id="..player_id.." ")) Thank you a lot
-
Hi, this is the small instruction. e.g <span class="imgPosition"><img src="your_path/ninja_head.png" alt=""></span> .imgPosition img { position: absolute; top: 10px; right: 20px; } Best regards, Dumik
-
Open game/src/shop_manager.cpp search : int iVal = 0; DWORD dwTax = 0; int iVal = 0; // default 3 // Santhia remove tax for items if (LC_IsYMIR() || LC_IsKorea()) { //dwTax = dwPrice * iVal / 100; dwPrice -= dwTax; } else { //dwTax = dwPrice * iVal/100; dwPrice -= dwTax; }
-
M2 Download Center Download Here ( Internal ) Hello, i created several functions for private server Santhia (czech private server). I hope it will useful for you. Log system function: function CreateLog ($status,$fileName,$id,$ip,$itemID = NULL,$desc = NULL) { $sql = mysql_query("SELECT login from ".DB_ACC.".account WHERE id = ".mysql_escape($id)." "); if(strtoupper(trim($fileName)) == 'BUY' and !is_null($itemID) ) {$opt = ' | Item: '.$itemID; } else {$opt = ''; } if (!is_null($desc)){ $descr = $desc; }else{ $descr = ''; } $log = new Logging(); $log->lfile('path/logs/'.$fileName.'.txt'); $log->lwrite('STATUS: '.strtoupper(trim($status)).' | Login: '.mysql_result($sql,0,login).''.$opt.' | '.$ip.' | '.$descr ); //e.g. CreateLog ('STATUS',NAME_OF_FILE,$_SESSION['id'],$_SERVER['REMOTE_ADDR'],''ID_ITEMU,'DESCRIPTION'); } Log system class: <?php class Logging { private $log_file, $fp; public function lfile($path) { $this->log_file = $path; } public function lwrite($message) { if (!is_resource($this->fp)) { $this->lopen(); } $time = @date('[Y.m.d H:i:s]'); fwrite($this->fp, "$time $message" . PHP_EOL); } public function lclose() { fclose($this->fp); } private function lopen() { $log_file_default = 'path/logs/login.txt'; $lfile = $this->log_file ? $this->log_file : $log_file_default; $this->fp = fopen($lfile, 'a') or exit("Can't open $lfile!"); } } ?> ----------------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------------- Function to display the image of Items: function ItemImg($vnum) { $equip_length = strlen($vnum); switch($equip_length) { case '1': $vnum = '0000'.$vnum; $id = substr($vnum, 0, -1); break; case '2': $vnum = '000'.$vnum; $id = substr($vnum, 0, -1); break; case '3': $vnum = '00'.$vnum; $id = substr($vnum, 0, -1); break; case '4': $vnum = '0'.$vnum; $id = substr($vnum, 0, -1); break; case '5': $vnum1 = $vnum; break; } if(file_exists('template/img/isIcon/ico/'.$id.'0.png')) { return 'path/ico/'.$id.'0.png'; } elseif(file_exists('path/ico/'.$vnum1.'.png')) { return 'path/ico/'.$vnum1.'.png'; } else { return 'path/error.png'; // error image. if image is missing } } I hope it will useful for you. If you have questions feel to free and contact me. Dumik WebDeveloper for Santhia
-
Hi, it is possible to share source code of python part? Thank you a lot. Dumik WebMaster for Santhia (czech private servver)
-
I add CTOA everywhere in ROOT/ UISCRIPT and LOCALE and now i have this problem Thank you a lot
-
Hello, i have still same problem. 0405 14:04:03862 :: ui 0405 14:04:03862 :: :1975: 0405 14:04:03862 :: RuntimeWarning 0405 14:04:03862 :: : 0405 14:04:03862 :: tp_compare didn't return -1 or -2 for exception 0405 14:04:03862 :: 0405 14:04:03862 :: Traceback (most recent call last): 0405 14:04:03862 :: File "networkModule.py", line 239, in SetGamePhase 0405 14:04:03863 :: File "game.py", line 107, in __init__ 0405 14:04:03863 :: File "interfaceModule.py", line 291, in MakeInterface 0405 14:04:03863 :: File "interfaceModule.py", line 113, in __MakeChatWindow 0405 14:04:03864 :: File "uiChat.py", line 622, in __init__ 0405 14:04:03864 :: File "ui.py", line 1992, in __init__ 0405 14:04:03864 :: File "ui.py", line 2008, in CreateScrollBar 0405 14:04:03865 :: File "ui.py", line 1975, in SetSize 0405 14:04:03865 :: OverflowError 0405 14:04:03865 :: : 0405 14:04:03865 :: Python int too large to convert to C long 0405 14:04:03865 :: I have binary from mainline_released. And I upgrade python-2.2 to python-2.7. Can you help me, pls. Thank you a lot. Dumik
-
[C++]Advanced chat & spam protection
Dumik replied to Sanchez's topic in Community Support - Questions & Answers
Yes im pretty sure. i checked 10 times. Thank you. Best regards, Vojta (Dumik) -
[C++]Advanced chat & spam protection
Dumik replied to Sanchez's topic in Community Support - Questions & Answers
Hello everybody, i have another problem. I add all codes. Compilation was successful but when i login as GM the client kick me out after loading window. in syserror is this: 0401 19:45:40573 :: Unknown packet header: 148, last: 45 81 Do you know how to fix it? Thank you a lot Best regards, Vojta -
[C++]Advanced chat & spam protection
Dumik replied to Sanchez's topic in Community Support - Questions & Answers
Hello everybody, i would like to ask you to one thing. You must create a new enum? For Spam system? if so how am I supposed to write Open common/length.h and add these: ? 1 2 3 SPAM_WAIT_SEC = 5, // The player can duplicate his message after 5 sec SPAM_CHAT_BAN_TIME = 60, // The player will receive 60 seconds chat ban, if he is saying a spamlist word SPAM_BAN_TIME = 3600, // The player will receive 1 hour ban, if he is saying a banlist word Thank you a lot Dumik -
Hello everybody, I have problem with client. I have built a Binary with Python 2.7 (mainline_releasedmainline_sgSrcsClient), but when I start it, it´s everythink ok but after loading screen the client fall down with this error: <<< 0313 16:43:49401 :: uiCharacter.py(line:399) __LoadWindow uiCharacter.py(line:152) __LoadScript ui.py(line:2818) LoadScriptFile ui.py(line:3008) LoadChildren ui.py(line:3008) LoadChildren ui.py(line:3008) LoadChildren ui.py(line:2864) LoadChildren ui.py(line:3091) LoadElementButton CharacterWindow.__LoadWindow - <type 'exceptions.OverflowError'>:Python int too large to convert to C long 0313 16:43:49401 :: ============================================================================================================ 0313 16:43:49401 :: Abort!!!! Can anyone help me? Thank you a lot. Best regards, Dumik santhia.eu