What's new

NPC na zam?wienie 7.6

Status
Not open for further replies.

Sokou

Advanced User
Joined
Jun 25, 2010
Messages
379
Reaction score
25
Witam, chcia?bym zaoferowac si? jak tw?rce npc na zam?wienie;)
Odrazu m?wie ?e nie zamierzam si? t?umaczy? dlaczego robie tylko pod 7.6
Wymagania:
Code:
50 post?w 
minimum miesi?c na forum

Uwagi:
Zam?wienia moga sk?adac tylko dwaj u?ytkownicy po ich wykonaniu przyjmuje kolejne. Jeden u?ytkownik na raz mo?e z?ozy? tylko jedno zam?wienie. Npc musi by? dok?adnie opisany, niczego nie b?d? si? domy?la?.;)

Zapraszam do sk?adania zam?wie? :)
 

master sraster

Active User
Joined
Jan 12, 2010
Messages
95
Reaction score
0
Odp: NPC na zam?wienie 7.6

no to ja pierwszy ^^

potrzebowa? bym takiego npc:

Teleportuje to wyznaczonych miejsc ale tylko jak ma si? pacc i tego nie moge zrobi?;/
prosze o wykonanie.
 

Sokou

Advanced User
Joined
Jun 25, 2010
Messages
379
Reaction score
25
Odp: NPC na zam?wienie 7.6

sraster - Prosze bardzo
Code:
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('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 ((string.find(msg, '(%a*)hi(%a*)')
and (focus == 0)) and getDistanceToCreature(cid) < 4 then
rsay = math.random(1)
if rsay == 1 then says = 'Hello'
end
		if isPremium(cid) then
			selfSay('Siemka ' .. creatureGetName(cid) .. '! Zabiore cie na [COLOR="SeaGreen"]NAZWA[/COLOR] i [COLOR="#2e8b57"]NAZWA[/COLOR], [COLOR="#2e8b57"]NAZWA[/COLOR] i [COLOR="#2e8b57"]NAZWA[/COLOR]. po 200 gps. Gdzie chcesz plynac?')
			focus = cid
			talk_start = os.clock()
		else
			selfSay('Nie posiadasz pacc, aby dowiedziec sie wiecej odwiedz nasza strone www.xxxx.pl.')
			focus = 0
			talk_start = 0
		end
  	elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
  		selfSay('Prosze wr?? do kolejki ' .. creatureGetName(cid) .. ' .')
  	elseif focus == cid then
		talk_start = os.clock()
		if msgcontains(msg, '[COLOR="DarkOrchid"]NAZWA[/COLOR]') then
			if pay(cid,[COLOR="Cyan"]200[/COLOR]) then
				selfSay('P?yniemy!')
				selfSay('/send ' .. creatureGetName(cid) .. ', [COLOR="Magenta"]xxx yyy z[/COLOR]')
				focus = 0
				talk_start = 0
			else
				selfSay('Nie masz tyle pieniedzy.')
end
		elseif msgcontains(msg, '[COLOR="#9932cc"]NAZWA[/COLOR]') then
			if pay(cid,[COLOR="Cyan"]200[/COLOR]) then
				selfSay('Jazda!')
				selfSay('/send ' .. creatureGetName(cid) .. ', [COLOR="#ff00ff"]xxx yyy z[/COLOR]')
						focus = 0
				talk_start = 0
			else
				selfSay('Nie masz tyle pieniedzy.')
end
		elseif msgcontains(msg, '[COLOR="#9932cc"]NAZWA[/COLOR]') then
			if pay(cid,[COLOR="#00ffff"]200[/COLOR]) then
				selfSay('Jazda!')
				selfSay('/send ' .. creatureGetName(cid) .. ', [COLOR="#ff00ff"]xxx yyy z[/COLOR]')
						focus = 0
				talk_start = 0
			else
				selfSay('Nie masz tyle pieniedzy.')
end
		elseif msgcontains(msg, '[COLOR="#9932cc"]NAZWA[/COLOR]') then
			if pay(cid,[COLOR="#00ffff"]200[/COLOR]) then
				selfSay('Jazda!')
				selfSay('/send ' .. creatureGetName(cid) .. ', [COLOR="#ff00ff"]xxx yyy z'[/COLOR])
						focus = 0
				talk_start = 0
			else
				selfSay('Nie masz tyle pieniedzy.')
