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

Prosze o Pomoc

Status
Zamknięty.

Harris1

Active User
Dołączył
Październik 14, 2009
Posty
55
Liczba reakcji
1
Wi?c tak mam kilka pyta? co do OTS'a pod Tibie 8.1.
Prosze o szybkie odpowiedzi poniewa? czas mam do ?wi?t ;(.
A wi?c zacznijmy:
1.Co zrob? aby runy sie ko?czy?y ???
2.Gdzie zmniejszy? Fast Attack ???
3.Pobra?em NPC Varkhal kt?ry dzia?a tyle ?e chcia?bym ?eby sprzedawa? jeden addon oddzielnie a on sprzedaje na tej sasadzie ?e kiedy kupie first addon to do wszystkich wyglad?w naraz ,a w?asnie tak bym nie chcia?.

Z g?ry dzi?kuje za odp. :]
 
Odp: Prosze o Pomoc

1. W cofing.lua ustawiasz to wszystko
2. Vocations.xml w folderze XML ustawiasz attackspeed na mniejsze u danej profesji
3.Musisz podac ca?y script to ci ktos przerobi
 
Odp: Prosze o Pomoc

1. Prosze o dokladne linijki gdzie mam zmienic.
2. Dzieki masz reputa
3.


local focus = 0
local talk_start = 0
local target = 0
local following = false
local 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 (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Witaj ' .. creatureGetName(cid) .. '! Sprzedaje first addon za 100k i second addon za 150k.')
focus = cid
talk_start = os.clock()

elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Przepraszam, ' .. creatureGetName(cid) .. '! Musisz zaczekac.')

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

if msgcontains(msg, 'first addon') then
selfSay('Czy napewno chcesz kupic first addon za 100k?')
talk_state = 1

elseif msgcontains(msg, 'second addon') then
selfSay('Czy napewno chcesz kupic second addon za 150k?')
talk_state = 2

elseif talk_state == 1 then
if msgcontains(msg, 'yes') then
if pay(cid,100000) then
addon(cid, 1)
else
selfSay('Niestety, nie masz tyle pieniedzy.')
end
end
talk_state = 0

elseif talk_state == 2 then
if msgcontains(msg, 'yes') then
if pay(cid,150000) then
addon(cid, 2)
else
selfSay('Niestety, nie masz tyle pieniedzy.')
end
end
talk_state = 0

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()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Nastepny...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Dowidzenia, zycze milego dnia.')
focus = 0
end
end
end
 
Odp: Prosze o Pomoc

Prosze o odpowiedz co do Varkhala. Z gory Dziekuje:(
 
Ostatnia edycja:
Odp: Prosze o Pomoc

3. Ja bym na twoim miejscu ?ci?gn?? z jakiego? silnika NPC Vakri, i na map edytorze umie?ci? go gdzie chcesz ;]. Mo?esz te? zmieni? mu nick na Varkhal, jak ci si? podoba. Vakri sprzedaje sprzedaje addony tak jak pisa?e? :p.
 
Odp: Prosze o Pomoc

Czlowieku ale mi chodzi o sprzedaz za cc a nie za itemki -.-.
 
Odp: Prosze o Pomoc

Wchodzisz w ots --> date--> npc--> tworzysz plik Varkhal.XML

dajesz tam to

<?xml version="1.0"?>

<npc name="Varkhal" script="data/npc/scripts/addon.lua" access="5" lookdir="2" autowalk="25">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="134" head="78" body="88" legs="0" feet="88"/>
</npc>



Potem wejdz w npc --> scrypt i tam zrub plik addon.lua
i wklej to


local focus = 0
local talk_start = 0
local target = 0
local following = false
local 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 the first addon for 5k and the second addon for 10k.')
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, 'first addon') then
selfSay('Do you want to buy the first addon for 5k?')
talk_state = 1

elseif msgcontains(msg, 'second addon') then
selfSay('Do you want to buy the second addon for 10k?')
talk_state = 2

elseif talk_state == 1 then
if msgcontains(msg, 'yes') then
if pay(cid,5000) then
addon(cid, 1)
else
selfSay('Sorry, you don\'t have enough money.')
end
end
talk_state = 0

elseif talk_state == 2 then
if msgcontains(msg, 'yes') then
if pay(cid,10000) then
addon(cid, 2)
else
selfSay('Sorry, you don\'t 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('Next Please...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good bye then.')
focus = 0
end
end
end




I masz Varkhal'a on sprzedaje addony ale niewiem czy oto chodzilo ;/


Jesli Pomoglem :) To repucik mile widziany :):)
 
Ostatnia edycja:
Odp: Prosze o Pomoc

Hoster, ale chodzilo mi o to czy on sprzedaje addony w ten sposob ze jak kupie first addon hunter to tylko do huntera a nie do all wygladow naraz bo tego wlasnie nie chce ;/
 
Odp: Prosze o Pomoc

Zobacze czy mi scrpt wyjdzie



Sry ale niezrobilem;/
 
Ostatnia edycja:
Status
Zamknięty.
Do góry