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
What is this code?
Author Message
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #1
What is this code?
For some people trying to standardize script packs to EA standards... you need to leave your personal code out of the scripts. For example:

Code:
[ITEMDEF 0144e]
DEFNAME=i_bone_arms
TYPE=t_armor
FLIP=1
//ARMOR=24
VALUE=65
WEIGHT=15.0
RESOURCES=14 i_bone,1 i_hides_cut
SKILLMAKE=Tailoring 96.8,t_sewing_kit,Anatomy 47.3,Necromancy 24.4
CATEGORY=Provisions - Armor
SUBSECTION=Bone Armor
DESCRIPTION=Bone Arms
ReqStr=55
CanUse=can_u_human|can_u_elf
TEVENTS=t_equipitem
DUPELIST=01453
ON=@Create
   HITPOINTS={36 48}
   RESCOLD=4
   RESENERGY=4
   RESFIRE=3
   RESPHYSICAL=3
   RESPOISON=2

^ This is from someone's custom server, and don't even deny it. This is crap. You are uploading this to the script packs why? I think the packs needs to be reverted to 56b when it started. Because it should look more like this:

Ignore my resource list, as I do things by STRICT naming. But mine is an EA replica. The original code is NOT.

Stop uploading custom scripts which will confuse the heck out of any new user. Necromancy, nor Anatomy are used in crafting this item. Nor does it weigh 15.0 stones.

*shaking my damn head*

Code:
// Bone Armor
[itemdef 0144f]
defname=i_bone_armor
name=bone armor
nameloc=1025199
type=t_armor
can=can_i_flip|can_i_exceptional|can_i_makers_mark
weight=6.0
reqstr=60
skillmake=tailoring 96.0
resources=12 i_piece_of_leather,10 i_bone
dupelist=01454

category=Equipment
subsection=Armor: Bone Armor
description=Bone Armor

on=@Create
canuse=can_u_human|can_u_elf
hitpoints={36 48}

ResPhysical=3
ResFire=3
ResCold=4
ResPoison=2
ResEnergy=4

[itemdef 01454]
nameloc=1025204
dupeitem=0144F

// Bone Arms
[itemdef 0144E]
defname=i_bone_arms
name=bone arms
nameloc=1025198
type=t_armor
can=can_i_flip|can_i_exceptional|can_i_makers_mark
weight=2.0
reqstr=55
skillmake=tailoring 92.0
resources=8 i_piece_of_leather,4 i_bone
dupelist=01453

category=Equipment
subsection=Armor: Bone Armor
description=Bone Arms

on=@Create
canuse=can_u_human|can_u_elf
hitpoints={36 48}

ResPhysical=3
ResFire=3
ResCold=4
ResPoison=2
ResEnergy=4

[itemdef 01453]
nameloc=1025203
dupeitem=0144E

// Bone Gloves
[itemdef 01450]
defname=i_bone_gloves
name=bone gloves
nameloc=1025200
type=t_armor
can=can_i_flip|can_i_exceptional|can_i_makers_mark
weight=2.0
reqstr=55
skillmake=tailoring 89.0
resources=6 i_piece_of_leather,2 i_bone
dupelist=01455

category=Equipment
subsection=Armor: Bone Armor
description=Bone Gloves

on=@Create
canuse=can_u_human|can_u_elf
hitpoints={36 48}

ResPhysical=3
ResFire=3
ResCold=4
ResPoison=2
ResEnergy=4

[itemdef 01455]
nameloc=1025205
dupeitem=01450

// Bone Helmet
[itemdef 01451]
defname=i_bone_helmet
name=bone helmet
nameloc=1025201
type=t_armor
can=can_i_flip|can_i_exceptional|can_i_makers_mark
weight=3.0
reqstr=20
skillmake=tailoring 85
resources=4 i_piece_of_leather,2 i_bone
dupelist=01456

category=Equipment
subsection=Armor: Bone Armor
description=Bone Helmet

on=@Create
canuse=can_u_human|can_u_elf
hitpoints={36 48}

ResPhysical=3
ResFire=3
ResCold=4
ResPoison=2
ResEnergy=4

[itemdef 01456]
nameloc=1025206
dupeitem=01451

// Bone Leggings
[itemdef 01452]
defname=i_bone_leggings
name=bone leggings
nameloc=1025202
type=t_armor
can=can_i_flip|can_i_exceptional|can_i_makers_mark
weight=3.0
reqstr=55
skillmake=tailoring 95.0
resources=10 i_piece_of_leather,6 i_bone
dupelist=01457

category=Equipment
subsection=Armor: Bone Armor
description=Bone Leggings

on=@Create
canuse=can_u_human|can_u_elf
hitpoints={36 48}

ResPhysical=3
ResFire=3
ResCold=4
ResPoison=2
ResEnergy=4

[itemdef 01457]
nameloc=1025207
dupeitem=01452

// Orc Helm
[itemdef 01F0B]
defname=i_orc_helm
name=orc helm
nameloc=1027947
type=t_armor
can=can_i_flip|can_i_exceptional|can_i_makers_mark
weight=5.0
reqstr=30
skillmake=tailoring 90.0
resources=6 i_piece_of_leather,4 i_bone
dupelist=01F0C

category=Equipment
subsection=Armor: Bone Armor
description=Orc Helm

on=@Create
canuse=can_u_human|can_u_elf
hitpoints={36 48}

ResPhysical=3
ResFire=1
ResCold=3
ResPoison=3
ResEnergy=5

[itemdef 01F0C]
nameloc=1025948
dupeitem=01F0B

[eof]

Resources and Typedefs
Code:
[typedef t_hide]
on=@ClientTooltip
if (<amount> == 1)
if (!<nameloc>)
  src.addcliloc 1042971,<name>        // ~1_nothing~
else
  src.addcliloc <nameloc>
endif
else
src.addcliloc 1050039,<amount>,<nameloc>
endif
src.addcliloc 1072789,<weight>    // Weight: ~1_weight~ stones
return 1

// Hides
[itemdef 01078]
defname=i_hides
name=hides
nameloc=1074924    // Hides
type=t_hide
tdata1=i_piece_of_leather
can=can_i_stack|can_i_flip
weight=5.0
value=5
dupelist=01079

category=Resources
subsection=Leather: Hides
description=Hides (Plain)

[itemdef 01079]
//pile of hides
nameloc=1024217
dupeitem=01078

// Spined Leather Hides
[itemdef i_spined_leather_hides]
defname=i_spined_hides
id=i_hides
name=spined leather hides
nameloc=1074925    // Spined Leather Hides
type=t_hide
tdata1=i_piece_of_spined_leather
can=can_i_stack|can_i_flip
weight=5
value=5

category=Resources
subsection=Leather: Hides
description=Spined Leather Hides

on=@Create
color=color_of_spined

// Horned Leather Hides
[itemdef i_horned_leather_hides]
defname=i_horned_hides
id=i_hides
name=horned leather hides
nameloc=1074926    // Horned Leather Hides
type=t_hide
tdata1=i_piece_of_horned_leather
can=can_i_stack|can_i_flip
weight=5
value=5

category=Resources
subsection=Leather: Hides
description=Pile of Horned Hides

on=@Create
color=color_of_horned

// Barbed Leather Hides
[itemdef i_barbed_leather_hides]
defname=i_barbed_hides
id=i_hides
name=barbed leather hides
nameloc=1074927    // Barbed Leather Hides
type=t_hide
tdata1=i_piece_of_barbed_leather
can=can_i_stack|can_i_flip
weight=5
value=5

category=Resources
subsection=Leather: Hides
description=Barbed Leather Hides

on=@Create
color=color_of_barbed

[typedef t_leather]
on=@ClientTooltip
if (<amount> == 1)
if (!<nameloc>)
  src.addcliloc 1042971,<name>        // ~1_nothing~
  src.addcliloc 1072788,<weight>    // Weight: ~1_weight~ stone
