• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action deleted thread

Humm :p

Great script and all :D, But ive run into some problems.

I added everything and then summoned the NPC.
Talked to him about his recipes and our conversation went like this

Code:
09:56 Elvarion [3674]: skull helmet
09:56 Gor'noth: Do you really want to learn how to smith skull helmet?
09:56 Elvarion [3674]: yes
09:56 Gor'noth: You learned the recipe of smithing skull helmet.
09:57 Elvarion [3674]: steel shield
09:57 Gor'noth: Do you really want to learn how to smith steel shield?
09:57 Elvarion [3674]: yes
09:57 Gor'noth: Your blacksmithing skill is too low.

Skull Helmet's "Skill" is 190, Im guessing your not supposed to be able to learn that recipe right away? Since i wasnt even able lo learn how to do a steel shield ^^
Im not able to learn any of the Recipes that needs "Skill = 0", But i can learn everything else.

Then i made a script to increase my skill, So i made my Blacksmithing 100'ish and then i tried to buy some recipes. I couldnt buy a single one, Not even the ones that requires me to have a lower skill. :eek:
The npc just responded with that my skill was to low.. :(

Edit:

Found something else,
When saying "Piece of Iron" It removes 1 Platinum Coin but NPC will say "10:14 Gor'noth: You don't have required ingredients."
But if you buy it using 30 gold coins it works xD

Edit yet again.

Made a script to add all the recipes into the Book.
All scripts from 100 to 139 works without any errors. However whenever i try to add the gems and opening the smithing book i get a Debug.
If its of any help here is the Error Report.

Handwritten, Couldnt Copy Paste it :D
Code:
Debug Assertion 8.60 Utils.cpp 501
Wed Sep 01 11:26:25 2010
Graphic Engine: OpenGL (1)
Operation System: Windows XP Professional in SWE
Processor: Intel Pentium 4 3.20 GHZ
Video Card: NVIDIA GeForce 6800
Last Packet Types: 150 109 109 109 109 109 103 109 109 109
Last Packet: 150 003 000 000 000 011 011 153 032 000 000 000 000 000 000 000
Player Position: [160,47,7]
Planer Name: Questaren (NaxedOt)
Player Action: 049 050 055 046 048 046 048 046 049 058 055 049 055 050
Player.cpp 361: exception occurred, reason:
Network.cpp 946: exception occured (ErrorCode = 0), reason:
Control.cpp 1331: exception occurred (Type = 150) (MainWindow = 21118696),
reason:
Communication.cpp 2619: exception occurred, reason:
Network.cpp 504: exception occurred, reason:
Utils.cpp 501: assertion failed (Position = 21) (Size = 21), reason:
Position<=Size-2
 
Last edited:
You are suppose to make a tile/item AID 4500 and then stand next to it or on it? Right? Cause I did that and it keeps saying "The forge is too far from you."

What's wrong?

15:05 You see an anvil.
ItemID: [8671], ActionID: [4500].
Position: [X: 3394] [Y: 3544] [Z: 8].

15:05 You see yourself. You are god.
Health: [155 / 155], Mana: [5 / 5].
Position: [X: 3394] [Y: 3545] [Z: 8].

As you can see Im standing next to it
 
You are suppose to make a tile/item AID 4500 and then stand next to it or on it? Right? Cause I did that and it keeps saying "The forge is too far from you."

What's wrong?

15:05 You see an anvil.
ItemID: [8671], ActionID: [4500].
Position: [X: 3394] [Y: 3544] [Z: 8].

15:05 You see yourself. You are god.
Health: [155 / 155], Mana: [5 / 5].
Position: [X: 3394] [Y: 3545] [Z: 8].

As you can see Im standing next to it

You are supposed to make an tile with the AID of 4500 then stand on it, Not next to it =)
Hope that helps.
 
