Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible solution for server response #94

Closed
JoseEduardo opened this issue Sep 16, 2012 · 12 comments
Closed

Possible solution for server response #94

JoseEduardo opened this issue Sep 16, 2012 · 12 comments

Comments

@JoseEduardo
Copy link

I missed a feature that returns me up something from the server, an example is given to get the position of a player anywhere on the server.
The solution I found was to add

   Local msginterna string.sub = (message, 1,23) - <otclientHiddenMessage>
   if msginterna == '<otclientHiddenMessage>' then
     hiddenMsg string.sub = (message, 24.500)
     return
   end

onTalk function in the file console.lua, so that everything that was spoken by the player started tagged would be stored in a variable that was seen for all modules, ie a variable public.

But I could only access this variable changing sandboxed: true to false ..

Sera whose include that in the original source?

@asamy
Copy link
Collaborator

asamy commented Sep 17, 2012

I don't quite get what you've said... I've edited your issue and formatted the code correctly but I still don't get it.

@JoseEduardo
Copy link
Author

Sorry, I just could access this variable desabititando the sandboxed, but gave some errors.
So if you wanted to know how to feed a variable for it to be seen by all modes.

And if you would like to add this code in the original design that I posted so we can spend some talkaction to the server and return it to what we want after that tag.

Trying to explain a little better:
Whatever is said by the player that contains the tag will be hidden in the beginning and after that content will be added to a variable to be used in all modules.
It's a way that I thought that we might send something to the server and it returns us what we want, we send a talkaction and she makes player i talk something in patterns.
The problem we have access to the variable that the only way I could was to disable sandboxed, but some problems occurred.

@asamy
Copy link
Collaborator

asamy commented Sep 17, 2012

Hi,

Are you trying to introduce new feature? Do you need help with it? or do you want to add it to upstream? Iff you're trying to add it to upstream then no, this is single user needs not every user needs.

@hrsantiago
Copy link
Collaborator

There's extended opcode if you have access to server sources. It's implemented in lastest TFS trunk.

@asamy
Copy link
Collaborator

asamy commented Sep 17, 2012

+1 for the extended opcode solution, it's best for what he needs. The way he used sounds shitty.

@hrsantiago
Copy link
Collaborator

Only using talkactions, this way is the only solution i guess.

@asamy
Copy link
Collaborator

asamy commented Sep 17, 2012

yeah ;)

@JoseEduardo
Copy link
Author

What would be extended opcode?
sorry I'm new in this business programming ....

@asamy
Copy link
Collaborator

asamy commented Sep 23, 2012

Apply this patch to your TFS source: https://github.com/edubart/otclient/blob/master/tools/tfs_extendedopcode.patch and then recompile, then modify to your needs.

Don't ask me how to apply cause I don't know.

@asamy asamy closed this as completed Sep 23, 2012
@JoseEduardo
Copy link
Author

If anyone knows how to deploy it in the source and use it, I am very grateful

@edubart
Copy link
Owner

edubart commented Sep 24, 2012

@JoseEduardo
Copy link
Author

But I'm very sorry about it and lay still without intender practically nothing ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants