What's new

Black Knight Quest - TFS 0.3.5

Status
Not open for further replies.

Accus

Active User
Joined
Nov 29, 2009
Messages
89
Reaction score
11
Siema dzisiaj wam zaprezentuje Black Knight Quest. Skrypta znalazlem na Otland-zie, wiec odrazu mowie ze nie jest moj. Ja go tylko przekazuje wam uzytkownikom ;P

A wiec zacznijmy.
W data/actions/actions.xml wklejamy takie cos.
Code:
<!-- Black Knight Quest-->
	<action uniqueid="7518" script="black knight/bkreward1.lua" />
        <action uniqueid="7519" script="black knight/bkreward2.lua" />

Pozniej w data/actions/scripts/black knight robimy nowy plik .lua i nazywamy go bkreward1.lua i wklejamy do niego ta zawartosc.
Code:
  function onUse(cid, item, frompos, item2, topos)


if item.uid ==7518 then
queststatus = getPlayerStorageValue(cid,7618)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a Crown Shield.")
doPlayerAddItem(cid,2519,1)
setPlayerStorageValue(cid,7618,1)
else
doPlayerSendTextMessage(cid,22,"You already done this quest.")
end
else
return 0
end

return 1
end

A nastepnie tworzymy kolejny plik i nazywamy go bkreward2.lua i to jego zawartosc.
Code:
  function onUse(cid, item, frompos, item2, topos)


if item.uid ==7519 then
queststatus = getPlayerStorageValue(cid,7619)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a Crown Armor.")
doPlayerAddItem(cid,2487,1)
setPlayerStorageValue(cid,7619,1)
else
doPlayerSendTextMessage(cid,22,"You already done this quest.")
end
else
return 0
end

return 1
end

Upwnijcie sie ze skrzynki maja te id :
Code:
[B]7519[/B] - crown armor 
[B]7518[/B] - crown shield

Mam nadzieje ze sie przyda, dodalem ten skrypt bo nie widzialem go jescze tutaj na forum. Mozna go przerobic takze na inne nagrody.
 

Maniucza

Advanced User
Joined
Jan 18, 2009
Messages
374
Reaction score
57
Odp: Black Knight Quest - TFS 0.3.5

Po pierwsze powinno wygl?da? to tak :

PHP:
function onUse(cid, item, frompos, item2, topos)
queststatus = getPlayerStorageValue(cid,7618)
	if item.uid ==7518 then
		if queststatus == -1 then
			doPlayerSendTextMessage(cid,22,"You have found a Crown Shield.")
			doPlayerAddItem(cid,2519,1)
			setPlayerStorageValue(cid,7618,1)
		else
			doPlayerSendTextMessage(cid,22,"You already done this quest.")
		end
	end
	return TRUE
end

Po 2 nie wiem po co robi? dwa skrypty jak ?atwo i szybko mo?na zrobi? jeden :
PHP:
function onUse(cid, item, frompos, item2, topos)
	if queststatus == -1 then
		doPlayerSendTextMessage(cid,22,"You have found a Crown Shield.")
		doPlayerAddItem(cid,2519,1)
		setPlayerStorageValue(cid,6080,1)
	else
		doPlayerSendTextMessage(cid,22,"You already done this quest.")
	end
	elseif item.uid == 9001 then
		queststatus = getPlayerStorageValue(cid,6081)
			if queststatus == -1 then
				doPlayerSendTextMessage(cid,22,"You got a Crown Armor.")
				doPlayerAddItem(cid,2519,1)
				setPlayerStorageValue(cid,6081,1)
			else
				doPlayerSendTextMessage(cid,22,"You already done this quest..")
			end
		return TRUE
end
 

Ldrozd

Senior User
Joined
Nov 26, 2008
Messages
572
Reaction score
44
Odp: Black Knight Quest - TFS 0.3.5

Maniucza lepiej, ale wciaz do dupy :|
W pierszym po co dajesz warunek na item.uid? Skoro deklaracje sie daje w .xml
W drugim zla skladnia i ogolnie do dupy. =)
 
T

Tairens

Guest
Odp: Black Knight Quest - TFS 0.3.5

Code:
function oUse(cid, item, frompos, itemEx, topos)
local rewards = 
{
	[7518] = {storage = 7618, item = 2519}
	[7519] = {storage = 7619, item = 2487}
}
local reward = rewards[item.actionid]
local item = 0
	if(reward == nil) then
		return true
	end
	if(getPlayerStorageValue(cid, reward.storage) >= 0) then
		doPlayerSendTextMessage(cid, 22, "You have already done this quest.")
		return true
	end
	item = doCreateItemEx(reward.item, 1)
	if(doPlayerAddItemEx(cid, item) == RETURNVALUE_NOERROR) then
		setPlayerStorageValue(cid, reward.storage, 1)
		doPlayerSendTextMessage(cid, 22, "You have found "..getItemNameById(reward.item)..".")
	else
		doPlayerSendTextMessage(cid, 22, "You don\'t have enough capacity or you don't have free place in backpack.")
	end
return true
end
Jako? tak, ale nie mam czasu na sprawdzenie tego.
 

Accus

Active User
Joined
Nov 29, 2009
Messages
89
Reaction score
11
Odp: Black Knight Quest - TFS 0.3.5

Maniucza tego skryptu nie skopiowa?em po to ?eby? go zmieni? lub cokolwiek z nim robi?. Mi dzia?a? i wszyscy kt?rzy b?d? go potrzebowali to niego u?yj?, a jak masz jaki? problem to za??? w?asny temat i nie nabijaj postow.
 

Ldrozd

Senior User
Joined
Nov 26, 2008
Messages
572
Reaction score
44
Odp: Black Knight Quest - TFS 0.3.5

