Ir para conteúdo
  • 0

Script Bugado


godjean

Pergunta

Ola pessoal do xtibia :)

Então eu tenho um script que ele meio que não funciona gostaria de saber se algo pode-se me ajudar :S

local function Blood30(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
end
end
local function Blood29(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood30, 1 * 1000, cid)
end
end
local function Blood28(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood29, 1 * 1000, cid)
end
end
local function Blood27(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood28, 1 * 1000, cid)
end
end
local function Blood26(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood27, 1 * 1000, cid)
end
end
local function Blood25(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood26, 1 * 1000, cid)
end
end
local function Blood24(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood25, 1 * 1000, cid)
end
end
local function Blood23(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood24, 1 * 1000, cid)
end
end
local function Blood22(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood23, 1 * 1000, cid)
end
end
local function Blood21(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood22, 1 * 1000, cid)
end
end
local function Blood20(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood21, 1 * 1000, cid)
end
end
local function Blood19(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood20, 1 * 1000, cid)
end
end
local function Blood18(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood19, 1 * 1000, cid)
end
end
local function Blood17(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood18, 1 * 1000, cid)
end
end
local function Blood16(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood17, 1 * 1000, cid)
end
end
local function Blood15(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood16, 1 * 1000, cid)
end
end
local function Blood14(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood15, 1 * 1000, cid)
end
end
local function Blood13(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood14, 1 * 1000, cid)
end
end
local function Blood12(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood13, 1 * 1000, cid)
end
end
local function Blood11(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood12, 1 * 1000, cid)
end
end
local function Blood10(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood11, 1 * 1000, cid)
end
end
local function Blood9(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood10, 1 * 1000, cid)
end
end
local function Blood8(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood9, 1 * 1000, cid)
end
end
local function Blood7(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood8, 1 * 1000, cid)
end
end
local function Blood6(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood7, 1 * 1000, cid)
end
end
local function Blood5(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood6, 1 * 1000, cid)
end
end
local function Blood4(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood5, 1 * 1000, cid)
end
end
local function Blood3(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood4, 1 * 1000, cid)
end
end
local function Blood2(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood3, 1 * 1000, cid)
end
end
local function Blood1(cid)
if isPlayer(cid) == TRUE then
doSendMagicEffect(getCreaturePosition(cid), 51)
addEvent(Blood2, 1 * 1000, cid)
end
end
local Chronos = createConditionObject(CONDITION_OUTFIT)
setConditionParam(Chronos, CONDITION_PARAM_TICKS, 30000)
addOutfitCondition(Chronos, 0, 251, 114, 114, 114, 114)
local Kazard = createConditionObject(CONDITION_OUTFIT)
setConditionParam(Kazard, CONDITION_PARAM_TICKS, 30000)
addOutfitCondition(Kazard, 0, 262, 114, 114, 114, 114)
local Hazus = createConditionObject(CONDITION_OUTFIT)
setConditionParam(Hazus, CONDITION_PARAM_TICKS, 30000)
addOutfitCondition(Hazus, 0, 194, 114, 114, 114, 114)
local Muted = createConditionObject(CONDITION_MUTED)
setConditionParam(Muted , CONDITION_PARAM_TICKS, 30000 * 10000)
local Speed = createConditionObject(CONDITION_HASTE)
setConditionParam(Speed, CONDITION_PARAM_TICKS, 30000)
setConditionFormula(Speed, 0, 3000, 0, 3000)
local Health = createConditionObject(CONDITION_REGENERATION)
setConditionParam(Health, CONDITION_PARAM_TICKS, 30000)
setConditionParam(Health, CONDITION_PARAM_HEALTHGAIN, 1000)
setConditionParam(Health, CONDITION_PARAM_HEALTHTICKS, 1)
setConditionParam(Health, CONDITION_PARAM_MANAGAIN, 1000)
setConditionParam(Health, CONDITION_PARAM_MANATICKS, 1)
function onUse(cid, item, frompos, item2, topos)
Blood = math.random(1,3)
HP = math.random(4000,10000)
MP = math.random(4000,10000)
if getPlayerSoul(cid) >= 0 then
if Blood == 1 then
doPlayerAddHealth(cid,HP)
doPlayerAddMana(cid,MP)
doTargetCombatCondition(0, cid, Chronos, 51)
doTargetCombatCondition(0, cid, Health, 51)
doPlayerSendTextMessage(cid,20,"Você Me Invocou, Agora Você é Um Chronos.")
doPlayerSay(cid, "MUAHAHAHA!", TALKTYPE_ORANGE_1)
doPlayerAddSoul(cid,-0)
doRemoveItem(item.uid,1)
addEvent(Blood1, 1*1000,cid)
elseif Blood == 2 then
doPlayerAddHealth(cid,HP)
doPlayerAddMana(cid,MP)
doTargetCombatCondition(0, cid, Kazard, 51)
doTargetCombatCondition(0, cid, Health, 51)
doTargetCombatCondition(0, cid, Speed, 51)
doPlayerSendTextMessage(cid,20,"Você Me Invocou, Agora Você é Um Kazard.")
doPlayerSay(cid, "MUAHAHAHA!", TALKTYPE_ORANGE_1)
doPlayerAddSoul(cid,-0)
doRemoveItem(item.uid,1)
addEvent(Blood1, 1*1000,cid)
elseif Blood == 3 then
doPlayerAddHealth(cid,HP)
doPlayerAddMana(cid,MP)
doTargetCombatCondition(0, cid, Hazus, 51)
doTargetCombatCondition(0, cid, Health, 51)
doTargetCombatCondition(0, cid, Muted, 51)
doPlayerSendTextMessage(cid,20,"Você Me Invocou, Agora Você é Um Hazus.")
doPlayerSay(cid, "MUAHAHAHA!", TALKTYPE_ORANGE_1)
doPlayerAddSoul(cid,-50)
doRemoveItem(item.uid,1)
addEvent(Blood1, 1*1000,cid)
end
else
doPlayerSendTextMessage(cid,20,"Desculpe, vocé não tem 50 almas para usa esse Blood Of God\'s.")
end
end

Link para o comentário
Compartilhar em outros sites

4 respostass a esta questão

Posts Recomendados

  • 0
local Muted = createConditionObject(CONDITION_MUTED)
setConditionParam(Muted , CONDITION_PARAM_TICKS, 30 * 1000)
local Speed = createConditionObject(CONDITION_HASTE)
setConditionParam(Speed, CONDITION_PARAM_TICKS, 30000)
setConditionFormula(Speed, 0, 3000, 0, 3000)
local Health = createConditionObject(CONDITION_REGENERATION)
setConditionParam(Health, CONDITION_PARAM_TICKS, 30000)
setConditionParam(Health, CONDITION_PARAM_HEALTHGAIN, 1000)
setConditionParam(Health, CONDITION_PARAM_HEALTHTICKS, 1)
setConditionParam(Health, CONDITION_PARAM_MANAGAIN, 1000)
setConditionParam(Health, CONDITION_PARAM_MANATICKS, 1)

local function Blood(p)
if isPlayer(p.cid) then
	if p.times > 0 then
		doSendMagicEffect(getThingPosition(p.cid), 51)
		addEvent(Blood, 1 * 1000, {cid = p.cid, times = p.times - 1})
	end
end
end

local types = {
[1] = {name = "Chronos", {lookType = 251, lookHead = 114, lookBody = 114, lookLegs = 114, lookFeet = 114}, soul = 0},
[2] = {name = "Kazard", {lookType = 262, lookHead = 114, lookBody = 114, lookLegs = 114, lookFeet = 114}, soul = 0},
[3] = {name = "Hazus", {lookType = 194, lookHead = 114, lookBody = 114, lookLegs = 114, lookFeet = 114}, soul = 50}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
local blood = types[math.random(1, #types)]
local HP = math.random(4000, 10000)
local MP = math.random(4000, 10000)

if getPlayerSoul(cid) >= 0 then
	doCreatureAddHealth(cid, HP)
	doCreatureAddMana(cid, MP)
	doAddCondition(cid, Health)
	doCreatureSetOutfit(cid, blood[2], 30 * 1000)
	doSendMagicEffect(fromPosition, 51)
	if blood.name == "Kazard" then
		doAddCondition(cid, Speed)
	elseif blood.name == "Hazus" then
		doAddCondition(cid, Muted)
	end
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você me invocou! Agora você é um ".. blood.name)
	doCreatureSay(cid, "MUAHAHAHA!", TALKTYPE_ORANGE_1)
	doPlayerAddSoul(cid, -blood.soul)
	doRemoveItem(item.uid, 1)
	addEvent(Blood, 1 * 1000, {cid = cid, times = 30})
else
	doPlayerSendCancel(cid, "Desculpe, você não possui 50 almas para usar esse Blood of Gods.")
end
return true
end

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...