Ir para conteúdo

Chegando storage


damiaotorres

Posts Recomendados

Os player que não tem essa storage pode usar esse item, tem como ajudar?

 

 

 
local config = {
[43] = {item = {8911, 1}, chance = 0, fishing = 50, quest = {enable = false, storage = nil}}, -- northwind rod 0,005%
[44] = {item = {2185, 1}, chance = 0, fishing = 50, quest = {enable = false, storage = nil}}, -- Fish Fin 0,05%
[45] = {item = {8850, 1}, chance = 0, fishing = 60, quest = {enable = false, storage = nil}}, -- chain bolter 0,01%
[46] = {item = {2644, 1}, chance = 0, fishing = 60, quest = {enable = false, storage = nil}}, -- bunny slippers 0,0015%
[47] = {item = {2196, 1}, chance = 0, fishing = 60, quest = {enable = false, storage = nil}}, -- broken amulet 0,0005%
[48] = {item = {2508, 1}, chance = 0, fishing = 60, quest = {enable = false, storage = nil}}, -- native armor 0,0005%
[49] = {item = {8853, 1}, chance = 0, fishing = 60, quest = {enable = false, storage = nil}}, -- ironworker 0,0065%
[50] = {item = {2669, 1}, chance = 0, fishing = 70, quest = {enable = false, storage = nil}}, -- Northern Pikes 10%
[51] = {item = {2183, 1}, chance = 0, fishing = 70, quest = {enable = false, storage = nil}}, -- hailstorm rod 0,0015%
[52] = {item = {8912, 1}, chance = 0, fishing = 70, quest = {enable = false, storage = nil}}, -- springsprout rod 0,0015%
[53] = {item = {8856, 1}, chance = 0, fishing = 70, quest = {enable = false, storage = nil}}, -- yol's bow 0,005%
[54] = {item = {7963, 1}, chance = 0, fishing = 80, quest = {enable = false, storage = nil}}, -- # FISH SHARK FISH 10%
[55] = {item = {8858, 1}, chance = 0, fishing = 80, quest = {enable = false, storage = nil}}, -- elethriel's elemental bow 0,001%
[56] = {item = {8888, 1}, chance = 0, fishing = 90, quest = {enable = false, storage = nil}}, -- master archer's armor 0,0001%
[57] = {item = {2130, 1}, chance = 0, fishing = 100, quest = {enable = false, storage = nil}}, -- golden amulet 0,0001%
[58] = {item = {2646, 1}, chance = 0, fishing = 100, quest = {enable = false, storage = nil}}, -- golden boots 0,0001%
 
[59] = {item = {ITEM_WORM, 1}, chance = 92392, fishing = 0, quest = {enable = false, storage = nil}}
}
local max = 0
for _, i in pairs(config) do
        max = max + i.chance
end
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
        local playerFishing = getPlayerSkill(cid, SKILL_FISHING)
        local random = math.random(max)
        local now = nil
        for i = 1, #config do
                random = random - config[i].chance
                if random <= 1 then
                        now = config[i]
                        break
                end
        end
 
if getPlayerLevel(cid) <= 125 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você não tem nível 125+ para ter acesso a pesca!")
return true
end
 
        if itemEx.itemid >= 8632 and itemEx.itemid <= 8632 or itemEx.itemid == 8632 then
if getPlayerStorageValue(cid,8749) == 1 then
                if math.random(1, 0.7 + playerFishing / 0.8) <= playerFishing and now then
                        if playerFishing >= now.fishing then
                                if now.quest.enable then
                                                doPlayerAddItem(cid, now.item[1], now.item[2])
                                                doPlayerAddSkillTry(cid, SKILL_FISHING, 1)
                                                doSendMagicEffect(fromPosition, 12)
                                                doSendAnimatedText(getPlayerPosition(cid), "OLD ROD!", TEXTCOLOR_LIGHTBLUE)
                                        else
                                                doPlayerAddItem(cid, 2152, 0)
                                                doPlayerAddSkillTry(cid, SKILL_FISHING, 1)
                                                doSendMagicEffect(fromPosition, 12)
                                                doSendAnimatedText(getPlayerPosition(cid), "OLD ROD!", TEXTCOLOR_LIGHTBLUE)
                                        end
                                else
                                        doPlayerAddItem(cid, now.item[1], now.item[2])
                                        doPlayerAddSkillTry(cid, SKILL_FISHING, 1)
                                        doSendMagicEffect(fromPosition, 12)
                                        doSendAnimatedText(getPlayerPosition(cid), "OLD ROD!", TEXTCOLOR_LIGHTBLUE)
                                end
                        else
                                doPlayerAddItem(cid, 2152, 1)
                                doPlayerAddSkillTry(cid, SKILL_FISHING, 1)
                                doSendMagicEffect(fromPosition, 12)
                                doSendAnimatedText(getPlayerPosition(cid), "OLD ROD!", TEXTCOLOR_LIGHTBLUE)
                        end
                end
                doSendMagicEffect(toPosition, 53)
                doPlayerRemoveItem(cid, ITEM_WORM, 1)
        return TRUE
        end
return FALSE
end
Link para o comentário
Compartilhar em outros sites

isso é um item de Quest que só quem fez pode usar,mais no ot até quem não fez usa.entendeu? tipo não verifica se o player tem a storage.

 

 

 

