Jump to content

Cataclismo

Premium
  • Posts

    232
  • Joined

  • Last visited

  • Days Won

    7
  • Feedback

    0%

Everything posted by Cataclismo

  1. This is not used in game source , so how can it work? It's not working. Read above.
  2. Ahahaha. People always write my name wrong xD Also, in the clean code it's checked the victim (i think), not the owner: LPCHARACTER victim = GetCompany()->GetOwner(); Can you check that too?
  3. if (!(item = m_apItems[i])) continue; instead of if (!(item = GetCompany()->GetItemByPosition(i))) continue; EDIT: Nvm
  4. Correct structure works, i tested. Best regards; Can BARAN... Think about it. You added a variable which it's not used by anything. How can a simple variable, which is never used, to change how your code works? Check what you've posted again.
  5. cBaran version wasn't doing anything. He added a variable, but never used it. Your code is working for sure. Great job
  6. So you're adding a variable to the code, but you're not using it anywhere. How does that solve the bug? This is not a bug fix at all. Your code does nothing.
  7. This is the default structure of SendNotice, right? void SendNotice(const char * c_pszBuf, bool isBig = false) { const DESC_MANAGER::DESC_SET & c_ref_set = DESC_MANAGER::instance().GetClientSet(); std::for_each(c_ref_set.begin(), c_ref_set.end(), notice_packet_func(c_pszBuf)); } Shouldn't it be like that? std::for_each(c_ref_set.begin(), c_ref_set.end(), notice_packet_func(c_pszBuf, isBig));
  8. Sorry then. I was to lazy to read everything
  9. Where you tell to notice_packet_func that is a big notice? If I am not missing something, nowhere
  10. Hm... What about keeping data in a map in CHARACTER_MANAGER (player id and a timestamp used to check if elevation expired or something)? I don't think there's a problem if you keep those data in a single channel, even if you may change channel to 99 and back (like dungeons, OX map). Also, you can send packets to all channels to store those data. I am sorry if I missed something xD
  11. Your iSlot variable is bigger or equal to SQL_MAX_NUM, which he shouldn't! Check your SQL_MAX_NUM or check where you call the function if iSlot is too big.
  12. Yeah. I forgot to answer. I've compiled the source under FreeBSD 32-bit and everything worked.
  13. First of all, you have to create a new file on your site called whatever you like. eg: tm_api.php Second, you have to put the code specified by them there. I am using this code: <?php session_start(); include "./inc/core.inc.php"; $allowedIP = "188.165.186.200"; $serverID = "ID"; $privateKey = "KEY"; if ($allowedIP == $_SERVER["REMOTE_ADDR"] && isset($_POST["TYPE"], $_POST["TIMESTAMP"], $_POST["HASH"])) { if ($_POST["TYPE"] == "VOTE" && isset($_POST["USER_ID"])) { if ($_POST["HASH"] == md5(sprintf("%s|%s|%s|%s|%s", $_POST["TYPE"], $serverID, $_POST["TIMESTAMP"], $_POST["USER_ID"], $privateKey))) { $userId = (int)$_POST["USER_ID"]; $vote->DoVote($userId); } } } ?> Where: $serverID is your unique server id from topmetin.org. How you can find it? Go on the site, log in and click on the Serverlist link from header. There you will find your server and the Votelink. The Votelink have this structure: [Hidden Content] Copy serverID and paste it in your file. Also, you will find, near the Votelink, the private key. Copy that key to your file too and replace KEY (keep quotation). Now replace $vote->DoVote($userId); with your code. eg: mysql_query("UPDATE account.account SET coins=coins+5 WHERE id='$userId'"); Where 5 is how coins you want to give for every vote. Tip: Do some logs to track votes. Also, you should force them to vote only once at 12 hours per account (even if topmetin.org does that already). Also, replace include "./inc/core.inc.php"; with your file which connects to database (if you don't know which is take it from another file -.- ). Now the vote link. First of all, put the link in a file which checks if a user is logged in (like User Panel or something). The link should look like that: [Hidden Content]/userID You should be able to get userID from sessions or something. And the last step: Go to the site and click on the Edit icon from your server (it's somewhere in the right) and in the field called API-Link (optional) put your API file link (eg: [Hidden Content]).
  14. I actually couldn't. That's why I had to use this fix.
  15. Check if insult.txt from locale is empty. If it is you have two options: delete it or put something in it. Do the same thing for any other files. Or, you can do what Ken said.
  16. I am not sure. I worked a bit and I am including them on my own server, so... For now, if someone succeed and gets into my VDS then I will release them xD ... no, is not a challenge. Please, have mercy.
  17. Hi everyone, I just wanna show you some things I made 1.Autopotions with time instead of quantity 2.Potions inventory: a special inventory for potions 3.Reborn replacing level instead of alignment (replacing alignment is kinda stupid, if you ask me). 4.Rage System: it fills by 1% for every mob you hit (hit, not ability). When it is at 100% you will gain some bonuses. If you don't attack for 3 seconds it will start decreasing by 5% per second. If you start attacking again it will start increasing too. I made more things, but I have prints only for those. What you think? Who of you are going to do them?
  18. Hi, A few days ago I observed that horse level is missing from client. You are able to see the level only when you advance your horse or when you take with a command (for GMs). I don't know if somebody else have this bug, but I will post the little fix I found because you never know. In input_login.cpp, inside the function void CInputLogin::Entergame(LPDESC d, const char * data) look for if (ch->GetHorseLevel() > 0) { DWORD pid = ch->GetPlayerID(); if (pid != 0 && CHorseNameManager::instance().GetHorseName(pid) == NULL) db_clientdesc->DBPacket(HEADER_GD_REQ_HORSE_NAME, 0, &pid, sizeof(DWORD)); } And replace that check with this one if (ch->GetHorseLevel() > 0) { DWORD pid = ch->GetPlayerID(); if (pid != 0 && CHorseNameManager::instance().GetHorseName(pid) == NULL) db_clientdesc->DBPacket(HEADER_GD_REQ_HORSE_NAME, 0, &pid, sizeof(DWORD)); ch->SetHorseLevel(ch->GetHorseLevel()); ch->SkillLevelPacket(); } That's it. Enjoy.
  19. How the actual fuck? The thing with "__" worked. HOW THE HELL? I can't believe it. Thank you anyway.
  20. That's only declaration. I execute the function after it's being declared and things.
  21. No, the identation is ok. It's shown like that only here, on forum.
  22. So, what is happening? I get this in syserr: 'MyDialog' object has no attribute '_Interface__OnRefresh' That's the structure of the file which contains "MyDialog", BUT I deleted some parts of the script because is kinda big. import app import os import chat import ui import locale import uiScriptLocale import uiCommon import snd import constInfo import event import net import interfaceModule class MyDialog(ui.ScriptWindow): def __init__(self): ui.ScriptWindow.__init__(self) self.isLoaded=0 self.selectEvent=None self.fileListBox=None def __del__(self): ui.ScriptWindow.__del__(self) def Show(self): if self.isLoaded==0: self.isLoaded=1 ui.ScriptWindow.Show(self) def Open(self): self.Show() self.SetCenterPosition() self.SetTop() def Close(self): self.popupDialog.Hide() self.Hide() def OnPressEscapeKey(self): self.Close() return TRUE def __OnRefresh(self): return On the "interfacemodule.py" I have: ... import uiMyDialog ... def __init__(self): ... self.wndMyDialog = None ... def RefreshMyDialog(self): self.wndMyDialog.__OnRefresh() def __MakeMessengerWindow(self): ... self.wndMyDialog = uiMyDialog.MyDialog() ... So, when I call this function from game.py self.interface.RefreshMyDialog() I get the error I posted above. I really don't understand why...
  23. local race = {"warrior", "ninja", "sura", "mage"} local sex = { "male", "female" } notice_all("Please welcome new "..sex[pc.get_sex()+1].." "..race[pc.job+1].." "..pc.get_name()) char_log(0, "NEW_CHARACTER", race[pc.job+1].."_"..sex[pc.get_sex()+1]) This instead of all your checks. Also, what's the purpose of last check? (the one with countitem)
×
×
  • 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.