yandrack Posted August 8, 2013 Report Share Posted August 8, 2013 Buenas necesito un quest que haga lo siguiente: Cuando hablras con un npc, puedas elegir entre vender o no vender los libros de habilidad, a cambio de yang, cada libro que venda por ejemplo dara 1000 de yang.Y tendria que ser con todo los libros de habilidad. Apoder ser cuando hables con el npc puedas elegir los libros a vender y la cantidad... es un poco complicado esta quest, aver si alguien se anima y puede. Gracias. Link to comment Share on other sites More sharing options...
KeKo Posted August 8, 2013 Report Share Posted August 8, 2013 Me da mucha pereza hacerla entera, le pones el libro encima al npc te quita 1 (ya que los libros no son apilables) y te da el dinero correspondiente a ese libro aver si te sirve (no la testee). quest vender beginstate start beginwhen idnpc.take beginlocal libros = {[id] = {precio},[id] = {precio},[etc] = {etc}}pc.remove_item(libros[item.get_vnum()],1)pc.change_gold(libros[item.get_vnum()][1])endendend Link to comment Share on other sites More sharing options...
yandrack Posted August 8, 2013 Author Report Share Posted August 8, 2013 Me da mucha pereza hacerla entera, le pones el libro encima al npc te quita 1 (ya que los libros no son apilables) y te da el dinero correspondiente a ese libro aver si te sirve (no la testee). quest vender beginstate start beginwhen idnpc.take beginlocal libros = {[id] = {precio},[id] = {precio},[etc] = {etc}}pc.remove_item(libros[item.get_vnum()],1)pc.change_gold(libros[item.get_vnum()][1])endendend Mas tarde lo pruebo y te digo si funciona bien o no Link to comment Share on other sites More sharing options...
yandrack Posted August 8, 2013 Author Report Share Posted August 8, 2013 hay un problema... no quita el libro del inventario xD y con 1 libro puedes seguir vendiendo hasta que te salga de las narices xDD jajjaa Link to comment Share on other sites More sharing options...
KeKo Posted August 8, 2013 Report Share Posted August 8, 2013 hay un problema... no quita el libro del inventario xD y con 1 libro puedes seguir vendiendo hasta que te salga de las narices xDD jajjaa Pega aqui como dejaste la quest Link to comment Share on other sites More sharing options...
yandrack Posted August 8, 2013 Author Report Share Posted August 8, 2013 quest vender begin state start begin when 9001.take begin local libros = { [50476 ] = {500000}, [50477] = {500000}, [50478] = {1000000} } pc.remove_item(libros[item.get_vnum()],1) pc.change_gold(libros[item.get_vnum()][1]) end end end Link to comment Share on other sites More sharing options...
Tiico™ Posted August 8, 2013 Report Share Posted August 8, 2013 Aquí te la dejo , te la tenia ayer como me la pediste , pero no eh estado quest libros_habi begin state start begin when 29000.chat."Vender Tus Libros" begin say_title("Hola "..pc.get_name().." ") say("Para vender tu libro, solo tira hacia") say("mi el libro de habilidad. Suerte") end when 29000.take begin local libros = { [50401] = {1000000}, [50402] = {1000000}, [50403] = {1000000}, [50404] = {1000000}, [50405] = {1000000}, [50416] = {1000000}, [50417] = {1000000}, [50418] = {1000000}, [50419] = {1000000}, [50420] = {1000000}, [50461] = {1000000}, [50462] = {1000000}, [50463] = {1000000}, [50464] = {1000000}, [50465] = {1000000}, [50466] = {1000000}, [50476] = {1000000}, [50477] = {1000000}, [50478] = {1000000}, [50479] = {1000000}, [50480] = {1000000}, [50481] = {1000000}, [50431] = {1000000}, [50432] = {1000000}, [50433] = {1000000}, [50434] = {1000000}, [50435] = {1000000}, [50446] = {1000000}, [50447] = {1000000}, [50448] = {1000000}, [50449] = {1000000}, [50450] = {1000000}, [50491] = {1000000}, [50492] = {1000000}, [50493] = {1000000}, [50494] = {1000000}, [50495] = {1000000}, [50496] = {1000000}, [50506] = {1000000}, [50507] = {1000000}, [50508] = {1000000}, [50509] = {1000000}, [50510] = {1000000}, [50511] = {1000000} } pc.remove_item() pc.change_gold(libros[item.get_vnum()][1]) end endend Espero mis +1 Link to comment Share on other sites More sharing options...
Tiico™ Posted August 8, 2013 Report Share Posted August 8, 2013 Keko , yo la hice casi igual , solo que le cambie a pc.remove_item() , ya que era .take Link to comment Share on other sites More sharing options...
yandrack Posted August 8, 2013 Author Report Share Posted August 8, 2013 Nop, no elimina el libro del inventario.... Link to comment Share on other sites More sharing options...
KeKo Posted August 8, 2013 Report Share Posted August 8, 2013 Keko , yo la hice casi igual , solo que le cambie a pc.remove_item() , ya que era .take pero tu comando no existe item.remove() Link to comment Share on other sites More sharing options...
PACI Posted August 8, 2013 Report Share Posted August 8, 2013 pc.remove_item(vnum, count) Así es como funciona, en ese caso sería item.remove() Link to comment Share on other sites More sharing options...
yandrack Posted August 8, 2013 Author Report Share Posted August 8, 2013 Dejo la quest arreglado y funcionando... testeado. Por si en un futuro alguien lo necesita. quest libros_habi begin state start begin when 9001.chat."Vender Tus Libros" begin say_title("Hola "..pc.get_name().." ") say("Para vender tu libro, solo tira hacia") say("mi el libro de habilidad. Suerte") end when 9001.take begin local libros = { [50401] = {1000000}, [50402] = {1000000}, [50403] = {1000000}, [50404] = {1000000}, [50405] = {1000000}, [50416] = {1000000}, [50417] = {1000000}, [50418] = {1000000}, [50419] = {1000000}, [50420] = {1000000}, [50461] = {1000000}, [50462] = {1000000}, [50463] = {1000000}, [50464] = {1000000}, [50465] = {1000000}, [50466] = {1000000}, [50476] = {1000000}, [50477] = {1000000}, [50478] = {1000000}, [50479] = {1000000}, [50480] = {1000000}, [50481] = {1000000}, [50431] = {1000000}, [50432] = {1000000}, [50433] = {1000000}, [50434] = {1000000}, [50435] = {1000000}, [50446] = {1000000}, [50447] = {1000000}, [50448] = {1000000}, [50449] = {1000000}, [50450] = {1000000}, [50491] = {1000000}, [50492] = {1000000}, [50493] = {1000000}, [50494] = {1000000}, [50495] = {1000000}, [50496] = {1000000}, [50506] = {1000000}, [50507] = {1000000}, [50508] = {1000000}, [50509] = {1000000}, [50510] = {1000000}, [50511] = {1000000} } pc.change_gold(libros[item.get_vnum()][1]) item.remove() end end end Gracias a los que ayudaron. Link to comment Share on other sites More sharing options...
Tiico™ Posted August 9, 2013 Report Share Posted August 9, 2013 Jajjajajajaja sorry men , pero igual estaba bien como la hice , perdon se me fue el pc xD Link to comment Share on other sites More sharing options...
Recommended Posts