Dragonslayer Posted March 5, 2015 Report Share Posted March 5, 2015 Bueno a peticion de Jex, una quest muy sencilla. quest cofre begin state start begin when xxxxx.use begin cofre.giverandomitem() pc.remove_item(xxxxx, 1) end end function giverandomitem() local ids = number(1,5) //5 la cantidad de objetos local items = { --numero idobjeto cant tamaño(inventario) [1] = {71018,200,1}, [2] = {71020,200,1}, [3] = {90027,1,1}, [4] = {90027,2,1}, [5] = {90028,1,1}, } if pc.get_empty_inventory_count() >= items[ids][3] then pc.give_item2(items[ids][1],items[ids][2]) else syschat("No tienes espacio en el inventario.") end end end end Edit: La funcion pc.get_empty_inventory_count es muy rara, creo que con añadirla al quest_fuction funciona bien. JazZ*, ZoneLife, Jex and 1 other 4 Quote Link to comment Share on other sites More sharing options...
ZoneLife Posted March 5, 2015 Report Share Posted March 5, 2015 Se agradece seguro ayudará a mucha gente Quote Link to comment Share on other sites More sharing options...
Konan Posted March 6, 2015 Report Share Posted March 6, 2015 puedes cambiar ese 5 por: number(1, table.getn(items)) --> y asi no deberas modificar ningun valor, y sera solo limitarte a añadir nuevos objetos. Saludos. Dragonslayer 1 Quote Link to comment Share on other sites More sharing options...
Guest DreamHQ Posted March 6, 2015 Report Share Posted March 6, 2015 Buena quest , simple , pero útil +1 Un saludo. Quote Link to comment Share on other sites More sharing options...
Jex Posted March 7, 2015 Report Share Posted March 7, 2015 no se que pasa pero modifico la quest y meto la funcion "pc.get_empty_inventory_count"en quest_functions reboteo y nada e.e Debes iniciar sesión para ver el contenido del enlace en esta publicación. ChuchoGamer 1 Quote Link to comment Share on other sites More sharing options...
Camus Posted March 10, 2015 Report Share Posted March 10, 2015 Jex es que Eres Nobi :c Me Fueras Dicho yo te la Hago :c Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.