Ir para conteúdo

Featured Replies

  • Respostas 11
  • Visualizações 618
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • local condition = createConditionObject(CONDITION_POISON) addDamageCondition(condition, 20, 700, -200) local storage = 600 function onCombat(cid, target) if isPlayer(cid) and getPlayerStorageValue(

  • Spell: local storage = 600 function onCastSpell(cid, var) if storage >= 1 then doPlayerSendCancel(cid, "You're already with Poisoned Attack.") doSendMagicEffect(getThingPos(cid), 2) retur

Postado
  • Solução

Spell:

local storage = 600

function onCastSpell(cid, var)
	if storage >= 1 then
		doPlayerSendCancel(cid, "You're already with Poisoned Attack.")
		doSendMagicEffect(getThingPos(cid), 2)
		return false
	end
	setPlayerStorageValue(cid, storage, 1)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Now you are with Poisoned Attack.")
	return true
end

a tag você ja deve saber colocar.

 

 

Em creaturescripts:

local condition = createConditionObject(CONDITION_POISON)
addDamageCondition(condition, 20, 700, -200)

local storage = 600

function onCombat(cid, target)
	if isPlayer(cid) and getPlayerStorageValue(cid, storage) >= 1 then
		return doAddCondition(target, condition) and setPlayerStorageValue(cid, storage, -1)
	end
	return true
end

Tag:

<event type="combat" name="PoisonedAttack" event="script" value="NOME DO ARQUIVO.lua" />

e finalmente em login.lua

registerCreatureEvent(cid, "PoisonedAttack")

o resto você ja deve saber o que fazer. Não sei se era isso que você tava querendo, mas ta ai.

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo