Npc Reborn sama nazwa mówi za siebie, wiec nie ma co tłumaczyć
Zaczynamy!!
Zaczynamy!!
Robimy Npc data/npc/... o nazwie "Reborn" i wklejamy tam to:
Kod:
<?xml version="1.0"?>
<npc name="Reborn" script="data/npc/scripts/reborn.lua" access="3" lookdir="2" autowalk="25">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="266" head="114" body="119" legs="132" feet="114" addons="3" />
</npc>
Teraz Wchodzimy w data/npc/scripts i tworzymy plik o nazwie reborn
Wklejamy do niego to:
Kod:
local focus = 0
local talk_start = 0
local target = 0
local days = 0
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Nara Frajerze')
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('Witam ' .. creatureGetName(cid) .. '! Witam U Mnie Mozesz Zdobyc Reborna [reborn]')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Przepraszam, ' .. creatureGetName(cid) .. '! poczekaj minutke')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'reborn') or msgcontains(msg, 'promote') then
if getPlayerVocation(cid) > 13 then
selfSay('Przepraszam ale ty juz masz reborna')
talk_state = 0
elseif getPlayerLevel(cid) < 500000 then
selfSay('Musisz Miec 500klvl zeby zrobic reborna')
talk_state = 0
elseif not isPremium(cid) then
selfSay('Chcesz Reborna?')
talk_state = 0
else
selfSay('Chcesz Reborna?')
talk_state = 1
end
elseif talk_state == 1 then
if msgcontains(msg, 'yes') then
if pay(cid,20000) then
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
selfSay('Otrzymales Reborna')
else
selfSay(Nie Posiadasz Kasy')
end
end
talk_state = 0
elseif talk_state == 2 then
if msgcontains(msg, 'yes') then
if pay(cid,7000) then
selfSay('/premium '.. creatureGetName(cid) ..', 7')
selfSay('You have 7 days of premium more!')
else
selfSay('Sorry, you do not have enough money.')
end
end
talk_state = 0
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Nastepny Prosze')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good bye then.')
focus = 0
end
end
end
i Na Samym Dole Wklejamy Tam To:
Kod:
<vocation id="12" name="Reborn 1 Knight" description="Reborn 1 Knight" gaincap="25" gainhp="150" gainmana="50" gainhpticks="2" gainhpamount="10" gainmanaticks="4" gainmanaamount="100" gainsoulticks="15" gainsoulamount="1" manamultiplier="3.0" attackspeed="250" prevoc="4" basespeed="220">
<diepercent experience="17" magic="17" skill="17" equipment="7" container="100"/>
<formula damage="5.2" defense="5.1" armor="5.1"/>
<skill id="0" multiplier="1.1"/>
<skill id="1" multiplier="1.1"/>
<skill id="2" multiplier="1.1"/>
<skill id="3" multiplier="1.1"/>
<skill id="4" multiplier="1.4"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="10" name="Reborn 1 Druid" description="a Reborn 1 Druid" gaincap="10" gainhp="30" gainmana="90" gainhpticks="60000000" gainhpamount="1000000" gainmanaticks="4000000" gainmanaamount="5000000" gainsoulticks="120" gainsoulamount="1" maxsoul="100" manamultiplier="1.1" attackspeed="600" prevoc="2" basespeed="220">
<diepercent experience="7" magic="7" skill="20" equipment="7" container="100"/>
<formula damage="5.2" defense="5.1" armor="6.1"/>
<skill id="0" multiplier="2.5"/>
<skill id="1" multiplier="2.8"/>
<skill id="2" multiplier="2.8"/>
<skill id="3" multiplier="1.8"/>
<skill id="4" multiplier="2.8"/>
<skill id="5" multiplier="2.5"/>
<skill id="6" multiplier="2.1"/>
</vocation>
<vocation id="11" name="Reborn 1 Sorcerer" description="a Reborn 1 Sorcerer" gaincap="10" gainhp="30" gainmana="90" gainhpticks="60000000" gainhpamount="1000000" gainmanaticks="4000000" gainmanaamount="5000000" gainsoulticks="120" gainsoulamount="1" maxsoul="100" manamultiplier="1.1" attackspeed="600" prevoc="2" basespeed="220">
<diepercent experience="7" magic="7" skill="20" equipment="7" container="100"/>
<formula damage="5.2" defense="5.1" armor="6.1"/>
<skill id="0" multiplier="2.5"/>
<skill id="1" multiplier="2.8"/>
<skill id="2" multiplier="2.8"/>
<skill id="3" multiplier="1.8"/>
<skill id="4" multiplier="2.8"/>
<skill id="5" multiplier="2.5"/>
<skill id="6" multiplier="2.1"/>
</vocation>
<vocation id="14" name="Reborn 1 Pall" description="a Reborn 1 Pall" gaincap="10" gainhp="30" gainmana="90" gainhpticks="60000000" gainhpamount="1000000" gainmanaticks="4000000" gainmanaamount="5000000" gainsoulticks="120" gainsoulamount="1" maxsoul="100" manamultiplier="1.1" attackspeed="600" prevoc="2" basespeed="220">
<diepercent experience="7" magic="7" skill="20" equipment="7" container="100"/>
<formula damage="5.2" defense="5.1" armor="6.1"/>
<skill id="0" multiplier="2.5"/>
<skill id="1" multiplier="2.8"/>
<skill id="2" multiplier="2.8"/>
<skill id="3" multiplier="1.8"/>
<skill id="4" multiplier="2.8"/>
<skill id="5" multiplier="2.5"/>
<skill id="6" multiplier="2.1"/>
</vocation>
Skrypt By Me... Cyborg19
Testowany na Evo by Kapic
Skrypt jest Przystosowany pod dużego expa!!
Testowany na Evo by Kapic
Skrypt jest Przystosowany pod dużego expa!!
Zakładki