#1 2008-05-04 13:17:39

 Dimek

http://i50.tinypic.com/242swno.jpg

Zarejestrowany: 2008-04-05
Posty: 1855

[Skrypt] Prawie jak GM (Wejdz nie pozalujesz)

Hmmm....to jest skrypcik dzieki ktoremu u NPC Broadcaster
- za 100 cc normalny player bedzie mogl powiedaiec wiadomosc
na czerowno jak gm!

Spoiler:

focus = 0
next_focus = 0
talk_start = 0
msgHi = 'Siema,chcesz cos powiedziec na czerwono jak gm? Oplata to 100 CC!'
msgBye = 'HYH Itak nie jestes lepszy od gma....'
price = 1000000
inConvo = 0
broadcast = ''
cast = ''
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(msgBye)
focus = next_focus
next_focus = 0
distFocus = getDistanceToCreature(next_focus)
if (distFocus ~= nil and distFocus < 4) then
selfSay(msgHi)
talk_start = os.clock()
focus = next_focus
next_focus = 0
inConvo = 1
else
focus = 0
talk_start = 0
inConvo = 0
end
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)
msg2 = msg
msg = string.lower(msg)
if (cast ~= '') then
selfSay('does nothing')
-- do nothing, wait until message has been broadcasted and npc has replied
elseif (getDistanceToCreature(cid) >= 4 and focus == cid) then
selfSay('Please come closer, '..creatureGetName(cid)..'. I can\'t hear what you are saying from over there.')

elseif (type == 1) then
if ((string.find(msg, '(%a*)hi(%a*)') or string.find(msg, '(%a*)hello(%a*)') or string.find(msg, '(%a*)heylo(%a*)') or string.find(msg, '(%a*)greetings(%a*)')) and (focus == 0) and getDistanceToCreature(cid) < 4) then
selfSay(msgHi)
focus = cid
talk_start = os.clock()
inConvo = 1

elseif ((string.find(msg, '(%a*)hi(%a*)') or string.find(msg, '(%a*)hello(%a*)') or string.find(msg, '(%a*)heylo(%a*)') or string.find(msg, '(%a*)greetings(%a*)')) and (focus ~= cid) and getDistanceToCreature(cid) < 4) then
if (next_focus > 0 and getDistanceToCreature(next_focus) < 4) then
selfSay('Take a nap while I help the ones before you, ' .. creatureGetName(cid) .. '.')
else
selfSay('I\'ll soon come to you, ' .. creatureGetName(cid) .. '.')
next_focus = cid
end

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

if ((msgcontains(msg, 'broadcast') or msgcontains(msg, 'say')) and inConvo == 0) then
if (getPlayerLevel(creatureGetName(cid)) >= 30) then
selfSay('Do you want me to broadcast anything for you?')
inConvo = 1
else
selfSay('Come back when you\'re older!')
end

elseif (msgcontains(msg, 'yes') and inConvo == 1) then
selfSay('Powiedz co chcesz powiedziec!')
inConvo = 2

elseif (msgcontains(msg, 'no') and inConvo == 1) then
selfSay('Perhaps tomorrow then..')
if (next_focus > 0 and getDistanceToCreature(next_focus) < 4) then
selfSay(msgHi)
talk_start = os.clock()
focus = next_focus
next_focus = 0
inConvo = 1
else
focus = 0
talk_start = 0
inConvo = 0
end
broadcast = ''

elseif (inConvo == 2 and (msg ~= 'stop')) then
if (string.len(msg) > 90) then
selfSay('YY Ale debil!! Twoja wiadomosc nie moze miec wiecej niz 90 liter! nie moze byc zadnych niewiadomych znakow!! Aby zaczac od nowa powiedz STOP.')
else
broadcast = msg2
selfSay('Chcesz zaplacic '..price..'za ten tekst: "'..broadcast..'"')
inConvo = 3
end

elseif (msgcontains(msg, 'tak') and inConvo == 3) then
if (pay(cid, price)) then
selfSay('/B '..creatureGetName(cid)..' says: '..broadcast)
saycast = os.clock()
inConvo = 1