Tem como edita o titulo pra "Checando storage"? errei na escrita

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

  • 1 month later...

isso é um item de Quest que só quem fez pode usar,mais no ot até quem não fez usa.entendeu? tipo não verifica se o player tem a storage.

 

 

 

Tem como edita o titulo pra "Checando storage"? errei na escrita

Tenta assim (lembrando que você precisa deixar enabled true e configurar as storages, todas estão como "nil"):

 

 

local config = {
	[43] = {item = {8911, 1}, chance = 0, fishing = 50, quest = {enable = false, storage = nil}}, -- northwind rod 0,005%
	[44] = {item = {2185, 1}, chance = 0, fishing = 50, quest = {enable = false, storage = nil}}, -- Fish Fin 0,05%
	[45] = {item = {8850, 1}, chance = 0, fishing = 60, quest = {enable = false, storage = nil}}, -- chain bolter 0,01%
	[46] = {item = {2644, 1}, chance = 0, fishing = 60, quest = {enable = false, storage = nil}}, -- bunny slippers 0,0015%
	[47] = {item = {2196, 1}, chance = 0, fishing = 60, quest = {enable = false, storage = nil}}, -- broken amulet 0,0005%
	[48] = {item = {2508, 1}, chance = 0, fishing = 60, quest = {enable = false, storage = nil}}, -- native armor 0,0005%
	[49] = {item = {8853, 1}, chance = 0, fishing = 60, quest = {enable = false, storage = nil}}, -- ironworker 0,0065%
	[50] = {item = {2669, 1}, chance = 0, fishing = 70, quest = {enable = false, storage = nil}}, -- Northern Pikes 10%
	[51] = {item = {2183, 1}, chance = 0, fishing = 70, quest = {enable = false, storage = nil}}, -- hailstorm rod 0,0015%
	[52] = {item = {8912, 1}, chance = 0, fishing = 70, quest = {enable = false, storage = nil}}, -- springsprout rod 0,0015%
	[53] = {item = {8856, 1}, chance = 0, fishing = 70, quest = {enable = false, storage = nil}}, -- yol's bow 0,005%
	[54] = {item = {7963, 1}, chance = 0, fishing = 80, quest = {enable = false, storage = nil}}, -- # FISH SHARK FISH 10%
	[55] = {item = {8858, 1}, chance = 0, fishing = 80, quest = {enable = false, storage = nil}}, -- elethriel's elemental bow 0,001%
	[56] = {item = {8888, 1}, chance = 0, fishing = 90, quest = {enable = false, storage = nil}}, -- master archer's armor 0,0001%
	[57] = {item = {2130, 1}, chance = 0, fishing = 100, quest = {enable = false, storage = nil}}, -- golden amulet 0,0001%
	[58] = {item = {2646, 1}, chance = 0, fishing = 100, quest = {enable = false, storage = nil}}, -- golden boots 0,0001%
	[59] = {item = {ITEM_WORM, 1}, chance = 92392, fishing = 0, quest = {enable = false, storage = nil}}
}
local max = 0
for _, i in pairs(config) do
        max = max + i.chance
end
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local playerFishing = getPlayerSkill(cid, SKILL_FISHING)
	local random = math.random(max)
	local now = nil
	for i = 1, #config do
		random = random - config[i].chance
		if random <= 1 then
			now = config[i]
			break
		end
	end
 
	if getPlayerLevel(cid) <= 125 then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você não tem nível 125+ para ter acesso a pesca!")
		return true
	end
 
	if itemEx.itemid >= 8632 and itemEx.itemid <= 8632 or itemEx.itemid == 8632 then
		if getPlayerStorageValue(cid, 8749) == 1 then
			if math.random(1, 0.7 + playerFishing / 0.8) <= playerFishing and now then
				if playerFishing >= now.fishing then
					if now.quest.enable and getPlayerStorageValue(cid, now.quest.storage) > 0 then
						doPlayerAddItem(cid, now.item[1], now.item[2])
						doPlayerAddSkillTry(cid, SKILL_FISHING, 1)
						doSendMagicEffect(fromPosition, 12)
						doSendAnimatedText(getPlayerPosition(cid), "OLD ROD!", TEXTCOLOR_LIGHTBLUE)
					else
						doPlayerAddItem(cid, 2152, 1)
						doPlayerAddSkillTry(cid, SKILL_FISHING, 1)
						doSendMagicEffect(fromPosition, 12)
						doSendAnimatedText(getPlayerPosition(cid), "OLD ROD!", TEXTCOLOR_LIGHTBLUE)
					end
				end
			else
				doPlayerAddItem(cid, 2152, 1)
				doPlayerAddSkillTry(cid, SKILL_FISHING, 1)
				doSendMagicEffect(fromPosition, 12)
				doSendAnimatedText(getPlayerPosition(cid), "OLD ROD!", TEXTCOLOR_LIGHTBLUE)
			end
		end
		doSendMagicEffect(toPosition, 53)
		doPlayerRemoveItem(cid, ITEM_WORM, 1)
		return true
	end
	return false
end

 

Link para o comentário
Compartilhar em outros sites

  • 3 weeks later...

O tópico foi fechado e movido para lixeira por estar inativo a mais de 10 dias. Caso seja preciso reabrir o mesmo, favor entrar em contato com a equipe.

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...