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
Areadef after dclick
Author Message
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #11
RE: Areadef after dclick
ok, gonna c again

(07-01-2014 01:56 PM)Extreme Wrote:  
(07-01-2014 12:02 PM)kn4tseb Wrote:  i know feeh, but im under a function, and i dont know how to store src (who dclicked the item)
tag/ctag only?

[itemdef blah]
...

ON=@Dclick
F_bla // this will run the function on the dclicked item, not on people
src.F_bla // this will run in who dclicked the item

[Function F_bla]
ref1 = <src> // if you run the function on item, it should work and <src> = who dclicked
ref1 = <uid> // this is 'who' or 'what' you used the function

it wont work :/
Its logic, if you run the function on item, <uid> = item and maybe <src> = who dclicked
if you run the function on who dclicked <uid> = who dclicked

yes Extreme, i thought i could make a ref for both, i run the function on item, but couldnt make a reference for src so i had to make a tag/ctag/var
some triggers have some other ways to refer more than 1 obj, thats what i was trying to figure; but on this case i couldnt, i get <uid> = item dclicked (because i run the function under this one)
but <src> gets me a non define value or 0
(This post was last modified: 07-01-2014 02:44 PM by kn4tseb.)
07-01-2014 02:39 PM
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: #12
RE: Areadef after dclick
bla <src>

[function bla]
ref1 <uid> // item
ref2 <args> // player

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-02-2014 12:18 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #13
RE: Areadef after dclick
ohhhh i see Smile TY Extreme Wink
07-02-2014 04:59 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #14
RE: Areadef after dclick
is it possible to store src on=@Timer when item is not contained without using a var/ctag/tag?
07-02-2014 10:29 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: #15
RE: Areadef after dclick
You can try use LINK.

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-03-2014 02:02 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #16
RE: Areadef after dclick
i did, thanks...

i have a bit more complex issue...

i have this but the item is not created or equipped and after a while a get a console error,
ERROR:GC: 8 unplaced object deleted
ERROR:UID=040017400, id=046ee 'Item memory', Invalid code=3202 (Object not placed in the world)
ERROR:UID=04001740b, id=046ee 'Item memory', Invalid code=3202 (Object not placed in the world)
ERROR:UID=040017424, id=046ee 'Item memory', Invalid code=3202 (Object not placed in the world)
ERROR:UID=04001742e, id=046ee 'Item memory', Invalid code=3202 (Object not placed in the world)

this is the script:
PHP Code:
ON=@Timer
REF1 
<LINK>
REF2 <UID>
  IF (<
ref1.tag0.mytag> == 4)
    
FORCLIENTS 5 // <r3,5>
    
flags += 08
    SERV
.NEWITEM i_memitem   // <----- this item is not created or equipped :S dunno why:
        
NEW.ATTR 082
        EQUIP 
<NEW> 
    ENDFOR
  ENDIF
REF1.tag0.mytag =
ENDIF

[
itemdef i_memitem]
id=i_gold
name
=Item memory
type
=t_eq_script
LAYER
=LAYER_SPECIAL
TEVENTS
=t_equipitem

on
=@create
REGENHITS 
60
REGENSTAM 
15
REGENMANA 
20
Attr
=attr_invis|attr_decay

on
=@equiptest
IF (<src.findid.i_memitem>)
      
src.findid.i_memitem.remove
ENDIF

on=@Equip
// LINK = <src.uid>
SRC.SYSMESSAGE YOU HAVE EQUIPPED <NAME>
timer 1 

ok i noticed its not placed because of the TEVENTS=t_equipitem
but it's weird because i ve seen it working before Confused
(This post was last modified: 07-03-2014 09:02 AM by kn4tseb.)
07-03-2014 08:13 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: #17
RE: Areadef after dclick
ON=@Timer
REF1 <LINK> who is LINK?
REF2 <UID> who is UID?
IF (<ref1.tag0.mytag> == 4)
FORCLIENTS 5 // <r3,5>
REF10 <UID> // UID here is the 'client' being checked
REF10.flags |= 08 // += don't works in FLAGS/ATTR they are hexadecimal, you have to use |= to 'sum'
SERV.NEWITEM i_memitem // <----- this item is not created or equipped Confused dunno why:
NEW.ATTR 082
REF10.EQUIP <NEW>
ENDFOR
ENDIF
REF1.tag0.mytag =
ENDIF

Use the things I changed and answer my questions.

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-03-2014 10:01 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #18
RE: Areadef after dclick
REF1 was <link>
and link was <src.uid>
ref2 is the item which time has ended
gonna change for what u wrote and retried it ^^

if i use |= to sum the hexadecimal values for flags, what's used for substractions? -=
(This post was last modified: 07-03-2014 10:31 AM by kn4tseb.)
07-03-2014 10:27 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: #19
RE: Areadef after dclick
&~

Did it works?

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-03-2014 10:52 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #20
RE: Areadef after dclick
it fixed the sum values for hexadecimal but didnt work for the item, i tried remplacing the i_memitem for any other item like an ironplate arms and it works

the only way i can equip this i_memitem is without the TEVENTS Confused
07-03-2014 11:01 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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