What's new

-Łatwy Jak zrobi? OTS 7.6 Dla ca?kiem Zielonych

Xelemeleque

New User
Joined
Jan 22, 2011
Messages
4
Reaction score
0
1. Autor: Xelemeleque (Ja)
Oryginalny Temat:
Wi?c Zaczynamy ;]
Spis Tre?ci:
1.Wszystko co Znajduje sie w folderze data.
Code:
1a). Accounts
1b). players
1c). houses
1d). items
1e). Monsters
1f). Npc
1g). Actions
1h). spells
1j).world
1k). vip
Pliki XML
Code:
1. commands
2. guilds
3. house items
4. houses
5. pvparenas
6. queue
7. readables
8. summons
2. konfiguracja config.lua
3. Zmiana Mapy na w?asn?.
4.Konfiguracja ACC Makera Na Passach 1/1
5. Konfiguracja ACC Makera Na Strone
6. Dodawanie Potwor?w do Map Editora (Simone's Map Editor)
1a) - w folderze accounts znajduja si? wszystkie nasze numery kont. w ?rodku to wygl?da tak.
Code:
<?xml version="1.0"?>
<account pass="1" type="1" premDays="150000">
<characters>
<character name="Account 1" />
<character name="Account 2" />
<character name="Account 3" />
</characters>
</account>
account pass="1" <-- Nasze has?o (password)
premDays="150000- ilo?? dni premium (nie dzia?a we wszystkich silnikach)
<characters>
<character name="Account 1" />
<character name="Account 2" />
<character name="Account 3" /> - Nazwy Postaci. Wa?ne now? posta? dodajemy zawsze po <characters> i przed </characters>
1b) W tym folderze znajduj? si? wszystkie nasze postacie. Kod wygl?da tak:
Code:
[SPOILER]<?xml version="1.0"?> <player name="Account 1" account="1" sex="1" lookdir="2" exp="0" voc="0" level="1" access="0" cap="0" maglevel="0" lastlogin="1280904965" premticks="16288000" promoted="0" banned="0"><spawn x="485" y="38" z="7"/><temple x="485" y="37" z="7"/><skull type="0" kills="0" ticks="0" absolve="0"/><health now="1" max="1" food="1000"/><mana now="1" max="1" spent="0"/><ban banned="0" banstart="0" banend="0" comment="" reason="" action="" deleted="0" finalwarning="0" banrealtime=""/><look type="132" head="0" body="81" legs="0" feet="0"/><skills><skill skillid="0" level="0" tries="0"/><skill skillid="1" level="0" tries="0"/><skill skillid="2" level="0" tries="0"/><skill skillid="3" level="0" tries="0"/><skill skillid="4" level="0" tries="0"/><skill skillid="5" level="0" tries="0"/><skill skillid="6" level="0" tries="0"/></skills><spells/><deaths/><inventory/><depots><depot depotid="5"><item id="2590"/></depot><depot depotid="4"><item id="2590"/></depot><depot depotid="3"><item id="2590"/></depot><depot depotid="2"><item id="2590"/></depot><depot depotid="1"><item id="2590"><inside><item id="2506"/><item id="2522"/><item id="2400"/><item id="2296"/><item id="2120"/><item id="2554"/><item id="2393"/><item id="2006" count="7"/><item id="2006" count="7"/><item id="2006" count="7"/><item id="2006" count="7"/><item id="2006" count="7"/><item id="2006" count="7"/><item id="2499"/><item id="2195"/><item id="1689"/><item id="1692"/><item id="2160" count="60"/></inside></item></depot></depots><storage><data key="1000" value="1"/><data key="1001" value="1"/><data key="1002" value="1"/><data key="2349" value="1"/><data key="2352" value="1"/><data key="2358" value="1"/><data key="2396" value="1"/><data key="2400" value="1"/><data key="2431" value="1"/><data key="2469" value="1"/><data key="2477" value="1"/><data key="2478" value="1"/><data key="2493" value="1"/><data key="2494" value="1"/><data key="2514" value="1"/><data key="2516" value="1"/><data key="4842" value="1"/><data key="5003" value="1"/><data key="5010" value="1"/><data key="5019" value="1"/><data key="8400" value="1"/><data key="8402" value="1"/><data key="8408" value="1"/><data key="9010" value="1"/><data key="9013" value="1"/><data key="9014" value="1"/><data key="9016" value="1"/><data key="9999" value="140"/></storage></player>][/SPOILER]
-player name -> imi? postaci musi by? takie same w pliku accounta,
-account -> numer accounta w moim przypadku 1 (numer taki sam jak w pliku „data/accounts”),
-sex -> p?e? postaci,
-lookdir -> kierunek zwr?cenia postaci
-voc -> profesja,
-exp -> ilo?? do?wiadczenia,
-level -> poziom,
-access -> 0-zwyk?y gracz, 1-Tutor, 2-Senior Tutor, 3-GM, 4-CM, 5- Gamemaster
- maglevel -> poziom magiczny,
-spawn -> wsp??rz?dne logowania na mapie (w nowszych silnikach mozna sprawdzic za pomoc? komendy /pos 'Nazwa Gracza' w tych starszych dzi?ki Map Editorowi
-temple -> wsp??rz?dne ?wi?tyni (gdy player zgnie w?a?nie tam si? pojawia),
-health -> ?ycie, now -> aktualne ?ycie, max -> maksymalne ?ycie,
-mana -> mana, reszta tak samo jak wy?ej,
-look type -> wygl?d (kolory), najlepiej zostawi? takie jakie sa
-skills -> nasze skille oto spis kt?ry numer to kt?ry skill:
1 – fist fighting
2 – club fighting
3 – sword fighting
4 – axe fighting
5 – distance fighting
6 – shielding
7 – fishing
-inventory -> nasz ekwipunek,
-slot slotid="1" -> miejsce w naszym ekwipunku:
1= he?m
2= amulet
3= plecak
4= zbroja
5= prawa r?ka
6= lewa R?ka
7= nogawice
8= buty
9= pier?cie?
10= miejsce na strza?y
-count -> liczba jaki? rzeczy np. bolt?w, gp, run?w,
-lastlogin – czas ostatniego logowania,
-premticks – czas pozosta?ego pacca,
-promoted – promocja; 0 – brak, 1- gracz ma promocje
-banned – status bana; 0 – brak, 1 – gracz jest zbanowany,
1c) Houses Ustalamy Owner?w danych domk?w Kod wygl?da tak:
Code:
<?xml version="1.0"?>
<house><frontdoor x="181" y="104" z="7"/><owner name=""/></house>
<house> poprostu domek
<frontdoor x="181" y="104" z="7"/> pozycja x,y,z dzwi frontowych
<owner name=""/> Nazwa W?a?ciciela domk?w.
1d) Items tutaj znajdziemy 2 pliki jeden to items.xml, a drugi to items.otb (Wa?ne do edytowania items.otb u?ywamy ItemEditor)
teraz poka?e zawarto?? items.xml
Code:
<?xml version="1.0"?>
<items>
<item id="2132" charges="200"/>		-- silver amulet
<item id="2126" charges="200"/>		-- bronze amulet
<item id="2161" charges="200"/>		-- strange talisman
<item id="2164" charges="20"/>		-- might ring
<item id="2166" time="1800000"/>	-- power ring
<item id="2167" time="600000"/>		-- energy ring
<item id="2169" time="600000"/>		-- time ring
<item id="2197" charges="5"/>		-- stone skin amulet
<item id="2198" charges="50"/>		-- elven amulet
<item id="2199" charges="150"/>		-- garlic necklace
<item id="2200" charges="250"/>		-- protection amulet
<item id="2201" charges="200"/>		-- dragon necklace
<item id="2207" time="1800000"/>	-- sword ring
<item id="2208" time="1800000"/>	-- axe ring
<item id="2209" time="1800000"/>	-- club ring
<item id="2165" time="60000"/>		-- stealth ring
<item id="1740" questbox="1" />		-- unmovables
<item id="1747" questbox="1" />
<item id="1748" questbox="1" />
<item id="1749" questbox="1" />
<item id="1770" questbox="1" />
<item id="1209" door="1"/>
<item id="1210" door="1"/>
<item id="1211" door="1"/>
<item id="1212" door="1"/>
<item id="1213" door="1"/>
<item id="1214" door="1"/>
<item id="1219" door="1"/>
<item id="1220" door="1"/>
<item id="1221" door="1"/>
<item id="1222" door="1"/>
<item id="1223" door="1"/>
<item id="1224" door="1"/>
<item id="1225" door="1"/>
<item id="1226" door="1"/>
<item id="1227" door="1"/>
<item id="1228" door="1"/>
<item id="1229" door="1"/>
<item id="1230" door="1"/>
<item id="1231" door="1"/>
<item id="1232" door="1"/>
<item id="1233" door="1"/>
<item id="1234" door="1"/>
<item id="1235" door="1"/>
<item id="1236" door="1"/>
<item id="1237" door="1"/>
<item id="1238" door="1"/>
<item id="1239" door="1"/>
<item id="1240" door="1"/>
<item id="1241" door="1"/>
<item id="1242" door="1"/>
<item id="1243" door="1"/>
<item id="1244" door="1"/>
<item id="1245" door="1"/>
<item id="1246" door="1"/>
<item id="1247" door="1"/>
<item id="1248" door="1"/>
<item id="1249" door="1"/>
<item id="1250" door="1"/>
<item id="1251" door="1"/>
<item id="1252" door="1"/>
<item id="1253" door="1"/>
<item id="1254" door="1"/>
<item id="1255" door="1"/>
<item id="1256" door="1"/>
<item id="1257" door="1"/>
<item id="1258" door="1"/>
<item id="1259" door="1"/>
<item id="1260" door="1"/>
<item id="1261" door="1"/>
<item id="1262" door="1"/>
<item id="3535" door="1"/>
<item id="3536" door="1"/>
<item id="3537" door="1"/>
<item id="3538" door="1"/>
<item id="3539" door="1"/>
<item id="3540" door="1"/>
<item id="3541" door="1"/>
<item id="3542" door="1"/>
<item id="3543" door="1"/>
<item id="3544" door="1"/>
<item id="3545" door="1"/>
<item id="3546" door="1"/>
<item id="3547" door="1"/>
<item id="3548" door="1"/>
<item id="3549" door="1"/>
<item id="3550" door="1"/>
<item id="3551" door="1"/>
<item id="3552" door="1"/>
<item id="1634" door="1"/>
<item id="1635" door="1"/>
<item id="1636" door="1"/>
<item id="1637" door="1"/>
<item id="1638" door="1"/>
<item id="1639" door="1"/>
<item id="1640" door="1"/>                       
<item id="1641" door="1"/>   
<item id="2589" name="locker" type="depot"/>   
<item id="2590" name="locker" type="depot"/> 
<item id="2591" name="locker" type="depot"/> 
<item id="2592" name="locker" type="depot"/>  
</items>
Je?eli edytowali?my map? i nie dzia?a nam depo nic straconego.
wystarczy wpisa? w items.xml na samym ko?cu przed </items>
Code:
<item id="2589" name="locker" type="depot"/>   
<item id="2590" name="locker" type="depot"/> 
<item id="2591" name="locker" type="depot"/> 
<item id="2592" name="locker" type="depot"/>
oraz w items.xml w Map edytorze. otworzy? map? postawi? byle jaki Ground i zapia? mape. Dzia?a Jedynie w Simone's Map Edytor
1e) Monsters. tu znajdziemy wszystkie potwory kt?re s? na naszym OTS'ie
Code:
<?xml version="1.0"?>
<monster name="Warlock" level="40" maglevel="10" experience="4000" pushable="0" armor="29" defense="31" canpushitems="1" staticattack="50" changetarget="200" speed="240">
	<health now="3200" max="3200"/>
	<look type="130" head="19" body="71" legs="128" feet="128" corpse="3128"/>
	<combat targetdistance="5" runonhealth="0"/>
