What's new

Skrypty & Kody quest dla profesji wa?ne

Status
Not open for further replies.

tibiarl

Active User
Joined
Feb 3, 2010
Messages
142
Reaction score
1
taki jest m?j kod:
unction onUse(cid, item, frompos, item2, topos)

if getPlayerVocation(cid) == 2 then

if getPlayerLevel(cid) < 500 then

doPlayerSendTextMessage(cid,22,"Nie da rady otworzyc za malo doswiadczenia.")
else
if item.uid == 7014 then
local queststatus = getPlayerStorageValue(cid,7014)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Darmowa Kasa, super VIP, Bron.")
doPlayerAddItem(cid,2160,300)
doPlayerAddItem(cid,12621,1)
setPlayerStorageValue(cid,7014,1)
else
doPlayerSendTextMessage(cid,22,"Patrzysz ... Nic nie ma ku***aaaa.")
end
else
return 0
end
return 1
end
return 1
else
doPlayerSendTextMessage(cid,22,"Tylko Druid moze to otworzyc.")
end
return 1
end

pytanie brzmi, jak zrobi? ?eby druid i elder druid m?g? odebra? nagrod? ???
 

Wolu

Advanced User
Joined
Jul 12, 2010
Messages
192
Reaction score
1
Odp: quest dla profesji wa?ne

if getPlayerVocation(cid) == 2 then

Tam gdzie masz == 2 zmie? na id profesji kt?ra b?dzie mog?a otworzy? quest.
 

dami1310

Poskramiacz Internet?w
Joined
Jun 1, 2009
Messages
1,385
Reaction score
113
Odp: quest dla profesji wa?ne

@UP
On chce, ?eby 2 profesje mog?y otwiera?...

@Topic
Nie lepiej zrobi?, ?eby by?o tylko dla promocji? id ED <6>
I na dole zmie? tekst na "druid z promocj?"
 

Dantez

Moim sekretem jest ciasto
Joined
May 22, 2008
Messages
1,206
Reaction score
202
Odp: quest dla profesji wa?ne

Zamiast:
if getPlayerVocation(cid) == 2 then

To:
if getPlayerVocation(cid) == 2 || getPlayerVocation(cid) == 6 then

Lub:
local voc = {2, 6}
if (isInArray(voc, getPlayerVocation(cid))) then
 

Samman

Senior User
Joined
Aug 23, 2009
Messages
782
Reaction score
39
Odp: quest dla profesji wa?ne

Albo pro?ciej..

PHP:
if getPlayerVocation(cid) == 2 or 6 then
 

boytano1

Active User
Joined
Jun 15, 2009
Messages
70
Reaction score
8
Odp: quest dla profesji wa?ne

Prosz?...
[LUA]function onUse(cid, item, frompos, item2, topos)
local voc = getPlayerVocation(cid)
if voc == 2 or voc == 6 then
if getPlayerLevel(cid) > 500 then
if item.uid == 7014 then
local queststatus = getPlayerStorageValue(cid,7014)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Darmowa Kasa, super VIP, Bron.")
doPlayerAddItem(cid,2160,300)
doPlayerAddItem(cid,12621,1)
setPlayerStorageValue(cid,7014,1)
else
doPlayerSendTextMessage(cid,22,"Patrzysz ... Nic nie ma ku***aaaa.")
end
end
else
doPlayerSendTextMessage(cid,22,"Nie da rady otworzyc za malo doswiadczenia.")
end
else
doPlayerSendTextMessage(cid,22,"Tylko Druid i Elder Druid moze otworzyc ta skrzynie.")
end
return true
end[/LUA]

Lub bardziej zaawansowany skrypt kilka voc w 1 skrypcie: (NIE TESTOWALEM GO)
[LUA]-- objasnienie :
-- [] -- id vocation, lvl -- lvl aby otworzyc skrzynie, storage -- getPlayerStorageValue(cid, value), items -- {id, count}, uid -- uniqueid skrzyni

local vocations = {
[1] = {lvl = 500, storage = 7014, items = {{2160, 5}, {12621, 1}}, uid = 7014},
[2] = {lvl = 500, storage = 7015, items = {{2160, 5}, {12621, 1}}, uid = 7014},
[3] = {lvl = 500, storage = 7016, items = {{2160, 5}, {12621, 1}}, uid = 7014},
[4] = {lvl = 500, storage = 7017, items = {{2160, 5}, {12621, 1}}, uid = 7014},
[5] = {lvl = 500, storage = 7018, items = {{2160, 5}, {12621, 1}}, uid = 7014},
[6] = {lvl = 500, storage = 7019, items = {{2160, 5}, {12621, 1}}, uid = 7014},
[7] = {lvl = 500, storage = 7020, items = {{2160, 5}, {12621, 1}}, uid = 7014},
[8] = {lvl = 500, storage = 7021, items = {{2160, 5}, {12621, 1}}, uid = 7014},
}



function onUse(cid, item, frompos, item2, topos)
local tbl = vocations[getPlayerVocation(cid)]
if tbl then
if item.uid == tbl.uid then
if getPlayerLevel(cid) > tbl.lvl then
local str = getPlayerStorageValue(cid, tbl.storage)
if str == -1 then
local bp = doPlayerAddItem(cid, 2000, 1)
for k, x in ipairs(tbl.items) do
doAddContainerItem(bp, x[1], x[2])
end
doPlayerSendTextMessage(cid,22,"Darmowa Kasa, super VIP, Bron.")
else
doPlayerSendTextMessage(cid,22,"Niestety ale juz zebrales z tej skrzyni itemy.")
end
else
doPlayerSendTextMessage(cid,22,"Potrzebujesz "..tbl.lvl.." poziom aby otworzyc ta skrzynie.")
end
end
else
doPlayerSendTextMessage(cid,22,"Twoja profesja nie moze otworzyc tej skrzyni.")
end
return true
end
[/LUA]
 
Last edited:

tibiarl

Active User
Joined
Feb 3, 2010
Messages
142
Reaction score
1
Odp: quest dla profesji wa?ne

no nie?le nie s?dzi?em ?e w lua b?d? dzia?a? znaczniki z cpp szczerze pr?bowa?em ale ?le :d bo robi?em tak
getPlayerVocation(cid) == 2 || 6
no dobra dzi?ki wielkie za pomoc
 

tibiarl

Active User
Joined
Feb 3, 2010
Messages
142
Reaction score
1
Odp: quest dla profesji wa?ne

to tak, ten kod nie dzia?a
if getPlayerVocation(cid) == 2 || getPlayerVocation(cid) == 6 then
jednak chyba nie dzia?aj? znaczniki z c++
za to ten:
local voc = {2, 6}
if (isInArray(voc, getPlayerVocation(cid))) then
jak najbardziej dzia?a dzi?kuje do zamkni?cia :p
 
Status
Not open for further replies.
Top