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
EVENTS TEVENTS on items
Author Message
kn4tseb
Master
**

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



Post: #1
EVENTS TEVENTS on items
Hey guys, hope you are all alright.. i need some help with this.

as i understan TEVENTS is only for ITEMDEFS, its not possible to remove a tevent from an item ingame.
im trying to make a itemidentification system based on the fallowing...
when an item has special props which is defined in a function already scripted i want this item when created in the world to have a new color, remove all events, also tooltip clilocs and be unequipeable... but i have problem creating events for items, even when items wiki tells i can add a new a new event with events +e_whatever i suppose, do i have to make the event defname as event or typedef??

this is what i have already, i had to use a global event for players so any suggestions would be great.
Code:
[EVENTS E_NEEDSITEMID]

ON=@ITEMCREATE
IF (<ARGO.HASSPECIALPROPS>)
IF (<ARGO.NSPECIALPROPS> > 1)
SERV.NEWITEM <SERV.ITEMDEF.<ARGO.ID>.BASEID>
NEW.COLOR 0AF4
NEW.NAME UNKNOWN <STRSUB 2 <EVAL STRLEN(<ARGO.TYPE>)-1> <ARGO.TYPE>>
NEW.WEIGHT <ARGO.WEIGHT>
NEW.EVENTS // dunno what to put here
ARGO.REMOVE
ENDIF
ENDIF

//[TYPEDEF OR EVENTS EVENT]????
ON=@ItemEquipTest
RETURN 1

ON=@ItemClientTooltip
ACT.ADDCLILOC 3000575

i want this item to have the shape of the original item, have that black HUE and be unequipeable, but the most important thing is it only shows the clilock shown in the code.

thanks in advance.
(This post was last modified: 09-21-2014 04:54 AM by kn4tseb.)
09-21-2014 04:51 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: #2
RE: EVENTS TEVENTS on items
TEVENTS -E_NEEDSITEMID
But I'm not sure if you can remove it if its already on ITEMDEF section.

You can add a TAG to tell this item isn't identified and remove it and fix its color when use ItemID.

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.
09-21-2014 05:37 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: #3
RE: EVENTS TEVENTS on items
TEVENTS cant be removed once its in the itemdef section, so i cannot remove the T_EQUIPITEM TEVENT, i tried it... but i could add a new event for this item if i could know how it works..
for example.

NEW.EVENTS +T_NEEDSITEMID // event for item

[EVENTS OR TYPEDEF??? T_NEEDSITEMID] ???

about the tag, what do you suggest for it?

cliclocs are also a problem, items receive the inhereted property from the ID of the original item, and what i'd like is no clilocs to be shown with the exception of the UNKOWN (ADDCLILOC 3000575)
09-21-2014 07:33 AM
Find all posts by this user Like Post Quote this message in a reply
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #4
RE: EVENTS TEVENTS on items
Events for items are TYPEDEFS... I don't want to sound like a dick, but you could have saved yourself ALOT of time by just trying it.

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
09-21-2014 07:39 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Ben's post
Extreme
Grandmaster Poster
***

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

SphereCommunity

Post: #5
RE: EVENTS TEVENTS on items
[TYPEDEF YOUR_ITEM_EVENT_NAME]
But I suggest use TAG...

[TYPEDEF T_EQUIPITEM]
ON=@CREATE
TAG0.UNIDENTIFIED 1

In your player event, @itemequiptest, @itemequip, @itemclick
Check if it has the TAG0.UNIDENTIFIED, if yes, do what you want, else continue...

On ItemID skill, when success, check if the item has the TAG and remove it.

(09-21-2014 07:39 AM)Ben Wrote:  Events for items are TYPEDEFS... I don't want to sound like a dick, but you could have saved yourself ALOT of time by just trying it.

Yeah.. Not only him, but the other guys always do that... ask before test...
In my case, If I come ask something, you know I tried everything else before.

They even look the wiki!

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.
(This post was last modified: 09-21-2014 07:54 AM by Extreme.)
09-21-2014 07:43 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: #6
RE: EVENTS TEVENTS on items
will try, to BEN you are right and i did try it, i was confuse, but nevermind.. and EXTREME yes i understand what you mean about the tag but the thing is that when item is created it receives the T_EQUIPITEM TEVENT and there's no way to remove it. Then i might have to modify this tevent ... thats what i'll do, thank you both.

19:05:ERROR:(sphere_events_itemid.scp,8)Undefined keyword 'TEVENTS'
19:05:ERROR:(sphere_events_itemid.scp,8)Undefined keyword 'TEVENTS'
19:05:ERROR:(sphere_events_itemid.scp,9)Undefined keyword 'TEVENTS'
19:05:ERROR:(sphere_events_itemid.scp,9)Undefined keyword 'TEVENTS'
(This post was last modified: 09-21-2014 08:08 AM by kn4tseb.)
09-21-2014 08:05 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: #7
RE: EVENTS TEVENTS on items
Okey, worked perfectly, due im using tooltip event was even easier to remove tooltips ! ;D
(used tag as suggested) thanks!
(This post was last modified: 09-21-2014 09:23 AM by kn4tseb.)
09-21-2014 09:23 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: #8
RE: EVENTS TEVENTS on items
Tongue

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.
09-21-2014 09:27 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: #9
RE: EVENTS TEVENTS on items
LOL wise advice about the steps but you have to admit that sometimes wiki is a little outdated, revision logs not always gives an answer and search button could be a little better, it doesnt accept 3 characters and several functions have that number, and there's a lot of threads which are created thinking in the needs of the thread creator and will not always be helpfull, which doesnt mean i could try harder with all of them before making a new thread ;D
(This post was last modified: 09-21-2014 10:14 AM by kn4tseb.)
09-21-2014 10: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: #10
RE: EVENTS TEVENTS on items
LOL?
Go on all your threads, 90% of answers was given by these links.

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.
09-21-2014 11:36 AM
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)