Ogłoszenie

Chcia³bym was zaprosiæ na Nowo Powsta³e Forum o OpenTibiaServer,Nasze Forum Posiada Telewizje oraz Radio! Forum Posiada Równie¿ Spolszczonego ShoutBoxa Nabór jest otwarty, I ty Mo¿esz zostaæ Moderatorem! Nie Jest To Kolejny Plagiat TNP Forum Posiada W³asnego OTSa z map± 5mb od zera. Mapa ci±gle jest dopracowywana oraz s± dodawane nowe potwory oraz profesje. Czêsto s± Aktualizacje oraz Admini czêsto s± Aktywni na Forum. Nie czekaj! Wejd¼ i Odwied¼ Nasze Forum!

#1 2010-07-15 06:59:01

Najtaczek

Przyjaciel

Zarejestrowany: 2010-07-14
Posty: 56
Punktów :   

Poradnik O OTS

Witajcie przedstawiam wam poradnik o ots moglem cos zle napisac ale to sie zdaza 

No wiêc powinni¶my zacz±æ od najwa¿niejszej rzeczy... czyli ¶æi±gniêciu OTS

Najlepiej pobierzcie YurOTS_0.9.4d Smile Very Happy Linka chyba juz sami potraficie znalezc no nie Wink

Nastêpnie rozpakowywujemy plik i zaczynamy od config.lua, którego otwieramy za pomoc± notatnika.
W³a¶ciwo¶ci-----> Otwórz za pomoc±------> Notatnik

Tutaj ju¿ wam poka¿ê co powinni¶cie lub mo¿ecie uzupe³niæ Miejsca oznaczone gwiazdk± oznaczaj±
wa¿niejsze informacje

Konfiguracja Config.lua

Kod:

---------------------------- OTServ configuration ------------------------------

-- datadir
datadir = "data/"

-- sets what map to load
map = "data/world/test.otbm" <------ ¦cie¿ka do mapy. Przy zmienieniu jej na mapê o nazwie ,,moja" wystarczy zmieniæ ,,test" na ,,moja".

-- OTBM for binary, SQL for SQL map, XML for OTX maps
mapkind = "OTBM" <------ To zostawiamy.

-- SQL for acc/player info from SQL, XML for acc/player info from XML
sourcedata = "XML" <------ To zostawiamy.

-- the message the player gets when he logs in
loginmsg = "Witam na PimpekOTS" <------ Napis, który pojawia siê po zalogowaniu do gry na kanale Default.

-- the port otserv listens on *
port = "7171" <------ Port Servera. Najlepiej zostawiæ taki jaki jest.

-- name of our server
servername = "PimpekOTS" <------ Nazwa servera.

-- name of the owner of our server
ownername = "GM Pimpus" <------ Posiadacz servera.

-- email of the owner of our server
owneremail = "" <------ E-mail posiadacza servera.

-- the url for more server info
url = "" <------ Strona servera. Nie jest konieczna

-- the location of the server
location = "Poland" <------ To raczej zostawiamy

-- the ip the server should redirect too *
ip = "86.63.99.152" <------ Nasze IP. Aby je sprawdziæ wchodzimy na http://www.whatismyip.org/

-- The messagebox you sometimes get before you choose characters *
motd = "Witamy na PimpekOTS " <------ Tekst, który pojawia siê przed list± postaci.
motdnum="0"

-- use md5 passwords for accounts, yes/no
md5passwords = "no"

-- world type. options: pvp, no-pvp, pvp-enforced *
worldtype = "pvp" <------ Typ ¶wiata.

Krótki opis
,,PvP- Mo¿na siê zabijaæ"
,,PvP-Enforced- Za zabicie gracza dostaje siê do¶wiadczenie"
,,No-PvP- Nie mo¿na siê zabijaæ.

-- max number of players allowed *
maxplayers = "40" <------ Maksymalna ilo¶æ osób na serverze.

-- exhausted time in ms (1000 = 1sec) *
exhausted = 1000 <------ Jak szybko mo¿na strzelaæ z runek. Poni¿ej 1000 mo¿na strzelaæ z macro =P

-- exhaustion time for healing spells (1000 = 1sec)
exhaustedheal = 1000 <------ Jak szybko mo¿na siê leczyæ czarami spontaniczymi (exura, exura gran, exura vita)

-- how many ms to add if the player is already exhausted and tries to cast a spell (1000 = 1sec)
exhaustedadd = 300

-- how long does the player has to stay out of fight to get pz unlocked in ms (1000 = 1sec)
pzlocked = 10*1000

