• logo_cipsoft
    Nowe serwery zostały otwarte 19 Lut 2025:
    Noctalia (Open PvP) Ignitera (Open PvP) us_logo Xybra (Open PvP)

Bankier 7.6.....

Status
Zamknięty.

Kordiax

User
Dołączył
Grudzień 13, 2008
Posty
29
Liczba reakcji
0
Poszukuje bankiera 7.6 kt?ry rozmienia? by 100cc na 1sc 1sc na 100cc te co tu s? nie dzia?aj? je?eli kto? by dawa? to prosz? o takiego kt?rego testowali?cie bardzo prosz? o pomoc.
 
Odp: Bankier 7.6.....

Nie ma sprawy.Ju? pisz? jak go zrobi?.
1.Wchodzimy w folder data>npc>otwieramy notatnik i wpisujemy :
<?xml version="1.0"?>
<npc name="Jack" script="data/npc/scripts/cash.lua" access="5">
<look type="134" head="2" body="95" legs="60" feet="132"/>
</npc>
2.Zapisujemy do tej lokacji,kt?r? poda?em wy?ej jako Jack.lua i zn?w otwieramy notatnik i wpisujemy :
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('Narazie')
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('Witaj ' .. creatureGetName(cid) .. '! Wymieniam gp na platinum i platinum na cc :)')
focus = cid
talk_start = os.clock()

elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. 'Zaczekaj Chwile') elseif focus == cid then
talk_start = os.clock()



if msgcontains(msg, '100 platinum') or msgcontains(msg, 'platinum') then sell(cid,2152,100,10000)

elseif msgcontains(msg, '100 gold') or msgcontains(msg, 'gold') then sell(cid,2148,100,100)

elseif msgcontains(msg, 'powtorz') then selfSay('Aby wymienic monety wpisz - "gold" [zamienia 100gp na 1 platinum, "platinum" [zamienia 100 platinum na 1cc]')


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


function onCreatureChangeOutfit(creature)

end


function onThink()
if (os.clock() - talk_start) > 15 then
if focus > 0 then
selfSay('Nastepny...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Narazie.')
focus = 0
end
end
end

function onThink()
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Nastepny prosze.')
end
focus = 0
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

3.Teraz zapisujemy jako cash.lua w data/npc/scripts i teraz wystarczy postawi? npc na mapie.
To wszystko.

Z pozdrowieniami
Secur
 
Status
Zamknięty.
Do góry