io.output(io.open("broadcast.log", "a"))
io.write("["..os.date("%y.%m.%d %X").."] <"..creatureGetName(cid).."> "..broadcast.."\n")
io.close()
cast = broadcast
else
selfSay('You can not afford this service. Please come back another time when you have more money!')
if (next_focus > 0) then
distFocus = getDistanceToCreature(next_focus)
if (distFocus ~= nil and distFocus < 4) then
selfSay(msgHi)
talk_start = os.clock()
focus = next_focus
next_focus = 0
inConvo = 1
else
focus = 0
talk_start = 0
inConvo = 0
end
broadcast = ''
end
end

elseif (msgcontains(msg, 'no') and inConvo == 3) then
selfSay('Ok then.')
inConvo = 0
broadcast = ''

elseif (string.find(msg, '(%a*)job(%a*)')) then
selfSay('Oh, I am just sitting around here and gamble now and then.')
inConvo = 0

elseif (string.find(msg, '(%a*)bye(%a*)')) then
selfSay(msgBye)
if (next_focus > 0) then
distFocus = getDistanceToCreature(next_focus)
if (distFocus ~= nil and distFocus < 4) then
selfSay(msgHi)
talk_start = os.clock()
focus = next_focus
next_focus = 0
inConvo = 1
else
focus = 0
talk_start = 0
inConvo = 0
end
broadcast = ''
end
end
end
end
end


function onCreatureChangeOutfit(creature)
end

function onThink()
if (cast ~= '' and (os.clock() - saycast) > 1) then
selfSay('Do you want to broadcast anything else?')
cast = ''
elseif (os.clock() - talk_start) > 30 then
if (focus > 0) then
selfSay(msgBye)
if (next_focus > 0) then
distFocus = getDistanceToCreature(next_focus)
if (distFocus ~= nil and distFocus < 4) then
selfSay(msgHi)
talk_start = os.clock()
focus = next_focus
next_focus = 0
inConvo = 1
else
focus = 0
talk_start = 0
inConvo = 0
end
else
focus = 0
talk_start = 0
inConvo = 0
end
broadcast = ''
end
elseif (focus ~= 0) then
distFocus = getDistanceToCreature(focus)
if (distFocus ~= nil and distFocus > 5) then
selfSay(msgBye)
if (next_focus > 0) then
distFocus = getDistanceToCreature(next_focus)
if (distFocus ~= nil and distFocus < 4) then
selfSay(msgHi)
talk_start = os.clock()
focus = next_focus
next_focus = 0
inConvo = 1
else
focus = 0
talk_start = 0
inConvo = 0
end
end
broadcast = ''
end
end
end

Mam nadzieje ze sie przyda i urozmaici wam
troche ots'a


http://i44.tinypic.com/kd01v7.png
http://www.kiep.pl/img21/2011/03/18/1300408688dance.gif

Offline

 

#2 2008-05-04 14:07:04

rakos40

http://i37.tinypic.com/sb1sbd.jpg

3920237
Zarejestrowany: 2007-12-05
Posty: 187

Re: [Skrypt] Prawie jak GM (Wejdz nie pozalujesz)

On jest na większosci otsów pod 8.1...tylko że przerobiłeś na polski.

Offline

 

#3 2008-05-05 17:29:42

żółw

http://i38.tinypic.com/2ni1vub.gif

1009507
Call me!
Skąd: Białystok
Zarejestrowany: 2008-04-22
Posty: 75
Nick: Speed Turtle
Profesja: Zanera

Re: [Skrypt] Prawie jak GM (Wejdz nie pozalujesz)

MI sie przydza ;P


http://www.pokeplushies.com/feed/296296   296298   328285   328377   330967  330968  pozmieniajcie tylko końcówke linku i zobaczcie jakie mam pokemony        http://stats.nachspiel.org/char/28/Speed+Turtle.png
http://www.zanimnapiszesz.info/bannery/3.png
http://sopot.i365.pl/neo/i/ban1.gif

Offline

 

#4 2008-05-05 18:14:51

L3chu

http://i37.tinypic.com/zmmamp.gif

TOP SECRET
Zarejestrowany: 2008-05-04
Posty: 38

Re: [Skrypt] Prawie jak GM (Wejdz nie pozalujesz)

ja wiem moze byc ;]


http://stats.nachspiel.org/char/19/Gerrell.png

Offline

 

#5 2008-05-07 12:55:34

Renion

http://i37.tinypic.com/okwrx1.gif

Skąd: WrOcLoVe <3
Zarejestrowany: 2007-12-31
Posty: 394

