Food System 4.0 8.31

tibiaa4e
em Actions e Talkactions

tibiaa4e

Ex amante de Tibia
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 18/12/05Posts: 912Gênero: MasculinoChar no Tibia: Kohzete

Aqui o novo Food System para 8.31

 

Como até o Eventide me lembro eu fiz um em vetores, porém ficou grande pois as comidas tem certas diferenças em falas

e em tempo de comer.

 

Ficou assim, substitua tudo o que você tem no other/food.lua por :

 

--Food system 340 by Ta4e (Soulblaster have some credits)--
--For tibia 8.31+--

local MAX_FOOD = 1200
local crunch = {2684,2687,2689,2690,2691,2787,2788,2789,2790,2791,2792,2793,2794,2795,2796}
local mmmm = {2668,2688,6501,6278,6279,6393,6394,6569,6574,8839,8840,8843,8845,8847}
local gulp = {2670,2695,5678,6541,6542,6543,6544,6545,7372,7373,7374,7375,7376,7377}
local yum = {2673,2674,2675,2676,2677,2679,2680,2681,2682,5097,8841,8842}
local munch = {2666,2667,2669,2683,2685,7158,7159,7909,7910,8838}
local chomp = {2671,2672}
local a0 = {2790,6393,6394,7372,7373,7374,7375,7376,7377}
local a12 = {2677,2679,6569,8840,8841,8844}
local a24 = {2680,2687,2688}
local a48 = {2670,2788,5097,7909,7910}
local a60 = {2673,2684,2796,6574,8839,8843,8845}
local a72 = {2674,2685,2690,2695,2792,2793,2794,6541,6542,6543,6544,6545}
local a96 = {2676,2691,5678}
local a108 = {2681,2686,2696,2787,2791}
local a120 = {2668,2689,6278,6279,8838,8847}
local a180 = {2666,7159}
local a240 = {2682,6501}

function onUse(cid, item, frompos, item2, topos)

if isInArray(munch, item.itemid) == TRUE then
	som = "munch."
elseif isInArray(mmm, item.itemid) == TRUE then
	som = "Mmmm."
elseif isInArray(gulp, item.itemid) == TRUE then
	som = "gulp."
elseif isInArray(chomp, item.itemid) == TRUE then
	som = "chomp."
elseif isInArray(yum, item.itemid) == TRUE then
	som = "Yum."
elseif isInArray(crunch, item.itemid) == TRUE then
	som = "crunch."
elseif item.itemid == 2696 then
	som = "smack."
elseif item.itemid == 8844 then
	som = "Ouch."
elseif item.itemid == 2678 then
	som = "slurp"
	food = 216
end

	if isInArray(a0, item.itemid) == TRUE then
		food = 0
	elseif isInArray(a12, item.itemid) == TRUE then
		food = 12
	elseif isInArray(a24, item.itemid) == TRUE then
		food = 24
	elseif isInArray(a48, item.itemid) == TRUE then
		food = 48
	elseif isInArray(a60, item.itemid) == TRUE then
		food = 60
	elseif isInArray(a72, item.itemid) == TRUE then
		food = 72
	elseif isInArray(a72, item.itemid) == TRUE then
		food = 96
	elseif isInArray(a108, item.itemid) == TRUE then
		food = 108
	elseif isInArray(a120, item.itemid) == TRUE then
		food = 120
	elseif isInArray(a180, item.itemid) == TRUE then
		food = 180
	elseif isInArray(a240, item.itemid) == TRUE then
		food = 240
	elseif item.itemid == 8842 then
		food = 84
	elseif item.itemid == 2667 then
		food = 144
	elseif item.itemid == 2675 then
		food = 156
	elseif item.itemid == 2683 then
		food = 204			
	elseif item.itemid == 2669 then
		food = 254
	elseif item.itemid == 2789 then
		food = 264
	elseif item.itemid == 7158 then
		food = 300
	elseif item.itemid == 2671 then
		food = 360
	elseif item.itemid == 2795 then
		food = 432
	elseif item.itemid == 2672 then
		food = 720
	end

		if getPlayerFood(cid) + food > MAX_FOOD then
			doPlayerSendCancel(cid, "You are full.")
		else
			doPlayerFeed(cid, food)
			doRemoveItem(item.uid,1)
			doCreatureSay(cid, som, TALKTYPE_ORANGE_1)
		end
return 1
end

 

E em actions.xml adicione :

 

