Ir para conteúdo

gabrielzika

Campones
  • Total de itens

    92
  • Registro em

  • Última visita

  • Dias Ganhos

    6

Posts postados por gabrielzika

  1. @Yan Liima pode passar a call qual programa tu usou pra compilar essa dll? e tbm quais os "linkers" to tentando utliza-lá aqui porem quando tento abrir o client recebe o erro "não foi possivel localizar o ponto de entrada no procedimento DirectDrawCreate.." poderia me ajudar?

  2. @Poke X Ice Se resolveu o seu problema marque como melhor resposta para que ajude outras pessoas que passarem pelo mesmo problema. Sobre a sua pergunta, basta comparar os dois scripts que lhe mandei eu estava digitando erradamente "itemAdd.uid" sendo que só era necessário "itemAdd".

  3. @Poke X Ice

     

    function onUse (cid,item,frompos,item2,topos)
    local config  = {
    level = 5,
    storage = 5951,
    uniqueid = 9000,
    effect = 29,
    items = {
    ["Ultra Ball"] = {item = 2392, quantidade = 50},
    ["Nota Verde"] = {item = 2152, quantidade = 40},
    ["Shiny Box"] = {item = 14838, quantidade = 1},
    ["Hyper Potions"] = {item = 12345, quantidade = 100}
    }
    }
    
    if item.uid == config.uniqueid then
    	if getPlayerLevel(cid) >= config.level then
    		local queststatus = getPlayerStorageValue(cid, config.storage)
    		if queststatus == -1 then
    			for k, v in pairs(config.items) do
    				local itemAdd = doPlayerAddItem(cid, v.item, v.quantidade)
    				doItemSetAttribute(itemAdd, "unique", 1)
    			end
    			doPlayerSendTextMessage(cid, 22, "Parabens, você acaba de pegar seu Kit Inicial.")
    			setPlayerStorageValue(cid, config.storage, 1)
    			doSendMagicEffect(getThingPos(cid), config.effect)
    		else
    			doPlayerSendCancel(cid, "Você ja pegou seu Kit Inicial.")
    		end
    	else
    		doPlayerSendCancel(cid, "Somente Level ".. config.level .."+ conseguem abrir este bau.")	
    	end
    end
    return 1
    end 

    Caso de algum erro de simbolos:

     

    https://hastebin.com/woqakacede.rb

  4. @Poke X Ice tomei a liberdade de fazer algumas alterações nele, veja(não testei):

     

    function onUse (cid,item,frompos,item2,topos)
    local config  = {
    level = 5,
    storage = 5951,
    uniqueid = 9000,
    effect = 29,
    items = {
    ["Ultra Ball"] = {item = 2392, quantidade = 50},
    ["Nota Verde"] = {item = 2152, quantidade = 40},
    ["Shiny Box"] = {item = 14838, quantidade = 1},
    ["Hyper Potions"] = {item = 12345, quantidade = 100}
    }
    }
    
    if item.uid == config.uniqueid then
    	if getPlayerLevel(cid) >= config.level then
    		local queststatus = getPlayerStorageValue(cid, config.storage)
    		if queststatus == -1 then
    			for k, v in pairs(config.items) do
    				local itemAdd = doPlayerAddItem(cid, v.item, v.quantidade)
    				doItemSetAttribute(itemAdd.uid, "unique", 1)
    			end
    			doPlayerSendTextMessage(cid, 22, "Parabens, você acaba de pegar seu Kit Inicial.")
    			setPlayerStorageValue(cid, config.storage, 1)
    			doSendMagicEffect(getThingPos(cid), config.effect)
    		else
    			doPlayerSendCancel(cid, "Você ja pegou seu Kit Inicial.")
    		end
    	else
    		doPlayerSendCancel(cid, "Somente Level ".. config.level .."+ conseguem abrir este bau.")	
    	end
    end
    return 1
    end 

    Caso de algum problema de simbolos:

     

    https://hastebin.com/gaburujiwu.rb

  5. @caique8921 Testa ai:

     

    function onLook(cid, thing, position, lookDistance)
    
    	local str = ""
    
    	if not isCreature(thing.uid) then
    
    		local iname = getItemInfo(thing.itemid)
    
    		if isPokeball(thing.itemid) then
    
    			local owner = getItemAttribute(thing.uid, "firstpoke")
    
    			local pokename = getItemAttribute(thing.uid, "poke")
    			local item = getItemInfo(thing.itemid)
    			str = "You see "..item.article.." "..item.name..".\n"
    			str = str.."It contains "..getArticle(pokename).." "..pokename..""
    
    			local level = getItemAttribute(thing.uid, "level") or 1
    			if level > 0 then
    				str = str.." [level "..level.."].\n"
    			end
    
    			if owner and owner ~= getCreatureName(cid) then
    				str = str.."It belongs to "..owner..".\nIt is a unique item."
    				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
    			return false
    			end
    
    			local boost = getItemAttribute(thing.uid, "boost") or 0
    			local boostshow = ""
    
    			if boost > 0 then
    				str = str.."Boost level: +"..boost..".\n"
    			end
    
    			if getItemAttribute(thing.uid, "nick") then
    				str = str.."It's nickname is: "..getItemAttribute(thing.uid, "nick")..".\n"
    			end
    		
    			if getItemAttribute(thing.uid, "gender") == SEX_MALE then
    				str = str.."It is male."
    			elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then
    				str = str.."It is female."
    			else
    				str = str.."It is genderless."
    			end
    	
    			str = str.."\n--- Status ---"
    			str = str.."\nOffense: "..math.floor(getItemAttribute(thing.uid, "offense")).." Defense: "..math.floor(getItemAttribute(thing.uid, "defense")).."\n"
    			str = str.."Agility: "..math.floor(getItemAttribute(thing.uid, "speed")).." Sp. Attack: "..math.floor(getItemAttribute(thing.uid, "specialattack")).."\n"
    			str = str.."Vitality: "..math.floor(getItemAttribute(thing.uid, "vitality"))..""	
    
    		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
    
    		return false
    
    		elseif string.find(iname.name, "fainted") or string.find(iname.name, "defeated") then
    
    			str = "You see a "..string.lower(iname.name).." ["..getItemAttribute(thing.uid, "level").."].\n"
    
    			if getItemAttribute(thing.uid, "gender") == SEX_MALE then
    				str = str.."It is male."
    			elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then
    				str = str.."It is female."
    			else
    				str = str.."It is genderless."
    			end
    			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
    
    		return false
    
    		else
    
    		return true
    
    		end
    	end
    
    	local npcname = getCreatureName(thing.uid)
    	local l = string.len(npcname)
    		if not isPlayer(thing.uid) and not isMonster(thing.uid) then
    			--string.sub(npcname, l - 1, l) == "  " then
    			local article = getPlayerStorageValue(thing.uid, 9891) == 1 and "He is" or "She is"
    			local nname = string.sub(npcname, 1, l - 2)
    			if nname == getCreatureName(cid) then
    				nname = "yourself"
    				article = "You are"
    			end
    			str = "You see "..nname..". "..article.." a pokemon trainer."
    			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
    		return false
    		end
    
    	if not isMonster(thing.uid) then
    	return true
    	end
    
    	if getCreatureName(thing.uid) == "Evolution" then return false end
    
    	if not isSummon(thing.uid) then
    		local str = "You see a wild "..string.lower(getCreatureName(thing.uid)).." [level "..getPokemonLevel(thing.uid).."].\n"
    		if getPokemonGender(thing.uid)  == SEX_MALE then
    			str = str.."It is male."
    		elseif getPokemonGender(thing.uid)  == SEX_FEMALE then
    			str = str.."It is female."
    		else
    			str = str.."It is genderless."
    		end
    		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
    	return false
    	elseif isSummon(thing.uid) and not isPlayer(thing.uid) then
    
    		local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0
    		local boostshow = " + "..boostlevel.."]"
    
    		if showBoostSeparated then
    			boostshow = "] [+"..boostlevel.."]"
    		end
    
    		local levelinfo = "["..getPokemonLevel(thing.uid)..""..boostshow..""
    
    		if getCreatureMaster(thing.uid) == cid then
    			local myball = getPlayerSlotItem(cid, 8).uid
    			local nexp = getItemAttribute(myball, "nextlevelexp")
    
    			local string = "You see your "..string.lower(getCreatureName(thing.uid)).." "..levelinfo.."."
    			string = string.."\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid).."."
    			string = string.."\n"..getPokemonHappinessDescription(thing.uid)
    				if getItemAttribute(myball, "level") <= 100 then
    					string = string.."\nExperience needed to level up: "..nexp.."."
    				end
    			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string)
    		else
    			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..string.lower(getCreatureName(thing.uid)).." "..levelinfo..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid))..".")
    		end
    
    
    	return false
    	end
    
    return true
    end

     

  6. @theodorogobi

     

    local config = {
    storage = 41651651, -- storage necessária para o script funcionar, aquele do npc.
    outfit_normal = {510, 511}, -- Male, Female
    outfit_mergulhador = {1034, 1035}, -- Male, Female
    speed = {320, 300, 100}, -- Normal, Player, Loss
    random = = math.random(1, 150), -- para randomizar a cor dos outfits.
    }
    
    function onStepIn(cid)
    
    	if isRiderOrFlyOrSurf(cid) then
    		doChangeSpeed(cid, getCreatureSpeed(cid)-config.speed[3])
    	end
    
    	if isPlayer(cid) and getPlayerStorageValue(cid, config.storage) >= 1 then
    		if getPlayerSex(cid) == 1 then
    			doSetCreatureOutfit(cid, {lookType = config.outfit_mergulhador[1], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1)
    		elseif getPlayerSex(cid) == 0 then
    			doSetCreatureOutfit(cid, {lookType = config.outfit_mergulhador[2], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1)
    		return true
    		end
    		if getCreatureOutfit(cid).lookType == config.outfit_mergulhador[1] or getCreatureOutfit(cid).lookType == config.outfit_mergulhador[2] then
    			doChangeSpeed(cid, getCreatureSpeed(cid)+config.speed[2])
    		else
    			doChangeSpeed(cid, getCreatureSpeed(cid)-config.speed[3])
    		end
    	end
     return true
     end
     
     function onStepOut(cid)
     
    	if isPlayer(cid) and getPlayerStorageValue(cid, config.storage) >= 1 then
    		if getPlayerSex(cid) == 1 then
    			doSetCreatureOutfit(cid, {lookType = config.outfit_normal[1], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1)
    			doChangeSpeed(cid, config.speed[1])
    		elseif getPlayerSex(cid) == 0 then
    			doSetCreatureOutfit(cid, {lookType = config.outfit_normal[2], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1)
    			doChangeSpeed(cid, config.speed[1])
    		return true
    		end
    	end
     return true
     end

     

  7. @theodorogobi

     

    local config = {
    storage = 41651651, -- storage necessária para o script funcionar, aquele do npc.
    outfit_normal = {510, 511}, -- Male, Female
    outfit_mergulhador = {1034, 1035}, -- Male, Female
    speed = {320, 300, 350, 100}, -- Normal, Player, Pokémon, Loss
    random = = math.random(1, 150), -- para randomizar a cor dos outfits.
    }
    
    function onStepIn(cid)
    
    	if isRiderOrFlyOrSurf(cid) then
    		doChangeSpeed(cid, getCreatureSpeed(cid)-config.speed[4])
    	end
    
    	if isPlayer(cid) and getPlayerStorageValue(cid, config.storage) >= 1 then
    		if getPlayerSex(cid) == 1 then
    			doSetCreatureOutfit(cid, {lookType = config.outfit_mergulhador[1], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1)
    		elseif getPlayerSex(cid) == 0 then
    			doSetCreatureOutfit(cid, {lookType = config.outfit_mergulhador[2], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1)
    		return true
    		end
    		if getCreatureOutfit(cid).lookType == config.outfit_mergulhador[1] or getCreatureOutfit(cid).lookType == config.outfit_mergulhador[2] then
    			doChangeSpeed(cid, getCreatureSpeed(cid)+config.speed[2])
    		else
    			doChangeSpeed(cid, getCreatureSpeed(cid)-config.speed[4])
    		end
    	end
    
    	if isWild(cid) or isSummon(cid) then
    		poketype1 = pokes[getCreatureName(cid)].type
    		poketype2 = pokes[getCreatureName(cid)].type2
    		velocidade = pokes[getCreatureName(cid)].agility
    
    		if poketype1 == "water" or poketype2 == "water" or poketype1 == "ice" or poketype2 == "ice" then -- coloque aqui os tipos de pokémon que ganham velocidade na agua
    			doChangeSpeed(cid, velocidade+config.speed[3])
    		else
    			doChangeSpeed(cid, velocidade-config.speed[4])
    		end
    	end
     return true
     end
     
     function onStepOut(cid)
     
    	if isPlayer(cid) and getPlayerStorageValue(cid, config.storage) >= 1 then
    		if getPlayerSex(cid) == 1 then
    			doSetCreatureOutfit(cid, {lookType = config.outfit_normal[1], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1)
    			doChangeSpeed(cid, config.speed[1])
    		elseif getPlayerSex(cid) == 0 then
    			doSetCreatureOutfit(cid, {lookType = config.outfit_normal[2], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1)
    			doChangeSpeed(cid, config.speed[1])
    		return true
    		end
    	end
    
    	if isWild(cid)or isSummon(cid) then
    		poketype1 = pokes[getCreatureName(cid)].type
    		poketype2 = pokes[getCreatureName(cid)].type2
    		velocidade = pokes[getCreatureName(cid)].agility
    
    		if poketype1 == "water" or poketype2 == "water" or poketype1 == "ice" or poketype2 == "ice" then -- coloque aqui os tipos de pokémon que ganham velocidade na agua
    			doChangeSpeed(cid, velocidade-config.speed[3])
    		else
    			doChangeSpeed(cid, velocidade+config.speed[4])
    		end
    	end
     return true
     end

     

  8. @theodorogobi

     

    local keywordHandler = KeywordHandler:new()
    local npcHandler = NpcHandler:new(keywordHandler)NpcSystem.parseParameters(npcHandler)
    local talkState = {}
    
    function doBuyPokemonWithCasinoCoins(cid, poke) npcHandler:onSellpokemon(cid) end
    function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
    function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
    function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
    function onThink() npcHandler:onThink() end
    
    local config = {
    items = {17631, 1, 17632, 1, 17633, 1}, -- item 1, quantidade, item 2, quantidade, item 3, quantidade
    storages = {646181, 41651651}, -- não fazer duas vezes, outfit
    }
    
    function creatureSayCallback(cid, type, msg)
    
    	if(not npcHandler:isFocused(cid)) then
    	return false
    	end
    
    	if msgcontains(msg, 'mission') or msgcontains(msg, 'missao') or msgcontains(msg, 'help') then
    		if getPlayerStorageValue(cid, config.storages[1]) >= 1 then
    			selfSay("Você já fez essa quest!", cid)
    		else
    			selfSay("Você gostaria de ganhar um outfit de mergulho? Para isso preciso de 1 air tank, um diving mask e 1 fin.", cid)
    			talkState[cid] = 1
    		return true
    		end
    	elseif msgcontains(msg, 'yes') or msgcontains(msg, 'Yes') and talkState[cid] == 1 then
    		if getPlayerStorageValue(cid, config.storages[1]) >= 1 then
    			selfSay("Você já fez essa quest!", cid)
    		return true
    		end
    		if doPlayerRemoveItem(cid, config.items[1], config.items[2]) and doPlayerRemoveItem(cid, config.items[3], config.items[4]) and doPlayerRemoveItem(cid, config.items[5], config.items[6]) then
    			selfSay("Parabens, agora você pode usar o outfit do mergulho para se mover mais rapido embaixo da agua!", cid)
    			setPlayerStorageValue(cid, config.storages[1], 1)
    			setPlayerStorageValue(cid, config.storages[2], 1)
    			talkState[cid] = 0
    			return true
    		else
    			selfSay("Você não tem os itens necessários!", cid)
    			talkState[cid] = 0
    			return true
    			end
    		end
      return true
      end
      npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
      npcHandler:addModule(FocusModule:new())

     

  9. @theodorogobi 

     

    local config = {
    storage = 41651651, -- storage necessária para o script funcionar, aquele do npc.
    outfit_normal = {510, 511}, -- Male, Female
    outfit_mergulhador = {1034, 1035}, -- Male, Female
    speed = {320, 300, 350, 100}, -- Normal, Player, Pokémon, Loss
    random = = math.random(1, 150), -- para randomizar a cor dos outfits.
    }
    
    function onStepIn(cid)
    
    	if isRiderOrFlyOrSurf(cid) then
    		doChangeSpeed(cid, getCreatureSpeed(cid)-config.speed[4])
    	end
    
    	if(isPlayer(cid)) then
    		if getPlayerSex(cid) == 1 then
    			doSetCreatureOutfit(cid, {lookType = config.outfit_mergulhador[1], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1)
    		elseif getPlayerSex(cid) == 0 then
    			doSetCreatureOutfit(cid, {lookType = config.outfit_mergulhador[2], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1)
    		return true
    		end
    		if getCreatureOutfit(cid).lookType == config.outfit_mergulhador[1] or getCreatureOutfit(cid).lookType == config.outfit_mergulhador[2] then
    			doChangeSpeed(cid, getCreatureSpeed(cid)+config.speed[2])
    		else
    			doChangeSpeed(cid, getCreatureSpeed(cid)-config.speed[4])
    		end
    	end
    
    	if isWild(cid) or isSummon(cid) then
    		poketype1 = pokes[getCreatureName(cid)].type
    		poketype2 = pokes[getCreatureName(cid)].type2
    		velocidade = pokes[getCreatureName(cid)].agility
    
    		if poketype1 == "water" or poketype2 == "water" or poketype1 == "ice" or poketype2 == "ice" then -- coloque aqui os tipos de pokémon que ganham velocidade na agua
    			doChangeSpeed(cid, velocidade+config.speed[3])
    		else
    			doChangeSpeed(cid, velocidade-config.speed[4])
    		end
    	end
     return true
     end
     
     function onStepOut(cid)
     
    	if(isPlayer(cid)) then
    		if getPlayerSex(cid) == 1 then
    			doSetCreatureOutfit(cid, {lookType = config.outfit_normal[1], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1)
    			doChangeSpeed(cid, config.speed[1])
    		elseif getPlayerSex(cid) == 0 then
    			doSetCreatureOutfit(cid, {lookType = config.outfit_normal[2], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1)
    			doChangeSpeed(cid, config.speed[1])
    		return true
    		end
    	end
    
    	if isWild(cid)or isSummon(cid) then
    		poketype1 = pokes[getCreatureName(cid)].type
    		poketype2 = pokes[getCreatureName(cid)].type2
    		velocidade = pokes[getCreatureName(cid)].agility
    
    		if poketype1 == "water" or poketype2 == "water" or poketype1 == "ice" or poketype2 == "ice" then -- coloque aqui os tipos de pokémon que ganham velocidade na agua
    			doChangeSpeed(cid, velocidade-config.speed[3])
    		else
    			doChangeSpeed(cid, velocidade+config.speed[4])
    		end
    	end
     return true
     end

     

  10. @Fawkzz12 isso ocorre pq você relogou de fly em um pokémon que não está configurado direito em:

    data/lib/configuration.lua

    ou então relogou com a storage de fly sem estar usando um poke de fly.

     

    experimenta fazer isso: 

    -- doSetCreatureOutfit(cid, {lookType = flys[poke][1].lookType + 351}, -1)

    comente a linha 138 desse mesmo jeito que fiz e tenta logar e veras o problema. 

  11. @mister17 havia entendido outra coisa:

     

    -- Elemental Orb System --
    -- Developed by Rigby --
    -- Edited by JS Lotus --
     
    local config = {
    --- [ID DA ORB] = {ID DAS STONES, QUANTIDADE{minimo, maximo},
    	[10542] = {fruit = 11441, quantity = {0, 1}, CommomM = {2132, 175}},
    	[10543] = {fruit = 11442, quantity = {0, 1}, CommomM = {2132, 175}},
    	[10544] = {fruit = 11443, quantity = {0, 1}, CommomM = {2132, 175}},
    }
    
    local tempo = 600 -- tempo em segundos
    local tempoVip = 300
    local stoTempo = 8120
     
    function onUse(cid, item, fromPosition, itemEx, toPosition)
        if getPlayerStorageValue(cid, stoTempo) >= os.time() then
            doPlayerSendTextMessage(cid, 27, "You have to wait "..(getPlayerStorageValue(cid, stoTempo) - os.time()).." seconds to use this item again.")
            return false
        end
        if getPlayerItemCount(cid, config[item.itemid].CommomM[1]) < config[item.itemid].CommomM[2] then
            doPlayerSendTextMessage(cid, 27, "Você nao possui os materiais necessários!")
            return false
        end
    	if config[item.itemid] then
    		local randomWin = math.random(config[item.itemid].quantity[1],config[item.itemid].quantity[2])
    		
    		if randomWin > 0 then
    			doPlayerAddItem(cid, config[item.itemid].fruit, randomWin)
    			doPlayerSendTextMessage(cid, 27, "Parabéns! O processo de transformaçao foi realizado com sucesso, assim se transformando em "..getItemNameById(config[item.itemid].fruit)..".")
    		else
    			doPlayerSendTextMessage(cid, 27, "A orb quebrou durante o processo!")
    		end
    		doRemoveItem(item.uid, 1)
    		doPlayerRemoveItem(cid, config[item.itemid].CommomM[1], config[item.itemid].CommomM[2])
    		if isPremium(cid) then
    			setPlayerStorageValue(cid, stoTempo, os.time() + tempoVip)
    		else
    			setPlayerStorageValue(cid, stoTempo, os.time() + tempo)
    		end
    	end
    return true
    end

     

  12. @mister17 Veja se é isso:

     

    -- Elemental Orb System --
    -- Developed by Rigby --
    -- Edited by JS Lotus --
     
    local config = {
    --- [ID DA ORB] = {ID DAS STONES, QUANTIDADE{minimo, maximo},
    	[10542] = {fruit = {11441, 11442, 11443, 11444}, quantity = {0, 1}, CommomM = {2132, 175}},
    }
    
    local tempo = 600 -- tempo em segundos
    local tempoVip = 300
    local stoTempo = 8120
     
    function onUse(cid, item, fromPosition, itemEx, toPosition)
        if getPlayerStorageValue(cid, stoTempo) >= os.time() then
            doPlayerSendTextMessage(cid, 27, "You have to wait "..(getPlayerStorageValue(cid, stoTempo) - os.time()).." seconds to use this item again.")
            return false
        end
        if getPlayerItemCount(cid, config[item.itemid].CommomM[1]) < config[item.itemid].CommomM[2] then
            doPlayerSendTextMessage(cid, 27, "Você nao possui os materiais necessários!")
            return false
        end
    	if config[item.itemid] then
    		local randomWin = math.random(config[item.itemid].quantity[1],config[item.itemid].quantity[2])
    		local randomStone = math.random (1, #config[item.itemid].fruit)
    		
    		if randomWin > 0 then
    			doPlayerAddItem(cid, config[item.itemid].fruit[randomStone], randomWin)
    			doPlayerSendTextMessage(cid, 27, "Parabéns! O processo de transformaçao foi realizado com sucesso, assim se transformando em "..getItemNameById(config[item.itemid].fruit[randomStone])..".")
    		else
    			doPlayerSendTextMessage(cid, 27, "A orb quebrou durante o processo!")
    		end
    		doRemoveItem(item.uid, 1)
    		doPlayerRemoveItem(cid, config[item.itemid].CommomM[1], config[item.itemid].CommomM[2])
    		if isPremium(cid) then
    			setPlayerStorageValue(cid, stoTempo, os.time() + tempoVip)
    		else
    			setPlayerStorageValue(cid, stoTempo, os.time() + tempo)
    		end
    	end
    return true
    end

     

  13. @angel joel

     

    local position = {x = 1608, y = 1628, z = 7}
    local templepos = {x = 155, y = 52, z = 7}
    local tempo = 180 * 60
    
    function onUse(cid)
    
        doTeleportThing(cid, position)
        doCreatureSetStorage(cid, 5834, 1)
        addEvent(    function()
    				doTeleportThing(cid, templepos)
    				doPlayerSendTextMessage(cid, 22, "Seu tempo acabou, e foi transportado de volta ao templo!")
    				doCreatureSetStorage(cid, 5834, -1)
    				doRemoveItem(item.uid, 1)
                    end, 1000 * tempo) 
        return true
    end

     

     

  • Quem Está Navegando   0 membros estão online

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