Ir para conteúdo
  • Cadastre-se

Pedido de tutorial script


Posts Recomendados

Base poke dash 8.54

 

preciso modificar a potion para curar em battle

preciso modificar o revive para apos reviver o pokemon resetar as skill

 

Preciso modificar o antidoto do servidor para curar todos os status negativos dos pokemons

 

 

 

Script lua do revive ( preciso que apos reviver o pokemon reset as skill)

 

function onUse(cid, item, fromPosition, itemEx, toPosition)
if itemEx.itemid ~= getPlayerSlotItem(cid, 8).itemid then
return doPlayerSendCancel(cid, "You must put your pokeball in the correct place!")
end

if getPlayerStorageValue(cid, 990) >= 1 then
return doPlayerSendTextMessage(cid, 27, "You can\'t use potions in the gym.")
end

if itemEx.itemid == 12422 then -- saffari
   doItemSetAttribute(itemEx.uid, "hp", 1)
   doTransformItem(itemEx.uid, 12420)
   doRemoveItem(item.uid, 1)
   doSendMagicEffect(getCreaturePosition(cid), 13)

elseif itemEx.itemid == 11828 then -- normal
   doItemSetAttribute(itemEx.uid, "hp", 1)
   doTransformItem(itemEx.uid, 11826)
   doRemoveItem(item.uid, 1)
   doSendMagicEffect(getCreaturePosition(cid), 13)

elseif itemEx.itemid == 11831 then -- ultra
   doItemSetAttribute(itemEx.uid, "hp", 1)
   doTransformItem(itemEx.uid, 11829)
   doRemoveItem(item.uid, 1)
   doSendMagicEffect(getCreaturePosition(cid), 13)

elseif itemEx.itemid == 11837 then -- super
   doItemSetAttribute(itemEx.uid, "hp", 1)
   doTransformItem(itemEx.uid, 11835)
   doRemoveItem(item.uid, 1)
   doSendMagicEffect(getCreaturePosition(cid), 13)

elseif itemEx.itemid == 11834 then -- great
   doItemSetAttribute(itemEx.uid, "hp", 1)
   doTransformItem(itemEx.uid, 11832)
   doRemoveItem(item.uid, 1)
   doSendMagicEffect(getCreaturePosition(cid), 13)

end
end




Script Potion (Preciso que cure em batalha)

 

function doHealOverTime(cid, div, turn, effect)
	if not isCreature(cid) then return true end
	if turn <= 0 then return true end
	if getCreatureHealth(cid) == getCreatureMaxHealth(cid) then return true end
	if getCreatureCondition(getCreatureMaster(cid)
, CONDITION_INFIGHT) then
		doSendAnimatedText(getThingPos(cid), "LOST HEAL", 215)
	return true
	end
	local d = div / 10000
	local amount = math.floor(getCreatureMaxHealth(cid) * d)
	doCreatureAddHealth(cid, amount)
		if math.floor(turn/10) == turn/10 then
			doSendMagicEffect(getThingPos(cid), effect)
		end
	addEvent(doHealOverTime, 100, cid, div, turn - 1, effect)
end

local potions = {
[12346] = {effect = 12, div = 20},
[12347] = {effect = 13, div = 40},
[12348] = {effect = 13, div = 60},
[12345] = {effect = 14, div = 80},
[12343] = {effect = 12, div = 100}}

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

if isPlayer(item2.uid) then
return doPlayerSendCancel(cid, "You can only use potions on pokemons!")
end

if getCreatureCondition(cid, CONDITION_INFIGHT) then
doPlayerSendCancel(cid, "Sorry, you can't heal your pokemon during fights!")
return TRUE
end

if not isCreature(item2.uid) then
return doPlayerSendCancel(cid, "You can only use potions on pokemons!")
end

if not isPlayer(getCreatureMaster(item2.uid)) then
return doPlayerSendCancel(cid, "You cant use potions on wild pokemons.")
end

if getCreatureHealth(item2.uid) == getCreatureMaxHealth(item2.uid) then
return doPlayerSendCancel(cid, "This pokemon is already at full health.")
end

doCreatureSay(cid, ""..getPlayerStorageValue(item2.uid, 1007)..", take this potion!", TALKTYPE_SAY)
doSendMagicEffect(getThingPos(item2.uid), 172)
doRemoveItem(item.uid, 1)

local a = potions[item.itemid]

doHealOverTime(item2.uid, a.div, 100, a.effect)

return true
end

 

 

 

 

Script do Antidoto ( Ja tentei modificar e nao funcionou)

 

local EMPTY_POTION = 7636

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_POISON)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_FIRE)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_FREEZING)


local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions'))

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(not isPlayer(itemEx.uid)) then
		return false
	end

	if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then
		doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
		return true
	end

	if(not doCombat(cid, combat, numberToVariant(itemEx.uid))) then
		return false
	end

	doAddCondition(cid, exhaust)
	doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
	doTransformItem(item.uid, EMPTY_POTION)
	return true
end



Agradeço a ajuda desde ja!