else
  src.addcliloc <nameloc>
  src.addcliloc 1072788,<weight>    // Weight: ~1_weight~ stone
endif
else
if (!<nameloc>)
  src.addcliloc 1050039,<amount>,<name>
  src.addcliloc 1072789,<weight>    // Weight: ~1_weight~ stones
else
  src.addcliloc 1050039,<amount>,<nameloc>
  src.addcliloc 1072789,<weight>    // Weight: ~1_weight~ stones
endif
endif
return 1

// Cut Leather
[itemdef 01067]
defname=i_cut_leather
name=cut leather
nameloc=1024199
type=t_leather
can=can_i_flip|can_i_stack
weight=1
resources=1 i_hides
value=5
dupelist=01068,01081,01082

category=Resources
subsection=Leather
description=Cut Leather

//cut up leather
[itemdef 01068]
nameloc=1024200
dupeitem=01067

//cut up leather strips facing sw
[itemdef 01081]
defname=i_cut_leather_1
nameloc=1024225
dupeitem=01067

//cut up leather strips facing se
[itemdef 01082]
nameloc=1024226
dupeitem=01067

// Piece of Leather
[itemdef i_piece_of_leather]
defname=i_plain_leather
id=i_cut_leather
name=cut leather
nameloc=1074929    // Piece of Leather
type=t_leather
can=can_i_flip|can_i_stack
weight=1.0
resources=1 i_hides
value=5

category=Resources
subsection=Leather
description=Piece of Leather

// Piece of Spined Leather
[itemdef i_piece_of_spined_leather]
defname=i_spined_cut_leather
id=i_cut_leather
name=piece of spined leather
nameloc=1074930    // Piece of Spined Leather
type=t_leather
can=can_i_flip|can_i_stack
weight=1.0
resources=1 i_spined_leather_hides
value=5

category=Resources
subsection=Leather
description=Spined Cut Leather

on=@Create
color=color_of_spined

// Piece of Horned Leather
[itemdef i_piece_of_horned_leather]
defname=i_horned_cut_leather
id=i_cut_leather
name=piece of horned leather
nameloc=1074931    // Piece of Horned Leather
type=t_leather
can=can_i_flip|can_i_stack
weight=1.0
resources=1 i_horned_leather_hides
value=5

category=Resources
subsection=Leather
description=Horned Cut Leather

on=@Create
color=color_of_horned

// Piece of Barbed Leather
[itemdef i_piece_of_barbed_leather]
defname i_barbed_cut_leather
id=i_cut_leather
name=barbed cut leather
nameloc=1074932    // Piece of Barbed Leather
type=t_leather
can=can_i_flip|can_i_stack
weight=1.0
resources=1 i_barbed_leather_hides
value=5

category=Resources
subsection=Leather: Leather
description=Barbed Cut Leather

on=@Create
color=color_of_barbed

[eof]
(This post was last modified: 02-27-2016 08:51 PM by XuN.)
02-24-2016 03:50 PM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #2
RE: What is this code?
yep the script pack have some scripts like this, I don't know from where these non-OSI items/chars came from. Honestly it's better than nothing, the item was added and this is a good thing. It just doesn't meet the OSI standards

but anyway feel free to send a pull request on GIT when you find things like this Smile
(This post was last modified: 02-27-2016 08:52 PM by XuN.)
02-25-2016 01:06 PM
Find all posts by this user Like Post Quote this message in a reply
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #3
RE: What is this code?
Rather just redo the entire thing like I was going to do in the past and upload it all at once (The script packs are a nightmare even compared to 55i days (they looked better then)). You can feel free to stop removing things without a soft code addition by the way. Do you realize how much I have to redo in base packs every time you remove things? Not trying to be rude, but as good as you are, this was what made us avoid bringing you on for so long. Desperate times call for desperate measures I guess.

*Bitch mode activated*
(This post was last modified: 02-27-2016 08:52 PM by XuN.)
02-25-2016 10:31 PM
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)