<!-- Food -->
<action fromid="2362" toid="2363" script="other/food.lua"/>
<action fromid="2666" toid="2691" script="other/food.lua"/>
<action fromid="2695" toid="2696" script="other/food.lua"/>
<action fromid="2787" toid="2796" script="other/food.lua"/>
<action itemid="5097" script="other/food.lua"/>
<action itemid="6125" script="other/food.lua"/>
<action itemid="6278" script="other/food.lua"/>
<action itemid="6279" script="other/food.lua"/>
<action itemid="6394" script="other/food.lua"/>
<action itemid="6501" script="other/food.lua"/>
<action fromid="6541" toid="6545" script="other/food.lua"/>
<action itemid="6569" script="other/food.lua"/>
<action itemid="6574" script="other/food.lua"/>
<action itemid="7158" script="other/food.lua"/>
<action itemid="7159" script="other/food.lua"/>
<action itemid="7709" script="other/food.lua"/>
<action itemid="7710" script="other/food.lua"/>
<action fromid="7372" toid="7377" script="other/food.lua"/>
<action fromid="8838" toid="8845" script="other/food.lua"/>
<action itemid="8847" script="other/food.lua"/>

 

É isso ai

--edited--

 

auhahua agora vi um jeito mais facil de fazer ainda :p

 

Depois eu coloco aqui

Mais funciona do mesmo jeito

Só que é menor

Aposentado de OTserver e Tibia

Meus melhores tutoriais
Enciclopédia Pasta Data
Tutorial de quest

DaNDaNrOxX

oi mosso
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 18/01/08Posts: 1455Char no Tibia: Saint Claire

Parece estar muito bom, e pelo que eu vejo, tem as novas comidas :D

Vou testar, parece ótimo!

PS: Será que funciona em The Forgotten Server?

Abraço

 

 

Entrada na equipe: 23/10/2008 Cargo: Estagiário

Promoção: 25/11/2008 Cargo: Moderador

Promoção: 21/10/2009 Cargo: Coordenador

Remoção: 09/05/2010 Motivo: Estudos

Retorno: 15/11/2010 Cargo: Moderador

Remoção: 20/12/2012.

 

 

tibiaa4e

Ex amante de Tibia
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 18/12/05Posts: 912Gênero: MasculinoChar no Tibia: Kohzete

Eu uso tfs...

Funfa sim

 

Se vc usar abaixo da 8.0 (axo) ele não fala o nome

Aposentado de OTserver e Tibia

Meus melhores tutoriais
Enciclopédia Pasta Data
Tutorial de quest

tibiaa4e

Ex amante de Tibia
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 18/12/05Posts: 912Gênero: MasculinoChar no Tibia: Kohzete

Atualizado novamente

 

(mal pelo spam não vi o topico meu acima)

Aposentado de OTserver e Tibia

Meus melhores tutoriais
Enciclopédia Pasta Data
Tutorial de quest

MarcolinoGOD

Byte que eu gosto! (TI na veia)
avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 19/06/07Posts: 267Gênero: MasculinoChar no Tibia: Rambocop Infernus

Eitah perfeito como tudo que você faz!? AhuhuaehuEauheuaeE :blush:

E como anda a Dream Challenge Quest? To ansioso para ver como vai ficar...

Feliz Natal e parabens pelo cargo de:

colaborador.gif

Chique em?

--

tibiaa4e

Ex amante de Tibia
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 18/12/05Posts: 912Gênero: MasculinoChar no Tibia: Kohzete

@up

 

a dream ta completa

 

Só que to simplificando pq fico gradinha :p

 

vou mete uns for q fica dahora

Aposentado de OTserver e Tibia

Meus melhores tutoriais
Enciclopédia Pasta Data
Tutorial de quest

soulblaster

avatar
Cavaleiro
Cavaleiro

INFOS

Grupo: CavaleiroRegistrado: 22/10/05Posts: 196

Hiho!

 

TAAA onde está você? : P

Da pra simplificar ainda mais viu. Mas ta legal : P

e não some não O_O'

 

cya

Assinatura feita por Kilerzinhow:
untitled3mg3.jpg
| Wey.Ctba | Wey.Ctba | Rafix | UnderNight | Xedegux |

Tprocheira

WOOOOW
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 23/12/07Posts: 566Char no Tibia: Tprocheira soldier

Erm...

local food =

