CH

Pedido De Script Para Monstro

Por chukyville, 28 de jul. de 2010 em Archived

script
3
886
chukyvilleC
28 de julho de 2010 às 21:39

Gostaria de um script em que eu falasse alguma palavra e o monstro sumonado usasse a magia...

 

Exemplo:

eu falo !fireball

e o monstro que tiver sumonado usa uma respectiva spell...

 

Estou no aguardo...

Obrigado

7 meses depois...
otherealityO
03 de fevereiro de 2011 às 11:41

ia ser bem interessante, se aparecer alguem que possa nos passar também me interesso.

meubkM
06 de fevereiro de 2011 às 13:36

crie um arquivo fireball.lua

 

function onSay(cid, words, param)

local configs = {
level = 10 -- level para usar
efeitodistance = 3 -- efeito de distancia
typedamage = COMBAT_FIREDAMAGE -- tipo de dano
min = 10 -- atk minino
max = 20 -- atk maximo
exhausted = 1 -- exaustão em segundos
}

local summonuse = {"Dragon", "Dragon Lord", "Demon"} -- summons ki pode usar

if #getCreatureSummons(cid) == 0 then
	return doPlayerSendCancel(cid, "You do not have any summon.")
end

if not isInArray(summonuse, getCreatureName(getCreatureSummons(cid)[1])) then
	return doPlayerSendCancel(cid, "This summon not use fire ball.")
end

if getCreatureTarget(cid) == 0 then
		return doPlayerSendTextMessage(cid, 19, "This Attack need any target.")
end


if getPlayerLevel(cid) < configs.level then
	return doPlayerSendTextMessage(cid, 19, "You need level "..configs.level.." to use fire ball.")
end

function getTime(s)
	local n = math.floor(s / 60)
	s = s - (60 * n)
	return n, s
end

if os.time()-getPlayerStorageValue(cid, 23231) <= configs.exhausted then
	minutes,seconds = getTime(configs.exhausted-(os.time()-getPlayerStorageValue(cid, 23231)))
	return doPlayerSendCancel(cid, "Summon exhausted")
end	

doSendDistanceShoot(getCreaturePosition(getCreatureSummons(cid)[1]), getCreaturePosition(getCreatureTarget(cid)), configs.efeitodistance)
doAreaCombatHealth(getCreatureSummons(cid)[1], configs.typedamage, getThingPos(getCreatureTarget(cid)), 0, -configs.min, -configs.max, 3)
doPlayerSay(cid, getCreatureName(getCreatureSummons(cid)[1])..", Fireball", 1)
setPlayerStorageValue(cid, 23231, os.time()+configs.exhausted)

return true
end

 

tag :

<talkaction words="!fireball" hide="yes" event="script" value="fireball.lua"/>

Editado Fevereiro 6 por xotservx