Re: [Skrypt] Prawie jak GM (Wejdz nie pozalujesz)

To pod 8.1? Jak zadziała dostaniesz plusa

Offline

 

#6 2008-05-08 18:58:54

 DaVo

http://i35.tinypic.com/71u5wo.gif

Zarejestrowany: 2008-02-03
Posty: 1053
WWW

Re: [Skrypt] Prawie jak GM (Wejdz nie pozalujesz)

Tak ;P Ten NPC  jest na większości 8.x i nawet 7.6 ....

               @Edit 8\10 niektórym się przyda ;]

Ostatnio edytowany przez DaVo (2008-05-08 18:59:23)


<<

http://img835.imageshack.us/img835/1563/franklampard.png

Offline

 

#7 2008-05-09 09:21:23

 Seeker

http://i49.tinypic.com/2whmhds.jpg

4133650
Skąd: Tu i Tam...
Zarejestrowany: 2008-02-29
Posty: 1243
Nick: Heannak
Profesja: Honera
Server: 39~
WWW

Re: [Skrypt] Prawie jak GM (Wejdz nie pozalujesz)

nom on jest na prawie kazdymotsie wiec nikomu sie nie przyda bo se skpiuje i juz ma


http://pretoriaots.pl/signature.php?character=Seeker&image=4
http://s2.tibiafun.y0.pl/char.php?c=Naplecior
http://www.pokeplushies.com/images/adoptables/690903.gif

Offline

 

#8 2008-05-09 15:34:16

Dzagamongo

http://i37.tinypic.com/okc0lk.gif

Zarejestrowany: 2008-05-08
Posty: 9

Re: [Skrypt] Prawie jak GM (Wejdz nie pozalujesz)

ooo...
Dzięki mi sie akurat przyda.
Zmienie że za 10k bo OTS RPG.
Chyba nie żądasz praw autorskich
: *** Second Thanks!

Offline

 

#9 2008-05-11 22:55:13

Dawid123

http://i37.tinypic.com/okc0lk.gif

Zarejestrowany: 2008-04-07
Posty: 1

Re: [Skrypt] Prawie jak GM (Wejdz nie pozalujesz)

KURWA ZAL -.-.-.-.-

Offline

 

#10 2008-05-12 07:46:46

Ziele

http://i38.tinypic.com/ztvkat.gif

6868784
Zarejestrowany: 2008-03-26
Posty: 462

Re: [Skrypt] Prawie jak GM (Wejdz nie pozalujesz)

Zgadzam się z Seekerem;) On jest prawie na wszystkich otsach 8.1

Wiec duzo ludzi na tym nieskorzysta..Ale skrypt fajny  7/10


^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^
http://www.pokeplushies.com/images/adoptables/771098.gif
Nakarmisz Mnie ???
www.cs-myp.xt.pl <<<<---- zapraszamy do rejestracjii !!
www.games4you.y0.pl <<<< --------- Również zapraszamy !!!

Offline

 

#11 2008-05-14 15:51:51

Xanderus

http://i38.tinypic.com/2ni1vub.gif

status 5378617
2629470
Call me!
Skąd: nie wiem :P
Zarejestrowany: 2008-01-10
Posty: 85
Nick: Mestro Rfu
Profesja: Kyra
Server: 21

Re: [Skrypt] Prawie jak GM (Wejdz nie pozalujesz)

Fajne bedziwe grało dużo ludzi

Offline

 

#12 2009-05-30 16:38:57

Xenox

http://i37.tinypic.com/2dqpohz.gif

Skąd: Gdzieś niedaleko...
Zarejestrowany: 2009-05-30
Posty: 28
Nick: GM Xenox
Profesja: Jeszcze nie gotowy...
Server: Wciąż rośnie...
WWW

Re: [Skrypt] Prawie jak GM (Wejdz nie pozalujesz)

Super dzienki wielkie!


Daj + Nic nie tracisz a zyskasz Przyjaciela

Offline

 

Stopka forum

RSS
Powered by PunBB
© Copyright 2002–2008 PunBB
Polityka cookies - Wersja Lo-Fi


Darmowe Forum | Ciekawe Fora | Darmowe Fora
www.powerrangersgranet.pun.pl www.gwardiaklimat.pun.pl www.swinkimorskie.pun.pl www.kult.pun.pl www.underworldots.pun.pl