My bad, mistery solved

Thanks b0r3d0m o/
var g = null;
var autoWalkingTimerId = null;
function onClientStarted() {
var options = {
renderingEnabled: true
};
return options;
}
function onLogin() {
print('Logging in...');
var credentials = {
login: 'x',
password: 'x'
};
return credentials;
}
function onCharSelect() {
print('Selecting character...');
return 'x';
}
function onGameLoaded(game) {
print('Game loaded');
g = game;
for (i = 0; i < 48; i++){
lc()
sleep(500);
pieprz(i);
sleep(500);
}
}
function pieprz(rid){
var kolba = g.getMapObjects('trellis');
g.mapObjectRightClick(kolba[rid].id);
g.chooseFlowerMenuOption(Harvest);
g.waitForPf();
g.waitForTaskToFinish();
}
function lc(){
var skrzynia = g.getMapObjects('largechest');
g.mapObjectRightClick(skrzynia[0].id);
g.waitForPf();
g.transferItems('peppercorn');
g.waitForTaskToFinish();
sleep(500);
}
function picie(){
if (g.getStamina() < 50){
print('Brak staminy');
g.drink();
}
}
UzU123 wrote:
g.chooseFlowerMenuOption(Harvest);
Granger wrote:UzU123 wrote:
g.chooseFlowerMenuOption(Harvest);
This line seems to be defective.
Granger wrote:Maybe you should target the plant, not the trellis.
var stojak = g.getMapObjectsByFullName('gfx/terobjs/plants/pepper');
UzU123 wrote:Granger wrote:Maybe you should target the plant, not the trellis.
Tried it also. I changed "trellis" to "pepper" and still nothing.
Should I use something like this? Or it won't work?
- Code: Select all
var stojak = g.getMapObjectsByFullName('gfx/terobjs/plants/pepper');
var g = null;
var autoWalkingTimerId = null;
function onClientStarted() {
var options = {
renderingEnabled: true
};
return options;
}
function onLogin() {
print('Logging in...');
var credentials = {
login: 'x',
password: 'x'
};
return credentials;
}
function onCharSelect() {
print('Selecting character...');
return 'x';
}
function onGameLoaded(game) {
print('Game loaded');
g = game;
for (i = 0; i < 48; i++){
lc()
sleep(500);
pieprz(i);
sleep(500);
}
}
function pieprz(rid){
var kolba = g.getMapObjectsByFullName('gfx/terobjs/plants/pepper');
g.mapObjectRightClick(kolba[rid].id);
g.chooseFlowerMenuOption('Harvest');
g.waitForPf();
g.waitForTaskToFinish();
}
function lc(){
var skrzynia = g.getMapObjects('largechest');
g.mapObjectRightClick(skrzynia[0].id);
g.waitForPf();
g.transferItems('peppercorn');
g.waitForTaskToFinish();
sleep(500);
}
function picie(){
if (g.getStamina() < 50){
print('Brak staminy');
g.drink();
}
}
Users browsing this forum: Claude [Bot] and 96 guests