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
getting attributes
Author Message
kn4tseb
Master
**

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



Post: #1
getting attributes
Hello again friends, i havent get there yet reading the sphereWIKI so i ask here first, its an easy question...

how do i define a value of an item attribute like ReqSTR
inside ON=@Create Trigger?

i'd like to change the reqstr using lowerreq

is it understandable enough?

PHP Code:
[ITEMDEF 020e]
DEFNAME=i_bone_machete
NAME
=bone machete
TYPE
=t_weapon_sword
DAM
=13,15
WEIGHT
=7.0
TWOHANDS
=N
RESOURCES
=14 i_ingot_iron,1 i_bone
SKILLMAKE
=Blacksmithing 70.0
ReqStr
=20
ON
=@Create
   HITPOINTS
={36 48}
   
LOWERREQ=10

IF <LowerReq>
------>  
ReqStr 

Thanks!
(This post was last modified: 05-31-2014 04:50 PM by kn4tseb.)
05-31-2014 04:46 PM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #2
RE: getting attributes
I gave functionality to LowerReq in the source, so you shouldn't need it ... or I didn't understand.
05-31-2014 09:41 PM
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: getting attributes
doesnt work, cliloc shows them but no calculation is taken, tried with damincrease, damfire, lowerreq, and others.
im using latest rev
(This post was last modified: 06-01-2014 12:40 AM by kn4tseb.)
06-01-2014 12: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: #4
RE: getting attributes
either way, in this case if for any reason i'd like to change it, how do i call the Item's ReqStr or item's Damage?

PD: BONUSHITS gives you the bonus but when you unequip it bonus remains and also when you equipit again it multiplies your maxhits till you can get infinite just equipit and unequipit.
DAMFIRE or any DAMX arent working for me at less
INCREASESWINGSPEED seems to be working fine, havent tried the others
BONUSSTR, BONUSDEX, BONUSINT seem to be working okey aswell.

ill keep checking ^^.
(This post was last modified: 06-01-2014 03:30 AM by kn4tseb.)
06-01-2014 02:55 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #5
RE: getting attributes
ReqStr is a static variable, it cannot be changed in the items upon created, so this is why I added hardcoded support for LowerReq.

IncreaseSwingSpeed isn't working, same as DamFire and ResFire and the others, look at this thread to know a little more of them: http://forum.spherecommunity.net/Thread-...17-04-2014 . These variables are meant to be softcoded ATM, but there's a t_equipitem TypeDef at sphere_item_typedef_equipitem.scp that already handle the @Equip/@UnEquip triggers with these variables to increase/decrease the values, if something's wrong ... it must be there.
(This post was last modified: 06-01-2014 03:19 PM by XuN.)
06-01-2014 03:08 PM
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: getting attributes
i understand XuN, i will check it out, but im telling you, lowerreq isnt working, at less for me, and if i cannot change static itemdef variables i cannot also make a sofcoded script for increasedam i suppose because i would need to get the DAM values aswell, am i correct?

thanks for answering ^^
06-01-2014 04:22 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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