Register for your free account! | Forgot your password?

You last visited: Today at 08:39

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Custom /Commands Discussion

Discussion on Custom /Commands Discussion within the Shaiya PServer Development forum part of the Shaiya Private Server category.

Reply
 
Old   #1
 
SugarD-x's Avatar
 
elite*gold: 0
Join Date: Oct 2015
Posts: 23
Received Thanks: 7
Custom /Commands Discussion

I've read over quite a few topics in here about custom commands, but they all seem to come down to the same limitation: You can't have custom /<command>-style commands due to the existing ones in the client. Reading further into some posts, most people seem to agree that they are directly hardcoded into the client's executable. With this in mind, has anyone ever discovered how to actually remove/disable the original /commands from the client executable so custom ones could replace them? As an alternative, what about replacing or changing their functionality? With all that is known today about the game files, (and the enormous amount of control we have over them now), it would surprise me if no one has yet to figure this out.

The reason why I ask about this is because it would seem like a much better method to creating custom commands if they could be done in a more native style to the game itself. Making custom commands obviously has been done before, but not in this way, as far as I can tell.
SugarD-x is offline  
Old 11/06/2015, 19:27   #2
 
elite*gold: 0
Join Date: May 2012
Posts: 394
Received Thanks: 392
I would say it's very possible to at least re-code it so you can change how to activate/deactivate commands.
changing /char off to /invis off for example if you wanted.
Never tried it myself, but if i was to try, i would attach the game.exe in CE and search from there.
I remember i got the game to load admins fully visible from login, but it's been months since i did much developing, just getting back into it myself. So doing that much is at least possible without much knowledge or skill.

Nubness or Juuf could tell you for sure if it's possible, and maybe give a better outline on how you would go about it. Or you can just play around yourself and see what you can learn/find.
Truth1010 is offline  
Thanks
1 User
Old 11/06/2015, 19:41   #3
 
SugarD-x's Avatar
 
elite*gold: 0
Join Date: Oct 2015
Posts: 23
Received Thanks: 7
Quote:
Originally Posted by Truth1010 View Post
I would say it's very possible to at least re-code it so you can change how to activate/deactivate commands.
changing /char off to /invis off for example if you wanted.
Never tried it myself, but if i was to try, i would attach the game.exe in CE and search from there.
I remember i got the game to load admins fully visible from login, but it's been months since i did much developing, just getting back into it myself. So doing that much is at least possible without much knowledge or skill.

Nubness or Juuf could tell you for sure if it's possible, and maybe give a better outline on how you would go about it. Or you can just play around yourself and see what you can learn/find.
Good to know that you agree it is possible. I don't really have any programming experience in my background, (despite managing several projects elsewhere which require it), but from the sounds it shouldn't be too tricky. I just still can't believe no one has done it here yet. I may have to play around and see what I can figure out.

Edit: After just some very basic playing around in HxD, (mainly for sheer curiosity), I was able to pull up some of the commands. Theoretically by changing them to something else, I wonder if it would be possible to use one of the custom scripted commands to override them...
SugarD-x is offline  
Old 11/06/2015, 20:17   #4
 
elite*gold: 0
Join Date: May 2012
Posts: 394
Received Thanks: 392
I see no reason for it not to be. And yea, it wasn't too hard to find them from what i remember.

I think there was a post here a few years back with custom commands, but i believe that was linked through the database. Didn't pay much attention to it, and my memory isn't good enough to remember it exactly. Search will probably bring up some results.

Truth1010 is offline  
Thanks
1 User
Old 11/06/2015, 20:27   #5
 
SugarD-x's Avatar
 
elite*gold: 0
Join Date: Oct 2015
Posts: 23
Received Thanks: 7
Quote:
Originally Posted by Truth1010 View Post
I see no reason for it not to be. And yea, it wasn't too hard to find them from what i remember.

I think there was a post here a few years back with custom commands, but i believe that was linked through the database. Didn't pay much attention to it, and my memory isn't good enough to remember it exactly. Search will probably bring up some results.

Ya, thankfully the custom concepts are well documented. I'm thinking I may try to play around with this and see what happens. Hopefully the game executable only needs the command reference itself removed to disable its use. I may test it with the ban function replaced to see how it reacts.
SugarD-x is offline  
Old 11/07/2015, 15:16   #6
 
SugarD-x's Avatar
 
elite*gold: 0
Join Date: Oct 2015
Posts: 23
Received Thanks: 7
Quote:
Originally Posted by [ADM]Cups View Post
Changing the command identifier won't affect the functionality of the command. Commands are hard coded into the client, and each command is represented by a different opcode when communicating via packets (the game process then decodes that packet and acts accordingly). I toyed with the idea on my project in hoping that commands would all have a common, static packet opcode and were identified purely by the command name and parameters, but was disappointed.

Unless you want to figure out a way to add new packets on both client and server side, the best we can do is rename commands or build custom ones with SQL triggers.
Renaming the originals to something random and using SQL triggers/other database methods was what I was thinking about doing too. I'm hoping that by doing both, I could effectively "replace" the functionality of existing /commands with custom versions. For example, with the idea I was testing, I renamed the hardcoded /ban command to something random. I've yet to do the database portion yet, but the general plan is to make a custom /ban command in the database which I can later define further in my own ways, (such as custom permission levels of who can use it and the like). I know someone has already proved that custom command prefixes like "\" will work, as will un-prefixed commands, but my curiosity and random thoughts have me wondering if replacing /ban (or any other command) with a custom one using the same command name will have any adverse, hidden effects.

To put it simply, if I do the above to make my own /ban command, I'm just hoping that simply renaming the hardcoded one in the client disables it completely from being used, (at least using its original name), as opposed to the server seeing the custom /ban command as the original, and still executing some hidden code that can't be disabled as easily. Since this idea seems to be fairly untested by the general public, it makes me wonder if those custom commands have code directly linked to the command name somewhere else besides the client's game executable.

(I know, my apologies for writing a book full of confusing literacy. It's a bad habit )
SugarD-x is offline  
Old 11/07/2015, 18:42   #7
 
elite*gold: 0
Join Date: May 2012
Posts: 394
Received Thanks: 392
Can't you just make it as a chat trigger to effectively change anything in the database. The same way that the AddGM trigger works in the DB releases here without them being fixed?

With that, any account can type in normal chat to gain Admin status. Not exactly a command as in /clear, but could be used just the same to a certain degree.

With testing, i'm sure you could replicate things such as /cmove, but not entirely sure exactly how it would be done database alone.
Been out of development too long to remember the assembly i did have learnt xD slowly getting back into it.
Truth1010 is offline  
Old 11/07/2015, 20:19   #8
 
elite*gold: 0
Join Date: May 2012
Posts: 394
Received Thanks: 392
Ah, i hadn't seen that post from you. Very nice btw.

Makes more sense how he wants to do it now, even if i don't understand the want/need to make custom commands, you can do allot with the already existing ones.

I do like your /w to self idea though, something i hadn't thought about when triggering commands through the DB
Truth1010 is offline  
Reply


Similar Threads Similar Threads
[Release] Custom staff commands
04/30/2015 - Shaiya PServer Guides & Releases - 3 Replies
---
[RELEASE]Custom GM commands
03/26/2015 - Shaiya PServer Development - 23 Replies
Here is a way to have custom GM commands in shaiya directly from the in-game chat. To get you started on making more I have included the ban function. First off, We need this a SQL function which I found on the internet You will need to execute this only once. IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'.') AND xtype IN (N'FN', N'IF', N'TF')) DROP FUNCTION . SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF
[Release]Custom GM Commands
02/18/2015 - Shaiya PServer Guides & Releases - 52 Replies
Admin Commands: WICHTIG!!! Alle Befehle müssen im normal Chat geschrieben werden und ohne /. IMPORTANT!!! All commands must be inserted in normal chat and without /. List: addpoints - Fügt AP hinzu.
Custom GM/Admin Commands
03/29/2014 - Fiesta Online - 7 Replies
GER: Hallo com :). Ich wollte mal fragen ob jemand weiß bzw. erklären kann wo ich die ganzen befehle finden kann, wie ich neue befehle erstellen kann und welche Vorkenntnisse vorhanden sein müssen. ty :) ENG: Hey com :).



All times are GMT +1. The time now is 08:40.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.