{

[2362] = {8, "Crunch."},

[2666] = {15, "Munch."},

[2667] = {12, "Munch."},

[2668] = {10, "Mmmm."},

[2669] = {17, "Munch."},

[2670] = {4, "Gulp."},

[2671] = {30, "Chomp."},

[2672] = {60, "Chomp."},

[2673] = {5, "Yum."},

[2674] = {6, "Yum."},

[2675] = {13, "Yum."},

[2676] = {8, "Yum."},

[2677] = {1, "Yum."},

[2678] = {18, "Slurp."},

[2679] = {1, "Yum."},

[2680] = {2, "Yum."},

[2681] = {9, "Yum."},

[2682] = {20, "Yum."},

[2683] = {17, "Munch."},

[2684] = {8, "Crunch."},

[2685] = {6, "Munch."},

[2686] = {9, "Crunch."},

[2687] = {2, "Crunch."},

[2688] = {9, "Munch."},

[2689] = {10, "Crunch."},

[2690] = {3, "Crunch."},

[2691] = {8, "Crunch."},

[2792] = {6, "Munch."},

[2793] = {9, "Munch."},

[2695] = {6, "Gulp."},

[2696] = {9, "Smack."},

[2787] = {9, "Munch."},

[2788] = {4, "Munch."},

[2789] = {22, "Munch."},

[2790] = {30, "Munch."},

[2791] = {30, "Munch."},

[2792] = {6, "Munch."},

[2794] = {3, "Munch."},

[2795] = {36, "Munch."},

[2796] = {5, "Munch."},

[2793] = {9, "Munch."},

[5097] = {4, "Yum."},

[6125] = {8, "Gulp."},

[6278] = {10, "Mmmm."},

[6279] = {15, "Mmmm."},

[6393] = {12, "Mmmm."},

[6394] = {15, "Mmmm."},

[6501] = {20, "Mmmm."},

[6541] = {6, "Gulp."},

[6542] = {6, "Gulp."},

[6543] = {6, "Gulp."},

[6544] = {6, "Gulp."},

[6545] = {6, "Gulp."},

[6569] = {1, "Mmmm."},

[6574] = {4, "Mmmm."},

[7158] = {15, "Munch."},

[7159] = {13, "Munch."},

[7372] = {7, "Yum."},

[7373] = {7, "Yum."},

[7374] = {7, "Yum."},

[7375] = {7, "Yum."},

[7376] = {7, "Yum."},

[7377] = {7, "Yum."}

}

function onUse(cid, item, frompos, item2, topos)

if(food[item.itemid] ~= nil) then

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

return FALSE

end

Créditos TFS Team

Por que usar esse seu se o do TFS é menor? =D

 

Tprocheira

tibiaa4e

Ex amante de Tibia
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 18/12/05Posts: 912Gênero: MasculinoChar no Tibia: Kohzete

@up

 

eu so vi ele na 8.31

 

eu não uso scripts de outros quando tenhos os meus :p

 

E fora q o tfs usa meus scripts só que eles mete array e talz xD

(FIquei traumatizado com isso =/)

Aposentado de OTserver e Tibia

Meus melhores tutoriais
Enciclopédia Pasta Data
Tutorial de quest

Darllan0

Darllan \___Bleach___/
avatar
Cavaleiro
Cavaleiro

INFOS

Grupo: CavaleiroRegistrado: 04/11/07Posts: 192Char no Tibia: Ranzor Raven

Rox Mnw

Bela Action Vei

Parabens

 

 

 

Continue Assim

Darllan Client Maker/Npc Maker
XD

Metas:
(x) 10 Posts
(x) 30 Posts
(x) 50 Posts
(x) 80 Posts
(x) 100 posts
(x) 200 Posts
(x) 250 Posts
(x) 280 Posts
(x) 300 Posts
(x) 350 Posts
( ) 380 Posts
( ) 400 Posts
( ) 450 Posts
( ) 480 Posts
( ) 500 Posts....

Sou Fan De:
<div style="margin:0px 0px 0px 0px">
<div class="smallfont" style="margin-bottom:0px">
<input type="button" value="Mostrar Spoil" style="width:80px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Esconder'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Mostrar Spoil'; }">
</div>
<div style="margin: 0px; padding: 0px; border: 0px inset;">
<div style="display: none;">
<img src="http://img156.imageshack.us/img156/2959/tymaoes949di7.png" border="0" class="linked-sig-image" />
<img src="http://img216.imageshack.us/img216/7688/sadfcopyyp9jm4df0.png" border="0" class="linked-sig-image" />
</div>
</div>
<img src="http://i492.photobucket.com/albums/rr287/Fliper_010/darllanxtibia.png" border="0" class="linked-sig-image" />

Ajudar é Humano e Tibiano =D:
<a href="http://s8.bitefight.com.pt/c.php?uid=95671" target="_blank">http://s8.bitefight.com.pt/c.php?uid=95671</a>

Te Ajudei ?, me ama?, me odeia? ou so que enfeitar sua assinatura? entao use
<img src="http://i492.photobucket.com/albums/rr287/Fliper_010/DarlanFANxtibia.png" border="0" class="linked-sig-image" />

funniesk

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 12/11/08Posts: 70

Muito bom cara soh que eu uso aqui eh menor tb, mas eh vc que faz os seus neh parabens veio!!

jpfds1

Jauum
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 07/12/08Posts: 41Char no Tibia: Phoenix Shore

Muito Bom Tibiaa4e

 

Continue Assim ( Lógico Né )

 

 

Obrigado !!

 

 

 

 

Anteciosamente,

Jaum

_-_-Jaum-_-_
My Orkut
Meu Avatar :



Leie E Respeite As Regras \/ :
Regras Xtibia
Char No Tibia :

Admin Jaum



Sign :



Eu Sou :






_____________________________________________________
* Copyright © 2009 Jaum. All rights reserved. ® *