SRL Archive - MSI Suggestions

[Suggestion]Free Tickets (squeal of fortune)


Neznam

2012-04-03 18:55:43

This idea came from another thread that was called Strange Rocks. While MSI banks strange rocks… these tickets, which are refering to Squeal of Fortune, are randomly given to player who are skilling, for example in my case Woodcutting, and are NOT bankable. They must be clicked and then dissapear and are added as an additional Spin to the Squeal of Fortune.

Its kind of annoying because when the ticket is recieved MSI will keep trying to bank them, unable to do so, and quit working + log out.

I dont know if anyone else is getting this… unless this is a member only feature? But im not sure because squeal of fortune is both member and non member…

Any ideas on what to do about this?

Cerylin

2012-04-03 19:02:08

I guess they'll have to add it to the randoms so if that happens it uses it.

NCDS

2012-04-03 20:09:29

Are the tickets a static image in the inventory or is each one different in some way?

I haven't yet gotten one on any accounts I don't think..

Justin

2012-04-03 20:28:32

From: NCDS
Are the tickets a static image in the inventory or is each one different in some way?

I haven't yet gotten one on any accounts I don't think..


Static image -


Text box text (When dropped by a monster)

NCDS

2012-04-03 20:37:34

I was just rewarded a 'double spin token' which had a slightly differently image. Are these included in monster drops as well, or only as a reward from squeal of fortune?

PatDuffy

2012-04-03 20:47:17

From: NCDS
I was just rewarded a 'double spin token' which had a slightly differently image. Are these included in monster drops as well, or only as a reward from squeal of fortune?


I believe those are only from the wheel. I think the "bonus token" is from monster drops and skilling.

Nebula

2012-04-03 20:52:18

If it's how the OP described it, it could just be added to FindNormalRandoms.

Neznam

2012-04-03 21:29:58

From: NCDS
I was just rewarded a 'double spin token' which had a slightly differently image. Are these included in monster drops as well, or only as a reward from squeal of fortune?


The double spin is only a reward from Squeal of Fortune, while spinning the wheel. The single spin ones are recieved as monster drops and while skilling (appear in your inventory whilst cutting wood… fishing..etc). I believe they are different in image.

NCDS

2012-04-03 21:47:41

Ok, thanks everyone. I appreciate the information. We will adjust to compensate for this shortly. :)

Justin

2012-04-03 22:20:43

From: NCDS
I was just rewarded a 'double spin token' which had a slightly differently image. Are these included in monster drops as well, or only as a reward from squeal of fortune?


Weird, all my tickets have been the same

Coh3n

2012-04-03 22:28:56

I've had this happen once. It should be added to SRL's antiban.simba I think, then called at the end of _FindAllRandoms in antirandoms.simba. That's how other similar things are handled.

All we need is a function that finds and clicks the ticket. Simple as that.

Kyle Undefined

2012-04-03 23:52:13

So something like this?


function FindTicket() : Boolean;
var
x, y : Integer;
TPA : TPointArray;
tmpCTS : Integer;
slot : TBox;
begin
if(not(LoggedIn))then Exit;

tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(1.05, 0.35);

if(FindColorsSpiralTolerance(x, y, TPA, 10527912, MIX1, MIY1, MIX2, MIY2, 2))then
begin
Result := True;
slot := InvBox(CoordsToItem(x, y));
MouseBox(slot.X1, slot.Y1, slot.X2, slot.Y2, mouse_Left);
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;

I haven't tested this, just something real quick.

Justin

2012-04-03 23:56:34

Another image of the spin ticket

From: Kyle Undefined
So something like this?


function FindTicket() : Boolean;
var
oneFreeSpin, x, y : Integer;
slot : TBox;
begin
oneFreeSpin := DTMFromString('maQEAAHicE2RgYHgFxLfR8H0gfgHEn4H4OxD/gOKfUPwAiJ8B8Tsg/gbEBowMDOpArAvEJkBsBcTWaBikxhSItaFqtYBYDQlPNtIBmsREIaYcMFIBYwAADC4UCQ==');

if(FindDTM(oneFreeSpin, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
slot := InvBox(CoordsToItem(x, y));
MouseBox(slot.X1, slot.Y1, slot.X2, slot.Y2, mouse_Left);
Result := True;
end;

FreeDTM(oneFreeSpin);
end;

I haven't tested this, just something real quick.


Tested your DTM with the two images that I have. Detected the first one but failed at the second one

Kyle Undefined

2012-04-04 00:08:15

Updated the code I had before based on your second image, thanks!

Coh3n

2012-04-04 00:16:46

DTM would be better in this situation because it will be searched for so often. That color could be common on several items.

E: Tested, added to FindNormalRandoms, and committed. Hopefully there aren't different tickets. If there are, we can make an array.

(*
FindSpinTicket
~~~~~~~~~~~~~~

.. code-block:: pascal

function FindSpinTicket(): Boolean;

Finds and exits the annoying Squeal of Fortune pop up.

.. note::

Author: Kyle Undefined
Last Modified: Apr. 3rd, 2012 by Coh3n

Example:

.. code-block:: pascal

FindSpinTicket();
*)
function FindSpinTicket(): Boolean;
var
oneFreeSpin, x, y: Integer;
begin
oneFreeSpin := DTMFromString('mrAAAAHic42BgYMhlYmBIBuJyIC4F4hQgLgPiaiAuAeInQDWvgfg+ED8D4vdQDBK/BcS9BloMHXHWYMzLwwMUYULB/EASH2ZCw4xoGAYA/y4OqA==');

if (FindDTM(oneFreeSpin, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(x, y, 5, 5, mouse_Move);

if (WaitUptext('laim', 300)) then
begin
ClickMouse2(mouse_Left);
Wait(RandomRange(100, 200));
Result := True;
end;
end;

FreeDTM(oneFreeSpin);
end;

kunzy

2012-04-04 00:29:14

I had the same porblem as justin, glad to see its pretty much almost fixed :)

Justin

2012-04-04 00:39:23

Thanks Coh3n, Will let you know how it goes

Neznam

2012-04-04 00:51:09

Im pretty sure that there is only one image of this ticket and its the same every time.

Kyle Undefined

2012-04-04 00:52:13

Coh3n, ahh ok. I really hate using DTMs, cause I suck at making them :p

eska

2012-04-04 06:00:04

Made a DTM from a picture I saw on rs wikia. I don't have a ticket at the moment so I couldn't test if it work or not. I'm hoping I get one before I go to sleep.

If someone else could test it I'd appreciate.

The DTM:
  squealTicketDTM := DTMFromString('mFQEAAHic42VgYBAFYmUkLADE3EDMBsU8UDXCUDkxIO'
+ 'YHYkkg5gViVijmBGJ2IBYHYikoFkEyb4qpPpBkIoi3TJCCY36oXaRg'
+ 'RjIwCgAAmOsHyg==');

I also added some code to some script I'm using so that it automaticaly detect and click the SOF ticket when one is found:

//Finds a squeal of fortune ticket in your eventory if you have one and claim it
//by left clicking on it.
function FindSquealTicket: Boolean;
var
x, y: Integer;
begin
if FindDTM(squealTicketDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 5, 5);
if WaitUpText('icket', 300) then
begin
WriteLn('We found a squeal of fortune ticket! Lets claim it...');
inc(gSOFTicketClaimed); // Unneeded. I just like to know how many I got in my proggy.
Mouse(x, y, 5, 5, true);
Result:= True;
end;
end;
end;

Abu

2012-04-04 06:29:21

Sir eska eau - you got ninja'd by Cohen, it's already added to FindNormalRandoms :p