end
		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()
  	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('Dowiedzenia.')
 			focus = 0
 		end
 	end
end
Mini Legenda:
Cyan - koszt podr??y
Sea Green - nazwa miasta w tek?cie NPC
Dark Orchid - s?owo kt?re musimy wpisa? aby npc nas teleportowa?
Magenta - kondynary na kt?re teleportuje NPC.
 

klingon89a

User
Joined
Aug 26, 2010
Messages
26
Reaction score
0
Odp: NPC na zam?wienie 7.6

mam pytanie jak to ty robi?e? ten skrypt do dlaczego jest w wersi england.
a co do "Odrazu m?wie ?e nie zamierzam si? t?umaczy? dlaczego robie tylko pod 7.6"
bo jeszcze 7.xx jest w prostym jezyku napisana. Ale i tak dobra robota. Piwko ci si? nalerzy za to.
 
Last edited:

Yoxino

Advanced User
Joined
Aug 12, 2009
Messages
478
Reaction score
51
Odp: NPC na zam?wienie 7.6

@Up
Po 1. Nie england tylko english
Po 2. Skrypty s? tylko w angielskiej wersji.

@Topic
Ja narazie dzi?kuj? za npc ;D jak by? mug? tylko zobaczy? ten temat : link mo?e b?dziesz umia? to odpowiedzie? mi na moje w?tpliwo?ci... ;) Pozdrawiam
 

Sokou

Advanced User
Joined
Jun 25, 2010
Messages
379
Reaction score
25
Odp: NPC na zam?wienie 7.6

ehh prosze o zam?wienia na npc a nie oceny od os?b trzeich czy tez inne komenatrze...
 

stars1992

User
Joined
May 3, 2009
Messages
11
Reaction score
0
Odp: NPC na zam?wienie 7.6

Ja bym prosil npc z ktorego beda mogli uzywac tylko gracze z pacc i prosil bym o jeszcze jakies fajne czary dla 4 profesji
 
Last edited:

krycha1998

Advanced User
Joined
May 22, 2009
Messages
199
Reaction score
6
Odp: NPC na zam?wienie 7.6

Ehh to ja bym prosi? o NPC Misje bo ?aden mi jako? nie chc? zadzia?a? tzn.dajesz itemke,a NPC daje ci experience;p
Prosi? bym te? o NPC ,kt?ry co 3h daje najazd (przer?bka cleanera nie dzia?a)
 

ArekDrax98

Active User
Joined
May 6, 2010
Messages
72
Reaction score
1
Odp: NPC na zam?wienie 7.6

Czesc chcialbym zebys mi przerobil :
PHP:
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, platinum na cc i sc 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, 'sc') or msgcontains(msg, 'sc') then sell(cid,2159,1,1000000)  

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) > 30 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  
end 
end 
end

poniewaz wyskakuje o to taki blad SS:
beztytuugc.png
 

Sokou

Advanced User
Joined
Jun 25, 2010
Messages
379
Reaction score
25
Odp: NPC na zam?wienie 7.6

stars1992a przeczytaj wymaganie :)
ArekDrax98 ty tak?e :)

krycha1998 przez do?? d?ugi czas nie mia?em czasu ale psotaram si? wukonac npc przez weekend lub szybciej. Co do npc od najazd?w to masz taki plik raids :)
 

Der

Active User
Joined
May 8, 2009
Messages
67
Reaction score
2
Odp: NPC na zam?wienie 7.6

Witam,ja potrzebowa?bym npc kt?ry zmienia?by nam profesje oraz dawa? outfit np. Barbarian.
Oczywi?cie ?eby awansowa? w profesji trzeba mie? najpierw promocje.

PS. Profesja by?aby zmieniana wzamian za itemy. Zaznacz je zielonym kolorem to sobie sam poustawiam za co.
 

poetaa

New User
Joined
Oct 9, 2009
Messages
8
Reaction score
1
Odp: NPC na zam?wienie 7.6

Sokou widz?,?e jeste? bardzo pomocny :) Oby tak dalej przyjacielu ;)
 

krycha1998

Advanced User
Joined
May 22, 2009
Messages
199
Reaction score
6
Odp: NPC na zam?wienie 7.6

Sokou,tak wiem ale chodzi mi ?eby automatycznie robi? raid ...
tzn.co 3h!
 
Status
Not open for further replies.
Top