The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Packets from server to client
Author Message
Breaker
Apprentice
*

Posts: 20
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 2



Post: #1
Packets from server to client
What i can hook packets from server to client?
05-24-2013 05:52 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Wap
Journeyman
*

Posts: 138
Likes Given: 6
Likes Received: 7 in 6 posts
Joined: Mar 2012
Reputation: 3

UORPG.net

Post: #2
RE: Packets from server to client
It is impossible by SphereScp and/or Sphere settings. Only by the external programm, may be.
05-25-2013 12:48 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #3
RE: Packets from server to client
I don't understand, can you give an example of what you want to do?
05-25-2013 12:50 AM
Find all posts by this user Like Post Quote this message in a reply
Breaker
Apprentice
*

Posts: 20
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 2



Post: #4
RE: Packets from server to client
sphere send packet for client, what i can rewrite packet before sending?

me liked that, if can create new trigger(for players only) before server send packet to client:
ON=@SendPacket
ARGN1=Packet Number
ARGN2=Length of Packet
SRC - character
l - character
LOCAL.1 - LOCAL.n = bytes of packet
RETURN 1 // Abort sending packet

really make this trigger?
(This post was last modified: 05-25-2013 01:00 AM by Breaker.)
05-25-2013 12:59 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #5
RE: Packets from server to client
you can alter packets sent per trigger, in the case stated above you are suggesting a trigger that fires everytime a packet is sent to the client, which seems to me to be very resource consuming tbh, i cant think of any good reason why you would need to alter every packet sent

when are you wanting to intercept the packets?, you can use an existing trigger, like @click, and then use the SENDPACKET function to send the packets you wish to send

like ran asked, what exactly are you trying to do? there is really no reason to trigger every packet sent when you can use the sendpacket function in any trigger that is already implemented

[Image: matts_siggy.gif]
05-25-2013 08:17 AM
Find all posts by this user Like Post Quote this message in a reply
Breaker
Apprentice
*

Posts: 20
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 2



Post: #6
RE: Packets from server to client
i want now hook packets: [0x1C] Send Speech, [0xAE] Unicode Speech message, i want make multi language support
or i want change replace sphere hardcore text for [DEFMESSAGES MESSAGES]
for example now we have
Code:
[DEFMESSAGE MESSAGES]
alchemy_dunno                "You have no clue how to make this potion."
alchemy_lack                "Hmmm, you lack %s for this potion."
alchemy_nobottles            "You have no bottles for your potion."
alchemy_not_reg                "That is not a reagent."
alchemy_pour                "pour the completed potion into a bottle"
....

i want make
Code:
[DEFMESSAGE MESSAGES_ENG] // all messages on english language
ENG_alchemy_dunno                "You have no clue how to make this potion."
ENG_alchemy_lack                "Hmmm, you lack %s for this potion."
ENG_alchemy_nobottles            "You have no bottles for your potion."
ENG_alchemy_not_reg                "That is not a reagent."
ENG_alchemy_pour                "pour the completed potion into a bottle"
....

[DEFMESSAGE MESSAGES_DEU]  // all messages on german language
DEU_alchemy_dunno                "You have no clue how to make this potion."
DEU_alchemy_lack                "Hmmm, you lack %s for this potion."
DEU_alchemy_nobottles            "You have no bottles for your potion."
DEU_alchemy_not_reg                "That is not a reagent."
DEU_alchemy_pour                "pour the completed potion into a bottle"
....

[DEFMESSAGE MESSAGES_RUS] // all messages on russian language
RUS_alchemy_dunno                "You have no clue how to make this potion."
RUS_alchemy_lack                "Hmmm, you lack %s for this potion."
RUS_alchemy_nobottles            "You have no bottles for your potion."
RUS_alchemy_not_reg                "That is not a reagent."
RUS_alchemy_pour                "pour the completed potion into a bottle"
...
(This post was last modified: 05-25-2013 10:10 PM by Breaker.)
05-25-2013 10:06 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
amonvangrell
Banned

Posts: 337
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #7
RE: Packets from server to client
YOU COULD USE TAGS ON PLAYERS WITH THE DEFINED LANGUAGES, AND TRY THEM OUT ON SUCCESS OF THE SKILL/SPELL.
05-26-2013 06:19 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Breaker
Apprentice
*

Posts: 20
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 2



Post: #8
RE: Packets from server to client
it's very big work to rewrite all actions, LOS, skills, and other sphere messages, and i can get lang from SRC.ACCOUNT.LANG, not need make tags
ps: sphere not support other custom sections for [DEFMESSAGE =(
(This post was last modified: 05-28-2013 06:29 AM by Breaker.)
05-28-2013 06:19 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #9
RE: Packets from server to client
If i remember well there is the packetX handler feature(You have to put it in the sphere.ini) :

PHP Code:
Added support for packets filteringsPlease notethat you should understand
    what are you doing
You can install your handler of a packet X specifying
    PACKETx
=functionnameThis function will be called when the packet is going
    to be processed by the server
It has the following arguments set:
    
ARGN1 packet number (to allow using one function for different packets)
    
ARGS source client ip address
    LOCAL.0
-LOCAL.9 first 10 bytes of the packet for parsing contents
    
If you do return 1 in this function, the packet will NOT be processed 

I never used it by the way Blush
05-28-2013 06:42 AM
Find all posts by this user Like Post Quote this message in a reply
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #10
RE: Packets from server to client
afaik language is handled client side via cliloc files anyways, so most of it you cant even change unless you change it client side

[Image: matts_siggy.gif]
05-28-2013 12:29 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)