you can make it that if you are facing the anvil with actionid 4500 it will smith just go to the talkaction script:
Code:
function onSay(cid, words, param)
 
	if getPlayerStorageValue(cid, 60010) < 0 then
		setPlayerStorageValue(cid, 60010, 0)
	end
	param = string.lower(param)
	if recipes[param] then
		if getPlayerStorageValue(cid, recipes[param].storage) == 1 then
			if getPlayerStorageValue(cid, 60010) >= recipes[param].skill then
				if getPlayerItemCount(cid, config.tool) > 0 then
					smithTile = [COLOR="blue"]getPlayerPosition(cid)[/COLOR]
					smithTile.stackpos = 0
					if getThingfromPos(smithTile).actionid == config.actionId then
						for items, count in pairs(recipes[param].requiredItems) do
							if getPlayerItemCount(cid, items) < count then
								doCreatureSay(cid, "You don't have required ingredients to craft ".. param .. ".", TALKTYPE_ORANGE_1)
								doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
								return true
							end
						end
						for items, count in pairs(recipes[param].requiredItems) do
							doPlayerRemoveItem(cid, items, count)
						end
						doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE)
						craftedItem = doCreateItemEx(getItemIdByName(param), 1)
						doItemSetAttribute(craftedItem, "description", "It was crafted by ".. getPlayerName(cid) ..".")
						doPlayerAddItemEx(cid, craftedItem, true)
						doPlayerAddOwnSkill(cid, 60010, recipes[param].skill)
						doCreatureSay(cid, "You've crafted ".. param ..".", TALKTYPE_ORANGE_1)
						return true
					else
						doCreatureSay(cid, "The forge is too far from you.", TALKTYPE_ORANGE_1)
						doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
					end
				else
					doCreatureSay(cid, "You don't have required tools to craft ".. param ..".", TALKTYPE_ORANGE_1)
					doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
				end
			else
				doCreatureSay(cid, "You don't have enought blacksmithing skill to craft ".. param .. ".", TALKTYPE_ORANGE_1)
				doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
			end
		else
			doCreatureSay(cid, "You don't have recipe for that.", TALKTYPE_ORANGE_1)
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
		end
	else
		doCreatureSay(cid, "There is no such a recipe.", TALKTYPE_ORANGE_1)
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
	end
	return true
end
change the blue highlighted part for:
Code:
getCreatureLookPosition(cid)
I think this function should be on 0.3.6 and up,
with this you can make it that you need to be next to an anvil looking at that item's direction.
 
Was more hinting at post #22, Where i found some bugs ^^,

But thats one way to make it look a bit more "realistic". Kind of hard to smith something and your looking in another direction from an anvil in real life :D
 
I will try to help you out a bit on the NPC thing, because this line:
Code:
Your blacksmithing skill is too low.
is not even in the script...unless you've added it yourself,
well I'll be back from work soon.
 
I will try to help you out a bit on the NPC thing, because this line:
Code:
Your blacksmithing skill is too low.
is not even in the script...unless you've added it yourself,
well I'll be back from work soon.

I copied everything from the first post (Not the MOD, Didnt want to have profession and that. Just the Blacksmithing.)

Its in the "Blacksmithing.lua"
The code is at around line 82-89

Lua:
		elseif(msgcontains(msg, "yes")) then
			if(talkState[talkUser] > 0) then
				if(talkState[talkUser] == values.talkState) then
					if(getPlayerStorageValue(cid, 60010) >= values.skill) then
						npcHandler:say("Your blacksmithing skill is too low.", cid, 1000)
						talkState[talkUser] = 0
						return true
					end
 
man it is posible when a player open a chest
its give him a blacksmith skill
and if possible plis do the script for me i need it
rep ++++ xD
 
When i talk to the npc, he doesnt give me any recipes or tools, he do take the money tho!
 
@UP
Shinmaru..
say what is this script and also tell me what and how to set us on the map to run the script in the ots

I am a Polish, D
 
Back
Top