Postado Fevereiro 4, 2017 8 anos Olá eu tenho um script preciso de uma modificação se alguém poder me ajudar, seria assim onde esta a configuração local lugar eu queria que fosse os lugares onde somente players sem premium pudessem usar o comando e teria que criar outra config lugar com lugares que somente player com premium fosse. function onSay(cid, words, param) local config = { pz = false, -- false battle = true, -- trues custo = false, -- false need_level = false, -- false premium = true -- true } --[[ Config lugares]]-- Players sem premium local lugar = { ["azeroth"] ={ -- azeroth pos = {x=615, y=1056, z=7},level = 0,price = 4}, ["esdra"] ={ -- azeroth pos = {x=1091, y=2272, z=4},level = 0,price = 4}, ["elsera"] ={ -- azeroth pos = {x=342, y=101, z=6},level = 0,price = 4}, ["arena"] ={ -- blacknight pos = {x=124, y=29, z=9},level = 200, price = 17}, } --[[ Config lugares]]-- Players com premium local lugar = { ["azeroth"] ={ -- azeroth pos = {x=615, y=1056, z=7},level = 0,price = 4}, <--- Essa parte foi eu que adicionei para mostra o exemplo de como seria os lugar para premium ["esdra"] ={ -- azeroth pos = {x=1091, y=2272, z=4},level = 0,price = 4}, ["elsera"] ={ -- azeroth pos = {x=342, y=101, z=6},level = 0,price = 4}, ["arena"] ={ -- blacknight pos = {x=124, y=29, z=9},level = 200, price = 17}, } if (param == "") then local str = "" for name, pos in pairs(lugar) do str = str..name.."\n" end str = str .. "" doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "--=[ AREAS FREE ]=--") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "CIDADES: azeroth, avalon, gloria, saragoka, elsera, edileia, khalarar, varmor, nevasta, shurima, formagor, esdra, nethergarde. ( promoOrc, arena )") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--=[ AREAS VIPS ]=--") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 8 a 30: troll, amazon, mino1, mino2, elf1, dworc, barbarian1, barbarian2, bonelord, orc1, orc2. ( treineroff )") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 30 a 50: cyclops1, cyclops2, cyclops3, cyclops4, pirate, vamp1, vamp2, lightvale, macacos, scarab, dwarf1, dwarf2, mutated, dragonhatchling1, dragonhatchling2.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 50 a 80: banshee, wyvern, hero1, hero2, dragon1, dragon2, dragon3, dragon4, dragon5, dragon6, blacknight1, blacknight2, hydra1, hydra2, hydra3, hydra4, spider1, icespider1, icespider2.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Hunt LEVEL 80 a 100: behemoth1, behemoth2, behemoth3, behemoth4, behemoth5, northland, frost1, frost2, frost3, frost4, frost5, volcano, rhun, defiler1, defiler2, bograider1, bograider2, nightmare1, nightmare2, quaras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 100 a 200: hellhound1, hellhound2, hellhound3, warlock1, warlock2, demon1, demon2, demon3, undead1, undead2, undead3, erediunvale, serpent1, serpent2, spiritfire, wyrm, dark, erechvale, behedemon, higelf") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 200+: northen, elemental, lizard1, lizard2, lizard3, medusa1, medusa2, oxyurus, terminator1, terminator2, jugger1, jugger2, solarian, bloodboil, valemordor, demonictoad.") return TRUE end if param == "" then end local a = lugar[param] if not(a) then return TRUE elseif config.pz == true and getTilePzInfo(getCreaturePosition(cid)) == FALSE then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder teleportar.") return TRUE elseif config.premium == true and not isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Apenas pleyer VIP podem usar este comando.") return TRUE elseif config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não pode se teleportar em uma batalha.") return TRUE elseif config.need_level == true and getPlayerLevel(cid) < a.level then doPlayerSendTextMessage(cid, 22, "Você não tem level suficiente para ser teleportado.") return TRUE elseif config.custo == true and doPlayerRemoveMoney(cid, a.price) == FALSE then doPlayerSendTextMessage(cid, 22, "Desculpe,voce nâo tem dinheiro suficiente. Voce precisa "..a.price.." gp para ser teleportado.") return TRUE end doSendMagicEffect(getCreaturePosition(cid), 27) doTeleportThing(cid, a.pos) doSendMagicEffect(a.pos, CONST_ME_BIGCLOUDS) return TRUE end
Postado Fevereiro 4, 2017 8 anos 1 hora atrás, doido disse: Olá eu tenho um script preciso de uma modificação se alguém poder me ajudar, seria assim onde esta a configuração local lugar eu queria que fosse os lugares onde somente players sem premium pudessem usar o comando e teria que criar outra config lugar com lugares que somente player com premium fosse. function onSay(cid, words, param) local config = { pz = false, -- false battle = true, -- trues custo = false, -- false need_level = false, -- false premium = true -- true } --[[ Config lugares]]-- Players sem premium local lugar = { ["azeroth"] ={ -- azeroth pos = {x=615, y=1056, z=7},level = 0,price = 4}, ["esdra"] ={ -- azeroth pos = {x=1091, y=2272, z=4},level = 0,price = 4}, ["elsera"] ={ -- azeroth pos = {x=342, y=101, z=6},level = 0,price = 4}, ["arena"] ={ -- blacknight pos = {x=124, y=29, z=9},level = 200, price = 17}, } --[[ Config lugares]]-- Players com premium local lugar = { ["azeroth"] ={ -- azeroth pos = {x=615, y=1056, z=7},level = 0,price = 4}, <--- Essa parte foi eu que adicionei para mostra o exemplo de como seria os lugar para premium ["esdra"] ={ -- azeroth pos = {x=1091, y=2272, z=4},level = 0,price = 4}, ["elsera"] ={ -- azeroth pos = {x=342, y=101, z=6},level = 0,price = 4}, ["arena"] ={ -- blacknight pos = {x=124, y=29, z=9},level = 200, price = 17}, } if (param == "") then local str = "" for name, pos in pairs(lugar) do str = str..name.."\n" end str = str .. "" doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "--=[ AREAS FREE ]=--") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "CIDADES: azeroth, avalon, gloria, saragoka, elsera, edileia, khalarar, varmor, nevasta, shurima, formagor, esdra, nethergarde. ( promoOrc, arena )") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--=[ AREAS VIPS ]=--") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 8 a 30: troll, amazon, mino1, mino2, elf1, dworc, barbarian1, barbarian2, bonelord, orc1, orc2. ( treineroff )") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 30 a 50: cyclops1, cyclops2, cyclops3, cyclops4, pirate, vamp1, vamp2, lightvale, macacos, scarab, dwarf1, dwarf2, mutated, dragonhatchling1, dragonhatchling2.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 50 a 80: banshee, wyvern, hero1, hero2, dragon1, dragon2, dragon3, dragon4, dragon5, dragon6, blacknight1, blacknight2, hydra1, hydra2, hydra3, hydra4, spider1, icespider1, icespider2.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Hunt LEVEL 80 a 100: behemoth1, behemoth2, behemoth3, behemoth4, behemoth5, northland, frost1, frost2, frost3, frost4, frost5, volcano, rhun, defiler1, defiler2, bograider1, bograider2, nightmare1, nightmare2, quaras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 100 a 200: hellhound1, hellhound2, hellhound3, warlock1, warlock2, demon1, demon2, demon3, undead1, undead2, undead3, erediunvale, serpent1, serpent2, spiritfire, wyrm, dark, erechvale, behedemon, higelf") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 200+: northen, elemental, lizard1, lizard2, lizard3, medusa1, medusa2, oxyurus, terminator1, terminator2, jugger1, jugger2, solarian, bloodboil, valemordor, demonictoad.") return TRUE end if param == "" then end local a = lugar[param] if not(a) then return TRUE elseif config.pz == true and getTilePzInfo(getCreaturePosition(cid)) == FALSE then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder teleportar.") return TRUE elseif config.premium == true and not isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Apenas pleyer VIP podem usar este comando.") return TRUE elseif config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não pode se teleportar em uma batalha.") return TRUE elseif config.need_level == true and getPlayerLevel(cid) < a.level then doPlayerSendTextMessage(cid, 22, "Você não tem level suficiente para ser teleportado.") return TRUE elseif config.custo == true and doPlayerRemoveMoney(cid, a.price) == FALSE then doPlayerSendTextMessage(cid, 22, "Desculpe,voce nâo tem dinheiro suficiente. Voce precisa "..a.price.." gp para ser teleportado.") return TRUE end doSendMagicEffect(getCreaturePosition(cid), 27) doTeleportThing(cid, a.pos) doSendMagicEffect(a.pos, CONST_ME_BIGCLOUDS) return TRUE end Explica melhor isso , players premuum vão pra X lugares e free vão pra X lugares?? os premium vão nos lugares dos premium tambem?? Qual versão do tfs ??
Postado Fevereiro 4, 2017 8 anos porque não coloca uma variável premium? mais fácil [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Fevereiro 4, 2017 8 anos 1 hora atrás, doido disse: Olá eu tenho um script preciso de uma modificação se alguém poder me ajudar, seria assim onde esta a configuração local lugar eu queria que fosse os lugares onde somente players sem premium pudessem usar o comando e teria que criar outra config lugar com lugares que somente player com premium fosse. function onSay(cid, words, param) local config = { pz = false, -- false battle = true, -- trues custo = false, -- false need_level = false, -- false premium = true -- true } --[[ Config lugares]]-- Players sem premium local lugar = { ["azeroth"] ={ -- azeroth pos = {x=615, y=1056, z=7},level = 0,price = 4}, ["esdra"] ={ -- azeroth pos = {x=1091, y=2272, z=4},level = 0,price = 4}, ["elsera"] ={ -- azeroth pos = {x=342, y=101, z=6},level = 0,price = 4}, ["arena"] ={ -- blacknight pos = {x=124, y=29, z=9},level = 200, price = 17}, } --[[ Config lugares]]-- Players com premium local lugar = { ["azeroth"] ={ -- azeroth pos = {x=615, y=1056, z=7},level = 0,price = 4}, <--- Essa parte foi eu que adicionei para mostra o exemplo de como seria os lugar para premium ["esdra"] ={ -- azeroth pos = {x=1091, y=2272, z=4},level = 0,price = 4}, ["elsera"] ={ -- azeroth pos = {x=342, y=101, z=6},level = 0,price = 4}, ["arena"] ={ -- blacknight pos = {x=124, y=29, z=9},level = 200, price = 17}, } if (param == "") then local str = "" for name, pos in pairs(lugar) do str = str..name.."\n" end str = str .. "" doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "--=[ AREAS FREE ]=--") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "CIDADES: azeroth, avalon, gloria, saragoka, elsera, edileia, khalarar, varmor, nevasta, shurima, formagor, esdra, nethergarde. ( promoOrc, arena )") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--=[ AREAS VIPS ]=--") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 8 a 30: troll, amazon, mino1, mino2, elf1, dworc, barbarian1, barbarian2, bonelord, orc1, orc2. ( treineroff )") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 30 a 50: cyclops1, cyclops2, cyclops3, cyclops4, pirate, vamp1, vamp2, lightvale, macacos, scarab, dwarf1, dwarf2, mutated, dragonhatchling1, dragonhatchling2.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 50 a 80: banshee, wyvern, hero1, hero2, dragon1, dragon2, dragon3, dragon4, dragon5, dragon6, blacknight1, blacknight2, hydra1, hydra2, hydra3, hydra4, spider1, icespider1, icespider2.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Hunt LEVEL 80 a 100: behemoth1, behemoth2, behemoth3, behemoth4, behemoth5, northland, frost1, frost2, frost3, frost4, frost5, volcano, rhun, defiler1, defiler2, bograider1, bograider2, nightmare1, nightmare2, quaras.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 100 a 200: hellhound1, hellhound2, hellhound3, warlock1, warlock2, demon1, demon2, demon3, undead1, undead2, undead3, erediunvale, serpent1, serpent2, spiritfire, wyrm, dark, erechvale, behedemon, higelf") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 200+: northen, elemental, lizard1, lizard2, lizard3, medusa1, medusa2, oxyurus, terminator1, terminator2, jugger1, jugger2, solarian, bloodboil, valemordor, demonictoad.") return TRUE end if param == "" then end local a = lugar[param] if not(a) then return TRUE elseif config.pz == true and getTilePzInfo(getCreaturePosition(cid)) == FALSE then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder teleportar.") return TRUE elseif config.premium == true and not isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Apenas pleyer VIP podem usar este comando.") return TRUE elseif config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não pode se teleportar em uma batalha.") return TRUE elseif config.need_level == true and getPlayerLevel(cid) < a.level then doPlayerSendTextMessage(cid, 22, "Você não tem level suficiente para ser teleportado.") return TRUE elseif config.custo == true and doPlayerRemoveMoney(cid, a.price) == FALSE then doPlayerSendTextMessage(cid, 22, "Desculpe,voce nâo tem dinheiro suficiente. Voce precisa "..a.price.." gp para ser teleportado.") return TRUE end doSendMagicEffect(getCreaturePosition(cid), 27) doTeleportThing(cid, a.pos) doSendMagicEffect(a.pos, CONST_ME_BIGCLOUDS) return TRUE end Usa > if isPremium(cid) == false then -- para free if isPremium(cid) == true then -- para vip
Postado Fevereiro 4, 2017 8 anos function onSay(cid, words, param) local param, str, var = param:lower(),"[+] Place List [+]\n\n",{ ["azeroth"] ={pos = {x=615, y=1056, z=7}, premium = true, price = 4}, ["esdra"] ={pos = {x=1091, y=2272, z=4}, premium = false, price = 4}, ["elsera"] ={pos = {x=342, y=101, z=6}, premium = false, price = 4}, ["arena"] ={pos = {x=124, y=29, z=9}, premium = true, price = 17} } if param == "" or param == "list" then for name, pos in pairs(var) do local add = true if pos.premium and not isPremium(cid) then add = false end if add then str = str.."Place: "..name.." - cost: "..pos.price.." gp's\n" end end doShowTextDialog(cid, 8983, str) return true end local a = var[param] if not(a) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "use !tp list para descobrir os lugares que você poderá ir.") return true elseif getTilePzInfo(getCreaturePosition(cid)) == false then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder teleportar.") return true elseif a.premium and not isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Apenas pleyer VIP podem usar este comando.") return true elseif getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não pode se teleportar em uma batalha.") return true elseif a.price > 0 and not doPlayerRemoveMoney(cid, a.price) then doPlayerSendTextMessage(cid, 22, "Desculpe,voce nâo tem dinheiro suficiente. Voce precisa "..a.price.." gp para ser teleportado.") return true end doSendMagicEffect(getCreaturePosition(cid), 27) doTeleportThing(cid, a.pos) doSendMagicEffect(a.pos, CONST_ME_BIGCLOUDS) return true end [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.