Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[Pytanie]kilka pytan


konrad9510

Rekomendowane odpowiedzi

Opublikowano

Witam, mam kilka pytań:

1) Jak ustawic darmowy statek, chodzi o to, aby wylaczyc oplaty na przeplywy do innego miasta, jak co wylaczyc ?

2) Jak ustawic, aby z kazdego miejsca mozna bylo by plynac, np. z thais do cromaya.

3) Jak zmienic wage item'u. ?

4) Oraz ostatnie pyt. jak np. stworze nowa wyspe np. mojawyspa to jak dodac nia do NPC od statku, aby mozna bylo by na nia plynac ??

Czy dasz mi + czy - i tak mam to gdzieś, ponieważ nie patrze na reputacje.

Opublikowano

wchodzisz w Data/npc/scripts i robisz nowy dokument w notatniku i wklejasz to potem dajesz zapisz jaki i nazywwasz go np. tpstatek.lua

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid)    npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid)    npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg)  npcHandler:onCreatureSay(cid, type, msg) end
function onThink()	   npcHandler:onThink() end
local travelNode = keywordHandler:addKeyword({'Edron'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Dou you wanna go to Edron,are you sure ?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 1, cost = 0, destination = {x=33175, y=31764, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Next time maybe.'})
local travelNode = keywordHandler:addKeyword({'Venore'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Dou you wanna go to Venore,are you sure ?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 1, cost = 0, destination = {x=32954, y=32022, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Next time maybe.'})
local travelNode = keywordHandler:addKeyword({'Thais'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Dou you wanna go to Thais,are you sure ?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 1, cost = 0, destination = {x=32311, y=32210, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Next time maybe.'})
local travelNode = keywordHandler:addKeyword({'Carlin'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Dou you wanna go to Carlin,are you sure ?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 1, cost = 0, destination = {x=32387, y=31821, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Next time maybe.'})
local travelNode = keywordHandler:addKeyword({'Ab dendriel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Dou you wanna go to Ab dendriel,are you sure ?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 1, cost = 0, destination = {x=32734, y=31669, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Next time maybe.'})
local travelNode = keywordHandler:addKeyword({'Liberty Bay'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Dou you wanna go to Liberty Bay,are you sure ?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 1, cost = 0, destination = {x=32285, y=32891, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Next time maybe.'})
local travelNode = keywordHandler:addKeyword({'Goroma'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Dou you wanna go to Goroma,are you sure ?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 1, cost = 0, destination = {x=31994, y=32564, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Next time maybe.'})
local travelNode = keywordHandler:addKeyword({'Port Hope'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Dou you wanna go to Port hope,are you sure ?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 1, cost = 0, destination = {x=32529, y=32784, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Next time maybe.'})
local travelNode = keywordHandler:addKeyword({'Ankrahmun'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Dou you wanna go to Ankrahmun,are you sure ?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 30, cost = 0, destination = {x=33092, y=32883, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Next time maybe.'})
local travelNode = keywordHandler:addKeyword({'Darashia'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Dou you wanna go to Darashia,are you sure ?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 1, cost = 0, destination = {x=33289, y=32481, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Next time maybe.'})
local travelNode = keywordHandler:addKeyword({'Svargrond'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Dou you wanna go to Svargrond,are you sure ?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 1, cost = 0, destination = {x=32431, y=31162, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Next time maybe.'})
keywordHandler:addKeyword({'travel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to all places.'})
npcHandler:addModule(FocusModule:new())

 

travel do wszystkich miejsc w Real tibi za 0gp

ponizej jak edytowac ten skrypt

 

local travelNode = keywordHandler:addKeyword({'Nazwa miasta'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'tutaj co npc ma odpisac do gracza'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = czy musi miec Pacc, level = tutaj lvl postaci, cost = tutaj kwota, destination = {tutaj podajesz kordy x,y,z} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'tutaj pozegnanie.'})

 

pozniej w data/npc robisz dokument w notratniku zapisujesz go nazwa npc z koncowka xml. np. kapitan.xml

 

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Oliver" script="data/npc/scripts/tpstatek.lua" walkinterval="2000">
<health now="100" max="100"/>
<look type="131" head="58" body="43" legs="38" feet="76" addons="0"/>
<parameters>
 <parameter key="message_greet" value="hello where u travel." />
 <parameter key="message_farewell" value="So I am alone again." />
 <parameter key="message_walkaway" value="So I am alone again." />
</parameters>
</npc>

Opublikowano

Dobra z poradzę sobie dalej, dzięki :). Ale jeszcze chcę pomoc z tym, aby z każdego miasta było można wszędzie płynąć. Np. thais>cormaya. a nie thais>edron>cormaya podajże.

Czy dasz mi + czy - i tak mam to gdzieś, ponieważ nie patrze na reputacje.

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...