What's new

Prosze o Pomoc

Status
Not open for further replies.

Harris1

Active User
Joined
Oct 14, 2009
Messages
55
Reaction score
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. :]
 

Kebabik

Active User
Joined
Aug 11, 2009
Messages
106
Reaction score
10
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
 

Harris1

Active User
Joined
Oct 14, 2009
Messages
55
Reaction score
1
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
 

Sc00rpion

Active User
Joined
Apr 6, 2008
Messages
102
Reaction score
4
Odp: Prosze o Pomoc

1. na tfs jest tak
removeChargesFromRunes = "yes" <- czy runy maj? si? ko?czy? yes lub no
2.nie znam sie na skryptach
 

Harris1

Active User
Joined
Oct 14, 2009
Messages
55
Reaction score
1
Odp: Prosze o Pomoc

Prosze o odpowiedz co do Varkhala. Z gory Dziekuje:(
 
Last edited:

Xemidano

New User
Joined
Jun 14, 2008
Messages
6
Reaction score
0
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.
 

Harris1

Active User
Joined
Oct 14, 2009
Messages
55
Reaction score
1
Odp: Prosze o Pomoc

Czlowieku ale mi chodzi o sprzedaz za cc a nie za itemki -.-.
 

Hoster STW

Active User
Joined
Jan 4, 2010
Messages
53
Reaction score
0
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 :):)
 
Last edited:

Harris1

Active User
Joined
Oct 14, 2009
Messages
55
Reaction score
1
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 ;/
 

Hoster STW

Active User
Joined
Jan 4, 2010
Messages
53
Reaction score
0
Odp: Prosze o Pomoc

Zobacze czy mi scrpt wyjdzie



Sry ale niezrobilem;/
 
Last edited:
Status
Not open for further replies.
Top