Maniucza tego skryptu nie skopiowa?em po to ?eby? go zmieni? lub cokolwiek z nim robi?. Mi dzia?a? i wszyscy kt?rzy b?d? go potrzebowali to niego u?yj?, a jak masz jaki? problem to za??? w?asny temat i nie nabijaj postow.
Fajnie, my tez umiemy kopiowac. A jak cos wrzucasz to wrzucaj cos sensownego, a nie jakies gowno, ktore jest przestarzale i smierdzi rdza.

Jedyna osoba co tu nabija posty jestes ty. Jak juz mowilem, kazdy zna kombinacje ctrl+c ctrl+v.
 

Accus

Active User
Joined
Nov 29, 2009
Messages
89
Reaction score
11
Odp: Black Knight Quest - TFS 0.3.5

Nie kt?rzy nie znaj? tamtego forum, wiec udost?pniam dla nich skrypt kt?ry na pewno si? komu? przyda. I to Ty i twoje bezsensowne posty prowokuj? mnie ?ebym napisa? kolejnego posta.
 

Szkal96

Advanced User
Joined
Jul 17, 2009
Messages
187
Reaction score
10
Odp: Black Knight Quest - TFS 0.3.5

co do waszej rozmowy mo?e i nie ctrl+c/v ale i tak to jest zwyk?y quest -.- wszystko opiera si? na mapce nie na skrypcie -.- a co do tego uid musi by? zadeklarowane je?li ma by? jeden skrypt -.- skrypt mo?na wrzuci? do kosza wg mnie bo nie przydatny, byle jaki, podw?jny, nudny, pospolity
 

demorator1

New User
Joined
Feb 17, 2010
Messages
1
Reaction score
0
Odp: Black Knight Quest - TFS 0.3.5

Po pierwsze powinno wygl?da? to tak :
PHP:
function onUse(cid, item, frompos, item2, topos)
queststatus = getPlayerStorageValue(cid,7618)
	if item.uid ==7518 then
		if queststatus == -1 then
			doPlayerSendTextMessage(cid,22,"You have found a Crown Shield.")
			doPlayerAddItem(cid,2519,1)
			setPlayerStorageValue(cid,7618,1)
		else
			doPlayerSendTextMessage(cid,22,"You already done this quest.")
		end
	end
	return TRUE
end
Po 2 nie wiem po co robi? dwa skrypty jak ?atwo i szybko mo?na zrobi? jeden :
PHP:
function onUse(cid, item, frompos, item2, topos)
	if queststatus == -1 then
		doPlayerSendTextMessage(cid,22,"You have found a Crown Shield.")
		doPlayerAddItem(cid,2519,1)
		setPlayerStorageValue(cid,6080,1)
	else
		doPlayerSendTextMessage(cid,22,"You already done this quest.")
	end
	elseif item.uid == 9001 then
		queststatus = getPlayerStorageValue(cid,6081)
			if queststatus == -1 then
				doPlayerSendTextMessage(cid,22,"You got a Crown Armor.")
				doPlayerAddItem(cid,2519,1)
				setPlayerStorageValue(cid,6081,1)
			else
				doPlayerSendTextMessage(cid,22,"You already done this quest..")
			end
		return TRUE
end
Bez Sensu to zrobiles -.- po co wam skrypty na jakies questy skoro otwierasz map editor wybierasz item <lol2> od razu mowie ze za duzo m?ki na darmo ale skoro chcecie byc tacy swietni to prosze chwalcie sie xD aha i potrzebuje skryptu na kasyno bo mam stigme i wgl jak go robie to mi jakos nie dziala robie wlasne i kopiuje i tez nic a nie mam konkretnie okreslonego tzn. Pod stigme konkretny silnik a nie Jakis Tfs powiedzmy ze 3.5
 

Stelma

Active User
Joined
Jan 6, 2009
Messages
114
Reaction score
19
Odp: Black Knight Quest - TFS 0.3.5

Ludzie o co wam chodzi -.-

Ch?opak chcia? pom?c zrobi? wstawk? z innego forum a wy na niego psy wieszacie jak by wam matk? zabi?..

Ja zrobi? w 1 pliku ca?ego bk i co ? b?dzie tak samo wydajne jak wasze a za?mieca? b?dzie mniej na dedyku (co o tym nie pomy?leli?cie ?)


Czasami zanim si? kogo? zjedzie trzeba si? zastanowi? czy warto...
 

Sassin

Forum friend
Joined
Jun 13, 2009
Messages
1,281
Reaction score
107
Odp: Black Knight Quest - TFS 0.3.5

Jestem zmuszony najbardziej zgodzi? si? z u?ytkownikiem wy?ej... Po pierwsze, bez wzgl?du na to jak skrypt jest banalny to tak czy siak nie ma go w tym dziale, a po drugie on tylko chcia? pom?c, a wy zachowujecie si? jakby pope?ni? przest?pstwo wklejaj?c tu ten skrypt, jestem niemal pewny ?e kto? to wykorzysta.

Fajnie, my tez umiemy kopiowac. A jak cos wrzucasz to wrzucaj cos sensownego, a nie jakies gowno, ktore jest przestarzale i smierdzi rdza.
Jedyna osoba co tu nabija posty jestes ty. Jak juz mowilem, kazdy zna kombinacje ctrl+c ctrl+v.

Rdza nie ?mierdzi i nie ka?dy zna kombinacje ctrl+c... A ka?dy kto ma Mozill? lub jak?kolwiek nowsz? przegl?dark? umie ortografi? tak? Szkoda ?e nie podkre?la b??d?w interpunkcyjnych, prawda?

Pozdrawiam,
Sassin
 
Last edited:
Status
Not open for further replies.
Top