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
Teleport stone
Author Message
Volkinson
Apprentice
*

Posts: 8
Likes Given: 3
Likes Received: 0 in 0 posts
Joined: Dec 2015
Reputation: 0



Post: #1
Exclamation Teleport stone
Hello everybody. I have trouble with script. Teleporting, part of script is not working correctly. It error come 50/50. Some time i have not, but other players can have it.

Sphere 55b
Here is code. Is all correct? Why after 5 sec i recieve Fail or no message at all...
Biig thanks for any tips.

(This post was last modified: 12-22-2015 06:24 AM by Volkinson.)
12-22-2015 06:24 AM
Find all posts by this user Like Post Quote this message in a reply
pointhz
Journeyman
*

Posts: 148
Likes Given: 1
Likes Received: 55 in 28 posts
Joined: Oct 2013
Reputation: 1



Post: #2
RE: Teleport stone
how are you creating and equipping the item?

I copy pasted your code and it works fine with me.
12-22-2015 07:43 AM
Find all posts by this user Like Post Quote this message in a reply
Volkinson
Apprentice
*

Posts: 8
Likes Given: 3
Likes Received: 0 in 0 posts
Joined: Dec 2015
Reputation: 0



Post: #3
RE: Teleport stone
(12-22-2015 07:43 AM)pointhz Wrote:  how are you creating and equipping the item?

I copy pasted your code and it works fine with me.

No need to copy paste. You dont have first part of code. First part of code is using this part for recall to safe zone. I think i have problem with checking last rule "(<cont.findid.i_m_team>)".
12-22-2015 11:04 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #4
RE: Teleport stone
the best way to check if any script is working, is debugging the script
debug is a simple "visual" way to make the code return some readable info to you, and with this info will be much more easier to check if there's something wrong on the code. You can use SAY, SYSMESSAGE, SERV.B, etc

Code:
ON=@Timer
CONT.SYSMESSAGE (<cont.hits> < <cont.maxhits>) || (<cont.flags> & 020) || (<cont.flags> & 04) || (<cont.findid.i_jail_item>) || (<cont.findid.i_m_team>)
12-22-2015 11:33 AM
Find all posts by this user Like Post Quote this message in a reply
Artyk
Journeyman
*

Posts: 75
Likes Given: 43
Likes Received: 9 in 9 posts
Joined: Sep 2014
Reputation: 0



Post: #5
RE: Teleport stone
If you get no message at all maybe the condition for the first and the second IF are both false.
Try placing a sysmessage on the else of the second if
12-22-2015 05:38 PM
Find all posts by this user Like Post Quote this message in a reply
evening
Journeyman
*

Posts: 138
Likes Given: 0
Likes Received: 14 in 9 posts
Joined: Apr 2012
Reputation: 1

Finally Land

Post: #6
RE: Teleport stone
[function aa]
serv.newitem i_teleport_item
new.timer = 1
new.equip <src>

[ITEMDEF i_teleport_item]
ID = i_memory
TYPE = t_eq_script
NAME = Teleport item

ON=@equip
morex = 5

ON=@Timer
if (<cont.hits> < <cont.maxhits>) || (<cont.flags> & 020) || (<cont.flags> & 04)// || (<cont.findid.i_jail_item>) || (<cont.findid.i_m_team>)
cont.sysmessage @55 Teleporting failed!
remove
return 1
endif
if (<morex> > 0)
morex -= 1
serv.log 1
else
//cont.f_clear_mem
cont.go cove
remove
//if (<tag0.delay> && <tag0.item_uid> )
//uid.<tag0.item_uid>.tag.delay = <eval <serv.time> + <tag0.delay> * 10>
//endif
endif
timer = 0
return 1
12-22-2015 05:51 PM
Visit this user's website 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)