<attacks>
	<attack type="melee" mindamage="27" maxdamage="85"/>
	<attack type="rune" name="warlock_burstarrow" exhaustion="500" cycleticks="3000" probability="70"/>
	<attack type="rune" name="warlock_firebomb" exhaustion="500" cycleticks="5000" probability="60"/>
	<attack type="instant" name="w exevo gran vis lux" exhaustion="500" cycleticks="6000" probability="90"/>
	<attack type="rune" name="warlock_manadrain" exhaustion="100" cycleticks="4000" probability="30"/>
	<attack type="instant" name="invis" exhaustion="100" cycleticks="5000" probability="25"/>
</attacks>
<defenses>
	<defense immunity="energy"/>
	<defense immunity="fire"/>
	<defense immunity="poison"/>
	<defense immunity="paralyze"/>
	<defense immunity="drunk"/>
	<defense immunity="invisible"/>
</defenses>
<voices>
	<voice sentence="Even a rat is a better mage than you."/>
</voices>
<loot>
 	<item id="2148" countmax="100" chance1="100000" chancemax="0"/>
 	<item id="2600" chance="10000"/>
 	<item id="1987" chance="100000">
 	<inside>
 	<item id="2148" countmax="50" chance1="80000" chancemax="0"/>
 	<item id="2411" chance="5000"/>
	<item id="2792" countmax="5" chance1="6666" chancemax="0"/>
	<item id="2793" countmax="2" chance1="6666" chancemax="0"/>
 	<item id="2656" chance="1333"/>
 	<item id="2466" chance="1111"/>
 	<item id="2436" chance="1428"/>
 	<item id="2123" chance="1200"/>
 	</inside>
 	</item>
</loot>
<summons maxSummons="3">
 	<summon name="Stone Golem" chance="1000"/>
</summons>
</monster>
Code:
[SPOILER=monster name- Nazwa potwora level- level potwora maglevel- magic level potwora experience- ile potw?r daje expa ilo?? wpisana w experience jest mno?ona (Np. je?eli mamy w exp mul wpisany exp=10 experience jest mno?ony 10 krotnie. pushable- ? armor- armor potwora defense- def potwora canpushitems-? staticattack- Attack Potwora changetarget - szansa ?e potw?r zmieni cel speed- szybko?? potwora health now- ?ycie teraz, health max- maxymalne ?ycie potwora Looktype- wygl?d potwora, head="19" body="71" legs="128" feet="128" -- kolory potwora corpse- id cia?a potwora combat targetdistance- combo z odleg?o?ci runonhealth- leczenie si? runami <attacks>- Ataki Potwora <attack type="melee" mindamage="27" maxdamage="85"/> atak potwora z odleg?o?ci min- minimalny hit, max- maxymalny hit potwora <attack type="rune" name="warlock_burstarrow" exhaustion="500" cycleticks="3000" probability="70"/> <attack type="rune" name="warlock_firebomb" exhaustion="500" cycleticks="5000" probability="60"/> <attack type="instant" name="w exevo gran vis lux" exhaustion="500" cycleticks="6000" probability="90"/> <attack type="rune" name="warlock_manadrain" exhaustion="100" cycleticks="4000" probability="30"/> <attack type="instant" name="invis" exhaustion="100" cycleticks="5000" probability="25"/> probability- prawdopodobienstwo ?e potw?r walnie z burst?w cycleticks-? exhaustion- exhaused po uderzniu warlock_burstarrow- z czego atakuje instant- atakuje z czaru warlock_manadrain- paralize </attacks> tym konczymy attaki potwora. <defenses> na co odporny <defense immunity="energy"/> energia <defense immunity="fire"/> ogien <defense immunity="poison"/> trucizna <defense immunity="paralyze"/> parali? <defense immunity="drunk"/> upicie <defense immunity="invisible"/> niewidzialno?? </defenses> tym ko?czymy <voices> -odg?osy Potwora <voice sentence="Even a rat is a better mage than you."/> co wypowiada </voices> tym ko?czymy <loot> loot z potwora <item id="2148" countmax="100" chance1="100000" chancemax="0"/> <item id="2600" chance="10000"/> <item id="1987" chance="100000"> <inside> <item id="2148" countmax="50" chance1="80000" chancemax="0"/> <item id="2411" chance="5000"/> <item id="2792" countmax="5" chance1="6666" chancemax="0"/> <item id="2793" countmax="2" chance1="6666" chancemax="0"/> <item id="2656" chance="1333"/> <item id="2466" chance="1111"/> <item id="2436" chance="1428"/> <item id="2123" chance="1200"/> </inside> </item> </loot> tym konczymy chance- szansa ?e item wypadnie countmax- ilo?? np grzybk?w item id- id item'u </inside>? <summons maxSummons="3"> maksymalna ilo?? summon?w <summon name="Stone Golem" chance="1000"/> </summons> tym ko?czymy summon name- Nazwa Summowanego potwora chance- szansa ?e przywo?a summona </monster> tym ko?czymy ca?y plik potwora.][/SPOILER]
Je?eli chcemy doda? nowego potwora wchodzimy:
data/monsters/monsters.xml:
Code:
<monster name="Lord Pancerniak" file="lord pancerniak.xml" />
monster name- nazwa potwora
file- plik z potworem.xml.
1f) Npc tutaj znajdziemy Ka?dego NPC (Takzwanego Bota Komputerowego)
Wa?ne znajdziesz tam jeszcze folder scripts. w kt?rym dodajesz ca?? rozmowe z NPC.
Podstawowy NPC.:
Code:
<?xml version="1.0"?>
<npc name="Dufi" script="data/npc/scripts/aol.lua" access="3">
 <look type="128" head="24" body="77" legs="10" feet="20"/>
</npc>
npc name- Nazwa NPC
script - data/npc/scripts/nazwa skryptu.lua
access- dost?pno?? Npc'ka zwykle jest to 3
look type wygl?d npc. head="24" body="77" legs="10" feet="20"/> <kolorki
</npc> tym ko?czymy NPC
Teraz Poka?e wam Jak Wygl?da Script NPC kt?ry sprzedaje aole.
Code:
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('Dowidzenia.')
          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 ((string.find(msg, '(%a*)hi(%a*)')
or string.find(msg, '(%a*)siema(%a*)')
or string.find(msg, '(%a*)czesc(%a*)')
or string.find(msg, '(%a*)cze(%a*)')
or string.find(msg, '(%a*)yo(%a*)')
or string.find(msg, '(%a*)elo(%a*)'))
and (focus == 0)) and getDistanceToCreature(cid) < 4 then
rsay = math.random(1,4)
if rsay == 1 then says = 'Waazzuup'
elseif rsay == 2 then says = 'Siema'
elseif rsay == 3 then says = 'Czesc'
elseif rsay == 4 then says = 'Witam'
end
   selfSay('Czesc ' .. creatureGetName(cid) .. '!!! Sprzedaje szaliki [1k], platinum amulet [5k], AOL [20k] oraz parcel [20gp] i letter [10gp]')
   focus = cid
talk_start = os.clock()
   elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
   selfSay('Spadaj ' .. creatureGetName(cid) .. ' do kolejki !')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'parcel') then
