Jump to content

Cataclismo

Premium
  • Posts

    232
  • Joined

  • Last visited

  • Days Won

    7
  • Feedback

    0%

Posts posted by Cataclismo

  1.  

     

    not work i tested...any other solution?

     

     

    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.

     

     

    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.

  2. 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));
    
    • Love 1
  3. 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

  4. 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: https://topmetin.org/site/vote/serverID_serverName

    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: https://topmetin.org/site/vote/serverID_serverName/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: http://yourserver.com/tm_api.php).

    • Love 2
  5. you release them?

     

    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.

  6. Hi everyone,

    I just wanna show you some things I made ^_^

    1.Autopotions with time instead of quantity

    9tKgj7P.png

     

    Description translated:

    Fills PM/PV automatically. Contains infinite PM/PV, but it has a limit of time.

    Remaining time: 29Days 23Hours 59Minutes

     

    2.Potions inventory: a special inventory for potions

    3.Reborn replacing level instead of alignment (replacing alignment is kinda stupid, if you ask me).

    XljzG0h.jpg

     

    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.

    Hzpummz.png

     

    "Furie" = Rage

     

    I made more things, but I have prints only for those. What you think? ^_^ Who of you are going to do them? :D

    • Love 2
  7. 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.

    • Love 9
  8.  

    I think the problem is that you didnt define the :

    self.wndMyDialog
    

    so when you do this:

    self.interface.RefreshMyDialog()
     
    The code dont run the:
     
    __MakeMessengerWindow
    
    So try putting the self.wndMyDialog defined in the init function, like this:
     def __init__(self):
         self.wndMyDialog = uiMyDialog.MyDialog()
    

    Sorry for my bad english,...

     

    #Edit 

    Oh and if isnt that i think it is because the function has __ in the name, and i think that is only for functions that are not going to be called by another class..

     

    So try to rename the funtion to 

    def OnRefresh(self):

    Kind Regards,

    Frozen

     

     

     

    How the actual fuck?

    The thing with "__" worked. HOW THE HELL? I can't believe it.

    Thank you anyway.

  9. 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...

  10. 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.