TheSanto 63 Report post Posted February 1, 2013 Bueno pues queria una quest en la que 1 mob dropee varios items ( si pueden ponganme idmob , iditem). Gracias. Share this post Link to post Share on other sites
Pathits! 29 Report post Posted February 1, 2013 quest drop_quest begin state start begin when mob.kill or mob.kill or mob.kill begin local suerte = math.random(1,2) local drop = {90020,90021} if suerte == 1 then game.drop_item(drop[1], 1) elseif suerte == 2 then game.drop_item(drop[2],1) end end end end esta quest la realizo Keko a si que tienes que agradecerle a el si te sirvio, para añadir mas mob solo agrega " or mob.kil" --> mob el "code del tiene que ir hay" y para agregar item los pones acá local drop = {90020,90021, xxxx,xxx} y debes agregar esto cada vez que pongas un item en este caso si agregas uno mas seria 3 elseif suerte == 3 then game.drop_item(drop[3],1) así sucesivamente... Share this post Link to post Share on other sites
TheSanto 63 Report post Posted February 1, 2013 la de keko no la entiendo. Share this post Link to post Share on other sites
KeKo 1,136 Report post Posted February 1, 2013 la de keko no la entiendo. Pues es muy sencillo: when mob.kill or mob.kill or mob.kill begin Ahi pones las ids de los mobs que queres que dropeen. local drop = {item1,item2,item3,item4} Ahi pones las ids de los items que queres que puedan dropear. local suerte = math.random(1,2) Esto indica el numero de items que pueden dropear. Como hay un maximo de 2 en el random significa que pueden dropearse dos items (los que has puesto antes en el otro local. Si metes mas drop en el otro array tendras que aumentar el maximo del random. if suerte == 1 then game.drop_item(drop[1], 1) elseif suerte == 2 then game.drop_item(drop[2],1) En este caso como el math.random es 1,2 hay dos posibilidades, que dropee. if suerte == 1 then game.drop_item(drop[1], 1) elseif suerte == 2 then game.drop_item(drop[2],1) Y por ultimo asignas a cada posible resultado del random un item, si tenes mas de dos pos metes: elseif suerte == 3 then game.drop_item(drop[3],1) Y asi con los demas posibles drops Espero que asi lo entiendas Share this post Link to post Share on other sites
ElRaulxX 89 Report post Posted February 2, 2013 Con la función game.drop_item_with_ownership() el item tendrá nombre en el suelo, como si fuera un drop normal. 1 stein20 reacted to this Share this post Link to post Share on other sites