buy(cid,2595,1,15)
buy(cid,2599,1,5)
elseif msgcontains(msg, 'letter') then
buy(cid,2597,1,10)
elseif msgcontains(msg, 'platinum amulet') then
buy(cid,2171,1,5000)
elseif msgcontains(msg, 'szalik') or msgcontains(msg, 'scaf') then
buy(cid,2661,1,1000)
elseif msgcontains(msg, 'amulet of loss') or msgcontains(msg, 'aol') then
         buy(cid,2173,1,20000)
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Dowidzenia ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
   if focus == 0 then
   end
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Ktos Nastepny??')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Dowidzenia.')
focus = 0
end
end
if focus == 0 then
cx, cy, cz = selfGetPosition()
randmove = math.random(1,20)
if randmove == 1 then
nx = cx + 1
end
if randmove == 2 then
nx = cx - 1
end
if randmove == 3 then
ny = cy + 1
end
if randmove == 4 then
ny = cy - 1
end
if randmove >= 5 then
nx = cx
ny = cy
end
moveToPosition(nx, ny, cz)
--summons = 30
--summons2 = 30
end
end
gdy gracz napisze hi npc wysle wiadomo??| selfSay('Czesc ' .. creatureGetName(cid) .. ' Sprzedaje szaliki [1k], platinum amulet [5k], AOL [20k] oraz parcel [20gp] i letter [10gp]') focus = cid gdy podczas rozmowy z graczem 2 gracz napisze hi npc odpowie elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Spadaj ' .. creatureGetName(cid) .. ' do kolejki !') if msgcontains(msg, 'parcel') then buy(cid,2595,1,15) buy(cid,2599,1,5) elseif msgcontains(msg, 'letter') then buy(cid,2597,1,10) elseif msgcontains(msg, 'platinum amulet') then buy(cid,2171,1,5000) elseif msgcontains(msg, 'szalik') or msgcontains(msg, 'scaf') then buy(cid,2661,1,1000) elseif msgcontains(msg, 'amulet of loss') or msgcontains(msg, 'aol') then buy(cid,2173,1,20000) gdy gracz napisze co? z rzeczy powy?ej zostanie mu usuni?te z Bp gp w zale?no?ci od tego co napisze i dostanie item o id xxx,1 (Item kt?ry chcia? kupi? 1x).]
1g). Nadszed? czas na Actions. w tym folderze znajdziemy plik actions.xml oraz folder scripts, (folder lib nas nie obchodzi)
wi?c przejd?my do actions.xml

Poka?e wam tylko kawa?ek tego pliku bo m?j jest zbyt du?y Xd
Code:
<?xml version="1.0"?>
<actions>
<action itemid="2148" script="gold.lua" />
<action uniqueid="7099" script="magiczne1.lua" />
<action actionid="7096" script="magiczne1.lua" />
</actions>
action itemid -- je?eli mamy klikn?? na przedmiot o danym id
action uniqueid -- je?eli mamy klikn?? na przedmiot o danym unique id
action actionid -- je?eli mamy klikn?? na przedmiot o danym action id
Folder Scripts
znajduj? si? tam wszystkie nasze skrypty, poka?e wam teraz skrypt na tilelvl
Code:
function onWalk(cid, item, itemuid, itemaid, posx, posy, posz) -- funkcja (w typ przypadku onWalk) czyli po wej?ciu na kratke
   topos = getPlayerPosition(cid) -- sprawdza pozycje gracza
   if itemuid == 4444 then -- jaki unique id musi miec kratka
      if getPlayerLevel(cid) < 10 then -- je?eli gracz ma dany level
         out = {x=154, y=58, z=7, stackpos=253} -- je?eli nie ma danego lvl'a to odsuwa go na pozycje
         tile = {x=posx, y=posy, z=posz, stackpos=253} -- kratka o danym uid (w miejsca x=, y=, z=.) nie wstawiamy pozycji x,y,z ona sama nam si? ustawi
         player = getThingfromPos(tile) -- je?eli gracz ma lvl przepuszcza gracza na ta kratke i moze isc
         doTeleportThing(player.uid,out) -- je?eli nie ma 10 lvl'a funkcja ta przesuwa gracza na podane wcze?niej wsp??rz?dne
         doPlayerSendCancel(cid,"Musisz miec minimum 10lvl aby przejsc.") -- wiad. ktora ukaze sie jak gracz nie ma lvla
      end
   end
end
1h). wi?c doszli?my do folderu spells. w ?rodku czekaj? na was 3 foldery i jeden plik xml. (folderu lib nie ruszamy)
zosta?o nam instant, oraz runes
runes- tam wrzucamy wszystkie runy!
instant- tu znajduja sie wszystkie czary, jak i te potwork?w.

