Jump to content

adgoke1992

Miembro
  • Contador contenido

    1
  • Ingreso

  • Última visita

  • Días ganados

    2

Mensajes publicados por adgoke1992

  1. Hola, 

     

    Ya que el equipo de Panamera hemos hecho un nuevo sistema para cambiar bonus de las armas (

    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
    ), voy a compartir nuestro antiguo sistema de dop. Es posible que haya alguno parecido posteado por aquí, pero igualmente comparto el nuestro.

     

    Esta quest te da al azar hasta 10 paquetes de 10 objetos encantados con un captcha por cada vez que quieras objetos encantados. No te dejará tener nunca más de 100 objetos encantados en el inventario. (Recomiendo poner que los objetos encantados no puedan comerciarse ni ponerse en almacén)

    -----------------------------------
    --	v1.0.1
    --	Last edit: 21/04/13
    -----------------------------------
    quest dopitem begin
    	state start begin
    		when 9003.chat."Abrir Tienda General" begin
    			setskin(NOWINDOW)
    			npc.open_shop(3)
    		end
    		when 9003.chat."Cambiar los bonos a mis objetos" begin
    			if not pc.enough_inventory(81000) then
    				say_mob_name()
    				say("¡Tu inventario está lleno!")
    				return
    			end
    			local IDS = {81000,81001,81002,81003,81004,81005,81006,81007,81008,81009,81010,81011,81012,81013,81014,81015,81016,81017,81018,81019}
    			local tablen = table.getn(IDS)
    			say_mob_name()
    			say("¿Cuantos Objetos Encantados quieres?")
    			local quant = {5, 10, 20, 50, 100, "Cancelar"}
    			s = select_table(quant)
    			if s >= table.getn(quant) or s < 1 then return end
    			local cur_quant = quant[s]
    			local cur_cost, to_inp = cur_quant*4000, math.random(100,999)
    			say_mob_name()
    			say("Bien, te venderé "..cur_quant.." Objetos Encantados.")
    			say_reward("Esto te costará "..cur_cost.." Yang.")
    			say("Aunque antes debes introducir el siguiente código.")
    			say("¡No me gusta hablar con robots!")
    			say_reward(to_inp)
    			s = tonumber(input())
    			local pks, num = dopitem.calculate(cur_quant,10)
    			if s != to_inp then
    				say_mob_name()
    				say("Has introducido un código incorrecto.")
    			elseif (pc.get_empty_inventory_count() - pks) < 1 then
    				say_mob_name()
    				say("¡No tienes suficiente espacio!")
    			elseif (pc.get_gold() - cur_cost) < 0 then
    				say_mob_name()
    				say("¡No tienes suficiente Yang!")
    			elseif (dopitem.count_item(IDS) + num) > 100 then
    				say_mob_name()
    				say("¡No puedes llevar encima tantos Objetos Encantados!")
    				say_reward("Puedes llevar un máximo de 100 unidades.")
    			else
    				pc.change_gold(-cur_cost)
    				if num < 10 then
    					local block = dopitem.get_block(IDS)
    					local ran
    					local cur_id
    					repeat
    						ran = math.random(1, tablen)
    						cur_id = IDS[ran]
    						if not table_is_in(block, cur_id) then break end
    					until false
    					pc.give_item2(cur_id,num)
    				else
    					local block = dopitem.get_block(IDS)
    					local ran
    					local cur_id
    					for i = 1, pks do
    						repeat
    							ran = math.random(1, tablen)
    							cur_id = IDS[ran]
    							if not table_is_in(block, cur_id) then
    								table.insert(block, cur_id)
    								break
    							end
    						until false
    						pc.give_item2(cur_id,10)
    					end
    				end
    			end
    		end
    		when 71084.use begin
    			item.remove()
    			pc.change_gold(25000)
    		end
    		
    		function calculate(quant,max)
    			if quant < max then return 1, quant end
    			local num = quant/max
    			return num, quant
    		end
    		function get_block(tab)
    			local block = {}
    			for i = 1, table.getn(tab) do
    				if pc.count_item(tab[i]) > 0 then
    					table.insert(block, tab[i])
    				end
    			end
    			return block
    		end
    		function count_item(tab)
    			local num = 0
    			for i = 1, table.getn(tab) do
    				num = num + pc.count_item(tab[i])
    			end
    			return num
    		end
    
    	end -- close state
    end -- close quest
    
    
×
×
  • Crear nuevo...