Ir para conteúdo

Runa Que Da Skill


Nolis

Posts Recomendados

Eai, vim postar um script de action, é uma ideia que eu tive, meio sem utilidade mas quem gostar que use ^^

 

Explicando:

é só uma runa que o player usa num pedaço de pau para treinar fist fighting (vou postar também outros script que ao usar a runa além de fist treina também sword, axe, club)

 

DATA/ITENS itens.xml

aperte ctrl + f e procure o id 2280 e substitua:

	<item fromid="2280" article="an" name="Fist Fighting Rune">
	<attribute key="weight" value="120" />
</item>

DATA/ACTIONS/SCRIPTS/TOOLS copie um arquivo e renomeie para fistfighting.lua

local useNails = TRUE
local waterIds = {5787, 5777}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isInArray(waterIds, itemEx.itemid) == TRUE then
	if itemEx.itemid ~= 493 then
		if useNails == FALSE or useNails == TRUE and doPlayerRemoveItem(cid, 0, 0) == TRUE then
			if math.random(1, (100 + (getPlayerSkill(cid, SKILL_FIST) / 10))) <= getPlayerSkill(cid, SKILL_FIST) then
				doPlayerAddItem(cid, 0, 0)
			end
			doPlayerAddSkillTry(cid, SKILL_FIST, 1)
		end
	end
	doSendMagicEffect(toPosition, CONST_ME_POFF)
	return TRUE
end
return FALSE
end

DATA/ACTIONS actions.xml

	<action itemid="2280" script="tools/fistfighting.lua"/>

 

para treinar sword, axe ou club é só mudar o script, é bem facil:

Sword.

 

local useNails = TRUE
local waterIds = {5787, 5777}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isInArray(waterIds, itemEx.itemid) == TRUE then
	if itemEx.itemid ~= 493 then
		if useNails == FALSE or useNails == TRUE and doPlayerRemoveItem(cid, 0, 0) == TRUE then
			if math.random(1, (100 + (getPlayerSkill(cid, SKILL_SWORD) / 10))) <= getPlayerSkill(cid, SKILL_SWORD) then
				doPlayerAddItem(cid, 0, 0)
			end
			doPlayerAddSkillTry(cid, SKILL_SWORD, 1)
		end
	end
	doSendMagicEffect(toPosition, CONST_ME_POFF)
	return TRUE
end
return FALSE
end

 

Axe.

 

local useNails = TRUE
local waterIds = {5787, 5777}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isInArray(waterIds, itemEx.itemid) == TRUE then
	if itemEx.itemid ~= 493 then
		if useNails == FALSE or useNails == TRUE and doPlayerRemoveItem(cid, 0, 0) == TRUE then
			if math.random(1, (100 + (getPlayerSkill(cid, SKILL_AXE) / 10))) <= getPlayerSkill(cid, SKILL_AXE) then
				doPlayerAddItem(cid, 0, 0)
			end
			doPlayerAddSkillTry(cid, SKILL_AXE, 1)
		end
	end
	doSendMagicEffect(toPosition, CONST_ME_POFF)
	return TRUE
end
return FALSE
end

 

Club.

 

local useNails = TRUE
local waterIds = {5787, 5777}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isInArray(waterIds, itemEx.itemid) == TRUE then
	if itemEx.itemid ~= 493 then
		if useNails == FALSE or useNails == TRUE and doPlayerRemoveItem(cid, 0, 0) == TRUE then
			if math.random(1, (100 + (getPlayerSkill(cid, SKILL_CLUB) / 10))) <= getPlayerSkill(cid, SKILL_CLUB) then
				doPlayerAddItem(cid, 0, 0)
			end
			doPlayerAddSkillTry(cid, SKILL_CLUB, 1)
		end
	end
	doSendMagicEffect(toPosition, CONST_ME_POFF)
	return TRUE
end
return FALSE
end

 

Distance.

 

local useNails = TRUE
local waterIds = {5787, 5777}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isInArray(waterIds, itemEx.itemid) == TRUE then
	if itemEx.itemid ~= 493 then
		if useNails == FALSE or useNails == TRUE and doPlayerRemoveItem(cid, 0, 0) == TRUE then
			if math.random(1, (100 + (getPlayerSkill(cid, SKILL_DISTANCE) / 10))) <= getPlayerSkill(cid, SKILL_DISTANCE) then
				doPlayerAddItem(cid, 0, 0)
			end
			doPlayerAddSkillTry(cid, SKILL_DISTANCE, 1)
		end
	end
	doSendMagicEffect(toPosition, CONST_ME_POFF)
	return TRUE
end
return FALSE
end

 

Shielding.

 

local useNails = TRUE
local waterIds = {5787, 5777}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isInArray(waterIds, itemEx.itemid) == TRUE then
	if itemEx.itemid ~= 493 then
		if useNails == FALSE or useNails == TRUE and doPlayerRemoveItem(cid, 0, 0) == TRUE then
			if math.random(1, (100 + (getPlayerSkill(cid, SKILL_SHIELDING) / 10))) <= getPlayerSkill(cid, SKILL_SHIELDING) then
				doPlayerAddItem(cid, 0, 0)
			end
			doPlayerAddSkillTry(cid, SKILL_SHIELDING, 1)
		end
	end
	doSendMagicEffect(toPosition, CONST_ME_POFF)
	return TRUE
end
return FALSE
end

 

 

Algumas Imagens :D

 

PQAAAAjXF2QgCV1DXqOglEcWYdcGnEv3uo_oNj_FMPuoE6dZM4PV3j5YCLj9_a2KrqbeT8rRN7leTYPQni_TGa_guJMAm1T1UFuCJFVSw5Qx7-qfWol6lYzRDToM.jpg

 

 

PQAAAH5FmsZxv0Kvg0-7kFUclf2de3JRWFMhIyB1lnO8lOTUW0IIrVNemsPMbmQu7RzpOTT3Sp4vJMJxx2m4BS6xlgwAm1T1UFbw4I_8ntfQpC-IOJ44LvXo3Ad-.jpg

 

 

PQAAAObPmr4mf0pUzac9k88X3RxjNSSDj3NE7XbeYbrhuMuTKC231qpvF0xCyZ7lGDvvYJQgiMf1NIr_1Xfe2sDbRSsAm1T1UMeXKGu69sjQnxQmCkNcg4uco17s.jpg

 

 

PQAAAKeSTptvCCsVW0Pp-x_3NUqtqQivOS2inGWaOUktTyo6pt01wIzKofaGss7XXMmYjQWtpUnRYm82odsT3HWEw0MAm1T1UDkiaHGMJ26eYw3WkdqPDHJBbFb5.jpg

 

É Isso, se gosto da um rep ai, até mais..

Editado por DanielZiyak
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...