User prompt
envanter içinde yazılar daha belirgin olsun envanter yazısı kaldır envanter arka planı daha siyah daha koyu olsun
User prompt
müşteri yaptığım teklife karşı başka bir teklif yapabilsin yada reddete bilir yada kabul edebilir. sağ alttaki kutuya bastınca envanter çıksın küçük envanter yazısı kaldır pazarlık et kısmına hatalarımızı düzeltmek için bişeyler koy
User prompt
envanter kısmını bir kutucuk yap sağ en alta alınan ürünler orada gözüksün pazarlık et kısmını düzelt toplama çıkarma ve enter olsun
User prompt
oyunu baştan başlat
User prompt
büyük oe satış yapabilsin müşteriler ürün alsın envanter bölümü olsun
User prompt
oyunun bir sonu olmasın oyuncu ne kadar oynamak isterse
User prompt
çalıntı mal geldi bildirimi tam gözükmüyor bu bildirim küçük oenin hemen altında çıksın
User prompt
müşteri yazılan şeyi engeliyor onu düzelt aynı zamanda pazarlık et kısmını düzenle büyük oe satışta yapabilsin polis için yanlış alrm olunca 5 değil 2 itibar kes alım yapınca artı itibar verme
User prompt
tezgahın arkasına küçük oe
User prompt
küçük oe yi eski yerine koy
User prompt
küçük oe tezgahın biraz daha arkasına aynı zamanda biraz daha sağ tarafa geçsin
User prompt
küçük oe tezgahın arkasında olsun gün içinde yeteli müşteri geldikten sonra sonraki güne geç
User prompt
müşteri geride olsun biraz küçük oe 10 kare daha geride olsun pazarlık et bölümüne yanlış teklif olabileceği için çıkarma işlemi koy paramız 100 dolar olsun
User prompt
tur yazısını kaldır günlük gelicek müşteri sayısı itibara göre olsun itibar 10 dan başlasın pazarlık et boşluğuna çıkarma yapmak için buton ekle büyük oe küçük oe ve müşteri yazıları ekle 1000 dolar fazla 100 dolardan başla ürünlerin enderlikleri olsun müşteriler sözlü diyolaglar ekle mesela bu ürün için 55 dolar istiyorum gibi pazarlık yapsınlar küçük oe biraz daha arkada bulunsun
User prompt
oyunuda türkçe yap
Code edit (1 edits merged)
Please save this source code
User prompt
Antika Shop: Big OE & Little OE
Initial prompt
antika alım satımı yapan büyük OE ve onun oğlu küçük oe insanlar dükkana gelerek antikalar satmaya çalışır pazarlık edilebilmektedir bunun için pazarlık et kabul et reddet gibi alanlar yap pazarlık et bölümüne bir boşluk daha koyki rakam yazabilelim büyük oe hem alış hemde satış yapabilsinki işini büyütsün arada sırada çakma ürünler getirsin dükkana hemde arada sırada çalıntı ürünler gelsin dükkan küçük oe bunu farkedebilsin ve polis i arabilelim
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var AntiqueItem = Container.expand(function () {
var self = Container.call(this);
self.init = function (name, baseValue, isCounterfeit, isStolen) {
self.itemName = name;
self.baseValue = baseValue;
self.isCounterfeit = isCounterfeit || false;
self.isStolen = isStolen || false;
self.customerPrice = Math.floor(baseValue * (0.3 + Math.random() * 0.4));
var itemGraphics = self.attachAsset('antique', {
anchorX: 0.5,
anchorY: 0.5
});
if (self.isCounterfeit) {
itemGraphics.tint = 0xFF0000;
} else if (self.isStolen) {
itemGraphics.tint = 0x800080;
}
return self;
};
return self;
});
var Button = Container.expand(function () {
var self = Container.call(this);
self.init = function (text, x, y, callback) {
self.callback = callback;
var buttonBg = self.attachAsset('buttonBG', {
anchorX: 0.5,
anchorY: 0.5
});
self.buttonText = new Text2(text, {
size: 40,
fill: 0xFFFFFF
});
self.buttonText.anchor.set(0.5, 0.5);
self.addChild(self.buttonText);
self.x = x;
self.y = y;
return self;
};
self.down = function (x, y, obj) {
if (self.callback) {
self.callback();
}
};
return self;
});
var Character = Container.expand(function () {
var self = Container.call(this);
self.init = function (type, x, y) {
self.characterType = type;
var characterGraphics = self.attachAsset(type, {
anchorX: 0.5,
anchorY: 1.0
});
self.x = x;
self.y = y;
return self;
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x2F4F4F
});
/****
* Game Code
****/
// Game state variables
var currentPlayer = 'bigOE'; // 'bigOE' or 'littleOE'
var gamePhase = 'waiting'; // 'waiting', 'negotiating', 'inputting'
var money = storage.money || 1000;
var reputation = storage.reputation || 50;
var currentCustomer = null;
var currentAntique = null;
var negotiationRound = 0;
var maxNegotiationRounds = 3;
var customPriceInput = '';
// Antique types with base values
var antiqueTypes = [{
name: 'Antika Vazo',
baseValue: 150
}, {
name: 'Eski Tablo',
baseValue: 300
}, {
name: 'Antika Saat',
baseValue: 250
}, {
name: 'Mücevher Kutusu',
baseValue: 180
}, {
name: 'Nadir Kitap',
baseValue: 120
}, {
name: 'Çini Takımı',
baseValue: 220
}, {
name: 'Gümüş Şamdan',
baseValue: 160
}, {
name: 'Antika Lamba',
baseValue: 140
}];
// UI Elements
var shopBackground = game.attachAsset('shopBackground', {
x: 0,
y: 0
});
var counterTop = game.attachAsset('counterTop', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 1800
});
// Characters
var bigOEChar = game.addChild(new Character().init('bigOE', 800, 1700));
var littleOEChar = game.addChild(new Character().init('littleOE', 1200, 1700));
var customerChar = null;
var antiqueDisplay = null;
// UI Text elements
var moneyText = game.addChild(new Text2('Para: $' + money, {
size: 60,
fill: 0xFFFFFF
}));
moneyText.x = 100;
moneyText.y = 200;
var reputationText = game.addChild(new Text2('İtibar: ' + reputation, {
size: 60,
fill: 0xFFFFFF
}));
reputationText.x = 100;
reputationText.y = 300;
var playerText = game.addChild(new Text2('Oynayan: Büyük OE', {
size: 80,
fill: 0xFFD700
}));
playerText.anchor.set(0.5, 0);
playerText.x = 1024;
playerText.y = 400;
var infoText = game.addChild(new Text2('Müşteri bekleniyor...', {
size: 50,
fill: 0xFFFFFF
}));
infoText.anchor.set(0.5, 0);
infoText.x = 1024;
infoText.y = 600;
var negotiationText = game.addChild(new Text2('', {
size: 45,
fill: 0xFFFF00
}));
negotiationText.anchor.set(0.5, 0);
negotiationText.x = 1024;
negotiationText.y = 800;
var customPriceText = game.addChild(new Text2('', {
size: 40,
fill: 0x00FF00
}));
customPriceText.anchor.set(0.5, 0);
customPriceText.x = 1024;
customPriceText.y = 1000;
// Buttons
var acceptButton = game.addChild(new Button().init('Kabul Et', 400, 2200, acceptDeal));
var rejectButton = game.addChild(new Button().init('Reddet', 800, 2200, rejectDeal));
var bargainButton = game.addChild(new Button().init('Pazarlık Et', 1200, 2200, startBargaining));
var callPoliceButton = game.addChild(new Button().init('Polis Çağır', 1600, 2200, callPolice));
// Number input buttons
var numberButtons = [];
var inputRow1Y = 2400;
var inputRow2Y = 2500;
var clearButton = game.addChild(new Button().init('Temizle', 200, 2600, clearInput));
var submitButton = game.addChild(new Button().init('Teklif Ver', 600, 2600, submitCustomPrice));
// Create number buttons 1-9 and 0
for (var i = 1; i <= 9; i++) {
var x = 200 + (i - 1) % 3 * 200;
var y = inputRow1Y + Math.floor((i - 1) / 3) * 100;
numberButtons.push(game.addChild(new Button().init(i.toString(), x, y, createNumberHandler(i.toString()))));
}
numberButtons.push(game.addChild(new Button().init('0', 400, inputRow2Y + 100, createNumberHandler('0'))));
// Hide UI initially
hideNegotiationUI();
hideInputUI();
function createNumberHandler(digit) {
return function () {
if (gamePhase === 'inputting' && customPriceInput.length < 5) {
customPriceInput += digit;
updateCustomPriceDisplay();
}
};
}
function clearInput() {
customPriceInput = '';
updateCustomPriceDisplay();
}
function updateCustomPriceDisplay() {
customPriceText.setText('Teklifiniz: $' + customPriceInput);
}
function submitCustomPrice() {
if (customPriceInput && parseInt(customPriceInput) > 0) {
var offer = parseInt(customPriceInput);
processCustomOffer(offer);
customPriceInput = '';
updateCustomPriceDisplay();
hideInputUI();
gamePhase = 'negotiating';
}
}
function showInputUI() {
for (var i = 0; i < numberButtons.length; i++) {
numberButtons[i].visible = true;
}
clearButton.visible = true;
submitButton.visible = true;
}
function hideInputUI() {
for (var i = 0; i < numberButtons.length; i++) {
numberButtons[i].visible = false;
}
clearButton.visible = false;
submitButton.visible = false;
}
function showNegotiationUI() {
acceptButton.visible = true;
rejectButton.visible = true;
bargainButton.visible = true;
if (currentPlayer === 'littleOE') {
callPoliceButton.visible = true;
} else {
callPoliceButton.visible = false;
}
}
function hideNegotiationUI() {
acceptButton.visible = false;
rejectButton.visible = false;
bargainButton.visible = false;
callPoliceButton.visible = false;
}
function spawnCustomer() {
if (customerChar) {
customerChar.destroy();
}
if (antiqueDisplay) {
antiqueDisplay.destroy();
}
customerChar = game.addChild(new Character().init('customer', 1024, 1200));
// Create random antique
var antiqueType = antiqueTypes[Math.floor(Math.random() * antiqueTypes.length)];
var isCounterfeit = Math.random() < 0.15;
var isStolen = Math.random() < 0.1;
currentAntique = new AntiqueItem().init(antiqueType.name, antiqueType.baseValue, isCounterfeit, isStolen);
antiqueDisplay = game.addChild(currentAntique);
antiqueDisplay.x = 1024;
antiqueDisplay.y = 1400;
gamePhase = 'negotiating';
negotiationRound = 0;
updateInfoDisplay();
showNegotiationUI();
}
function updateInfoDisplay() {
if (currentAntique) {
infoText.setText(currentAntique.itemName + ' - Müşteri istiyor: $' + currentAntique.customerPrice);
var suspiciousText = '';
if (currentPlayer === 'littleOE') {
if (currentAntique.isStolen) {
suspiciousText = '\nBir şeyler şüpheli görünüyor...';
} else if (currentAntique.isCounterfeit) {
suspiciousText = '\nBu sahte olabilir...';
}
}
negotiationText.setText('Tur ' + (negotiationRound + 1) + '/' + maxNegotiationRounds + suspiciousText);
}
}
function acceptDeal() {
if (gamePhase !== 'negotiating' || !currentAntique) return;
LK.getSound('accept').play();
var profit = currentAntique.baseValue - currentAntique.customerPrice;
if (currentAntique.isStolen) {
// Caught with stolen goods
money -= 200;
reputation -= 20;
infoText.setText('Polis çalıntı mal buldu! Ceza: $200');
} else if (currentAntique.isCounterfeit) {
// Bought counterfeit
money -= currentAntique.customerPrice;
reputation -= 5;
infoText.setText('Sahte ürün aldınız! Para ve itibar kaybettiniz');
} else {
// Legitimate deal
money -= currentAntique.customerPrice;
if (profit > 50) {
reputation += 2;
} else if (profit < 0) {
reputation -= 1;
}
infoText.setText('Anlaşma kabul edildi! Kar potansiyeli: $' + profit);
}
updateDisplays();
endTransaction();
}
function rejectDeal() {
if (gamePhase !== 'negotiating') return;
LK.getSound('reject').play();
infoText.setText('Anlaşma reddedildi. Müşteri ayrıldı.');
endTransaction();
}
function startBargaining() {
if (gamePhase !== 'negotiating') return;
LK.getSound('negotiate').play();
gamePhase = 'inputting';
infoText.setText('Karşı teklifinizi girin:');
hideNegotiationUI();
showInputUI();
}
function processCustomOffer(offer) {
negotiationRound++;
var difference = Math.abs(offer - currentAntique.customerPrice);
var acceptance_threshold = currentAntique.customerPrice * 0.2;
if (difference <= acceptance_threshold) {
// Customer accepts
currentAntique.customerPrice = offer;
acceptDeal();
} else if (negotiationRound >= maxNegotiationRounds) {
// Max rounds reached
infoText.setText('Müşteri pazarlıktan yoruldu ve ayrıldı.');
endTransaction();
} else {
// Continue negotiating
var newPrice = Math.floor((currentAntique.customerPrice + offer) / 2);
currentAntique.customerPrice = newPrice;
updateInfoDisplay();
showNegotiationUI();
}
}
function callPolice() {
if (gamePhase !== 'negotiating' || currentPlayer !== 'littleOE') return;
LK.getSound('police').play();
if (currentAntique.isStolen) {
reputation += 10;
money += 100; // Reward for good citizenship
infoText.setText('İyi yakaladın! Çalıntı mal bildirildi. Ödül: $100');
} else {
reputation -= 5;
infoText.setText('Yanlış alarm. Müşteri alındı.');
}
updateDisplays();
endTransaction();
}
function endTransaction() {
gamePhase = 'waiting';
hideNegotiationUI();
hideInputUI();
if (customerChar) {
tween(customerChar, {
alpha: 0
}, {
duration: 1000,
onFinish: function onFinish() {
customerChar.destroy();
customerChar = null;
}
});
}
if (antiqueDisplay) {
tween(antiqueDisplay, {
alpha: 0
}, {
duration: 1000,
onFinish: function onFinish() {
antiqueDisplay.destroy();
antiqueDisplay = null;
}
});
}
// Switch players
currentPlayer = currentPlayer === 'bigOE' ? 'littleOE' : 'bigOE';
updateDisplays();
// Schedule next customer
LK.setTimeout(function () {
if (gamePhase === 'waiting') {
spawnCustomer();
}
}, 2000);
}
function updateDisplays() {
moneyText.setText('Para: $' + money);
reputationText.setText('İtibar: ' + reputation);
playerText.setText('Oynayan: ' + (currentPlayer === 'bigOE' ? 'Büyük OE' : 'Küçük OE'));
// Save progress
storage.money = money;
storage.reputation = reputation;
// Check game over conditions
if (money < 0) {
LK.showGameOver();
} else if (money > 5000 && reputation > 80) {
LK.showYouWin();
}
}
// Start the game
LK.setTimeout(function () {
spawnCustomer();
}, 1000);
game.update = function () {
// Handle visual feedback for current player
if (currentPlayer === 'bigOE') {
bigOEChar.alpha = 1.0;
littleOEChar.alpha = 0.6;
} else {
bigOEChar.alpha = 0.6;
littleOEChar.alpha = 1.0;
}
// Update custom price display
if (gamePhase === 'inputting') {
customPriceText.visible = true;
} else {
customPriceText.visible = false;
}
}; ===================================================================
--- original.js
+++ change.js
@@ -89,30 +89,30 @@
var maxNegotiationRounds = 3;
var customPriceInput = '';
// Antique types with base values
var antiqueTypes = [{
- name: 'Vintage Vase',
+ name: 'Antika Vazo',
baseValue: 150
}, {
- name: 'Old Painting',
+ name: 'Eski Tablo',
baseValue: 300
}, {
- name: 'Antique Clock',
+ name: 'Antika Saat',
baseValue: 250
}, {
- name: 'Jewelry Box',
+ name: 'Mücevher Kutusu',
baseValue: 180
}, {
- name: 'Rare Book',
+ name: 'Nadir Kitap',
baseValue: 120
}, {
- name: 'China Set',
+ name: 'Çini Takımı',
baseValue: 220
}, {
- name: 'Silver Candlestick',
+ name: 'Gümüş Şamdan',
baseValue: 160
}, {
- name: 'Vintage Lamp',
+ name: 'Antika Lamba',
baseValue: 140
}];
// UI Elements
var shopBackground = game.attachAsset('shopBackground', {
@@ -130,28 +130,28 @@
var littleOEChar = game.addChild(new Character().init('littleOE', 1200, 1700));
var customerChar = null;
var antiqueDisplay = null;
// UI Text elements
-var moneyText = game.addChild(new Text2('Money: $' + money, {
+var moneyText = game.addChild(new Text2('Para: $' + money, {
size: 60,
fill: 0xFFFFFF
}));
moneyText.x = 100;
moneyText.y = 200;
-var reputationText = game.addChild(new Text2('Reputation: ' + reputation, {
+var reputationText = game.addChild(new Text2('İtibar: ' + reputation, {
size: 60,
fill: 0xFFFFFF
}));
reputationText.x = 100;
reputationText.y = 300;
-var playerText = game.addChild(new Text2('Playing as: Big OE', {
+var playerText = game.addChild(new Text2('Oynayan: Büyük OE', {
size: 80,
fill: 0xFFD700
}));
playerText.anchor.set(0.5, 0);
playerText.x = 1024;
playerText.y = 400;
-var infoText = game.addChild(new Text2('Waiting for customer...', {
+var infoText = game.addChild(new Text2('Müşteri bekleniyor...', {
size: 50,
fill: 0xFFFFFF
}));
infoText.anchor.set(0.5, 0);
@@ -171,18 +171,18 @@
customPriceText.anchor.set(0.5, 0);
customPriceText.x = 1024;
customPriceText.y = 1000;
// Buttons
-var acceptButton = game.addChild(new Button().init('Accept', 400, 2200, acceptDeal));
-var rejectButton = game.addChild(new Button().init('Reject', 800, 2200, rejectDeal));
-var bargainButton = game.addChild(new Button().init('Bargain', 1200, 2200, startBargaining));
-var callPoliceButton = game.addChild(new Button().init('Call Police', 1600, 2200, callPolice));
+var acceptButton = game.addChild(new Button().init('Kabul Et', 400, 2200, acceptDeal));
+var rejectButton = game.addChild(new Button().init('Reddet', 800, 2200, rejectDeal));
+var bargainButton = game.addChild(new Button().init('Pazarlık Et', 1200, 2200, startBargaining));
+var callPoliceButton = game.addChild(new Button().init('Polis Çağır', 1600, 2200, callPolice));
// Number input buttons
var numberButtons = [];
var inputRow1Y = 2400;
var inputRow2Y = 2500;
-var clearButton = game.addChild(new Button().init('Clear', 200, 2600, clearInput));
-var submitButton = game.addChild(new Button().init('Submit', 600, 2600, submitCustomPrice));
+var clearButton = game.addChild(new Button().init('Temizle', 200, 2600, clearInput));
+var submitButton = game.addChild(new Button().init('Teklif Ver', 600, 2600, submitCustomPrice));
// Create number buttons 1-9 and 0
for (var i = 1; i <= 9; i++) {
var x = 200 + (i - 1) % 3 * 200;
var y = inputRow1Y + Math.floor((i - 1) / 3) * 100;
@@ -204,9 +204,9 @@
customPriceInput = '';
updateCustomPriceDisplay();
}
function updateCustomPriceDisplay() {
- customPriceText.setText('Your offer: $' + customPriceInput);
+ customPriceText.setText('Teklifiniz: $' + customPriceInput);
}
function submitCustomPrice() {
if (customPriceInput && parseInt(customPriceInput) > 0) {
var offer = parseInt(customPriceInput);
@@ -269,18 +269,18 @@
showNegotiationUI();
}
function updateInfoDisplay() {
if (currentAntique) {
- infoText.setText(currentAntique.itemName + ' - Customer wants: $' + currentAntique.customerPrice);
+ infoText.setText(currentAntique.itemName + ' - Müşteri istiyor: $' + currentAntique.customerPrice);
var suspiciousText = '';
if (currentPlayer === 'littleOE') {
if (currentAntique.isStolen) {
- suspiciousText = '\nSomething seems suspicious...';
+ suspiciousText = '\nBir şeyler şüpheli görünüyor...';
} else if (currentAntique.isCounterfeit) {
- suspiciousText = '\nThis might be a fake...';
+ suspiciousText = '\nBu sahte olabilir...';
}
}
- negotiationText.setText('Round ' + (negotiationRound + 1) + '/' + maxNegotiationRounds + suspiciousText);
+ negotiationText.setText('Tur ' + (negotiationRound + 1) + '/' + maxNegotiationRounds + suspiciousText);
}
}
function acceptDeal() {
if (gamePhase !== 'negotiating' || !currentAntique) return;
@@ -289,38 +289,38 @@
if (currentAntique.isStolen) {
// Caught with stolen goods
money -= 200;
reputation -= 20;
- infoText.setText('Police found stolen goods! Fine: $200');
+ infoText.setText('Polis çalıntı mal buldu! Ceza: $200');
} else if (currentAntique.isCounterfeit) {
// Bought counterfeit
money -= currentAntique.customerPrice;
reputation -= 5;
- infoText.setText('You bought a counterfeit! Lost money and reputation');
+ infoText.setText('Sahte ürün aldınız! Para ve itibar kaybettiniz');
} else {
// Legitimate deal
money -= currentAntique.customerPrice;
if (profit > 50) {
reputation += 2;
} else if (profit < 0) {
reputation -= 1;
}
- infoText.setText('Deal accepted! Profit potential: $' + profit);
+ infoText.setText('Anlaşma kabul edildi! Kar potansiyeli: $' + profit);
}
updateDisplays();
endTransaction();
}
function rejectDeal() {
if (gamePhase !== 'negotiating') return;
LK.getSound('reject').play();
- infoText.setText('Deal rejected. Customer left.');
+ infoText.setText('Anlaşma reddedildi. Müşteri ayrıldı.');
endTransaction();
}
function startBargaining() {
if (gamePhase !== 'negotiating') return;
LK.getSound('negotiate').play();
gamePhase = 'inputting';
- infoText.setText('Enter your counter-offer:');
+ infoText.setText('Karşı teklifinizi girin:');
hideNegotiationUI();
showInputUI();
}
function processCustomOffer(offer) {
@@ -332,9 +332,9 @@
currentAntique.customerPrice = offer;
acceptDeal();
} else if (negotiationRound >= maxNegotiationRounds) {
// Max rounds reached
- infoText.setText('Customer got tired of negotiating and left.');
+ infoText.setText('Müşteri pazarlıktan yoruldu ve ayrıldı.');
endTransaction();
} else {
// Continue negotiating
var newPrice = Math.floor((currentAntique.customerPrice + offer) / 2);
@@ -348,12 +348,12 @@
LK.getSound('police').play();
if (currentAntique.isStolen) {
reputation += 10;
money += 100; // Reward for good citizenship
- infoText.setText('Good catch! Stolen goods reported. Reward: $100');
+ infoText.setText('İyi yakaladın! Çalıntı mal bildirildi. Ödül: $100');
} else {
reputation -= 5;
- infoText.setText('False alarm. Customer was offended.');
+ infoText.setText('Yanlış alarm. Müşteri alındı.');
}
updateDisplays();
endTransaction();
}
@@ -393,11 +393,11 @@
}
}, 2000);
}
function updateDisplays() {
- moneyText.setText('Money: $' + money);
- reputationText.setText('Reputation: ' + reputation);
- playerText.setText('Playing as: ' + (currentPlayer === 'bigOE' ? 'Big OE' : 'Little OE'));
+ moneyText.setText('Para: $' + money);
+ reputationText.setText('İtibar: ' + reputation);
+ playerText.setText('Oynayan: ' + (currentPlayer === 'bigOE' ? 'Büyük OE' : 'Küçük OE'));
// Save progress
storage.money = money;
storage.reputation = reputation;
// Check game over conditions