-
Posts
232 -
Joined
-
Last visited
-
Days Won
7 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Cataclismo
-
-
Ok fixed version up there thanks to Cataclisimo for the original function.
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?
-
Can someone maybe provide the clean source code for that function everyone is using this is a WoM custom function <.<
if (!(item = m_apItems[i])) continue;
instead of
if (!(item = GetCompany()->GetItemByPosition(i))) continue;
EDIT: Nvm
-
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.
-
cBaran version wasn't doing anything. He added a variable, but never used it. Your code is working for sure. Great job
-
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.
-
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.
-
Oops, totally forgot about that.
I'm editing it right now. I first developed it and then wrote the guide, that's why I missed it by accident
Thanks!
I thought so. No problem.
-
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));
- 1
-
Yes Cataclismo, that would pretty much be the P2P solution we were talking about.
Sorry then. I was to lazy to read everything
-
Where you tell to notice_packet_func that is a big notice? If I am not missing something, nowhere
-
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
-
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.
-
You already fixed this problem?
Yeah. I forgot to answer.
I've compiled the source under FreeBSD 32-bit and everything worked.
- 1
-
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).
- 2
-
you can see the horse level in skills page O.o
I actually couldn't. That's why I had to use this fix.
-
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.
-
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.
-
Hi everyone,
I just wanna show you some things I made
1.Autopotions with time instead of quantity
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).
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.
"Furie" = Rage
I made more things, but I have prints only for those. What you think? Who of you are going to do them?
- 2
-
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.
- 9
-
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.
-
when u execute the script:
def RefreshMyDialog(self): self.wndMyDialog.__OnRefresh() def __MakeMessengerWindow(self): ... self.wndMyDialog = uiMyDialog.MyDialog()
u first load the
def __MakeMessengerWindow(self):
and then
def RefreshMyDialog(self):
?
That's only declaration. I execute the function after it's being declared and things.
-
ur fail is here:
def onrefresh 1 tab more ? u need delete 1 tab.
Regards.
No, the identation is ok. It's shown like that only here, on forum.
-
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...
-
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)
How To Fix Exchange Bug SRC
in Bug Fixes
Posted
It's not working. Read above.