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
FORITEMS doesn´t work right?
Author Message
Vendetta
Apprentice
*

Posts: 39
Likes Given: 1
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 0



Post: #11
RE: FORITEMS doesn´t work right?
i think best should be to use
foristance

then in 2 locals
local.distance
local.uid

foristance
if <local._for.distance> < <local.distance>>
local.distance = <local._for.distance>
local.uid = <local._for.uid>
endif
gouid <local.uid>

conceptualy should work
you could also use only a ref instead of local.uid but maybe it is a little bit more complex calculating everytime the distance, also should check for topobj to be equal with uid (on the ground...)

this should be a good idea Smile
07-07-2012 07:36 AM
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: #12
RE: FORITEMS doesn´t work right?
ok my friends.
here is the script, if someone need and want it. thanks to all.

Code:
[FUNCTION f_death_to_shrine]
    ref1=<uid>    

FORITEMS 20
  IF ((<link> == <ref1.uid>) && (<type> == T_CORPSE))
    f_loot_death <ref1.uid>
    remove
  ENDIF
ENDFOR

    ref1.smsg @<def.def_smsg_info>,3 You will be teleported to the nex shrine
    local.lowdistance=50000
FORITEMS 6144
  IF (<type> == t_shrine)
   IF (<ref1.distance <uid>> < <local.lowdistance>)
     local.lowdistance= <ref1.distance <uid>>
     ref2 = <uid>
   ENDIF
  ENDIF
ENDFOR
    ref1.go = <ref2.p>
    ref1.update


[FUNCTION f_loot_death]
ref1=<args>
IF <findcont(0)>
    findcont(0).cont=<ref1>
    f_loot_death <ref1.uid>
   RETURN 1
  ELSE
    SRC.RESEND
    RETURN 1
ENDIF
(This post was last modified: 07-11-2012 05:55 AM by admin phoenix.)
07-11-2012 05:55 AM
Find all posts by this user Like Post Quote this message in a reply
Vendetta
Apprentice
*

Posts: 39
Likes Given: 1
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 0



Post: #13
RE: FORITEMS doesn´t work right?
lol

it was best to use istances to avoid check for all map... however..
07-11-2012 06:31 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #14
RE: FORITEMS doesn´t work right?
You're kidding me that you will use FORITEMS, right?
You will use lots of processing to find few items.
Really, I would use that I paste for your, its the fastest and don't need processing.
But OK.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
07-11-2012 09:29 AM
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: #15
RE: FORITEMS doesn´t work right?
hey folks . we have only 5-20 player online at the Same time . Do you think that this player will die at the Same time and the Script will be use 20 time at the same moment ?
07-11-2012 04:22 PM
Find all posts by this user Like Post Quote this message in a reply
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #16
RE: FORITEMS doesn´t work right?
possible
Code:
.serv.allclients kill
lol

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
(This post was last modified: 07-11-2012 10:51 PM by Skul.)
07-11-2012 10: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)