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
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Blacksmithing and Skillmenus
Author Message
Jonaleth
Apprentice
*

Posts: 42
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2012
Reputation: 0



Post: #1
Blacksmithing and Skillmenus
I've encoutnered a problem, that I cannot get fixed no matter how. Perhaps you can help me out?

I have added new materials to craft armors and weapons from. It worked fine at first, but then I wanted to modify the blacksmith system.

The new system requires coal to lit a forge inorder for it to be used.

Code:
[ITEMDEF 0fb1]
//forge
//**Is there a type for this? Smithing type?
DEFNAME=i_forge
TYPE=T_FORGE
RESOURCES=20 i_rock_plain, 30 i_KINDLING
WEIGHT=500
CATEGORY=Items by Professions
SUBSECTION=Blacksmiths
DESCRIPTION=Forge 1

ON=@DCLICK
IF <tag0.lit> > 0
message @036 Forge is already lit
RETURN 1
ELSE
    IF (<src.restest <DLOCAL.lega> i_coal>)
    sound=550
    src.consume <DLOCAL.lega> i_coal
    src.sysmessage @031 It cost 1 coal to lit the forge
    src.newitem i_forge_fire
    new.p=<p>
    new.nudgeup 8
    new.link=<src.uid>
    new.timer=60*10
    src.say @036 <name> is lit and ready to be used
    tag0.lit=1
    return 1
    ELSE
    message @025 You need to have the coal in your backpack
    return 1
    ENDIF
ENDIF

And once the forge is lit, you can use the anvil (I couldn't find a way to give a message if you were further away then 3, perhaps that can be solved somehow, but that'd be a bonus).

Code:
[ITEMDEF 0faf]
//anvil
DEFNAME=i_anvil
TYPE=T_ANVIL
SKILLMAKE=BLACKSMITHING 30.0, TINKERING 56.0,t_tinker_tools
RESOURCES=20 i_ingot_iron, 1 i_LOG
FLIP=1
WEIGHT=255
CATEGORY=Items by Professions
SUBSECTION=Blacksmiths
DESCRIPTION=Anvil (N)
DUPELIST=0fb0

ON=@DCLICK
FORITEMS 3
    WHILE <tag0.lit> == 01
    src.SKILLMENU=sm_blacksmith
    RETURN 1
    ENDWHILE
ENDFOR

Now here's the problem. I won't let me to craft anything! Here take a look;

Code:
[SKILLMENU sm_blacksmith]
Blacksmithing

ON=i_ANVIL Repair
TEST=BLACKSMITHING 1.0
REPAIR

ON=i_rock_plain Stone Items
SKILLMENU=sm_items_stone

[SKILLMENU sm_items_stone]
Stone Items

ON=i_sword_viking Weapons
SKILLMENU=sm_weapons_stone
ON=i_bone_chest Armors
SKILLMENU=sm_stonearmor_armor

[SKILLMENU sm_weapons_stone]
Stone Weapons

ON=i_gold Info
sysmessage @025 Stone weapons
ON=i_stone_dagger <name> (<resmake>)
MAKEITEM=i_stone_dagger
ON=i_stone_sword_broad <name> (<resmake>)
MAKEITEM=i_stone_sword_broad
ON=i_stone_sword_2h <name> (<resmake>)
MAKEITEM=i_stone_sword_2h
ON=i_stone_axe <name> (<resmake>)
MAKEITEM=i_stone_axe
ON=i_stone_axe_large <name> (<resmake>)
MAKEITEM=i_stone_axe_large
ON=i_stone_mace <name> (<resmake>)
MAKEITEM=i_stone_mace
ON=i_stone_maul <name> (<resmake>)
MAKEITEM=i_stone_maul
ON=i_stone_hammer_war <name> (<resmake>)
MAKEITEM=i_stone_hammer_war

[SKILLMENU sm_stonearmor_armor]
Stone Armor

ON=i_gold Info
sysmessage @025 Stone armors
ON=i_stone_helm <name> (<resmake>)
MAKEITEM=i_stone_helm
ON=i_stone_chest <name> (<resmake>)
MAKEITEM=i_stone_chest
ON=i_stone_bracers <name> (<resmake>)
MAKEITEM=i_stone_bracers
ON=i_stone_gauntlets <name> (<resmake>)
MAKEITEM=i_stone_gauntlets
ON=i_stone_legguards <name> (<resmake>)
MAKEITEM=i_stone_legguards

I added the gold coin just to see if the skillmenu works at all, and it does. That is the only item that shows up in the skillmenu. So then i thought perhaps I don't have the material needed to craft these stone items.

I added 100 i_stone and tried to craft this;
Code:
[ITEMDEF i_stone_helm]
ID=i_helm_open
NAME=Stone Helmet
TYPE=T_ARMOR
RESOURCES=15 i_stone
WEIGHT=12
ARMOR=20
REQSTR=40
SKILLMAKE=BLACKSMITHING 30.0

CATEGORY=Equipments - Armor
SUBSECTION=Stone Armor
DESCRIPTION=Helmet

ON=@Create
COLOR=color_o_stone
HITPOINTS={30 40}

But it won't show up on the skillmenu. What have I missed?
(This post was last modified: 08-09-2014 10:50 PM by Jonaleth.)
08-09-2014 10:34 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Blacksmithing and Skillmenus - Jonaleth - 08-09-2014 10:34 PM
RE: Blacksmithing and Skillmenus - Skul - 08-10-2014, 01:04 AM
RE: Blacksmithing and Skillmenus - Skul - 08-10-2014, 02:24 AM
RE: Blacksmithing and Skillmenus - Skul - 08-10-2014, 02:52 AM
RE: Blacksmithing and Skillmenus - Skul - 08-10-2014, 09:35 AM

Forum Jump:


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