[x.x][NPC]Zam?wienia!

Status
Zamknięty.
Odp: [x.x][NPC]Zam?wienia!

OKKK.Moze byc w kilka,a na kiedy mogl bys to zrobic??:confused:


Aha Podobno umiesz robic tez czary??Jak Umiesz to mam tak? pro?be.Mug? by? mi zacytowac w kt?rym miejscu ustala sie hity bicia???

 
Ostatnia edycja:
Odp: [x.x][NPC]Zam?wienia!

Siemka mam problem mam ju? softy ale teraz potrzebni mi npc kt?ry b?dzie je ?adowa? za 50ccmam silnik evo 0.7.6 [7.92] :(
Skrypty moich npc wygl?daj? tak:

Frodo.xml:
Kod:
<?xml version="1.0"?>

<npc name="Frodo" script="data/npc/scripts/seller.lua" access="1" lookdir="2" autowalk="25">
	<mana now="800" max="800"/>
	<health now="200" max="200"/>
<look type="134" head="114" body="113" legs="113" feet="113"/>
</npc>

seller.lua:
Kod:
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 town portals (for free), amulet of loss (10k), stone skin amulet (50cc).')
  		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, 'town portal') or msgcontains(msg, 'tp') then
			buy(cid,4857,getCount(msg),0)
		elseif msgcontains(msg, 'amulet of loss') or msgcontains(msg, 'aol') then
			buy(cid,2173,getCount(msg),10000)
		elseif msgcontains(msg, 'stone skin amulet') or msgcontains(msg, 'ssa') then
			buyFluidContainer(cid, 2197, 1, 500000, 100)

		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()
if focus > 0 then 
x, y, z = creatureGetPosition(focus)
myx, myy, myz = selfGetPosition()
if ((myy-y==0) and (myx-x<=0 and myx-x>=-4)) then
selfTurn(1)
end 
if ((myy-y==0) and (myx-x>=0 and myx-x<=4)) then
selfTurn(3)
end
if ((myx-x==0) and (myy-y<=0 and myy-y>=-4)) then
selfTurn(2)
end
if ((myx-x==0) and (myy-y>=0 and myy-y<=4)) then
selfTurn(0)
end
if ((myy-y==-2) and (myx-x>=-1 and myx-x<=1)) then
selfTurn(2)
end
if ((myy-y==2) and (myx-x>=-1 and myx-x<=1)) then
selfTurn(0)
end
if ((myx-x==2) and (myy-y>=-1 and myy-y<=1)) then
selfTurn(3)
end
if ((myx-x==-2) and (myy-y>=-1 and myy-y<=1)) then
selfTurn(1)
end
if ((myy-y==-3) and (myx-x>=-2 and myx-x<=2)) then
selfTurn(2)
end
if ((myy-y==3) and (myx-x>=-2 and myx-x<=2)) then
selfTurn(0)
end
if ((myx-x==3) and (myy-y>=-2 and myy-y<=2)) then
selfTurn(3)
end
if ((myx-x==-3) and (myy-y>=-2 and myy-y<=2)) then
selfTurn(1)
end
if ((myy-y==-4) and (myx-x>=-3 and myx-x<=3)) then
selfTurn(2)
end
if ((myy-y==4) and (myx-x>=-3 and myx-x<=3)) then
selfTurn(0)
end
if ((myx-x==4) and (myy-y>=-3 and myy-y<=3)) then
selfTurn(3)
end
if ((myx-x==-4) and (myy-y>=-3 and myy-y<=3)) then
selfTurn(1)
end
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)
end

  	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

