Witam !
Chcia?bym wam zaprezentowa? Guild Mastera w 100% spolszczonego przeze mnie bez ?adnych nedznych translator?w z ktorych nic nie mozna zrozumiec i lepiej jest juz uzywac angielskiego GM ,tak jak w tym temacie... : tibia.net.pl/npc/19362-guild-master-spolszczony-99-9-8-1-a.html << ctrl+c i ctrl+v do translatora to kazdy g?upek umie...
Moj Guild Master jest w 100% spolszczony tak aby kazdy mogl zrozumiec a nie tylko to co rozumie translator... Zajelo mi to okolo 10 minut.
Oto Kod
Oczywiscie wklejamy to do ots\data\npc\scripts\guild.lua
Testowalem to tylko na tibii 8.1 Evo
Jakby ktos zauwazyl jakas liter?wke prosze o PW.
!!UWAGA!!
Zezwalam na Kopiowanie i rozprowadzanie mojego w 100% spolszczonego Guild Mastera
Ale je?eli ju? wstawiacie go na inne fora to musicie na ko?cu napisa? "Autor Pacyna86".
@anbu
dzi?ki ju? poprawi?em
Chcia?bym wam zaprezentowa? Guild Mastera w 100% spolszczonego przeze mnie bez ?adnych nedznych translator?w z ktorych nic nie mozna zrozumiec i lepiej jest juz uzywac angielskiego GM ,tak jak w tym temacie... : tibia.net.pl/npc/19362-guild-master-spolszczony-99-9-8-1-a.html << ctrl+c i ctrl+v do translatora to kazdy g?upek umie...
Moj Guild Master jest w 100% spolszczony tak aby kazdy mogl zrozumiec a nie tylko to co rozumie translator... Zajelo mi to okolo 10 minut.
Oto Kod
Oczywiscie wklejamy to do ots\data\npc\scripts\guild.lua
Kod:
local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false
local talk_state = 0
local gstat = 0 -- guild status
local grank = '' -- guild rank
local gname = '' -- guild name
local cname = '' -- name of player who talks to us
local pname = '' -- name of some other player
local maxnamelen = 30
local maxranklen = 20
local maxnicklen = 20
local leaderlevel = 50
local NONE = 0
local INVITED = 1
local MEMBER = 2
local VICE = 3
local LEADER = 4
local allow_pattern = '^[a-zA-Z0-9 -]+$'
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)
cname = creatureGetName(cid)
if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Siema ' .. cname .. '! W czym moge Ci pomoc?')
talk_state = 0
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. cname .. '! Pogadamy za minute.')
elseif msgcontains(msg, 'bye') and (focus == cid) and getDistanceToCreature(cid) < 4 then
selfSay('Nara, ' .. cname .. '!')
talk_state = 0
focus = 0
talk_start = 0
elseif focus == cid then
if talk_state == 0 then
msg = string.lower(msg)
if msgcontains(msg, 'found') then -- found a new guild
level = getPlayerLevel(cid)
if level >= leaderlevel then
gstat = getPlayerGuildStatus(cname)
if gstat == NONE or gstat == INVITED then
selfSay('Podaj nazwe gildi!')
talk_state = 1
elseif gstat == MEMBER or gstat == VICE or gstat == LEADER then
selfSay('Masz juz gildie.')
talk_state = 0
end
else
selfSay('Sorry, potrzebujesz ' .. leaderlevel .. ' by zalozyc gildie.')
end
talk_start = os.clock()
elseif msgcontains(msg, 'join') then -- join a guild when invited
gstat = getPlayerGuildStatus(cname)
if gstat == NONE then
selfSay('Sorry, nie jestes zaproszony do zadnej gildi.')
talk_state = 0
elseif gstat == INVITED then
gname = getPlayerGuildName(cname)
selfSay('Czy chcesz dolaczyc do ' .. gname .. '?')
talk_state = 3
elseif gstat == MEMBER or gstat == VICE or gstat == LEADER then
selfSay('Masz juz gildie.')
talk_state = 0
end
talk_start = os.clock()
elseif msgcontains(msg, 'exclude') or msgcontains(msg, 'kick') then -- kick player from a guild
gstat = getPlayerGuildStatus(cname)
if gstat == VICE or gstat == LEADER then
selfSay('Kogo chcesz wyrzucic?')
talk_state = 4
else
selfSay('Tylko Lider i vice liderzy moga wyrzucac z gildii.')
talk_state = 0
end
talk_start = os.clock()
elseif msgcontains(msg, 'invite') then -- invite player to a guild
gstat = getPlayerGuildStatus(cname)
if gstat == VICE or gstat == LEADER then
selfSay('Kogo chcesz zaprosic?')
talk_state = 5
else
selfSay('Tylko Lider i Vice liderzy moga zapraszac do gildii.')
talk_state = 0
end
talk_start = os.clock()
elseif msgcontains(msg, 'leave') then -- leave a guild
gstat = getPlayerGuildStatus(cname)
if gstat == NONE or gstat == INVITED then
selfSay('Nie jestes w gildii.')
talk_state = 0
elseif gstat == MEMBER or gstat == VICE then
gname = getPlayerGuildName(cname)
selfSay('Czy chcesz opuscic ' .. gname .. '?')
talk_state = 7
elseif gstat == LEADER then
selfSay('Jestes liderem. Czy na pewno chcesz opuscic gildie?')
talk_state = 7
end
elseif msgcontains(msg, 'pass') then -- pass leadership
gstat = getPlayerGuildStatus(cname)
if gstat == LEADER then
selfSay('Kogo wybierasz na Lidera?')
talk_state = 8
else
selfSay('Tylko lider moze zmienic lidera.')
talk_state = 0
end
elseif msgcontains(msg, 'vice') then -- set vice leader
gstat = getPlayerGuildStatus(cname)
if gstat == LEADER then
selfSay('Kogo wybierasz na vice lidera?')
talk_state = 9
else
selfSay('Tylko lider moze wybrac kogos na vice lidera.')
talk_state = 0
end
elseif msgcontains(msg, 'member') then -- remove vice-leader
gstat = getPlayerGuildStatus(cname)
if gstat == LEADER then
selfSay('Kogo chcesz zdegradowac z lidera do zwyklego czlonka?')
talk_state = 10
else
selfSay('Tylko lider moze zdegradowac z lidera do zwyklego czlonka.')
talk_state = 0
end
elseif msgcontains(msg, 'nick') or msgcontains(msg, 'title') then -- set nick
gstat = getPlayerGuildStatus(cname);
if gstat == LEADER then
selfSay('Komu chcesz zmienic tytul?')
talk_state = 11
else
selfSay('Tylko lider moze zmieniac tytul.')
talk_state = 0
end
end
else -- talk_state != 0
talk_start = os.clock()
if talk_state == 1 then -- get name of new guild
gname = msg
if string.len(gname) <= maxnamelen then
if string.find(gname, allow_pattern) then
if foundNewGuild(gname) == 0 then
selfSay('Juz istnieje gildia o takiej nazwie.')
talk_state = 0
else
selfSay('Jaka range chcesz posiadac?')
talk_state = 2
end
else
selfSay('Gildia ma niepoprawne znaki!')
talk_state = 0
end
else
selfSay('Gildia nie moze byc dluzsza niz ' .. maxnamelen .. ' liter.')
talk_state = 0
end
elseif talk_state == 2 then -- get rank of leader
grank = msg
if string.len(grank) <= maxranklen then
if string.find(grank, allow_pattern) then
setPlayerGuild(cname,LEADER,grank,gname)
selfSay('Gratulacje. Zostales nowym liderem.')
talk_state = 0
else
selfSay('Ranga ma niepoprawne znaki.')
talk_state = 0
end
else
selfSay('Ranga nie moze byc dluzsza niz ' .. maxranklen .. ' liter.')
talk_state = 0
end
elseif talk_state == 3 then -- join a guild
if msg == 'yes' then
setPlayerGuildStatus(cname, MEMBER)
selfSay('Jestes nowym czlonkiem gildi .. gname ..')
talk_state = 0
else
selfSay('Co moge dla ciebie zrobic?')
talk_state = 0
end
elseif talk_state == 4 then -- kick player
pname = msg
gname = getPlayerGuildName(cname)
gname2 = getPlayerGuildName(pname)
if cname == pname then
selfSay('Zeby opuscic gildie napisz leave.')
talk_state = 0
elseif gname == gname2 then
gstat2 = getPlayerGuildStatus(pname)
if gstat > gstat2 then
clearPlayerGuild(pname)
selfSay('Wyrzuciles ' .. pname .. ' ze swojej gildii.')
talk_state = 0
else
selfSay('Tylko lider i vice liderzy moga wyrzucac czlonkow gildii.')
talk_state = 0
end
else
selfSay('Sorry, ' .. pname .. ' nie jest w twojej gildii.')
talk_state = 0
end
elseif talk_state == 5 then -- get invited name
pname = msg
gstat = getPlayerGuildStatus(pname)
if gstat == MEMBER or gstat == VICE or gstat == LEADER then
selfSay('Sorry, ' .. pname .. ' jest w innej gildii.')
talk_state = 0
else
selfSay('Jaka range chcesz przydzielic jej/jemu?')
talk_state = 6
end
elseif talk_state == 6 then -- get invited rank
grank = msg
if string.len(grank) <= maxranklen then
if string.find(grank, allow_pattern) then
gname = getPlayerGuildName(cname)
setPlayerGuild(pname, INVITED, grank, gname)
selfSay('Zaprosiles ' .. pname .. ' do swej gildii.')
talk_state = 0
else
selfSay('Ranga zawiera nieprawidlowe znaki.')
talk_state = 0
end
else
selfSay('Ranga nie moze byc dluzsza niz ' .. maxranklen .. ' liter.')
talk_state = 0
end
elseif talk_state == 7 then -- leave a guild
if msg == 'yes' then
clearPlayerGuild(cname)
selfSay('Opusciles gildie.')
talk_state = 0
else
selfSay('Co moge dla ciebie zrobic?')
talk_state = 0
end
elseif talk_state == 8 then -- pass leadership
pname = msg
level = getPlayerLevel(pname)
if level >= leaderlevel then
gname = getPlayerGuildName(cname)
gname2 = getPlayerGuildName(pname)
if gname == gname2 then
setPlayerGuildStatus(cname,MEMBER)
setPlayerGuildStatus(pname,LEADER)
gname = getPlayerGuildName(cname)
selfSay(pname .. ' jest nowym liderem ' .. gname .. '.')
talk_state = 0
else
selfSay('Sorry, ' .. pname .. ' nie jest w twojej gildi.')
talk_state = 0;
end
else
selfSay('Sorry, ' .. pname .. ' jest offline.')
talk_state = 0
end
elseif talk_state == 9 then -- set vice-leader
pname = msg
gname = getPlayerGuildName(cname)
gname2 = getPlayerGuildName(pname)
if cname == pname then
selfSay('Aby ustapic z przywodztwa napisz pass.')
talk_state = 0
elseif gname == gname2 then
gstat = getPlayerGuildStatus(pname)
if gstat == INVITED then
selfSay('Sorry, ' .. pname .. ' nie dolaczyl jeszcze do gildii.');
talk_state = 0
elseif gstat == VICE then
selfSay(pname .. ' juz jest vice liderem.')
talk_state = 0
elseif gstat == MEMBER then
setPlayerGuildStatus(pname, VICE)
selfSay(pname .. ' wlasnie zostal nowym vice liderem.')
talk_state = 0
end
else
selfSay('Sorry, ' .. pname .. ' nie jest w twojej gildii.')
talk_state = 0
end
elseif talk_state == 10 then -- set member
pname = msg
gname = getPlayerGuildName(cname)
gname2 = getPlayerGuildName(pname)
if cname == pname then
selfSay('Aby ustapic z przywodztwa napisz pass.')
talk_state = 0
elseif gname == gname2 then
gstat = getPlayerGuildStatus(pname)
if gstat == INVITED then
selfSay('Sorry, ' .. pname .. ' nie dolaczyl jeszcze do gildii.');
talk_state = 0
elseif gstat == VICE then
setPlayerGuildStatus(pname, MEMBER)
selfSay(pname .. ' zostal wlasnie normalnym czlonkiem.')
talk_state = 0
elseif gstat == MEMBER then
selfSay(pname .. ' jest juz normalnym czlonkiem.')
talk_state = 0
end
else
selfSay('Sorry, ' .. pname .. ' nie jest w tej gildii.')
talk_state = 0
end
elseif talk_state == 11 then -- get name of player to change nick
pname = msg
gname = getPlayerGuildName(cname)
gname2 = getPlayerGuildName(pname)
if gname == gname2 then
selfSay('Jaki tytul ma miec ta osoba (napisz none aby wyczyscic tytul)?')
talk_state = 12
else
selfSay('Sorry, ' .. pname .. ' nie jest w tej gildii.')
talk_state = 0
end
elseif talk_state == 12 then -- get nick
if msg == 'none' then
setPlayerGuildNick(pname, '')
selfSay(pname .. ' teraz nie ma zadnego tytulu.')
talk_state = 0
else
if string.len(msg) <= maxnicklen then
if string.find(msg, allow_pattern) then
setPlayerGuildNick(pname, msg)
selfSay('Zmieniles ' .. pname .. '\'s tytul.')
talk_state = 0
else
selfSay('Tytul zawiera niepoprawne znaki.')
talk_state = 0
end
else
selfSay('Tytul nie moze byc dluzszy niz ' .. maxnicklen .. ' liter.')
talk_state = 0
end
end
end
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 45 then
if focus > 0 then
selfSay('Nastepny...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Nara, '.. cname ..'.')
focus = 0
end
end
end
Testowalem to tylko na tibii 8.1 Evo
Jakby ktos zauwazyl jakas liter?wke prosze o PW.
!!UWAGA!!
Zezwalam na Kopiowanie i rozprowadzanie mojego w 100% spolszczonego Guild Mastera
Ale je?eli ju? wstawiacie go na inne fora to musicie na ko?cu napisa? "Autor Pacyna86".@anbu
dzi?ki ju? poprawi?em






