Eu am implementat urmatorul npc http://just4metin.ro/resurse-metin2/com ... -t554.html
Am schimbat itemele bine am pus ce vroiam dar se inampla ca la 1 player merge si la 20 nu ...
Si nustiu ce am gresit uitati aici .. poate am gresit ceva
quest trade_for_pet begin
state start begin
when 20094.CHAT."Comertul cu Pet" begin
local s=select("Sigiliu Leonidas","Sigiliu Porcusor","Sigiliu Khan","Sigiliu Phenix Gheata","Sigiliu Phenix Foc","Renunt")
if s == 1 then
if pc . count_item ( 30203 ) <= 0 then
say ( "Ai nevoie de 20:" )
say_item_vnum ( 30203 )
elseif pc . count_item ( 30203 ) == 20 then
say ( "Ai primit:" )
say_item_vnum ( 53010 )
pc . remove_item ( 30203 , 20 )
pc . give_item2 ( 53010 , 1 )
end
elseif s == 2 then
if pc . count_item ( 30198 ) <= 0 then
say ( "Ai nevoie de 20:" )
say_item_vnum ( 30198 )
elseif pc . count_item ( 30198 ) == 20 then
say ( "Ai primit:" )
say_item_vnum ( 53012 )
pc . remove_item ( 30198 , 20 )
pc . give_item2 ( 53012 , 1 )
end
elseif s == 3 then
if pc . count_item ( 70023 ) <= 0 then
say ( "Ai nevoie de 20:" )
say_item_vnum ( 70023 )
elseif pc . count_item ( 70023 ) == 20 then
say ( "Ai primit:" )
say_item_vnum ( 53011 )
pc . remove_item ( 70023 , 20 )
pc . give_item2 ( 53011 , 1 )
end
elseif s == 4 then
if pc . count_item ( 27993 ) <= 0 then
say ( "Ai nevoie de 20:" )
say_item_vnum ( 27993 )
elseif pc . count_item ( 27993 ) == 20 then
say ( "Ai primit:" )
say_item_vnum ( 53003 )
pc . remove_item ( 27993 , 20 )
pc . give_item2 ( 53003 , 1 )
end
elseif s == 5 then
if pc . count_item ( 27994 ) <= 0 then
say ( "Ai nevoie de 20:" )
say_item_vnum ( 27994 )
elseif pc . count_item ( 27994 ) == 20 then
say ( "Ai primit:" )
say_item_vnum ( 53001 )
pc . remove_item ( 27994 , 20 )
pc . give_item2 ( 53001 , 1 )
end
elseif s == 6 then
return
end
end
end
end
state start begin
when 20094.CHAT."Comertul cu Pet" begin
local s=select("Sigiliu Leonidas","Sigiliu Porcusor","Sigiliu Khan","Sigiliu Phenix Gheata","Sigiliu Phenix Foc","Renunt")
if s == 1 then
if pc . count_item ( 30203 ) <= 0 then
say ( "Ai nevoie de 20:" )
say_item_vnum ( 30203 )
elseif pc . count_item ( 30203 ) == 20 then
say ( "Ai primit:" )
say_item_vnum ( 53010 )
pc . remove_item ( 30203 , 20 )
pc . give_item2 ( 53010 , 1 )
end
elseif s == 2 then
if pc . count_item ( 30198 ) <= 0 then
say ( "Ai nevoie de 20:" )
say_item_vnum ( 30198 )
elseif pc . count_item ( 30198 ) == 20 then
say ( "Ai primit:" )
say_item_vnum ( 53012 )
pc . remove_item ( 30198 , 20 )
pc . give_item2 ( 53012 , 1 )
end
elseif s == 3 then
if pc . count_item ( 70023 ) <= 0 then
say ( "Ai nevoie de 20:" )
say_item_vnum ( 70023 )
elseif pc . count_item ( 70023 ) == 20 then
say ( "Ai primit:" )
say_item_vnum ( 53011 )
pc . remove_item ( 70023 , 20 )
pc . give_item2 ( 53011 , 1 )
end
elseif s == 4 then
if pc . count_item ( 27993 ) <= 0 then
say ( "Ai nevoie de 20:" )
say_item_vnum ( 27993 )
elseif pc . count_item ( 27993 ) == 20 then
say ( "Ai primit:" )
say_item_vnum ( 53003 )
pc . remove_item ( 27993 , 20 )
pc . give_item2 ( 53003 , 1 )
end
elseif s == 5 then
if pc . count_item ( 27994 ) <= 0 then
say ( "Ai nevoie de 20:" )
say_item_vnum ( 27994 )
elseif pc . count_item ( 27994 ) == 20 then
say ( "Ai primit:" )
say_item_vnum ( 53001 )
pc . remove_item ( 27994 , 20 )
pc . give_item2 ( 53001 , 1 )
end
elseif s == 6 then
return
end
end
end
end
