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-nmm6 (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-nmm6 (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-nmm6 (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
The best way to function ISMOVE
Author Message
Monty
Apprentice
*

Posts: 40
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jun 2012
Reputation: 1



Post: #1
The best way to function ISMOVE
Hi all,

At the beginning, I must apologize for my English.
I need advice how do function something like ISMoveing or ChangePosition.
In practice: Player staying on position 100,100 and when he go on 101,100 or something different start my function.

I try do around invisible items and when he step on it start my function delete old items and create new invisiblle items. In my opinion this is the worst way what i can use. Please can anybody say me better way?

I hope you understand my problem.

Thx.
03-13-2013 07:21 AM
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: #2
RE: The best way to function ISMOVE
When and where you have to use this function ? it is a sort of "forever running function" or it is used in special cases?
(This post was last modified: 03-13-2013 07:44 AM by darksun84.)
03-13-2013 07:44 AM
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: #3
RE: The best way to function ISMOVE
ONPACKET_2 --> Character DIR == DIR in packet --> Movement try.
(This post was last modified: 03-13-2013 08:21 AM by Wap.)
03-13-2013 08:19 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: #4
RE: The best way to function ISMOVE
There is a reqion trigger called @Step, but I warn you, if you put code in this trigger your server will be VERY busy...
03-13-2013 09:05 AM
Find all posts by this user Like Post Quote this message in a reply
Monty
Apprentice
*

Posts: 40
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jun 2012
Reputation: 1



Post: #5
RE: The best way to function ISMOVE
To darksun84:
Not forever only for the selected player and only sometimes.

To Wap:
I never used packet in sphere or uo can you give me some tips how use it?

To RanXerox:
And if i will use it only for 2-5 player and only sometimes it was problem?
03-13-2013 04:07 PM
Find all posts by this user Like Post Quote this message in a reply
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #6
RE: The best way to function ISMOVE
put and memory item in your layer 30 and save the coordination x,y,z from the src on it.
put a timer on it and compare the saved coordination with the new coordination from the source.
that´s how I make my meditation script.
03-13-2013 05:31 PM
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: #7
RE: The best way to function ISMOVE
(03-13-2013 04:07 PM)Monty Wrote:  To Wap:
I never used packet in sphere or uo can you give me some tips how use it?
Quote:28-01-05, Vjaka
- Added support for packets filterings. Please note, that you should understand
what are you doing. You can install your handler of a packet X specifying
PACKETx=functionname. This 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

11-04-05, Vjaka
- Packet filtering support heavily expanded. Now you have these variables:
LOCAL.NUM (value) set to amount of data got from the packet
LOCAL.STR (string) all data threated as a string (aware of zero chars)
LOCAL.ACCOUNT (string) current active account if any is logged by the client
LOCAL.CHAR (uid) current active char if any is logged in from the client
and the all data is now given in LOCAL.x, not the only first 10 bytes.

So, write
Quote:PACKET2=ONPACKET_2
in sphere.ini

after it create a function in scripts
Quote:[FUNCTION ONPACKET_2]
UID.<LOCAL.CHAR>.SYSMESSAGE <LOCAL.0> <LOCAL.1> <LOCAL.2>
(This post was last modified: 03-13-2013 09:46 PM by Wap.)
03-13-2013 09:45 PM
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: #8
RE: The best way to function ISMOVE
5 players wouldn't be too bad... But all the monsters in the region will be taking a step too. And if your region is the entire world, it might be too much. Try it and see.
03-13-2013 11:27 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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