zosta?o nam otworzy? spells.xml
Code:
<?xml version="1.0"?>
<spells maxVoc="4"> -- maksymalna ilo?? professji 
<!--// Instant \\--> -- czary
aby doda? czar nale?y doda? jedn? linijk?
<spell name="sasasasasasasas"				words="exori mas mas"				maglv="20"	mana="2200"	enabled="1"><vocation id="1" /></spell>
spell name- nazwa spell'u 
words- zakl?cie, (co gracz ma napisa? ?eby u?y? czaru)
maglv- potrzebny lvl do u?ycia czaru
mana- potrzebna mana do u?ycia czaru
enabled- czy czar jest w??czony (nie jestem pewien w 100%)
vocation id- numer professji kt?ra mo?e u?y? czaru, aby doda? wi?cej Professji wystarczy doda? obok <vocation id="1" /><vocation id="2 />
</spell> tym ko?czymy czar
<!--// Runes \\--> Runy r?wnie? w spells.xml (wystarczy wcisn?c Ctrl+f i wpisa? runes)
<rune name="Fireball"				id="2302"	charges="3"		maglv="2"	mana="0"	enabled="1"></rune>
rune name- nazwa runy
id- id runy
charges- uzycia runy
maglv-magic lvl potrzebny do uzycia runy
mana- mana potrzebna do uzycia runy
enabled to co wcze?niej.
</rune> tym konczymy run?
folder scripts, oraz runes zostawiamy poniewa? te? je?li jeste?my nowi lepiej przeczyta? par? poradnik?w na ten temat
1j). czas na Folder World znajdziemy tam 2 pliki xml oraz Mape z rozszerzeniem OTBM
test-spawn- tutaj zapisywane s? wszystkie potwory kt?re postawili?my na Map Editorze (Radz? zrobi? kopie zapasow? test-spawna)
Je?eli nie mamy dodanych Potwork?w do map editora. tak wygl?da test-spawn od ?rodka
Radz? nie zmienia? zawarto?ci tego pliku (tylko i wy??cznie poprzez Map Editor)
NPC- tutaj stawiamy nasze Boty na mapie kod
Code:
<?xml version="1.0"?>
<npclist>
<npc name="GM SHOP" x="161" y="54" z="7" dir="0"/>
Npc name- nazwa npc 
x,y,z - pozycja na mapie naszego NPC
</npclist> tak ko?czymy NPC
PLIKU Z ROZSZERZENIEM OTBM NIE RUSZAMY!!
1k)Folder Vip. tutaj s? zapisywane wszystkie numery kont kt?re si? loguj?
Czas na reszt? plik?w kt?re znajduj? si? w folderze data.
1. Commands.xml
Code:
<?xml version="1.0"?>
<!-- commands are described in readme.txt -->
<commands>
<command cmd="/a"			access="3" /> skok o x kratek 
<command cmd="/B"			access="1" /> wiadomo?? na czerwono
<command cmd="/b"			access="3" /> ban na ip
<command cmd="/c"			access="3" /> przyzywanie potwor?w/ gracza do siebie
<command cmd="/i"			access="3" /> tworzenie items /i id itema 1. (przy tworzeniu jedzenia, cc itp mo?na ustawic 100.
<command cmd="/m"			access="3" /> tworzenie potwora
<command cmd="/reload"		access="3" /> prze?adowanie actions/scrips (nie trzeba restartowa? OTS'a)
<command cmd="/s"			access="3" /> 
<command cmd="/t"			access="3" /> teleportacja do Temple
<command cmd="/z"			access="3" /> przywo?anie NPC /z Mad
<command cmd="/goto"		access="3" /> teleport do gracza/monstera /goto Name
<command cmd="/info"		access="3" /> /info informacje o Graczu
<command cmd="/closeserver"	access="3" /> Zamykanie Servera
<command cmd="/openserver"	access="3" /> Otwieranie Servera
<command cmd="/getonline"	access="1" /> Sprawdzanie kto jest online (jakie lvl)
<command cmd="/access"		access="3" /> dawanie accessu graczowi 
<command cmd="/summon"		access="3" /> summonowanie Potwork?w
<command cmd="/vip"		    access="1" /> gracze nie widz? cie w li?cie vip
<command cmd="/playermsg"	access="1" /> wiadomo?? do gracza
<command cmd="/kick"		access="3" /> kickniecie gracza
<command cmd="/premmy"		access="3" /> danie xx godzin paca graczowi /premmy 21 Name
<command cmd="/vote"		access="1" /> Pisanie Na Bia?o bez nick'u
<command cmd="/dwarf"		access="3" /> zmiana gracza w dwarfa
<command cmd="/changesex"	access="3" /> zmiana graczowi p?ci
<command cmd="/nimf"		access="3" /> zmiana gracza w elfa
<command cmd="/checkall"	access="3" /> sprawdza wszystkich graczy czy nie uzywaja bot?w
<command cmd="/checkmc"		access="3" /> sprawdza wszystkich graczy czy nie uzywaja  MC
<command cmd="/makesay"		access="3" /> nie pami?tam
<command cmd="/outfit"		access="3" /> zmiena outfit graczowi /outfit 78 Name
<command cmd="/q"		    access="3" /> sprawdza ilo?? pieni?dzy przy sobie
<command cmd="/removeitem"	access="3" /> Usuwa item o danym id z bp gracza
<command cmd="/white"		access="3" /> pisanie na bia?o
<command cmd="/up"			access="3" /> przeskoczenie o pietro w g?re
<command cmd="/down"		access="3" /> przeskoczenie o pietro w d??
<command cmd="/invisible"	access="3" /> niewidzialno??
<command cmd="/owner"		access="3" /> ustawia ownera domku 
<command cmd="/send"		access="3" /> ?
<command cmd="/pvp"			access="3" /> ustawia pvp 0-brak, 1-pvp 2- pvp enfo
<command cmd="/ban"			access="3" /> banuje gracza
<command cmd="/save"		access="3" /> zapisuje server
<command cmd="/pos"			access="3" /> sprawdza pozycje
<command cmd="/shutdown"	access="3" /> wy??cza serv
<command cmd="/max"			access="3" /> ustawia max graczy na servie
<command cmd="/clean"		access="3" /> czy?ci server
<command cmd="/promote"		access="3" /> daje promocje graczowi
<command cmd="/privMsg"     access="1" /> wysy?a prywatna wiadomo?? do gracza
<command cmd="/opisz"       access="1" /> opisuje gracza 
<command cmd="/temple"      access="1" /> powr?t do temple
<command cmd="!exp"			access="0" /> sprawdza ile pozosta?o exp'u do lvl
<command cmd="!uptime"		access="0" /> sprawdza czas online
<command cmd="!mana"		access="0" /> sprawdza ile pozosta?o exp'u do mlvl
<command cmd="!report"		access="0" /> wysy?a raport
<command cmd="!online"		access="0" /> sprawdza ilo?? graczy online
<command cmd="!house"		access="0" /> kupuje chatke
<command cmd="!frags"		access="0" /> sprawdza ilo?? frag?w
<command cmd="!rs"			access="0" /> sprawdza czas do znikniecia RS'a
<command cmd="!premmy"		access="0" /> sprawdza czas premium
</commands>
tutaj sa wszystkie komendy jakie sa na OTS mo?liwe ze u niekt?rych z was jest mniej ale opisze wszystkie kt?re mam ;)
Code:
[B]2.guilds tu zapisuje wszystkie gildie stworzone na servie
3. houseitems- tu zapisuje wszystkie itemki kt?re s? w domkach
4.houses- tutaj dodajemy nowe domki po wiecej informacji zapraszam do tego tematu Klick
5. pvparenas- tutaj dodajemy wszystkie PVP areny
6.queue??
7.readables- tutaj ustawiamy tekst na tabliczkach.
8.summons- potwory kt?re mo?na summowa?[/B]
2. konfiguracja config.lua
Code:
---------------------------- OTServ configuration ------------------------------
-- datadir
datadir = "data/"   -- nie r?sza?
-- sets what map to load
map = "data/world/test.otbm" --nie rusza? to zostawimy na zmiane Mapy
-- OTBM for binary, SQL for SQL map, XML for OTX maps
mapkind = "OTBM"   --nie rusza? 
-- SQL for acc/player info from SQL, XML for acc/player info from XML
sourcedata = "XML" --nie rusza? 
-- Wiadomosc po zalogowaniu sie
loginmsg = "Witaj Na CrImS OTS Zyczymy milej i udanej gry"
-- port servera
port = "7171"
-- Nazwa Servera
servername = "CrImS OTS"
-- Nazwa Wlasciciela
ownername = "Wielki Buch"
-- Email Wlasciciela
owneremail = ""
-- Aress Servera
url = ""
-- Lokacja Servera
location = "Poland"
-- Ip Servera
ip = "127.0.0.1"
-- Wiadomosc przed wybraniem postaci
motd = "CrImS OTS"
motdnum="0"
-- use md5 passwords for accounts, yes/no
md5passwords = "no"
-- Typ Swiata. options: pvp, no-pvp, pvp-enforced
worldtype = "pvp"
-- Maxymalna ilosc graczy
maxplayers = "200"
-- czas exhausted in ms (1000 = 1sec)
exhausted = 500
-- czas exhaustion Dla czarow leczasych (1000 = 1sec)
exhaustedheal = 500
-- ile gracz dostaje exhaused po uzyciu czaru gdy ma exhaused (1000 = 1sec)
exhaustedadd = 0
-- Czas do znikniecia pz po zaatakowaniu Potwora (1000 = 1sec)
pzlocked = 3*1000
-- Ile Osob moze sie zalogowac na ta sama postac
allowclones = 0
-- Nazwa Professji
vocations = {"Mag", "Druid", "Lucznik", "Rycerz"}
promoted_vocations = {"Starszy Mag", "Starszy Druid", "Mroczny Lucznik", "Rycerz Niszczyciel"}
--- SQL part  -- nie rusza? 
sql_host = "localhost"
sql_user = "root"
sql_pass = ""
sql_db   = "otserv"
--- SQL MAP part  -- nie rusza? 
sqlmap = "test_map"
map_host = "localhost"
map_user = "root"
map_pass = ""
map_db   = ""
------------------------- YurOTS basic configuration ---------------------------
-- Nazwa Servera Przed Wyborem Postaci
worldname = "CrImS OTS"
-- Co jaki Czas Bedzie Zapis Servera (0 = off, 5 = 5min, 60 = hour)
autosave = 0
-- Czy Cap System ma byc wlaczony (yes/no)
capsystem = "no"
-- Czy Gracze Musza Sie Uczyc Czarow (yes/no)
learnspells = "no"
-- Czy Kazdy Gracz Ma Miec Na Poczatek premium (yes/no)
freepremmy = "no"
-- Czy Kazdy Gracz Ma Miec Na Start Promotion? (yes/no)
queuepremmy = "no"
-- Ile % {exp, mana, skill, eq, bp} Gracz traci po zgonie
diepercent = {"6", "6", "6", "6", "90"}
-- Maksymalna Ilosc Summonow
maxsummons = 0
-- Czy Kazda Profesja Moze Summowac Potwory? (yes/no)
summonsallvoc = "no"
-- Szansa Po Zgubieniu Spear po strzale (0 - none lost, 100000 - all lost)
spearlosechance = 20000
-- ANTY AFK po ilu minutach ma kicknac gracza (1 = 1min)
kicktime = 10
-- Maksymalna Ilosc w Depo
maxdepotitems = 300
-- Maksymalna Ilosc Rzeczy Na 1 kratce
maxhousetileitems = 80
-- Po Ilu Dedach Ma Usuwac stara Death List (old are deleted)
maxdeathentries = 10
-- Spalana Mana przez {snakebite, moonlight, volcanic, quagmire, tempest} Rods
rodmana = {"2", "3", "5", "8", "13"}
-- Spalana Mana przez wand of {vortex, dragonbreath, plague, cosmic energy, inferno, sprite wand, mls,}  -- u niekt?rych mo?e nie by? niekt?rych rzeczy !! zaznacze je na czerwono
wandmana = {"2", "3", "5", "8", "13", "40", "5"}
-- Zasieg Rozdzek {snakebite, moonlight, volcanic, quagmire, tempest} rod
rodrange = {"4", "3", "2", "1", "3"}
-- Zasieg wandow of {vortex, dragonbreath, plague, cosmic energy, inferno, sprite wand,
wandrange = {"4", "3", "2", "1", "3", "8"}
-- Sila burst arrows blast
-- default is from (1*lvl+5*mlvl)*0.24 to (1*lvl+5*mlvl)*0.55
burstarrowdmg = {"1.0", "5.0", "0.24", "0.55"}
-- Sila of silver wand
-- default is from (1*lvl+5*mlvl)*0.24 to (1*lvl+5*mlvl)*0.55
silverwanddmg = {"6.0", "5.0", "0.20", "0.20"}
-- Sila of golden bolt
-- default is from (1*lvl+5*mlvl)*0.24 to (1*lvl+5*mlvl)*0.55
goldboltdmg = {"9.8", "6.9", "0.34", "0.36"}
--------------------------- Multipliers and gains ------------------------------
-- Exp Za Monsters (how much faster you got exp from monsters)
expmul = 1000000
-- Exp Za Playerow (Na Swiatach PVP ENFORCED)
expmulpvp = 1000000000
-- Skill Exp: 1 - rl tibia, 10 - ten times faster etc. {no-voc, sorcerer, druid, paladin, knight}
weaponmul = {"1", "1", "1", "1", "10"}
distmul = {"1", "1", "1", "10", "1"}
shieldmul = {"1", "1", "1", "10", "10"}
manamul = {"1", "10", "10", "10", "10"}
-- Ilosc dodtawanej many hp capu za LVL {no-voc, sorcerer, druid, paladin, knight}
capgain = {"5", "10", "10", "20", "30"}
managain = {"10", "35", "35", "25", "15"}
hpgain = {"10", "20", "20", "30", "40"}
-- Co ile sie regeneruje Mana hp po zjedzeniu Fooda (1 - rl tibia)
healthtickmul = 10
manatickmul = 10
-------------------------------- Skull system ----------------------------------
-- Ilosc Fragow Do RedSkulla
redunjust = 4
-- Ilosc Fragow Do Bana
banunjust = 6
-- Czas Trwania Skulla po Zaatakowaniu Gracza (1 = 1min)
hittime = 2
-- Czas Trwania Skulla po Zabiciu Gracza (1 = 1min)
whitetime = 5
-- Czas Trwania RedSkulla (1 = 1min)
redtime = 1*60
-- Czas Trwania Skulla (1 = 1min)
fragtime = 1*10
-- Czas Trwania Bana Za PK (1=1day)
pkbandays = 1
------------------------------ GM access rights --------------------------------
-- access Do otwierania dzwi 
accesshouse = 3
-- access Do Wchodzenia Na Server Kiedy Jest Zamkniety
accessenter = 1
-- access Do Ignorowania Atakowania innych graczy Monsterow itp.
accessprotect = 3
-- access Do Pisania Na Kanalach na Czerwono (#c blabla - publiczne kana?y)
accesstalk = 1
-- access Do Rzucania Itemami Poza Zasiegiem
accessremote = 3
-- access Do Widzenia id itemek oraz pozycji.
accesslook = 3
-- access Do Uzywania Kanalu (aka ctrl+y)
accessctrly = 3
-- PvP od:
pvplvl = 2000
-- szybkosc ataku  (no-voc, sorc, druid, pally, knight)
speed = {"1.0", "1.2", "1.2", "1.0", "0.8"}
-- predkosc pierwszego ataku ~click->hit~ (1000 = 1 sec)--
first = 1000 
-- Cena Domku 1 Kratka
priceforsqm = 10000
-- Maksymalna Ilosc Domkow
maxhouses = 1
-- Level Potrzebny do Uzycia !buyhouse
levelhouse = 100
-- !buyhouse Wlaczone?
buyhouse = "yes"
--bolty maja sie konczyc? (yes/no)
bolts = "no"
-- Life Ring Konfiguracja
LifeRingHealth = "100"
LifeRingMana = "400"
-- ROH Konfiguracja
RoHHealth = "200"
RoHMana = "500"
dist = 50
--Automatyczny Clean Servera(0 - off, 1 - one minute, 60 - one hour)
autoclean = 120
--Automatyczny Zapis Servera(0 - off, 1 - one minute, 60 - one hour)
autorestart = 300
-- Wysylanie wiadomo?ci do GM ?. (yes/no)
gmmsg = "no"
--access Do Mowienia Na Kanalach na CZERWONO
colortxt = 3
-- Ustawienia SOFT BOOTS
softHealth = "500"
softMana= "800"
-- O ile % zwiekszone beda obrazenia przy noszeniu Pademonium Armor?
pandemoniumarmor = 10
-- O ile % zwiekszone beda obrazenia przy noszeniu Magic Bunny Slippers?
magiczneklapkizapomnienia = 20
-- O ile % zwiekszone beda obrazenia przy noszeniu Sapphire Legs?
sapphirelegs = 15
-- O ile % zwiekszone beda obrazenia przy noszeniu Sapphire Armor?
sapphirearmor = 15
-- O ile % zwiekszone beda obrazenia przy noszeniu Sapphire Helmet?
sapphirehelmet = 20
-- O ile % zwiekszone beda obrazenia przy noszeniu Blue Robe?
bluerobe = 15
-- Drop Rate Konfiguracja
droprate = 4
----------------------  Maxymalny M LVL each Voc  ---------------------------
-- knight / elite knight
maglev4 = 15
-- paladin / royal paladin
maglev3 = 45
-- druid / elder druid
maglev2 = 200
-- sorcerer / master sorcerer
maglev1 = 200
3. Zmiana Mapy na w?asn?.
(Najlepiej utworzy? kopie zapasowe!)
Code:
Je?eli chcesz zmieni? mape zobacz czy nie jest podobna do tej w folderze world
je?li jest inna musisz podmieni? wi?kszo?? plik?w aby nie wyst?powa?y b??dy w konsoli.
1.readables.xml
2.pvparenas.xml
3.houseitems.xml
4.houses.xml
5.folder houses
6.folder npc (chyba ?e s? takie same NPC) 
7.folder actions (ca?a jego zawarto??
8.w folderze world podmienic mapk?, test spawn, oraz npc
9. w folderze player's (Je?eli nie masz aktywowanych Pearl's) zmieni? -spawn -> wsp??rz?dne logowania 
-temple -> wsp??rz?dne ?wi?tyni (gdy player zgnie w?a?nie tam si? pojawia), u ka?dego playera
10. w config.lua zmie?
Code:
-- sets what map to load
map = "data/world/test.otbm"
na nazwe swojej mapy kt?ra jest w folderze world. nazwa.otbm
 

Xelemeleque

New User
Joined
Jan 22, 2011
Messages
4
Reaction score
0
Odp: Jak zrobi? OTS 7.6 Dla ca?kiem Zielonych

2 CZ???
4.Konfiguracja ACC Makera Na Passach 1/1

w data/npc/tworzymy ACC Maker.xml a w nim:
Code:
<?xml version="1.0"?>
<npc name="ACC Maker" script="data/npc/scripts/acc.lua" access="3">
<look type="104" head="4" body="114" legs="132" feet="115"/>
</npc>
zapisujemy i przechodzimy do data/npc/scrips robimy acc.lua a w nim:
Code:
---little config-----------------------------------------
maxnamelen = 10
maxpasslen = 6
startlvl = 8
startexp =4200
vocations = 1
healthstart = 185
manastart = 35
depoitemid = 2591
promoted = 1
---------skills-------------------------
--knight-------
kmlvl = 4
kfist = 10
kclub = 10
ksword = 10
kaxe = 10
kdist = 10
kshield = 10
kfish = 10
kcap = 100
--pall------------
pmlvl = 8
pfist = 10
pclub = 10
psword = 10
paxe = 10
pdist = 10
pshield = 10
pfish = 10
pcap = 10
---drut i sorc----
mmlvl = 15
mfist = 10
mclub = 10
msword = 10
maxe = 10
mdist = 10
mshield = 10
mfish = 10
mcap = 10
---end skills -------------------------------
---end little config-----------------------------------------
focus = 0
talk_start = 0
target = 0
following = false
attacking = false
accstatus = 0
seksik = 3
myname = ''
mypass = ''
allow_pattern = '^[a-zA-Z0-9 -]+$'
origmsg = ''
mypasscheck = ''
mynamecheck = ''
vocation = 0
 
 
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)
origmsg = msg
msg = string.lower(msg)
 
 
 
if (msgcontains(msg, 'hi') and focus == 0) and getDistanceToCreature(cid) < 4 then
selfSay('Witaj. Jestem tu aby pomoc ci stworzyc nowe konto i nowa postac. Jesli chcesz zaczac tworzenie kona to powiedz mi najpierw czy jestes facetem czy kobieta. --facet---kobieta--- ')
accstatus = 1
myname = ''
mypass = ''
myaccnumber = 0
focus = cid
talk_start = os.clock()
 
 
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Poczekaj, porozmawiam z toba za minutke')
 
 
elseif focus == cid then
talk_start = os.clock()
 
if accstatus == 1 then
if msgcontains(msg, 'facet') then selfSay('Dobrze przyjacielu. Teraz podaj mi swoje imie.')
seksik = 1
accstatus = 2
elseif msgcontains(msg, 'kobieta') then
selfSay('Dobrze moja droga, teraz podaj mi swoje imie.')
seksik = 0
accstatus = 2
end
 
 
 
 
elseif accstatus == 66 then
if msgcontains(msg, 'pall') then
vocation = 3
selfSay('Paladyn, tak ?')
 
elseif msgcontains(msg, 'sorc') then
vocation = 1
selfSay('Sorcerer, tak ?')
 
elseif msgcontains(msg, 'drut') then
vocation = 2
selfSay('Druid, tak ?')
 
elseif msgcontains(msg, 'knight') then
vocation = 4
selfSay('Knight, tak ?')
else
selfSay('Co tak mamroczesz, powiedz jeszcze raz.')
end
 
accstatus = 67
 
 
elseif accstatus == 2 then
myname = origmsg
mynamecheck = msg
if string.len(mynamecheck) <= maxnamelen then
if string.find(mynamecheck, allow_pattern) then
if io.open("data/players/"..myname..".xml" , "r") == nil then
selfSay('Chcesz miec na imie '..myname..' tak ?')
accstatus = 3
else
selfSay('To imie jest juz zarezerwowane !! Podaj inne, slucham')
end
else
selfSay('To imie zawiera niedozwolone znaki !! Podaj inne')
end
else
selfSay('To imie jest za dlugie !! Max to 10 znakow ! Podaj inne')
end
elseif msgcontains(msg, 'tak') then
if accstatus == 3 then
if vocations == 0 then
selfSay('Dobrze, teraz podaj mi haslo ktorego chcesz uzywac.')
vocation = 0
accstatus = 4
else
selfSay('Dobrze przyjacielu, teraz podaj czy chcesz byc --pall-- czy --sorc-- czy --drut-- czy --knight--.')
accstatus = 66
end
elseif accstatus == 5 then
if seksik == 0 then
selfSay('Wspaniale. Sprawdzmy jeszcze raz: Jestes kobieta o imieniu '..myname..' haslo do twojego konta brzmi '..mypass..'. Numer zostanie wylosowany na koncu. Czy wszystko sie zgadza ??')
else
selfSay('Wspaniale. Sprawdzmy jeszcze raz: Jestes facetem o imieniu '..myname..' haslo do twojego konta brzmi '..mypass..'. Numer zostanie wylosowany na koncu. Czy wszystko sie zgadza ??')
end
accstatus = 6
elseif accstatus == 6 then
selfSay('Doskonale. Czy mozemy przystapic do losowania numeru? --losowanie--bye---')
accstatus = 7
elseif accstatus == 67 then
selfSay('Doskonale. Teraz powiedz jakie chcesz miec haslo.')
accstatus = 4
end
elseif msgcontains(msg, 'nie') then
if accstatus == 3 then
selfSay('Podaj inne, slucham')
accstatus = 2
elseif accstatus == 5 then
selfSay('Podaj inne, slucham')
accstatus = 4
elseif accstatus == 6 then
selfSay('Zacznijmy od poczatku: Jestes facetem czy kobieta --facet--kobieta--')
accstatus = 1
elseif accstatus == 67 then
selfSay('Ehhh wiec powiedz jeszcze raz - jaka profesje chcesz miec ?')
accstatus = 66
end
elseif accstatus == 4 then
mypass = origmsg
mypasscheck = msg
if string.len(mypasscheck) <= maxpasslen then
if string.find(mypasscheck, allow_pattern) then
selfSay('Twoje haslo bedzie brzmialo '..mypass..' tak ?')
accstatus = 5
else
selfSay('To haslo zawiera niedozwolone znaki !! Podaj inne')
end
else
selfSay('To haslo jest za dlugie !! Max to 6 znakow ! Podaj inne')
end
 
elseif msgcontains(msg, 'losowanie') and accstatus == 7 then
if manastart == 0 then
manastartc = 1
else
manastartc = manastart
end
if healthstart == 0 then
healthstartc = 1
else
healthstartc = healthstart
end
if vocations == 0 then
mlvl = 1
fist = 10
club = 10
sword = 10
axe = 10
dist = 10
shield = 10
fish = 10
cap = 100
else
if vocation == 1 or vocation == 2 then
mlvl = mmlvl
fist = mfist
club = mclub
sword = msword
axe = maxe
dist = mdist
shield = mshield
fish = mfish
cap = mcap
 
elseif vocation == 3 then
mlvl = pmlvl
fist = pfist
club = pclub
sword = psword
axe = paxe
dist = pdist
shield = pshield
fish = pfish
cap = pcap
elseif vocation == 4 then
mlvl = kmlvl
fist = kfist
club = kclub
sword = ksword
axe = kaxe
dist = kdist
shield = kshield
fish = kfish
cap = kcap
 
end
end
 
myaccnumber = math.random(100000,999999)
if io.open("data/accounts/"..myaccnumber..".xml" , "r") == nil then
selfSay('wylosowano poprawny numer '..myaccnumber..' Powedz --dalej--')
accstatus = 8
f = assert(io.open("./data/accounts/"..myaccnumber..".xml", "w"))
f = io.open("./data/accounts/"..myaccnumber..".xml", "w")
f:write("<?xml version=\"1.0\"?><account pass=\""..mypass.."\" type=\"1\" premDays=\"666\"><characters><character name=\""..myname.."\"\/><\/characters><\/account>")
f:close()
 
f = assert(io.open("./data/players/"..myname..".xml", "w"))
f = io.open("./data/players/"..myname..".xml", "w")
f:write("<?xml version=\"1.0\"?><player name=\""..myname.."\" account=\""..myaccnumber.."\" sex=\""..seksik.."\" lookdir=\"3\" exp=\""..startexp.."\" voc=\""..vocation.."\" level=\""..startlvl.."\" access=\"0\" cap=\""..cap.."\" maglevel=\""..mlvl.."\" lastlogin=\"0\" premticks=\"0\" promoted=\""..promoted.."\" banned=\"0\"><spawn x=\"474\" y=\"398\" z=\"7\"\/><temple x=\"160\" y=\"54\" z=\"7\"\/><skull type=\"0\" kills=\"0\" ticks=\"0\" absolve=\"0\"\/><health now=\""..healthstart.."\" max=\""..healthstartc.."\" food=\"1000\"\/><mana now=\""..manastartc.."\" max=\""..manastartc.."\" spent=\"1\"\/><look type=\"134\" head=\"77\" body=\"79\" legs=\"78\" feet=\"77\"\/><skills><skill skillid=\"0\" level=\""..fist.."\" tries=\"0\"\/><skill skillid=\"1\" level=\""..club.."\" tries=\"0\"\/><skill skillid=\"2\" level=\""..sword.."\" tries=\"0\"\/><skill skillid=\"3\" level=\""..axe.."\" tries=\"0\"\/><skill skillid=\"4\" level=\""..dist.."\" tries=\"0\"\/><skill skillid=\"5\" level=\""..shield.."\" tries=\"0\"\/><skill skillid=\"6\" level=\""..fish.."\" tries=\"0\"\/><\/skills><spells><spell words=\"utevo lux\"\/><\/spells><deaths\/><inventory><slot slotid=\"3\"><item id=\"1994\"><inside><item id=\"2674\" count=\"1\"\/><\/inside><\/item><\/slot><slot slotid=\"4\"><item id=\"2650\"\/><\/slot><slot slotid=\"6\"><item id=\"2382\"\/><\/slot><slot slotid=\"7\"><item id=\"2649\"\/><\/slot><slot slotid=\"8\"><item id=\"2643\"\/><\/slot><\/inventory><depots><depot depotid=\"1\"><item id=\""..depoitemid.."\"><inside><item id=\"2594\"\/><\/inside><\/item><\/depot><\/depots><storage><data key=\"777\" value=\""..seksik.."\"\/><\/storage><\/player>")
f:close()
else
selfSay('Blad. Wylosowany numer juz istnieje. Powiedz jeszcze raz --losowanie-- aby losowac ponownie. Nie przejmuj sie, to sie czesto zdarza.')
end
 
 
 
elseif msgcontains(msg, 'dalej') and accstatus == 8 then
selfSay('Twoj numer to: '..myaccnumber..' Haslo do tego konta brzmi: '..mypass..' . Nie zapomnij tych passow !! Jesli nie znasz strony naszego OTSa to powiedz --linki--. To bylby juz koniec tworzenia twojego konta. Mozesz sie zalogowac i grac !!')
accstatus = 0
elseif msgcontains(msg, 'linki') then
selfSay('Link do oficjalnej strony servera: \n link do forum: \n jesli zapomnijsz ktoregos z tych adresow w przyszlosci wejdz poprostu na passy 1/1 i zapytaj mnie o ---linki---')
 
 
 
 
elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 4 then
selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
focus = 0
accstatus = 0
myname = ''
mypass = ''
myaccnumber = 0
seksik = ''
talk_start = 0
end
end
end
 
 
function onCreatureChangeOutfit(creature)
 
end
Nale?y zmienic Pozycje Temple oraz Spawn
5. Konfiguracja ACC Makera Na Strone
1-acc na rook
2-acc na main
1. config.php
PHP:
<? 
//---------------------------- OTS directories  -------------------------------- 
$diraccount = 'c:\\YurOTS\\data\\accounts'; -- zmien scie?ke na w?asna 
$dirplayer = 'c:\\YurOTS\\data\\players'; -- zmien scie?ke na w?asna 
$dirvip = 'c:\\YurOTS\\data\\vip'; -- zmien scie?ke na w?asna 


//-------------------------------- Rookie -------------------------------------- 
// spawn place / miejsce gdzie pojawia si? gracz po zalogowaniu si? na konto 
$spawnx = '85'; 
$spawny = '211'; 
$spawnz = '7'; 

// temple / miejsce gdzie rodzi si? gracz, gdy go kto? zabije. 
$templex = '85'; 
$templey = '211'; 
$templez = '7'; 

// Looks (male, female) / wygl?d 
$look[1] = '130'; 
$look[0] = '138'; 

// Eq:         helm, amul, bp,  armor, rght, left, legs, boot, ring, ammo 
$equip = array(   0,    0, 1988, 2467,    0, 2382,    0,    0,    0,    0); 

// Backpack: 
$bp = '<item id="2674" count="1"/>'; 
?>
1. index.php
PHP:
<html> 
<body> 
<form method="post" action="newacc.php"> 
<div style="text-align: center"><b>Tiny account maker for YurOTS on Rookgard</b></div> / napis na samej g?rze Acc Makera 
<table cellspacing="0" width="100%"> 
 <tr><td width="20%">Account:</td> 
  <td><? 
$account = rand(100000, 999999); 
print '' . $account . ' <input type="hidden" name="account" value="' . $account . '">' . "\n"; 
  ?></td> 
 </tr> 

 <tr> 
  <td width="20%">Name:</td> 
  <td><input type="text" name="nick" maxlength="20" /> <span class="copy">3-20 characters</span></td> 
 </tr>  <tr> 
  <td width="20%">Password: </td> 
  <td><input type="password" name="pass" maxlength="10"> <span>3-10 characters</span></td> 
 <tr> 

 <tr> 
  <td width="20%">Sex:</td> 
  <td> 
   <input type="radio" name="sex" value="1" checked> Male 
   <input type="radio" name="sex" value="0"> Female 
  </td> 
 </tr> 

 <tr> 
  <td colspan="2"> 
   <input type="submit" value="Create">  
   <input type="reset" value="Reset"> 
  </td> 
 </tr> 
</table> 
</form> 
</div> 
</body> 
</html>
1. newacc.php
PHP:
<center> 
<? 
function skills() 
{ 
    require('config.php'); 
    $str = ""; 

    for ($id = 0; $id <= 6; $id++) 
        $str .= ('<skill skillid="' . $id . '" level="10" tries="0"/>' . "\n"); 

    return $str; 
} 

function equip() 
{ 
    require('config.php'); 
    $str = ""; 

    for ($id = 1; $id <= 10; $id++) 
    { 
        if ($equip[$id-1] != 0) 
        { 
            $str .= ('<slot slotid="' . $id . '"><item id="' . $equip[$id-1] . '"'); 
            if ($id == 3)    // backpack 
                $str .= ('><inside>' . $bp . '</inside></item>'); 
            else 
                $str .= ('/>'); 
            $str .= ('</slot>' . "\n"); 
        } 
    } 

    return $str; 
} 

function newacc() 
{ 
    require('config.php'); 
    $nick = $_POST['nick']; 
    $sex = $_POST['sex']; 
    $account = $_POST['account']; 
    $pass = $_POST['pass']; 

    ($pass != $account) or die ('Haslo jest takie same jak numer!'); 
    ($pass != $nick) or die ('Haslo jest takie same jak nazwa!'); 
    ($pass != 'tibia' && $pass != 'lol') or die ('Haslo jest zbyt proste!'); 

    ($sex == 0 || $sex == 1) or die ('Invalid sex!'); 
    ($account >= 100000 && $account <= 999999) or die ('Invalid account number!'); 
    preg_match("/^[a-zA-Z][a-zA-Z ]*$/", $nick) or die ('Nazwa zawiera niedozwolone znaki!'); 
    preg_match("/^[a-zA-Z0-9]+$/", $pass) or die ('Haslo zawiera niedozwolone znaki!'); 
    !preg_match("/^gm/i", $nick) or die ('Nie jestes GM!'); 

    $account_file = "$diraccount/$account.xml"; 
    $player_file = "$dirplayer/$nick.xml"; 
    $vip_file = "$dirvip/$account.xml"; 

    !file_exists($account_file) or die ('Ten numer jest zajety!'); 
    !file_exists($player_file) or die ("Istnieje juz gracz$nick!"); 

    $file = fopen($account_file, 'w'); 
    fwrite($file, 
'<?xml version="1.0"?> 
<account pass="' . $pass . '" type="1" premDays="90"> 
<characters> 
    <character name="' . $nick . '"/> 
</characters> 
</account>'); 
    fclose($file); 

    $file = fopen($player_file, 'w'); 
    fwrite($file, 
'<?xml version="1.0"?> 
<player name="' . $nick . '" account="' . $account . '" sex="' . $sex . '" lookdir="1" exp="0" voc="0" level="1" access="0" cap="300" maglevel="0" lastlogin="0"> 
<spawn x="' . $spawnx . '" y="' . $spawny . '" z="' . $spawnz . '"/> 
<temple x="' . $templex . '" y="' . $templey . '" z="' . $templez . '"/> 
<health now="150" max="150" food="0"/> 
<mana now="0" max="0" spent="0"/> 
<look type="' . $look[$sex] . '" head="20" body="30" legs="40" feet="50"/> 
<skills>' . "\n" . skills() . '</skills> 
<inventory>' . equip() . '</inventory> 
<depots><depot depotid="1"><item id="2590"><inside><item id="2594"/></inside></item></depot></depots> 
<storage/> 
</player>'); 
    fclose($file); 

    $file = fopen($vip_file, 'w'); 
    fwrite($file, 
'<?xml version="1.0"?> 
<vips/>'); 
    fclose($file); 

    print "Numer $account Zosta? pomyslnie zalozony!"; 
} 

newacc(); 
?> 
</center>
2. config.php
PHP:
<? 
//---------------------------- OTS directories  -------------------------------- 
$diraccount = 'c:\\YurOTS\\data\\accounts';  zmien sciezki 
$dirplayer = 'c:\\YurOTS\\data\\players';   zmien sciezki 
$dirvip = 'c:\\YurOTS\\data\\vip';   zmien sciezki 


//----------------------------- All vocations ---------------------------------- 
$lvl = '10';     // level 
$exp = '9300';    // exp(musi pasowac do lvl) 
$cap = '300';    // cap 

// spawn place 
$spawnx = '160'; 
$spawny = '54'; 
$spawnz = '7'; 

// temple 
$templex = '160'; 
$templey = '54'; 
$templez = '7'; 

// do not change! 
if (!defined('MALE')) define('MALE', 1); 
if (!defined('FEMALE')) define('FEMALE', 0); 
if (!defined('SORC')) define('SORC', 1); 
if (!defined('DRUID')) define('DRUID', 2); 
if (!defined('PALADIN')) define('PALADIN', 3); 
if (!defined('KNIGHT')) define('KNIGHT', 4); 

//-------------------------------- Sorcerer ------------------------------------ 
// Looks 
$look[SORC][MALE] = '130'; 
$look[SORC][FEMALE] = '138'; 

// HP, mana, magic level 
$health[SORC] = '195'; 
$mana[SORC] = '95'; 
$mlvl[SORC] = '30'; 

// Skills:          fist,club,sword,axe,dist,shld,fish 
$skill[SORC] = array(10,  10,  10,  10,  10,  15,  10); 

// Eq:               helm, amul, bp,  armor, rght, left, legs, boot, ring, ammo 
$equip[SORC] = array(2490, 2129, 1988, 2463, 2423, 2525, 2468, 2643, 2164, 0); 

// Backpack: 
$bp[SORC] = '<item id="2152" count="2"/><item id="2311" count="10"/>'; 

//--------------------------------- Druid -------------------------------------- 
// Looks 
$look[DRUID][MALE] = '130'; 
$look[DRUID][FEMALE] = '138'; 

// HP, mana, magic level 
$health[DRUID] = '195'; 
$mana[DRUID] = '95'; 
$mlvl[DRUID] = '30'; 

// Skills:           fist,club,sword,axe,dist,shld,fish 
$skill[DRUID] = array(10,  10,  10,  10,  10,  15,  10); 

// Eq:                helm, amul, bp,  armor, rght, left, legs, boot, ring, ammo 
$equip[DRUID] = array(2490, 2129, 1988, 2463, 2423, 2525, 2468, 2643, 2164, 0); 

// Backpack: 
$bp[DRUID] = '<item id="2152" count="2"/><item id="2311" count="10"/>'; 

//-------------------------------- Paladin ------------------------------------- 
// Looks 
$look[PALADIN][MALE] = '129'; 
$look[PALADIN][FEMALE] = '137'; 

// HP, mana, magic level 
$health[PALADIN] = '205'; 
$mana[PALADIN] = '65'; 
$mlvl[PALADIN] = '12'; 

// Skills:             fist,club,sword,axe,dist,shld,fish 
$skill[PALADIN] = array(10,  10,  10,  10,  71,  41,  10); 

// Eq:                  helm, amul, bp,  armor, rght, left, legs, boot, ring, ammo 
$equip[PALADIN] = array(2490, 2129, 1988, 2463, 2455,     0, 2468, 2643, 2164, 0); 

// Backpack: 
$bp[PALADIN] = '<item id="2152" count="2"/><item id="2543" count="10"/>'; 

//--------------------------------- Knight ------------------------------------- 
// Looks 
$look[KNIGHT][MALE] = '131'; 
$look[KNIGHT][FEMALE] = '139'; 

// HP, mana, magic level 
$health[KNIGHT] = '215'; 
$mana[KNIGHT] = '45'; 
$mlvl[KNIGHT] = '4'; 

// Skills:            fist,club,sword,axe,dist,shld,fish 
$skill[KNIGHT] = array(10,  71,  71,  71,  10,  71,  10); 

// Eq:                 helm, amul, bp,  armor, rght, left, legs, boot, ring, ammo 
$equip[KNIGHT] = array(2490, 2129, 1988, 2463, 2423,  2525, 2468, 2643, 2164, 0); 

// Backpack: 
$bp[KNIGHT] = '<item id="2152" count="2"/><item id="2311" count="3"/>'; 
?>
2. index.php
PHP:
<html> 
<body> 
<form method="post" action="newacc.php"> 
<div style="text-align: center"><b>Tiny account maker for YurOTS</b></div> 
<table cellspacing="0" width="100%"> 
 <tr><td width="20%">Account:</td> 
  <td><? 
$account = rand(100000, 999999); 
print '' . $account . ' <input type="hidden" name="account" value="' . $account . '">' . "\n"; 
  ?></td> 
 </tr> 

 <tr> 
  <td width="20%">Name:</td> 
  <td><input type="text" name="nick" maxlength="20" /> <span class="copy">3-20 characters</span></td> 
 </tr>  <tr> 
  <td width="20%">Password: </td> 
  <td><input type="password" name="pass" maxlength="10"> <span>3-10 characters</span></td> 
 <tr> 

 <tr> 
  <td width="20%">Sex:</td> 
  <td> 
   <input type="radio" name="sex" value="1" checked> Male 
   <input type="radio" name="sex" value="0"> Female 
  </td> 
 </tr> 

 <tr> 
  <td width="20%">Vocation:</td> 
  <td> 
   <input type="radio" name="vocation" value="1" checked> Sorcerer 
   <input type="radio" name="vocation" value="2"> Druid 
   <input type="radio" name="vocation" value="3"> Paladin 
   <input type="radio" name="vocation" value="4"> Knight 
  </td> 
 </tr> 

 <tr> 
  <td colspan="2"> 
   <input type="submit" value="Zaloz">  
   <input type="reset" value="Reset"> 
  </td> 
 </tr> 
</table> 
</form> 
</div> 
</body> 
</html>
2. newacc.php
PHP:
<center> 
<? 
function skills($vocation) 
{ 
    require('config.php'); 
    $str = ""; 

    for ($id = 0; $id <= 6; $id++) 
        $str .= ('<skill skillid="' . $id . '" level="' . $skill[$vocation][$id] . '" tries="0"/>' . "\n"); 

    return $str; 
} 

function equip($vocation) 
{ 
    require('config.php'); 
    $str = ""; 

    for ($id = 1; $id <= 10; $id++) 
    { 
        if ($equip[$vocation][$id-1] != 0) 
        { 
            $str .= ('<slot slotid="' . $id . '"><item id="' . $equip[$vocation][$id-1] . '"'); 
            if ($id == 3)    // backpack 
                $str .= ('><inside>' . $bp[$vocation] . '</inside></item>'); 
            else 
                $str .= ('/>'); 
            $str .= ('</slot>' . "\n"); 
        } 
    } 

    return $str; 
} 

function newacc() 
{ 
    require('config.php'); 
    $nick = $_POST['nick']; 
    $sex = $_POST['sex']; 
    $vocation = $_POST['vocation']; 
    $account = $_POST['account']; 
    $pass = $_POST['pass']; 

    ($pass != $account) or die ('haslo jest takie same jak Numer!'); 
    ($pass != $nick) or die ('haslo jest takie same jak Nazwa!'); 
    ($pass != 'tibia' && $pass != 'lol') or die ('Haslo jest zbyt latwe!'); 

    ($sex == 0 || $sex == 1) or die ('Invalid sex!'); 
    ($vocation >= 1 && $vocation <= 4) or die ('Invalid vocation!'); 
    ($account >= 100000 && $account <= 999999) or die ('Invalid account number!'); 
    preg_match("/^[a-zA-Z][a-zA-Z ]*$/", $nick) or die ('Name contains illegal characters!'); 
    preg_match("/^[a-zA-Z0-9]+$/", $pass) or die ('Password contains illegal characters!'); 
    !preg_match("/^gm/i", $nick) or die ('GM is only one!'); 

    $account_file = "$diraccount/$account.xml"; 
    $player_file = "$dirplayer/$nick.xml"; 
    $vip_file = "$dirvip/$account.xml"; 

    !file_exists($account_file) or die ('There is already an account with this number!'); 
    !file_exists($player_file) or die ("There is already a player $nick!"); 

    $file = fopen($account_file, 'w'); 
    fwrite($file, 
'<?xml version="1.0"?> 
<account pass="' . $pass . '" type="1" premDays="90"> 
<characters> 
    <character name="' . $nick . '"/> 
</characters> 
</account>'); 
    fclose($file); 

    $file = fopen($player_file, 'w'); 
    fwrite($file, 
'<?xml version="1.0"?> 
<player name="' . $nick . '" account="' . $account . '" sex="' . $sex . '" lookdir="1" exp="' . $exp . '" voc="' . $vocation . '" level="' . $lvl . '" access="0" cap="' . $cap . '" maglevel="' . $mlvl[$vocation] . '" lastlogin="0"> 
<spawn x="' . $spawnx . '" y="' . $spawny . '" z="' . $spawnz . '"/> 
<temple x="' . $templex . '" y="' . $templey . '" z="' . $templez . '"/> 
<health now="' . $health[$vocation] . '" max="' . $health[$vocation] . '" food="0"/> 
<mana now="' . $mana[$vocation] . '" max="' . $mana[$vocation] . '" spent="0"/> 
<look type="' . $look[$vocation][$sex] . '" head="20" body="30" legs="40" feet="50"/> 
<skills>' . "\n" . skills($vocation) . '</skills> 
<inventory>' . equip($vocation) . '</inventory> 
<depots><depot depotid="1"><item id="2590"><inside><item id="2594"/></inside></item></depot></depots> 
<storage/> 
</player>'); 
    fclose($file); 

    $file = fopen($vip_file, 'w'); 
    fwrite($file, 
'<?xml version="1.0"?> 
<vips/>'); 
    fclose($file); 

    print "Account $account was successfully created!"; 
} 

newacc(); 
?> 
</center>
6.Dodawanie Potwor?w do Map Editora (Simone's Map Editor)
aby doda? nowe potwory do Map Editora otw?rz hard_drive//:sciezka do map editora/creatures
i dodaj pod <creatures>
Code:
<creature looktype="137" head="113" body="120" legs="114" feet="132" name="Amazon" type="monster"/>
Wa?ne wszystko musi by? tak jak w folderze monsters!!

To ju? koniec poradnika, mam nadzieje ?e dzieki temu zmniejszy si? ilo?? post?w zwiazanych z tym tematem
Prosze o ocenianie!
 

Forseti

Senior User
Joined
Dec 23, 2011
Messages
954
Reaction score
82
Odp: Jak zrobi? OTS 7.6 Dla ca?kiem Zielonych

Poradnik chaotycznie napisany. Popraw stylistyk?, jakie? bbcode ciekawiej dodaj, aby to jako? wygl?da?o.
Tak to 6/10
 

Hendeho

Active User
Joined
Apr 28, 2012
Messages
76
Reaction score
4
Odp: Jak zrobi? OTS 7.6 Dla ca?kiem Zielonych

Mog?e? bardziej si? postara?, mog?e? co jest co opisa? (Np. Zielona osoba nie b?dzie wiedzia?a co to znaczy pozycja Temple, wi?c mog?e? bardziej opisa? takie rzeczy) . Jest to poradnik dla zielonego a nie dla jakiej? osoby kt?ra spotka?a ju? si? z stawianiem. No ale nie jest najgorzej 6/10.
Mo?e, jak nast?pny poradnik napiszesz to troch? lepiej ci p?jdzie.
 
Last edited:
Joined
Aug 13, 2011
Messages
46
Reaction score
1
Odp: Jak zrobi? OTS 7.6 Dla ca?kiem Zielonych

Ch?opak Chcia? Dobrze, A Wy Si? Go Czepiacie - Zapraszam Do Napisania Poradniku Sami Zobaczycie Jak To Jest, Gdy Kto? Si? Stara, A Wy Nawet Nie Umiecie Doceni? Jego Ci??kiej I Niezbyt Mi?ej Pracy.
 
Top