-
Posts
16 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Dumik
-
-
I will try and Thank you a lot
-
It is there any possible how to add possible use SELECT clause?
-
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
- 1
-
Open game/src/shop_manager.cpp
search : int iVal = 0;
DWORD dwTax = 0;int iVal = 0; // default 3// Santhia remove tax for itemsif (LC_IsYMIR() || LC_IsKorea()){//dwTax = dwPrice * iVal / 100;dwPrice -= dwTax;}else{//dwTax = dwPrice * iVal/100;dwPrice -= dwTax;} -
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
- 1
- 1
- 2
- 5
-
Hi, it is possible to share source code of python part?
Thank you a lot.
Dumik
WebMaster for Santhia (czech private servver)
- 1
-
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
-
Yes im pretty sure. i checked 10 times.
Thank you.
Best regards,
Vojta (Dumik)
-
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
-
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:
123SPAM_WAIT_SEC = 5, // The player can duplicate his message after 5 secSPAM_CHAT_BAN_TIME = 60, // The player will receive 60 seconds chat ban, if he is saying a spamlist wordSPAM_BAN_TIME = 3600, // The player will receive 1 hour ban, if he is saying a banlist wordThank 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
-
Solved....
[HELP]New function: Counting items
in Community Support - Questions & Answers
Posted
Hello everybody,
i have a problem with new funtion in error log i have this:
this is the function from char_item.cpp
belt_inventory_helper.cpp
Thanks for any help