| Mirage Source http://miragesource.net/forums/ |
|
| adding new commands... http://miragesource.net/forums/viewtopic.php?f=201&t=4084 |
Page 1 of 2 |
| Author: | lalablah [ Fri Aug 01, 2008 4:15 am ] |
| Post subject: | adding new commands... |
if i wanted to add. say this viewtopic.php?f=75&t=2887 would i add it to any module or a specific one? |
|
| Author: | Jack [ Sat Aug 02, 2008 12:33 am ] |
| Post subject: | Re: adding new commands... |
Yes that would go in any Module in the Client Side. I would put it either in ModGameLogic or either ModGeneral. |
|
| Author: | lalablah [ Sat Aug 02, 2008 1:12 am ] |
| Post subject: | Re: adding new commands... |
thanks |
|
| Author: | Jack [ Sat Aug 02, 2008 2:55 am ] |
| Post subject: | Re: adding new commands... |
No problem |
|
| Author: | Rian [ Sat Aug 02, 2008 6:00 am ] |
| Post subject: | Re: adding new commands... |
Looks more like a server side function to me. |
|
| Author: | Jack [ Sat Aug 02, 2008 11:19 am ] |
| Post subject: | Re: adding new commands... |
im sure of it being client side. =) |
|
| Author: | Matt [ Sat Aug 02, 2008 12:34 pm ] |
| Post subject: | Re: adding new commands... |
It's server side. He remade the TakeItem code. Which is server side, since the client doesn't deal with the account files. |
|
| Author: | lalablah [ Sat Aug 02, 2008 3:37 pm ] |
| Post subject: | Re: adding new commands... |
can you call this from the client if i pasted it to the server? |
|
| Author: | Matt [ Sat Aug 02, 2008 3:55 pm ] |
| Post subject: | Re: adding new commands... |
You gotta use the client to send a packet to the server, have the server execute that code, and send a packet back to the client with the results. |
|
| Author: | lalablah [ Sun Aug 03, 2008 4:44 am ] |
| Post subject: | Re: adding new commands... |
i know how to send/ recieve packets but whats an example of what you are saying, like would i paste the code in the client.. then call it in a packet or like what? |
|
| Author: | Lea [ Sun Aug 03, 2008 4:50 am ] |
| Post subject: | Re: adding new commands... |
First of all, never copy and paste. Let me read that link you gave and I will post again |
|
| Author: | Lea [ Sun Aug 03, 2008 4:56 am ] |
| Post subject: | Re: adding new commands... |
It's hard to help you when we don't know what you're trying to do. There is never a good reason to let the client take authority, it makes security holes. The client should send REQUESTS to the server, and the server should make the change if it's OK and update the client. The code you link to is a replacement/specialization of the takeitem code for currency. It is likely coupled with other changes, and that code will need to be supplemented by changing the TakeItem call everywhere it's called server side to take currency out of the player's inventory (trades, drops, and repairs I can think of off the top of my head). |
|
| Author: | lalablah [ Sun Aug 03, 2008 6:09 am ] |
| Post subject: | Re: adding new commands... |
oh ok then, and sorry by copy and paste i ment installing. i just had to type quick and couldent think of another way to put it |
|
| Author: | Rian [ Sun Aug 03, 2008 4:59 pm ] |
| Post subject: | Re: adding new commands... |
Jack wrote: im sure of it being client side. =) orly? |
|
| Author: | Robin [ Tue Aug 05, 2008 12:09 pm ] |
| Post subject: | Re: adding new commands... |
Jack, Rian knows more about programming than you ;D Sure, the actual keystroke hooking is in the client, but the command's consequences are all handled by the server. |
|
| Author: | lalablah [ Tue Aug 05, 2008 5:18 pm ] |
| Post subject: | Re: adding new commands... |
so if the warp command is Call WarpTo(n) then is there another warp command that i can use to warp to a specific x and y? |
|
| Author: | Rian [ Tue Aug 05, 2008 5:23 pm ] |
| Post subject: | Re: adding new commands... |
PlayerWarp(index, map, x, y) Thats the only kind of warp sub that exists. Warping to a different player would be PlayerWarp(index, getplayermap(n), getplayerX(n), getplayerY(n)) |
|
| Page 1 of 2 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|