Bardzo prosz? o pomoc :(
 
Odp: [x.x][NPC]Zam?wienia!

@Miziak.
To co przedstawi?e? to Frodo , co sprzedaje.
A nie wymienia..
Masz tu gotowy skrypt.
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
return false
end

if msgcontains(msg, 'specialised') or msgcontains(msg, 'boot') then
selfSay('Yes, my fathers was a great one blacksmith, it was a wise person , but when he decided to teach me he dies and i just learn about the lovely boots. So, did you bring me some boots? which one?')

elseif msgcontains(msg, 'soft boots') or msgcontains(msg, 'worn soft boots') or msgcontains(msg, 'soft boot') or msgcontains(msg, 'worn soft boot') then
selfSay('Did u like that i fix ur worn soft boots? it will cost 100 platinum coins')
talk_state = 1

elseif msgcontains(msg, 'yes') and talk_state == 1 then
if getPlayerItemCount(cid,6530) >= 1 and getPlayerItemCount(cid,2152) >= 100 then
if doPlayerTakeItem(cid,6530,1) and doPlayerTakeItem(cid,2152,100) == 0 then
selfSay('Here you are.')
doPlayerAddItem(cid,2640,1)
end
else
selfSay('Sorry, you don\'t have the item.')
end


elseif msgcontains(msg, 'no') and (talk_state == 1) then
selfSay('Ok than.')
talk_state = 0
end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
@Gohans.
Jakby co pomog? ci troszk? , bo tu spam b?dzie.
@Miniksz
Masz tu skrypt na Guild Mastera
guild.lua
http://wklej.org/id/45822/
Wejd? w ten link bo nie zmie?ci? si?.
Pozdrawiam :)
 
Ostatnia edycja:
Odp: [x.x][NPC]Zam?wienia!

@arts1991.
Wi?c tak tez znalaz?em tego npc za po?rednictwem google.pl ale na moim silniku niestety nie dzia?a :( wi?c prosi?bym o przerobienie skryptu Froda pt?ry poda?em w moim powy?szym po?cie.

Z g?ry dzi?kuj?.
 
Odp: [x.x][NPC]Zam?wienia!

Przypominam o Moim NPC!
Na kiedy Bedzie Gotowy???
A czy wogule bedzie???!???!
Mam Nadzieje...
ThX XemiX
 
Odp: [x.x][NPC]Zam?wienia!

NPC ma dac stroj :}
tibia 8.4

wyglond dowolny

Nazwa : Leszek

co ma muwic:
Player : hi
NPC : Siemasz napewno pszysz?a?a cie moja zona na "ratunek"
Player : ratunek
NPC : Wiedzialem ze pszyslala ci moja zona tak naprawde to ja niechce doniej wrucic "dlaczego"
Player : Dlaczego
NPC : ona mnie nie kocha i ja jej terz brala tylko odemnie cc i nic wiencej ;/ "obietnica"
Player : Obietnica
NPC :Zapewne moja zona obiecala ci Matrinex Stroj Nie Prawdasz?"tak"
Player "tak"
NPC : A wienc Spelnie twojom Prozbe nie na darmo sie domnie dostawales "prosba"
Player : Prozba
NPC : Prosze zebys nie Powiedzial mojej zonie ze mnie znalazles mogla by mnie zabic Sam rozumisz ona expi a ja tu siedze ma juz 200 EK ja uh jej nie zjade wienc sie boje ,Czy dalej chcesz Stroj? "tak"
Player: Tak
NPC : a wienc niech sie stanie ostrzymales stroj a teraz mozesz z tont isc bardzo boli mnie g?owa
tego stroju niemozna wybrac chce zeby ten NPc dawal wyglonda monstera 254 Bardzo Pszepraszam za blendy ale jestem dyslektykiem i prosze abys mi go zrobil :} Poleci Reput :P
 
Ostatnia edycja:
Odp: [x.x][NPC]Zam?wienia!

@xemix
Nie b?d? tak za przeproszeniem upierdoliwy , ma mn?stwo zamowie?.
Poczekaj.
Pozdrawiam,
Arts
 
Odp: [x.x][NPC]Zam?wienia!

Gohans plx wyjdz i nie wracaj.... bravo widze, ze potrafisz skopiowac scrypty z innego ots? Poka? co potrafisz i zamknij ten temat bo i tak to kopiowanie idzie Ci dosc dlugo.
 
Odp: [x.x][NPC]Zam?wienia!

To ja Gohans, kto? si? w?ama? na moje konto.
2 razy odzyskiwa?em has?o lecz niestety... :/
Dobra robi? zam?wienia...
Prosz? od nowa podawa? bo przez artsa si? troszk? zamiesza? ale thx za pomoc....

@ignas1415
Niekt?re skrypty s? takie, ale c?? nie moja wina ?e oni takie zamawiaj?...
A tak og??em to G?rnik, Sir VAlocest, Sir Manuel, Diler, Bat zrobi?em sam ^^
 
Odp: [x.x][NPC]Zam?wienia!

Tibia 8.4
Wyglond Dowolny
Co ma Robic? Dawac Stroj Monstera 254

co ma muwic :
Player : hi
NPC : Siemasz napewno pszysz?a?a cie moja zona na "ratunek"
Player : ratunek
NPC : Wiedzialem ze pszyslala ci moja zona tak naprawde to ja niechce doniej wrucic "dlaczego"
Player : Dlaczego
NPC : ona mnie nie kocha i ja jej terz brala tylko odemnie cc i nic wiencej ;/ "obietnica"
Player : Obietnica
NPC :Zapewne moja zona obiecala ci Matrinex Stroj Nie Prawdasz?"tak"
Player "tak"
NPC : A wienc Spelnie twojom Prozbe nie na darmo sie domnie dostawales "prosba"
Player : Prozba
NPC : Prosze zebys nie Powiedzial mojej zonie ze mnie znalazles mogla by mnie zabic Sam rozumisz ona expi a ja tu siedze ma juz 200 EK ja uh jej nie zjade wienc sie boje ,Czy dalej chcesz Stroj? "tak"
Player: Tak
NPC : a wienc niech sie stanie ostrzymales stroj a teraz mozesz z tont isc bardzo boli mnie g?owa
tego stroju niemozna wybrac chce zeby ten NPc dawal wyglonda monstera 254 Bardzo Pszepraszam za blendy ale jestem dyslektykiem i prosze abys mi go zrobil :} Poleci Reput :P
 
Odp: [x.x][NPC]Zam?wienia!

@Picollo.
Jak b?de wstanie to ci pomoge.
Pozdrawiam :)
 
Odp: [x.x][NPC]Zam?wienia!

To zrobi mi ktos takiego NPC :] Plix
 
Odp: [x.x][NPC]Zam?wienia!

ZAL!
Ale kiedy Ja tego NPC zam?wilem
Jak sie nieda zrobic to poprostu napiszcie a nie...;/


XemiX

P.S. W kt?rym miejscu ustawia si? hity bicia z czaru??!PlX HeLp:D
 
Odp: [x.x][NPC]Zam?wienia!

zrobi to ktos czy nie? czekam 2 dni juz xD

Edit: zrobi to ktos czy nie? czekam 2 dni juz xD
 
Odp: [x.x][NPC]Zam?wienia!

@^^^ A Ja Juz dluzej;/;/;/:(:mad:
I nikt Mi chyba Niezrobi:(:mad::mad:
P.S. Wie Kto? w kt?rym miejscu ustala si? hity bicia z czaru??!PlX HeLp
ThX XemiX
Pozdr.
 
Odp: [x.x][NPC]Zam?wienia!

Prosz? zamkn?? temat...
Nie robi? zhakowali mi GOhansa...
 
Odp: [x.x][NPC]Zam?wienia!

Siema mi chodzi tylko o skrytp bo robie ale co? mi nie wychodzi
jak napiszesz 'hi' odpisze 'Witaj, moge cie przewiesc na expowiska o to one: {cyce}, {wyverny}, {dragi}, {dragi-ghoule}, {beholdery}, {amazonki} i {smuglery}'
?eby nie spamowa? dam tylko 1 pos reszto ustawie. Jak napiszesz 'cyce' to on ci? tp na POS x=368, y=371, z=7

(to chyba jest ?eby napisa? to na ciemno niebiesko "{}" bo mi chodzi ?eby pisa? te zaznaczony wyrazy na cieno niebiesko)
 
Odp: [x.x][NPC]Zam?wienia!

NPC Nick:Marcus
Co ma robi?:Dawa? misje typu zabij jakiego? bossa<sam zrobie" to dam ci expa,a jak sie nie da to z bossa b?dzie lecie? jaki? item i za to exp.
Wygl?d: oboj?tnie mo?e by? monk.
 
Status
Zamknięty.
Back
Do góry