Postado Janeiro 30, 2013 12 anos Autor up (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Janeiro 31, 2013 12 anos Tente Isso.. <npc name="NPCNAME" script="default.lua" walkinterval="2000" floorchange="0"> <health now="185" max="185"/> <look type="128" addons="0" head="0" body="0" legs="0" feet="0" corpse="2317"/> <parameters> <parameter key="module_travel" value="'"/> <parameter key="message_greet" value="Ola |PLAYERNAME| diga Travel"/> <parameter key="message_farewall" value="Ate mais..."/> <parameter key="message_walkaway" value="sz!"/> <parameter key="travel_destinations" value="Cidade do Papai Noel,x,y,z,200;Teletubies,x,y,z,200;Goku,x,y,z,200;"/> </parameters> Namenpc = Nome do npc HealthNow = Quantos de life o Npc vai ficar Max = Quantos de life ele vai ter ao total Looktype / addons / etc etc... isso voce deve saber mecher.. Nessa parte define pra onde o npc vai te levar .. <parameter key="travel_destinations" value="Cidade do Papai Noel,x,y,z,200;Teletubies,x,y,z,200;Goku,x,y,z,200;"/> </parameters> Em Azul é o nome da cidade Em Vermelho é a posição do local que o char sera teletransportado Em Verde é o preço da viagem não expliquei mt bem, mas acho q da pra entender. Te Ajudei ? REP +! Editado Janeiro 31, 2013 12 anos por Laastzn (veja o histórico de edições) te ajudei ? REP + ---------------------------------- Holy Server ON-LINE IP: Holyserver.no-ip.org Site: Holyserver.no-ip.org Versão: 8.6 Saiba mais no nosso site ! - Servidor online 24 horas -
Postado Janeiro 31, 2013 12 anos Autor Ja testei, fumfa não (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Janeiro 31, 2013 12 anos \data\npc\Marujo.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Marujo" script="marujo.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="151" head="17" body="54" legs="114" feet="0" addons="3"/> <parameters> </parameters> </npc> \data\npc\scripts\marujo.lua local focuses = {} local function isFocused(cid) for i, v in pairs(focuses) do if(v == cid) then return true end end return false end local function addFocus(cid) if(not isFocused(cid)) then table.insert(focuses, cid) end end local function removeFocus(cid) for i, v in pairs(focuses) do if(v == cid) then table.remove(focuses, i) break end end end local function lookAtFocus() for i, v in pairs(focuses) do if(isPlayer(v)) then doNpcSetCreatureFocus(v) return end end doNpcSetCreatureFocus(0) end local function getPlayerMoney(cid) return ((getPlayerItemCount(cid, 2160) * 10000) + (getPlayerItemCount(cid, 2152) * 100) + getPlayerItemCount(cid, 2148)) end function onCreatureDisappear(cid) if(isFocused(cid)) then selfSay("Bye!") removeFocus(cid) if(isPlayer(cid)) then --Be sure he's online closeShopWindow(cid) end end end function onCreatureAppear(cid) end local places = { ["papai noel"] = {pos={x=1, y=2, z=7}, price = 1}, ["teletubies"] = {pos={x=1, y=2, z=7}, price = 1}, ["goku"] = {pos={x=1018, y=1032, z=7}, price = 1}, } function onCreatureSay(cid, type, msg) if((msg == "hi" or msg == "hello") and not (isFocused(cid))) then selfSay("Welcome, ".. getCreatureName(cid) ..".", cid) addFocus(cid) elseif((isFocused(cid)) and (msg == "travel" or msg == "sail")) then local str = "" for cityName, _ in pairs(places) do str = str.."{"..cityName.."} " end selfSay("Para onde voce quer viajar? "..str, cid) elseif((isFocused(cid)) and places[msg:lower()]) then if not(doPlayerRemoveMoney(cid, places[msg:lower()].price)) then return selfSay("Voce nao tem dinheiro", cid) end selfSay("Bye", cid) doTeleportThing(cid, places[msg:lower()].pos) removeFocus(cid) elseif((isFocused(cid)) and (msg == "bye" or msg == "goodbye" or msg == "cya")) then selfSay("Goodbye!", cid, true) removeFocus(cid) end end function onPlayerCloseChannel(cid) if(isFocused(cid)) then selfSay("Bye!") closeShopWindow(cid) removeFocus(cid) end end function onThink() for i, focus in pairs(focuses) do if(not isCreature(focus)) then removeFocus(focus) else local distance = getDistanceTo(focus) or -1 if((distance > 4) or (distance == -1)) then selfSay("Hmph!") closeShopWindow(focus) removeFocus(focus) end end end lookAtFocus() end
Postado Janeiro 31, 2013 12 anos Autor Onde edita as coordenadas? (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
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.