-- allow multiple logins of the same char
allowclones = 0 <------ Ile osób mo¿e graæ 1 charem. Przydatne do PvP

-- vocation names
vocations = {"a sorcerer", "a druid", "a paladin", "a knight"} <------ Najlepiej zostawiæ
promoted_vocations = {"a master sorcerer", "an elder druid", "a royal paladin", "an elite knight"} <------ Te¿ najlepiej zostawiæ


--- SQL part
sql_host = "localhost"
sql_user = "root"
sql_pass = ""
sql_db = "otserv"


--- SQL MAP part
sqlmap = "test_map"
map_host = "localhost"
map_user = "root"
map_pass = ""
map_db = ""

------------------------- YurOTS basic configuration ---------------------------

-- name of your world (seen on the character list when logging in)
worldname = "Siwek OTS" <------ Nazwa Servera

-- how often do server saves it's state (0 = off, 5 = 5min, 60 = hour)
autosave = 10 <------ Co jaki czas ma nastêpowaæ zapis servera.

-- do you want to enable cap system? (yes/no)
capsystem = "no" <------ Czy ma byæ cap system??

-- do you want players to learn spells before they can use them? (yes/no) *
learnspells = "no" <------ Czy trzeba uczyæ siê czarów??

-- do you want to give premium account to all players? (yes/no)
freepremmy = "no" <------ Czy gracze maj± zaczynaæ z Premium Account

-- do you want premium players to wait in queue as others? (yes/no)
queuepremmy = "yes"

-- how much % of {exp, mana, skill, eq, bp} do you lose when dying
diepercent = {"7", "7", "7", "7", "100"} <------ Jakie s± szanse na stratê do¶wiadczenia, m lvl, skilli, eq lub backpacka

-- how many summons player can have
maxsummons = 2 <------ Maksymalna ilo¶æ summonów.

