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
ForAllItems
Author Message
Llirik
Journeyman
*

Posts: 115
Likes Given: 0
Likes Received: 10 in 8 posts
Joined: Feb 2015
Reputation: 0

UO Forum

Post: #1
ForAllItems
What command for search all items in the scripts:

[FUNCTION all_items]
db.execute TRUNCATE items
foritems 100000
if <isarmor> || <isweapon>
db.execute INSERT INTO `items`(`name`, `RESOURCES`, `SKILLMAKE`) VALUES ("<name>","<RESOURCES>","<SKILLMAKE>")
endif
endfor

But this command search items in the world only! Sad
01-12-2016 04:24 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Llirik
Journeyman
*

Posts: 115
Likes Given: 0
Likes Received: 10 in 8 posts
Joined: Feb 2015
Reputation: 0

UO Forum

Post: #2
RE: ForAllItems
How many items in the Sphere 56b?

[itemdef i_all_items]
ID=i_deed

ON=@DClick
for 10000 // How many?
src.newitem <LOCAL._for>
if <src.act.isarmor> || <src.act.isweapon>
serv.newitem <LOCAL._for>
new.p=<p>
endif
endfor
(This post was last modified: 01-12-2016 05:58 PM by Llirik.)
01-12-2016 05:58 PM
Visit this user's website 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: #3
RE: ForAllItems
Code:
27-10-2013, Ben
- Added: new Section to Sphere.ini [RESOURCELIST] with a list of resource blocks to be loaded into DEFLISTs
         Ex: Adding ITEMDEF in the RESOURCELIST will create a DEFLIST.ITEMDEF with all itemdefs loaded by the server.

For the use of lists -> lists

You can take a look at sphere_add_sqlite.scp, it could be useful
01-12-2016 10:28 PM
Find all posts by this user Like Post Quote this message in a reply
Llirik
Journeyman
*

Posts: 115
Likes Given: 0
Likes Received: 10 in 8 posts
Joined: Feb 2015
Reputation: 0

UO Forum

Post: #4
RE: ForAllItems
Thank you! But I have troubles with skills on chars. Sad

[FUNCTION f_chars]
for 0 <eval <serv.deflist.chardef.count>-1>
local.char=<serv.deflist.chardef.<dlocal._for>>
if (<local.char>)
local.name=<serv.chardef.<local.char>.name>
local.taming=<serv.chardef.<local.char>.taming> // Can't resolve <serv.chardef.C_BIRD_JUNGLE.taming>
db.execute INSERT INTO sphere_items_chars VALUES ("<local.name>","<local.taming>")
endif
endfor

MySQL create "0". Help me please!
(This post was last modified: 01-13-2016 02:51 PM by Llirik.)
01-13-2016 02:49 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Llirik
Journeyman
*

Posts: 115
Likes Given: 0
Likes Received: 10 in 8 posts
Joined: Feb 2015
Reputation: 0

UO Forum

Post: #5
RE: ForAllItems
On Blank SphereWorld:

[FUNCTION ff_chars]
for 0 <eval <serv.deflist.chardef.count>-1>
local.char=<serv.deflist.chardef.<dlocal._for>>
if (<local.char>)
local.defname=<serv.chardef.<local.char>.defname>
serv.newnpc <local.defname>
new.p 5140,1773
endif
endfor

[FUNCTION fff_chars]
forchars 6144
if <taming>
db.execute INSERT INTO sphere_items_chars VALUES ("<name>","<taming>","0")
endif
endfor
01-13-2016 04:12 PM
Visit this user's website 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: #6
RE: ForAllItems
Code:
-Added: Category, Subsection, and Description to ITEMDEF and CHARDEF (now the server can read them if directly in the DEF section and not under @create)

I think those are the only fields you have in the deflist (other than defname and name)
01-13-2016 11:22 PM
Find all posts by this user Like Post Quote this message in a reply
rastrero
Master
**

Posts: 250
Likes Given: 41
Likes Received: 28 in 24 posts
Joined: Jan 2016
Reputation: 3



Post: #7
RE: ForAllItems
I think its better if u use python or java to do this task.
01-14-2016 02:18 AM
Find all posts by this user Like Post Quote this message in a reply
Kanibal
Master
**

Posts: 255
Likes Given: 6
Likes Received: 30 in 28 posts
Joined: Jun 2012
Reputation: 0



Post: #8
RE: ForAllItems
(01-14-2016 02:18 AM)rastrero Wrote:  I think its better if u use python or java to do this task.

Or Perl
Code:
cat "Find all sphere items..." | perl -e '$??s:;s:s;;$?::s;;=]=>%-{<-|}<&|`{;;y; -/:-@[-`{-};`-{/" -;;s;;$_;see'

Grandmaster Localhost Admin
01-14-2016 02:35 AM
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: 2 Guest(s)