ßlaςK 1 Report post Posted January 21, 2013 Hola a todos, alguien me podria hacer estas 2 quest porfavor... 1.- que al matar un mob te anuncia que lo haz matado y que te de varios item pero con 50 % de posibilidades unos 6? se podra ? 2.- Una quest de teletrasporte donde te pida un lvl para entrar y si pasaste ese lvl ya no entres mas ej: eres lvl 85 y el mapa que sigue es el 100 cuando seas nivel 100 que no te deje entrar al mapas del 85, se me ocurre esto para que los lvl altos no entren a matar a los demas pj Se los agradecería muchísimo Por favor Saludos.- Share this post Link to post Share on other sites
KeKo 1,133 Report post Posted January 22, 2013 Hola a todos, alguien me podria hacer estas 2 quest porfavor... 1.- que al matar un mob te anuncia que lo haz matado y que te de varios item pero con 50 % de posibilidades unos 6? se podra ? 2.- Una quest de teletrasporte donde te pida un lvl para entrar y si pasaste ese lvl ya no entres mas ej: eres lvl 85 y el mapa que sigue es el 100 cuando seas nivel 100 que no te deje entrar al mapas del 85, se me ocurre esto para que los lvl altos no entren a matar a los demas pj Se los agradecería muchísimo Por favor Saludos.- quest mob begin state start begin when idmob.kill begin -- pones la id del mob notice_all(""..pc.get_name().." ha acabado con nombremob") local suerte = math.random(1,2) if suerte == 1 then local item = math.random(1,6) local drop = {iditem1,iditem2,iditem3,iditem4,iditem5,iditem6} -- pones las ids de los items if item == 1 then game.drop_item(drop[1], 1) elseif item == 2 then game.drop_item(drop[2],1) elseif item == 3 then game.drop_item(drop[3],1) elseif item == 4 then game.drop_item(drop[4],1) elseif item == 5 then game.drop_item(drop[5],1) elseif item == 6 then game.drop_item(drop[6],1) end end end end end De este mob cuando mates al mob hay un 50% de que dropee. Si dropea dara aleatoriamente uno de los 6 items, pero no tengo claro si querias que en caso de dropear tuviera un 50% cada uno y pudieran caer los 6 asi que si queres que edite solo dime La segunda la hago mañana xd Share this post Link to post Share on other sites
ßlaςK 1 Report post Posted January 22, 2013 solo que caiga 1 de los 6 item. con 50% cada 1, creo que asi esta bien o no? Share this post Link to post Share on other sites
KeKo 1,133 Report post Posted January 22, 2013 solo que caiga 1 de los 6 item. con 50% cada 1, creo que asi esta bien o no? Asi tal y como está ahora es como acabas de decir Hay un 50% de que dropee algo y si dropea sale uno de los 6 aleatorio así que ahi tenes la primera quest teleporter begin state start begin when idnpc.chat."Teleporter" begin say_title("Teleporter") say("") say ( "Buenas ".. pc.get_name() .."" ) say ( "Te ofrezco teletransportarte a donde quieras" ) say ( "a donde quieres ir?" ) local main_set = select ("Mapa Nuevo", "Cerrar") if main_set == 1 then if pc.get_level() < nivel then -- pones el minimo chat("Lo siento eres demasiado bajo para ir") end if pc.get_level() > nivel then -- pones el maximo chat("Lo siento eres demasiado alto para ir") end pc.warp ( cordesx , cordesy ) -- pones las cordes end end end end Y ahi tenes la segunda, aunque ya se habia pedido una así en esta seccion xd Share this post Link to post Share on other sites
Croqueta 180 Report post Posted January 22, 2013 es mejor local item = math.random(1,table.getn(item)) es mejor con table.getn, esta funcion cuenta cuantos items estan en la tablaasi se puede poner los items en la tabla sin cambiar los numeros en math.randoom Share this post Link to post Share on other sites
Croqueta 180 Report post Posted January 22, 2013 o se puede aser asi tambien local eitem={ {item1,cantidad1}, {item2,cantidad2}, {item3,cantidad3}, {y asi mas} } pc.give_item2(eitem[number(1, table.getn(eitem))][1],eitem[number(1, table.getn(eitem))][2]) y la quest _____________________________________ quest mob begin state start begin when kill with npc.get_race() == id del monstro begin local eitem={ {item1,cantidad1}, {item2,cantidad2}, {item3,cantidad3}, {y asi mas} } notice_all(""..pc.get_name().." ha acabado con nombremob") game.drop_item(eitem[number(1, table.getn(eitem))][1],eitem[number(1, table.getn(eitem))][2]) end end end 1 KeKo reacted to this Share this post Link to post Share on other sites
KeKo 1,133 Report post Posted January 22, 2013 o se puede aser asi tambien local eitem={ {item1,cantidad1}, {item2,cantidad2}, {item3,cantidad3}, {y asi mas} } pc.give_item2(eitem[number(1, table.getn(eitem))][1],eitem[number(1, table.getn(eitem))][2]) y la quest_____________________________________ quest mob begin state start begin when kill with npc.get_race() == id del monstro begin local eitem={ {item1,cantidad1}, {item2,cantidad2}, {item3,cantidad3}, {y asi mas} } notice_all(""..pc.get_name().." ha acabado con nombremob") game.drop_item(eitem[number(1, table.getn(eitem))][1],eitem[number(1, table.getn(eitem))][2]) end end end Genial Noa a mi me servira mucho, pero creo que pa usuarios no muy acostumbrados a las tablas será más facil de entender la quest sin usar ese metodo. Share this post Link to post Share on other sites
Croqueta 180 Report post Posted January 22, 2013 es que me gustan las tablas y asi se aora mucho texto estoi escribiendo tambien una quest que es para el gm tool tambien unso la tabla *.* pero la quest la vendo, por que nadie la tiene jajaja^^ Share this post Link to post Share on other sites