• 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!

"Magic Food"

Sherlok

Active Member
Joined
Aug 29, 2008
Messages
2,116
Reaction score
44
Location
Poland, Wrocław.
Hello,
I need scripts for this food:

Blessed_Steak.gif
Blessed Steak - 9999

Carrot_Cake.gif
Carrot Cake - 10000

Filled_Jalape%C3%B1o_Peppers.gif
Filled Jalapeño Peppers - 9998

Hydra_Tongue_Salad.gif
Hydra Tongue Salad - 9993

Roasted_Dragon_Wings.gif
Roasted Dragon Wings - 9994

Rotworm_Stew.gif
Rotworm Stew - 9992

Tropical_Fried_Terrorbird.gif
Tropical Fried Terrorbird - 9995

Veggie_Casserole.gif
Veggie Casserole - 9997


Please
&
Thanks :thumbup:
 
Last edited:
maybe tweety wants a script to cook the food?
there is a good recipe system around the forum
 
Blessed_Steak.gif
Blessed Steak - 9999

Carrot_Cake.gif
Carrot Cake - 10000

Filled_Jalape%C3%B1o_Peppers.gif
Filled Jalapeño Peppers - 9998

Hydra_Tongue_Salad.gif
Hydra Tongue Salad - 9993

Roasted_Dragon_Wings.gif
Roasted Dragon Wings - 9994

Rotworm_Stew.gif
Rotworm Stew - 9992

Tropical_Fried_Terrorbird.gif
Tropical Fried Terrorbird - 9995

Veggie_Casserole.gif
Veggie Casserole - 9997
 
Add your IDS

Also that food config: Where it stays 15, 30, 60. It's about fast you'll be full or how to explain ^^.
Fixed with your ids.

Create new file in action/scripts - call it newFoods.lua
Lua:
local food =
{
	[9999] = {35, "Aahmm.."},
	[10000] = {30, "Chomp.."},
	[9998] = {60, "Aaahm.."},
	[9993] = {20, "Chomp"},
	[9994] = {25, "Munch."},
	[9992] = {35, "Munch."},
	[9995] = {40, "Munch."},
	[9997] = {15, "Munch."}


}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(not food[item.itemid]) then
		return FALSE
	end

	if(getPlayerFood(cid) + food[item.itemid][1]) >= 400 then
		doPlayerSendCancel(cid, "You are full.")
	else
		doPlayerFeed(cid, food[item.itemid][1] * 4)
		doCreatureSay(cid, food[item.itemid][2], TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	end

	return TRUE
end

actions.xml add
Code:
	<action fromid="9992" toid="9995" event="script" value="newFoods.lua"/>
	<action fromid="9997" toid="10000" event="script" value="newFoods.lua"/>
You can change the text of what they'll say when they eat them.
 
Last edited:
<Gold Shovel>
Sorry for digging this old thread back to the surface, but I really need this system, any news on this?
Just edit the food script and add the id's to the table.
https://github.com/otland/forgottenserver/blob/master/data/actions/scripts/other/food.lua

Then modify the create bread script and save it as something else to create the items with the necessary ingredients.
https://github.com/otland/forgottenserver/blob/master/data/actions/scripts/other/createbread.lua

If you are not using 1.x find similar scripts in your distro to construct these scripts.
 
Just edit the food script and add the id's to the table.
https://github.com/otland/forgottenserver/blob/master/data/actions/scripts/other/food.lua

Then modify the create bread script and save it as something else to create the items with the necessary ingredients.
https://github.com/otland/forgottenserver/blob/master/data/actions/scripts/other/createbread.lua

If you are not using 1.x find similar scripts in your distro to construct these scripts.

Sorry, but I don't think you got it.
We want food with especial conditions, like providing speed for a while, melee skills etc.
 
im ur other thread i told you the basics of it and linked you a thread that has the nececssary things for those conditions

Yes Zothion, I'm currently working on it.
Managed to get it working, except for effects like elemental damage for a period of time, but I don't think it's possible...
 
Back
Top