ReuS Publicado 27 de Agosto del 2018 Reportar Compartir Publicado 27 de Agosto del 2018 Alguien tiene alguna quest parecida a la del ox? Pero en este caso que al usar X item, puedas darle un premio a todos los conectado en X mapa ? Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Dilong Publicado 27 de Agosto del 2018 Reportar Compartir Publicado 27 de Agosto del 2018 Seria asi, pero es mejor hacerlo via C++ para que sea mejor (No lo he probado) Quest: Spoiler quest premio begin state start begin when 20094.chat."premios" with pc.is_gm() begin check2 = mysql_query("SELECT index, id_item, cantidad FROM player.premios") local datos = select("Acticar(Primero)","Index Mapa(Segundo)","Id items(Tercero)","Cerrar") if datos == 1 then local activo = select("Si","Terminar","Cerrar") if activo == 1 then if game.get_event_flag("check")== 1 then say("Ya esta activo") return end game.set_event_flag("check",1) elseif activo == 2 then game.set_event_flag("check",0) mysql_query("DELETE FROM player.premios") return end elseif datos == 2 then say("Escribe el index del mapa") local index = tonumber(input()) if index "" then say("error") return end mysql_query("INSERT INTO player.premios(index) VALUES ('"..index.."'") elseif datos == 3 then say("Escribe el id del item") local ids = tonumber(input()) if ids "" then say("error") return end mysql_query("INSERT INTO player.premios(id_item) VALUES ('"..ids.."'") return end end when login with pc.get_map_index()==check2.index[1] and game.get_event_flag("check")== 1 begin loop_timer("check3",2) end when check3.timer begin if game.get_event_flag("check")==0 then cleartimer("check3") pc.setqf("premio",0) return end if pc.getqf("premio")== 1 then return end pc.give_item2(check2.id_item[1],check2.cantidad[1]) pc.setqf("premio",1) end end end Sql: Spoiler /* Navicat MySQL Data Transfer Source Server : SF Akron2 Source Server Type : MySQL Source Server Version : 50630 Source Host : 127.0.0.0:3306 Source Schema : player Target Server Type : MySQL Target Server Version : 50630 File Encoding : 65001 Date: 27/08/2018 15:07:40 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for premios -- ---------------------------- DROP TABLE IF EXISTS `premios`; CREATE TABLE `premios` ( `index` int(8) NOT NULL, `id_item` int(8) NULL DEFAULT NULL, `cantidad` int(8) NULL DEFAULT NULL, PRIMARY KEY (`index`) USING BTREE ) ENGINE = MyISAM CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Fixed; SET FOREIGN_KEY_CHECKS = 1; tikiwiki reacciono a esto 1 Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
ReuS Publicado 29 de Agosto del 2018 Author Reportar Compartir Publicado 29 de Agosto del 2018 Gracias Dilong lo probare Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Mensajes recomendados