-- do you want to give summons for all vocations? (yes/no)
summonsallvoc = "no" <------ Czy wszystkie profesje mog± tworzyæ summona (Knight biega z 2 ds'ami?)

-- chance of losing a spear when shot (0 - none lost, 100000 - all lost)
spearlosechance = 50 <------ Po ilu uderzeniach spear ma ulec zniszczeniu

-- anti-afk - maximum idle time to kick player (1 = 1min)
kicktime = 15 <------ Po ilu minutach po nie oddawaniu oznak ¿ycia gracz ma zostaæ wyrzucony z gry

-- maximum number of items player can keep in his/her depot
maxdepotitems = 10000 <------ Maksymalna ilo¶æ itemów w depo

-- maximum number of items on a house tile (including those in containers)
maxhousetileitems = 20 <------ Maksymalna ilo¶æ itemów na jednej kratce domku

-- how much death entries are saved in players file (old are deleted)
maxdeathentries = 10

-- mana consumend by {snakebite, moonlight, volcanic, quagmire, tempest} rod
rodmana = {"2", "3", "5", "8", "13"} <------ Najlepiej to i 3 poni¿sze zostawiæ.

-- mana consumed by wand of {vortex, dragonbreath, plague, cosmic energy, inferno}
wandmana = {"2", "3", "5", "8", "13"} <------ Najlepiej to i 2 poni¿sze zostawiæ.

-- shooting range of {snakebite, moonlight, volcanic, quagmire, tempest} rod
rodrange = {"4", "3", "2", "1", "3"} <------ Najlepiej to i 1 poni¿szy zostawiæ.

-- shooting range of wand of {vortex, dragonbreath, plague, cosmic energy, inferno}
wandrange = {"4", "3", "2", "1", "3"} <------ Najlepiej to zostawiæ.

-- damage of burst arrows blast
-- default is from (1*lvl+5*mlvl)*0.24 to (1*lvl+5*mlvl)*0.55 <------ Obra¿enia od burst arrow
burstarrowdmg = {"1.0", "5.0", "0.24", "0.55"} <------ Obra¿enia od burst arrow

--------------------------- Multipliers and gains ------------------------------

-- experience multiplier (how much faster you got exp from monsters) *
expmul = 4 <------ Mno¿nik expa.

-- experience multiplier for pvp-enforced (how much faster you got exp from players)
expmulpvp = 2 <------ Przy PvP-Enforced po zabiciu gracza dostajemy jego do¶wiadczenie. Tutaj jest mno¿nik tego do¶wiadczenia

-- skill multipliers: 1 - rl tibia, 10 - ten times faster etc. {no-voc, sorcerer, druid, paladin, knight}
weaponmul = {"5", "5", "5", "5", "40"} <------ Jak szybko maj± rosn±æ skille: fist, sword, axe i club figting
distmul = {"1", "1", "1", "40", "1"} <------ Jak szyko ma rosn±æ distance
shieldmul = {"5", "5", "5", "20", "30"} <------ Jak szybko ma rosn±æ shielding
manamul = {"1", "3", "3", "2", "2"} <------ Jak szybko ma rosn±æ magic level

-- how much points of life,mana,cap do you get when advancing {no-voc, sorcerer, druid, paladin, knight}
capgain = {"10", "10", "10", "20", "25"} <------ Ile co level dana profesja ma otrzymywaæ capa
managain = {"5", "30", "30", "15", "5"} <------ Ile co level dana profesja ma otrzymywaæ many
hpgain = {"5", "5", "5", "10", "15"} <------ Ile co level dana profesja ma otrzymywaæ ¿ycia

-- how much faster do you recovery life,mana after eating food (1 - rl tibia)
healthtickmul = 10 <------ O ile razy szybciej ma rosn±æ ¿ycie ni¿ w rl tibii
manatickmul = 10 <------ O ile razy szybciej ma rosn±æ mana ni¿ w rl tibii

-------------------------------- Skull system ----------------------------------

-- how many unjustified kills to get a red skull
redunjust = 3 <------ Po ilu zabiciach mamy otrzymaæ red skulla (tylko w PvP)

-- how many unjustified kills to get banned
banunjust = 6 <------ Po ilu zabiciach mamy otrzymaæ automatycznego bana

-- how long do you have white skull after attacking player (1 = 1min)
hittime = 1

-- how long do you have white skull after killing player (1 = 1min)
whitetime = 15 <------ Czas trwania white skulla

-- how long do you have red skull (1 = 1min)
redtime = 6*60 <------ Czas trwania red skulla. Im wiêcej osób tutaj zabijemy tym d³u¿ej mamy. Po zabiciu 3 osób czekamy 3h, po 4 graczach 4h itd.

-- how long do you have to wait to lose 1 unjustified kill (1 = 1min)
fragtime = 12*60

------------------------------ GM access rights -------------------------------- To ju¿ zostawimy

-- access to walk into houses and open house doors
accesshouse = 3

-- access to login without waiting in the queue or when server is closed
accessenter = 3

-- access to ignore damage, exhaustion, cap limit and be ignored by monsters
accessprotect = 3

-- access to broadcast messages and talk in colors (#c blabla - in public channels)
accesstalk = 3

-- access to move distant items from/to distant locations
accessremote = 3

-- access to see id and position of the item you are looking at
accesslook = 3

Tak wiêc po uzupe³nieniu tych wa¿nych i mniej wa¿nych pól mamy w³a¶ciwie OTS gotowego.

Zmienianie cen run
Ale zapewne nie jeden z was chcia³ by, aby na serverze nie by³y takie drogie runy.
Jak to zrobiæ?? W³a¶nie tak:
Wchodzimy w folder z OTS nastêpnie data/npc/scripts
Otwieramy plik runes.lua za pomoc± notatnika i zmieniamy nastêpuj±ce rzeczy:

Kod:

focus = 0
talk_start = 0
target = 0
following = false
attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)

end


function onCreatureAppear(creature)

end


function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye then.')
focus = 0
talk_start = 0
end
end


function onCreatureTurn(creature)

end


function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end


function onCreatureSay(cid, type, msg)
msg = string.lower(msg)

if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Hello ' .. creatureGetName(cid) .. '! I sell runes, wands and rods.')
focus = cid
talk_start = os.clock()

elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')

elseif focus == cid then
talk_start = os.clock()

if msgcontains(msg, 'runes') then
selfSay('I sell hmms (40gps), uhs (40gps), gfbs (60gps), explosions (60gps), sds (90gps) and blank runes (5gps). To buy more runes say "10 uh" or "100 sd".')
elseif msgcontains(msg, 'wands') then
selfSay('I sell wand of inferno (15k), plague (5k), cosmic energy (10k), vortex (500gp) and dragonbreath (1k).')
elseif msgcontains(msg, 'rods') then
selfSay('I sell quagmire (10k), snakebite (500gp), tempest (15k), volcanic (5k) and moonlight rod (1k).')

elseif msgcontains(msg, 'inferno') then
buy(cid,2187,1,15000)
elseif msgcontains(msg, 'plague') then
buy(cid,2188,1,5000)
elseif msgcontains(msg, 'cosmic energy') then
buy(cid,2189,1,10000)
elseif msgcontains(msg, 'vortex') then
buy(cid,2190,1,500)
elseif msgcontains(msg, 'dragonbreath') then
buy(cid,2191,1,1000)

elseif msgcontains(msg, 'quagmire') then
buy(cid,2181,1,10000)
elseif msgcontains(msg, 'snakebite') then
buy(cid,2182,1,500)
elseif msgcontains(msg, 'tempest') then
buy(cid,2183,1,15000)
elseif msgcontains(msg, 'volcanic') then
buy(cid,2185,1,5000)
elseif msgcontains(msg, 'moonlight') then
buy(cid,2186,1,1000)

elseif msgcontains(msg, '100 hmm') then
buy(cid,2311,100,800)
elseif msgcontains(msg, '10 hmm') then
buy(cid,2311,10,80)
elseif msgcontains(msg, 'hmm') then
buy(cid,2311,5,40)

elseif msgcontains(msg, '100 uh') then
buy(cid,2273,100,4000)
elseif msgcontains(msg, '10 uh') then
buy(cid,2273,10,400)
elseif msgcontains(msg, 'uh') then
buy(cid,2273,1,40)

elseif msgcontains(msg, '100 gfb') then
buy(cid,2304,100,2000)
elseif msgcontains(msg, '10 gfb') then
buy(cid,2304,10,200)
elseif msgcontains(msg, 'gfb') then
buy(cid,2304,3,60)

elseif msgcontains(msg, '100 explosion') then
buy(cid,2313,100,2000)
elseif msgcontains(msg, '10 explosion') then
buy(cid,2313,10,200)
elseif msgcontains(msg, 'explosion') then
buy(cid,2313,3,60)

elseif msgcontains(msg, '100 sd') then
buy(cid,2268,100,9000)
elseif msgcontains(msg, '10 sd') then
buy(cid,2268,10,900)
elseif msgcontains(msg, 'sd') then
buy(cid,2268,1,90)

elseif msgcontains(msg, 'blank') then
buy(cid,2260,1,5)

elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 4 then
selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end
end


function onCreatureChangeOutfit(creature)

end


function onThink()
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Next Please...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good bye then.')
focus = 0
end
end
end

Zrobiê tutaj przyk³ad z hmm.
Mamy oto takie 2 linijki:

Kod:

elseif msgcontains(msg, 'hmm') then
buy(cid,2311,100,40)

Tekst, który gracz musi wypowiedzieæ, aby kupiæ dan± runê.
Ilo¶æ strza³ów w zakupionej runie
Suma pieniêdzy zakupu runy

Czyli teraz przyk³adowo gdyby¶my napisali do NPC:
>Hi
>hmm

Musieli by¶my zap³aciæ 40 gp, a otrzymali by¶my hmm o warto¶ci 100 strza³ów.
Tak zmieniamy przy ka¿dej runie, a bêdzie wszystko ok



I prosze go nie dawac na inne forum z gory dzieki

///Mefix
Dodaje Cytat

Ostatnio edytowany przez Najtaczek (2010-07-15 06:59:48)

Offline

#2 2010-07-15 07:48:46

 Mefix

_/Pjona

4895893
Call me!
Skąd: Zielona Góra/Falubaz
Zarejestrowany: 2010-07-14
Posty: 19
Punktów :   

Re: Poradnik O OTS

Poradnik ³adny, powiniene¶ obramowaæ go w cytat, i zmieniæ kolor.
Pozdrawiam

Offline

Chcia³bym was zaprosiæ na Nowo Powsta³e Forum o OpenTibiaServer,Nasze Forum Posiada Telewizje oraz Radio! Forum Posiada Równie¿ Spolszczonego ShoutBoxa Nabór jest otwarty, I ty Mo¿esz zostaæ Moderatorem! Nie Jest To Kolejny Plagiat TNP Forum Posiada W³asnego OTSa z map± 5mb od zera. Mapa ci±gle jest dopracowywana oraz s± dodawane nowe potwory oraz profesje. Czêsto s± Aktualizacje oraz Admini czêsto s± Aktywni na Forum. Nie czekaj! Wejd¼ i Odwied¼ Nasze Forum!

Stopka forum

RSS
Powered by PunBB 1.2.23
© Copyright 2002–2008 PunBB
Polityka cookies - Wersja Lo-Fi

[ Generated in 0.027 seconds, 8 queries executed ]


Darmowe Forum | Ciekawe Fora | Darmowe Fora
www.poprostupascal.pun.pl www.cs-grzenda.pun.pl www.milicja.pun.pl www.makoma.pun.pl www.bozogrobcy.pun.pl