Editado por humberto99 (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
10 horas atrás, Underewar disse:

Me manda o link dessa base ai eu consigo te ajudar, vlw!

Nao tenho como passar caso puder ajudar agradeço

 

 

15 horas atrás, humberto99 disse:

 

 

preciso modificar a potion para curar em battle

preciso modificar o revive para apos reviver o pokemon resetar as skill

 

Preciso modificar o antidoto do servidor para curar todos os status negativos dos pokemons

 

 

 

Script lua do revive ( preciso que apos reviver o pokemon reset as skill)

 


function onUse(cid, item, fromPosition, itemEx, toPosition)
if itemEx.itemid ~= getPlayerSlotItem(cid, 8).itemid then
return doPlayerSendCancel(cid, "You must put your pokeball in the correct place!")
end

if getPlayerStorageValue(cid, 990) >= 1 then
return doPlayerSendTextMessage(cid, 27, "You can\'t use potions in the gym.")
end

if itemEx.itemid == 12422 then -- saffari
   doItemSetAttribute(itemEx.uid, "hp", 1)
   doTransformItem(itemEx.uid, 12420)
   doRemoveItem(item.uid, 1)
   doSendMagicEffect(getCreaturePosition(cid), 13)

elseif itemEx.itemid == 11828 then -- normal
   doItemSetAttribute(itemEx.uid, "hp", 1)
   doTransformItem(itemEx.uid, 11826)
   doRemoveItem(item.uid, 1)
   doSendMagicEffect(getCreaturePosition(cid), 13)

elseif itemEx.itemid == 11831 then -- ultra
   doItemSetAttribute(itemEx.uid, "hp", 1)
   doTransformItem(itemEx.uid, 11829)
   doRemoveItem(item.uid, 1)
   doSendMagicEffect(getCreaturePosition(cid), 13)

elseif itemEx.itemid == 11837 then -- super
   doItemSetAttribute(itemEx.uid, "hp", 1)
   doTransformItem(itemEx.uid, 11835)
   doRemoveItem(item.uid, 1)
   doSendMagicEffect(getCreaturePosition(cid), 13)

elseif itemEx.itemid == 11834 then -- great
   doItemSetAttribute(itemEx.uid, "hp", 1)
   doTransformItem(itemEx.uid, 11832)
   doRemoveItem(item.uid, 1)
   doSendMagicEffect(getCreaturePosition(cid), 13)

end
end




Script Potion (Preciso que cure em batalha)

 



function doHealOverTime(cid, div, turn, effect)
	if not isCreature(cid) then return true end
	if turn <= 0 then return true end
	if getCreatureHealth(cid) == getCreatureMaxHealth(cid) then return true end
	if getCreatureCondition(getCreatureMaster(cid)
, CONDITION_INFIGHT) then
		doSendAnimatedText(getThingPos(cid), "LOST HEAL", 215)
	return true
	end
	local d = div / 10000
	local amount = math.floor(getCreatureMaxHealth(cid) * d)
	doCreatureAddHealth(cid, amount)
		if math.floor(turn/10) == turn/10 then
			doSendMagicEffect(getThingPos(cid), effect)
		end
	addEvent(doHealOverTime, 100, cid, div, turn - 1, effect)
end

local potions = {
[12346] = {effect = 12, div = 20},
[12347] = {effect = 13, div = 40},
[12348] = {effect = 13, div = 60},
[12345] = {effect = 14, div = 80},
[12343] = {effect = 12, div = 100}}

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

if isPlayer(item2.uid) then
return doPlayerSendCancel(cid, "You can only use potions on pokemons!")
end

if getCreatureCondition(cid, CONDITION_INFIGHT) then
doPlayerSendCancel(cid, "Sorry, you can't heal your pokemon during fights!")
return TRUE
end

if not isCreature(item2.uid) then
return doPlayerSendCancel(cid, "You can only use potions on pokemons!")
end

if not isPlayer(getCreatureMaster(item2.uid)) then
return doPlayerSendCancel(cid, "You cant use potions on wild pokemons.")
end

if getCreatureHealth(item2.uid) == getCreatureMaxHealth(item2.uid) then
return doPlayerSendCancel(cid, "This pokemon is already at full health.")
end

doCreatureSay(cid, ""..getPlayerStorageValue(item2.uid, 1007)..", take this potion!", TALKTYPE_SAY)
doSendMagicEffect(getThingPos(item2.uid), 172)
doRemoveItem(item.uid, 1)

local a = potions[item.itemid]

doHealOverTime(item2.uid, a.div, 100, a.effect)

return true
end

 

 

 

 

Script do Antidoto ( Ja tentei modificar e nao funcionou)

 



local EMPTY_POTION = 7636

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_POISON)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_FIRE)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_FREEZING)


local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions'))

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(not isPlayer(itemEx.uid)) then
		return false
	end

	if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then
		doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
		return true
	end

	if(not doCombat(cid, combat, numberToVariant(itemEx.uid))) then
		return false
	end

	doAddCondition(cid, exhaust)
	doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
	doTransformItem(item.uid, EMPTY_POTION)
	return true
end



Agradeço a ajuda desde ja!

o script da potion esta logo acima, preciso que de pra usar em battle

Editado por humberto99 (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo