albere 6 Postado Outubro 6, 2011 Share Postado Outubro 6, 2011 (editado) ola galerinha do Xtibia vim posta um sistema de egg que eu fiz para um projeto mais nao deu certo o projeto chega de conversa e vamo logo pro script antes coloque o nome do lua de eggsystem.lua function installEggSystem() local query = [=[ CREATE TABLE "egg" ( "time" INTEGER NOT NULL DEFAULT 0, "pid" INTEGER NOT NULL, "eggid" INT(15) NOT NULL auto_increment, "type" VARCHAR NOT NULL DEFAULT ""); ]=] if db.executeQuery(query) then print("[Egg System] Sucefull install!") else print("[Egg System] Failed!") end end na parti que ta escrito eggid coloca o id do egg <action itemid="iddoegg" event="script" value="eggsystem.lua"/> se ajudei me de rep XD falta o da maquina que usa Editado Outubro 6, 2011 por Albere Link para o comentário https://xtibia.com/forum/topic/169196-actions-egg-system/ Compartilhar em outros sites More sharing options...
484539 9 Postado Outubro 6, 2011 Share Postado Outubro 6, 2011 Ta dando esse erro aki amigo [Warning - Event::loadScript] Event onUse not found (data/actions/scripts/eggsystem.lua) e + esse [05/10/2011 23:32:57] [Warning - IOMapSerialize::loadItems] NULL item at ( 00917 / 01056 / 006 ) (type = 5304, sid = 1, pid = 0) [05/10/2011 23:32:57] [Warning - IOMapSerialize::loadItems] NULL item at ( 00922 / 01044 / 006 ) (type = 5303, sid = 1, pid = 0) [05/10/2011 23:32:57] [Warning - IOMapSerialize::loadItems] NULL item at ( 00923 / 01044 / 006 ) (type = 5303, sid = 1, pid = 0) [05/10/2011 23:32:57] [Warning - IOMapSerialize::loadItems] NULL item at ( 00926 / 01045 / 006 ) (type = 5304, sid = 1, pid = 0) [05/10/2011 23:32:57] [Warning - IOMapSerialize::loadItems] NULL item at ( 00926 / 01046 / 006 ) (type = 5304, sid = 1, pid = 0) [05/10/2011 23:32:57] [Warning - IOMapSerialize::loadItems] NULL item at ( 00930 / 01041 / 006 ) (type = 5303, sid = 1, pid = 0) [05/10/2011 23:32:57] [Warning - IOMapSerialize::loadItems] NULL item at ( 00931 / 01041 / 006 ) (type = 5303, sid = 1, pid = 0) [05/10/2011 23:32:57] [Warning - IOMapSerialize::loadItems] NULL item at ( 00928 / 01049 / 006 ) (type = 5303, sid = 1, pid = 0) [05/10/2011 23:32:57] [Warning - IOMapSerialize::loadItems] NULL item at ( 00930 / 01049 / 006 ) (type = 1252, sid = 1, pid = 0) [05/10/2011 23:32:57] [Warning - IOMapSerialize::loadItems] NULL item at ( 00932 / 01049 / 006 ) (type = 5303, sid = 1, pid = 0) [05/10/2011 23:32:57] [Warning - IOMapSerialize::loadItems] NULL item at ( 00914 / 01044 / 006 ) (type = 5303, sid = 1, pid = 0) [05/10/2011 23:32:58] [Warning - IOMapSerialize::loadItems] NULL item at ( 00919 / 01044 / 006 ) (type = 1252, sid = 1, pid = 0) [05/10/2011 23:32:58] [Warning - IOMapSerialize::loadItems] NULL item at ( 00909 / 01044 / 006 ) (type = 5303, sid = 1, pid = 0) [05/10/2011 23:32:58] [Warning - IOMapSerialize::loadItems] NULL item at ( 00912 / 01044 / 006 ) (type = 1252, sid = 1, pid = 0) [05/10/2011 23:32:58] [Warning - IOMapSerialize::loadItems] NULL item at ( 00890 / 01041 / 006 ) (type = 1252, sid = 1, pid = 0) [05/10/2011 23:32:58] [Warning - IOMapSerialize::loadItems] NULL item at ( 00891 / 01046 / 006 ) (type = 1252, sid = 1, pid = 0) [05/10/2011 23:32:58] [Warning - IOMapSerialize::loadItems] NULL item at ( 00899 / 01042 / 006 ) (type = 5304, sid = 1, pid = 0) [05/10/2011 23:32:58] [Warning - IOMapSerialize::loadItems] NULL item at ( 00899 / 01043 / 006 ) (type = 5304, sid = 1, pid = 0) si tiver como ajudar REP+ Link para o comentário https://xtibia.com/forum/topic/169196-actions-egg-system/#findComment-1112350 Compartilhar em outros sites More sharing options...
albere 6 Postado Outubro 6, 2011 Autor Share Postado Outubro 6, 2011 vc nao adicionou o item no ot entao o iten que vc colocou vai da errado function installEggSystem() local query = [=[ CREATE TABLE "egg" ( "120" INTEGER NOT NULL DEFAULT 0, "0" INTEGER NOT NULL, "2455" INT(15) NOT NULL auto_increment, "grass" VARCHAR NOT NULL DEFAULT ""); ]=] if db.executeQuery(query) then print("[Egg System] Sucefull install!") else print("[Egg System] Failed!") end end ta ai o meu eu coloquei no actions e no lib no actions coloca dois itens o da maquina eo do ovo Link para o comentário https://xtibia.com/forum/topic/169196-actions-egg-system/#findComment-1112522 Compartilhar em outros sites More sharing options...
BrunooAngel 41 Postado Outubro 6, 2011 Share Postado Outubro 6, 2011 vc nao adicionou o item no ot entao o iten que vc colocou vai da errado function installEggSystem() local query = [=[ CREATE TABLE "egg" ( "120" INTEGER NOT NULL DEFAULT 0, "0" INTEGER NOT NULL, "2455" INT(15) NOT NULL auto_increment, "grass" VARCHAR NOT NULL DEFAULT ""); ]=] if db.executeQuery(query) then print("[Egg System] Sucefull install!") else print("[Egg System] Failed!") end end ta ai o meu eu coloquei no actions e no lib no actions coloca dois itens o da maquina eo do ovo Onde posso arrumar o pokemon que ira ganhar? :B Link para o comentário https://xtibia.com/forum/topic/169196-actions-egg-system/#findComment-1112545 Compartilhar em outros sites More sharing options...
albere 6 Postado Outubro 6, 2011 Autor Share Postado Outubro 6, 2011 isso que eu to tentando mudar mais nesse script que fiz e todos os que tiver na pasta monster Link para o comentário https://xtibia.com/forum/topic/169196-actions-egg-system/#findComment-1112584 Compartilhar em outros sites More sharing options...
BrunooAngel 41 Postado Outubro 6, 2011 Share Postado Outubro 6, 2011 isso que eu to tentando mudar mais nesse script que fiz e todos os que tiver na pasta monster [06/10/2011 16:22:26] [Warning - Event::loadScript] Event onUse not found (data/actions/scripts/eggsystem.lua) podes arrumar? e como funciona o script +/-? tipo se tem como mudar pra outra pasta e pa! Link para o comentário https://xtibia.com/forum/topic/169196-actions-egg-system/#findComment-1112591 Compartilhar em outros sites More sharing options...
albere 6 Postado Outubro 6, 2011 Autor Share Postado Outubro 6, 2011 function doAddEgg(cid, type,time) local query = "INSERT INTO `egg` (`pid`, `time`, `type`) VALUES ("..getPlayerGUID(cid)..","..(os.time()+time)..","..type");" return assert(db.executeQuery(query), "Can't add Egg") end Link para o comentário https://xtibia.com/forum/topic/169196-actions-egg-system/#findComment-1112595 Compartilhar em outros sites More sharing options...
fagundes14 7 Postado Outubro 6, 2011 Share Postado Outubro 6, 2011 (editado) Como Assim Não Entendi Tipo Da Uma Explicada Melhor Do Que Ele Fais E Como Funciona E Se Possivel Posta Ele Com O Script Da Maquina Ja Mas Mesmo Assim Parabens Pela Iniciativa Ganho Meu Rep + Abrass Editado Outubro 6, 2011 por Fagundes14 Link para o comentário https://xtibia.com/forum/topic/169196-actions-egg-system/#findComment-1112606 Compartilhar em outros sites More sharing options...
albere 6 Postado Outubro 6, 2011 Autor Share Postado Outubro 6, 2011 function installEggSystem() local query = [=[ CREATE TABLE "egg" ( "time" INTEGER NOT NULL DEFAULT 0, "pid" INTEGER NOT NULL, "eggid" INT(15) NOT NULL auto_increment, "type" VARCHAR NOT NULL DEFAULT ""); ]=] if db.executeQuery(query) then print("[Egg System] Sucefull install!") else print("[Egg System] Failed!") end end em time eo tempo que o ovo vai quebrar pid tem que colocar 0 mesmo eggid eo id do egg type eo tipo do ovo tipo no meu caso eu coloquei fire pra o ovo ser de fogo e so nascer poke de fogo obrigado pelas criticas e tudo mais pq e oo meu primeiro script Link para o comentário https://xtibia.com/forum/topic/169196-actions-egg-system/#findComment-1112694 Compartilhar em outros sites More sharing options...
Posts Recomendados