PDA

View Full Version : My Trade Procedure, Function



Ransom
11-20-2006, 12:01 AM
While making my player to player merchant i was dismayed at the lack of procedures and functions. So i made 2 of my own to share with the world.


{Function FindTheTrade
By: Ransom
Description:
Returns True if purple trade color
is in the chat window}

Function FindTheTrade : Boolean;
var xx, yy : integer;
begin
if (FindColor(xx,yy,8388736,20,355,425,430) = True) Then
result := True;
end;


and

{Procedure OpenTrade;
By: Ransom
Description
Opens Trade by clicking trade chat
in chat window}

Procedure OpenTrade;
var cx, cy : integer;
begin
if (FindColor(cx,cy,8388736,20,355,425,430) = True) Then
begin
Wait(500);
CMouse(cx+10,cy+3,0,0,True);
Wait(500);
end;
end;


Hope they provide useful!

Ransom

Wrycu
11-20-2006, 12:09 AM
I probably wont use it, but im sure this will be very usefull to someone.

Infantry001
11-20-2006, 12:14 AM
this is already in SRL\SRL\misc\trade.scar, but good effort

Ransom
11-20-2006, 12:23 AM
this is already in SRL\SRL\misc\trade.scar, but good effort

Nah the ones there don't work very well. The trade chat must be in the last line (nearly impossble in busy situations) and there is no function like mine .... but good effort. Don't Patronize me

masquerader
11-20-2006, 12:47 AM
have you tried turning chat to hide?

Ransom
11-20-2006, 12:50 AM
yes...
didn't like it...
thats why i made these...

lelle
11-25-2006, 04:55 PM
What does this script actually do? can someone exlpain?

roM3
12-14-2006, 09:18 PM
What does this script actually do? can someone exlpain?

If u find trade in ur chat window...it'll click for u...:D..to make trading with the one who offer u something...

looneytoon
01-13-2007, 06:08 PM
this is an old post i know... just wanted to let you know this is exactly what i was looking for, and do you mind if i use it in my new script. ill give you credits