hey people im making a smelter (west fally) and it will walk to the smelter but it wont choose the bar can anyone help?
hey people im making a smelter (west fally) and it will walk to the smelter but it wont choose the bar can anyone help?
You dtm is not working i think and the bars in the chat screen are diff from the ones in the inv if im right
~Hermen
yea i know thats y i made a new one called steelDTM2 in my DTM for ores procedure but it still wont work
Make a DTM of the bar in the chat window;
Then do:
SCAR Code:FindDTM(DTM, x, y, x1, y1, x2, y2);
MMouse(x, y, 4, 4);
Wait(100+random(100));
Mouse(x, y, 1, 1, false);
Wait(100+random(100));
ChooseOption('melt x');
Wait(150+random(100));
TypeSend(RandomRange(14, 99));
Didn't test that; but it should work
The huge range on the numbers is because most people don't type in 14 when they smelt.
Nava2
Writing an SRL Member Application | [Updated] Pascal Scripting Statements
My GitHub
Progress Report:13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you have serious physchological problems 13:46 <@BenLand100> HE GETS IT! 13:46 <@BenLand100> HE FINALLY GETS IT!!!!1
add this function to your script:
and to your procedure:SCAR Code:Function SmeltBars(Kind: String): Boolean; // by iroki
Var
Msx, Msy, ForInv: Integer;
Smelt, BarsKind, BarsSmelting: String;
Begin
Repeat
Wait(200 + Random(200));
Until Not FindText(Msx, Msy, 'What would', NPCChars, 155, 366, 365, 381);
BarsKind := LowerCase(Kind);
Case BarsKind Of
'bronze' : Begin ForInv := 14;
BarsSmelting := 'Bronze'; End;
'blurite' : Begin ForInv := 28;
BarsSmelting := 'Blurite'; End;
'iron' : Begin ForInv := 28;
BarsSmelting := 'Iron'; End;
'silver' : Begin ForInv := 28;
BarsSmelting := 'Silver'; End;
'steel' : Begin ForInv := 9;
BarsSmelting := 'Steel'; End;
'gold' : Begin ForInv := 28;
BarsSmelting := 'Gold'; End;
'mithril' : Begin ForInv := 5;
BarsSmelting := 'Mithril'; End;
'adamant' : Begin ForInv := 4;
BarsSmelting := 'Adamant'; End;
'rune' : Begin ForInv := 3;
BarsSmelting := 'Rune'; End;
End;
If (ForInv < 3) Then
Begin
WriteLn('Unknow name of bars, logging out.');
Players[CurrentPlayer].Active := False;
Players[CurrentPlayer].Loc := 'Wrong name of bars';
LogOut;
end;
If ((ForInv <= 5) And (ForInv >= 3)) Then Smelt := '5';
If ((ForInv <= 10) And (ForInv > 5)) Then Smelt := '10';
If (ForInv > 10) Then Smelt := 'X';
Wait(RandomRange(400, 600));
If FindText(Msx, Msy, BarsSmelting, StatChars, 28, 428, 488, 443) Then
Begin
Wait(200 + RandomRange(200, 250));
Mouse(Msx + 5, Msy - 12, 10, 10, False);
Wait(900 + Random(600));
If (ForInv > 10) Then
Begin
ChooseOption('Smelt ' + Smelt);
Wait(1500 + Random(500));
TypeSend(IntToStr(RandomRange(28, 99)));
Wait(500 + Random(500));
Result := True;
End Else
Begin
ChooseOption('Smelt ' + Smelt);
Result := True;
End;
WriteLn('We are smelting : ' + IntToStr(ForInv) + ' ' + BarsKind + ' bars');
Exit;
End Else
Result := False;
End;
SCAR Code:SmeltBars('nameofbar');
No maybe try a simple co-ord click for each bar with 10 randomness, It much Much more easier![]()
I had the same problem omfg!!!lol.........
There are currently 1 users browsing this thread. (0 members and 1 guests)