SRL Archive - Outdated / Broken

Merchant Suggestions


Ransom

2006-11-26 13:20:16

I'm all gung-ho about the merchant script. I will be fixing it up and re-releasing for members. I need suggestions for objects normally bought/sold in bulk. I also plan to make an option to sell items one at a time (such as armor you make and whatnot).

What i would need is if the item is F2P just tell me what it is. If it is a members object just simply send me screenshots of the 1st and 2nd trade windows. Or if you REALLY want to be cool just do it yourself and post us the variables and TradeIdents. =D

Anyway i'm looking for any ideas on what i could add/subtract.

My next project will be a runecrafter. I've seen a few but never had a really good one so i thought i would give a go at it.

Thanks!

Ransom

Boreas

2006-11-26 13:30:48

For f2p all I can think of is feathers, iron, coal, steel, maybe logs I dunno.

m0u53m4t

2006-11-26 18:15:47

Same. If I were you, I'd focus on things people can change themselves, like let them use their own item, by letting them know what they need to change.

YoHoJo

2006-11-26 18:43:13

Id make it sell items by COLOR so any item would work
also make it quadruple check the 2nd trade screen for scams =)
And the talking at the end
its gona be kinda wierd to see the guy say
ty
ty ty
come agai im here all week
every each trade
use cases there
case random(5) of
0:writeln('blah')
1:writeln('blah')
2:writeln('blah')
3:writeln('blah')
4:writeln('blah')
5:writeln('blah')
and uhh yea
this is a pretty nice concept if you can make it scam proof
its jut kinda hard to communicate with ppl though a script

like if you offer 100 of an item
and the player on puts enough for 50 (because he only wants 50)
make the script divide what he offer and subtrac that many from the 100 you offered ect ect

just bascily you yourself merchant for a while and see all the different scenarios that could happen and implement them into your script

like if someone puts up items, make it decline and say
'cash only'

I can tell if you are very dedicated this is gonna be big =)

Good Luck

Junior

2006-11-26 19:18:03

Big Bones :D

masquerader

2006-11-26 20:17:48

if you need any scripting help, ask me, pyro, or cheesehunk
(the only people with experience with a merchanter)

most of the stuff you need is in trade or amount.scar
the entire merchanter i made was less than 400 lines, but it got modded to about 500

if you have two computers, a server/client like moparscape is pretty useful for testing

Ransom

2006-11-28 01:23:57

Getting there. Made it so all you have to do is enter a color. To add new items you only have to add an if statement with the UpText. YoHo i've tried to scam myself with this and i can't find out a way to do it. I'll do a double check at 2 places but it really is safe. I've made 200k transfers with it and had many people do the 200k to 20k trick and stuff. Just can't be fooled when it really does see. The good part also is that if it doesn't see anything…it still doen't see 200k…so it declines.

I also made it remove x if they don't put up enough gold. i'll have to test this alot. I had it in a previous test version but i had it so fast people reported me for item scamming. i'm making it nice and slow and easy now. With several messages to guide the buyer along.

Just fixing up a few color problems and that'll be it fo the next release.

The user only has to enter in Price, Color, and Buying(boolean) and the script pretty much does the rest.

Thanks for all the ideas!

Ransom

WT-Fakawi

2006-11-28 04:34:07

Selling noted Power Ammys please….

Yakman

2006-11-28 09:34:52

i think there could be an option where you can put your own DTMs or bitmap masks, a bit like the player array setup

procedure declareitems;
begin
setarraylength(items,2);

items[0]:= dtmfromstring('sgehgerhdsg546dsfg....');

items[1]:=dtmfromstring('fdgsrt34s\fgdshtr....');

end;

YoHoJo

2006-11-28 16:26:21

yea i was thinking taht also
it would really easy to do
const
DTMm=;asdfasdfasdfsdafasdf';

if findDtm(DTMm,x,y,MIX1,MIY2,MIX2,MIY2) then

yea..

Ransom

2006-11-29 00:10:18

Once i repost it i'll let it fall out of my hands for a bit. I tried DTM's and Bitmaps without much success. It would keep failing at random times and DTM's took forever. I'll try it again once i get a stable color version working. It is pretty simple to add a new item. The trouble came with getting a word for the 2nd item trade window so the item check would pass. I worked around this to use the UpText. This means i no longer need an array of items really. Just one item color (DTM in future i guess) and an if statement to look for it's uptext. No matter what you use to find the item i NEED text for the 2nd trade window check. Once i repost it (hopefully tomorrow i'll have time to work on it) you'll see what i mean.

Anyway thanks for the suggestions. I'm taking most of them to light.

Ransom

YoHoJo

2006-11-29 01:03:39

Try looking up my DTM tutoirial in the tutorial island section
Its helped countless number of people learn DTMs fast and easy =)

Ransom

2006-11-29 16:14:55

Alright I can do the DTM's. Not on the next release. Would you rather have me make an array of items (… dang thats alot) or would you rather have it so you must make your own item DTM each time (i guess you could save them or something).

I like the flexibility of the colors and will probably use that personally but it DTM's are the hot topic i'll make a release for them. Just let me know how you want to enter them. Remember you'll have to add an uptext thing to(you'll see when i release…hopefully tonight xD)

Ransom

YoHoJo

2006-11-29 23:09:10

Make it color or DTMs
the pros will chose DTM =p
and The noobs will chose color
Make it have lots of nice options so it will be very userfrindly
the idea of inserting your own dtm is easy.
making a DTM of an item takes literally one minute =)
So my tut taught you well? =)

corrupt16

2006-12-07 23:23:54

How would you go about doing the money since sometimes people put 1004gp instead of 100k gp just something to watchout for.

Killerdou

2007-01-07 13:13:03

well… you could make the user deside how many items he wants to sell…

const
NumberOfItems = 1;

type Item = record
Name:string;
BuyCost:integer;
SellCost:integer;
Both:boolean;//sell and buy
Sell:boolean;//sell or buy
end;

var
WhatItem:array[0..NumberOfItems] of Item;

procedure TheItems;
begin
WhatItem[0].Name:= ;
WhatItem[0].BuyCost:= ;
WhatItem[0].SellCost:= ;
WhatItem[0].Both:= ;
WhatItem[0].Sell:= ;
...
...
...
...
end;

not sure if it will work…

Boreas

2007-01-07 15:50:12

or a form like setupplayer

Doofy

2007-04-19 00:42:47

make it buy and sell every type of rune (that should be very useful), and the main types of rune armor (i know i have a lot fo extra rune stuff :p )

Rune Hacker

2007-04-19 00:54:56

ide guess you can give it things to say out loud in the constants
Writeln('Buying ______');
then if it finds someone that traded you, it will trade, then do this
if(FindDTM(DTM, x, y, MSX1, MSY1, MSX2, MSY2))then
and then find out how many there are and put in the corresponding amount that is in the const. then make it check second window, do the trade, adn say stuff like this
Writeln('Tyvm');
then just wait like 10 seconds and type in what your buying and repeat.

Widget

2007-04-29 00:08:32

Well I tried starting a merchanter, but my parents have been limiting me to an hour of internet a day so I'll just post what I started and see if you can do nifty things with it ;)

It uses my custom autotalker in it (more undetectable than srl… still…) and the functions for finding trades don't work yet but that's what I was able to do without runescape to test on.

program WidgetMerchanter;  // // // // // // // //
{.include SRL/SRL.scar}
const
Selling = 'ess'; // What are you selling?
// Script will try to sell as 'Selling [that] [price]ea - [name]'
Selling2 = 'essence'; // another name
WaitTime = 10000; // Time to wait between talking
WaitTimeRand = 5000; // +/- time for WaitTime
BuyPrice = 20; // Price to buy your object for
SellPrice = 30; // Price to sell your object for
Plural = False; // Does it get an 's' after the name? Like nats or laws.
UseEffect = True; // Using an effect? Helps a lot =)
EffectToUse = 'glow3:'; // Don't need to bother if UseEffect is False
UName = 'Widget'; // Name to put after typing, like 'selling something 30ea -- Widget'

var wx,wy:integer;
item,item2,effect,price:string;
price2:string;

Procedure Init;
begin
Price := IntToStr(SellPrice)
Price2 := IntToStr(BuyPrice)
Item := Selling
Item2 := Selling2
if Plural then begin
Item := Selling + 's'
Item2 := Selling2 + 's'
end;
If UseEffect then
Effect := EffectToUse
end;
function number(letter:char):boolean;
var t:integer;
begin
t := getkeycode(letter)
result := true
if (t < 122) and (t > 97) then result := false;
if (t < 90) and (t > 65) then result := false;
end;

function Capital(letter:char):boolean;
var t:integer;
s:string;
begin
result := false;
t := getkeycode(letter);
s := letter;
if (Chr(t) = letter) then result := true;
if number(letter) then result := false;
if (s='<') or (s='>') or (s='?') or (s=':') or (s='"')
or (s='{') or (s='}') or (s='|') or (s='+') or (s='_')
or (s='~') or (s='!') or (s='@') or (s='#') or (s='$')
or (s='%') or (s='^') or (s='&') or (s='*') or (s='(')
or (s=')') then result := true;
end;
function CheckPrevious(text:string;pos:integer):boolean;
begin
try
if pos > 1 then
Result := Capital(text[pos-1])
except
Result := False;
end;
end;
function CheckAfter(text:string;pos:integer):boolean;
begin
try
if pos < (length(text)-1) then
Result := Capital(text[pos+1])
except
Result := False;
end;
end;
function Mistake(letter:char):string;
begin
if number(letter) then result := letter else result := humantext(letter,40)
if result=letter then begin end else writeln('mistake made')
end;
function MakeMistakes(text:string):string;
var t:integer;
begin
for t := 1 to length(text) do begin
result := result + mistake(text[t])
end;
end;
procedure Talk(text:string);
var t:integer;
s:string;
begin
s := MakeMistakes(text) + Chr(13);
for t := 1 to length(s) do begin
if capital(s[t]) and not CheckPrevious(s,t) then
begin keydown(16); sleep(20+random(20)) end;
keydown(getkeycode(s[t]))
sleep(10+random(20))
keyup(getkeycode(s[t]))
sleep(20+random(20))
if capital(s[t]) and not CheckAfter(text,t) then
begin keyup(16); sleep(20+random(20)) end;
end;
end;
Procedure AddFriend(friend:string);
begin
GameTab(8);
Mouse(601,444,7,3,True);
sleep(100+random(500));
Talk(friend);
end;
Procedure DeleteFriend(friend:string);
begin
GameTab(9);
Mouse(681,444,7,3,True);
sleep(100+random(500));
Talk(friend);
end;
Function FindTradeOffer:Boolean; // doesn't work
begin
if InChat('would like to trade')
then result := True;
end;
Function GetTrader:string;// doesn't work
begin
GetLastChatText(result)
result := Chr(0)+result;
result := Between(Chr(0),' would like',result)
end;
Procedure AcceptTrade;
var t:integer;
begin
t := getcolor(290,189)
Mouse(260,195,7,3,True);
repeat
sleep(100)
until not (GetColor(290,189)=t)
Mouse(225,310,7,2,True)
WriteLn('Accepted Trade')
end;
Procedure DeclineTrade;
begin
Mouse(260,267,7,3,True);
sleep(100+random(500));
end;
Procedure ShakeOffRClick; // doesn't work
var t,tx,ty:integer;
begin
t := MouseSpeed
MouseSpeed := 1
getmousepos(tx,ty)
MMouse(tx+500,ty,300,300)
MMouse(tx,ty,50,50)
MouseSpeed := t
end;
Function SellingThis:String;
var t:integer;
sstring:string;
begin
t := random(30)
if (t > -1) and (t < 16) then // 0-15
sstring := Effect+'Selling '+Item+' '+Price+'ea';
if (t > 15) and (t < 21) then // 15-20
sstring := Effect+'Selling '+Item+' '+Price+'ea'+' -- '+UName;
if (t > 20) and (t < 24) then // 21-23
sstring := Effect+'Selling '+Item2+' '+Price+'ea';
if (t > 23) and (t < 27) then // 24-26
sstring := Effect+'Selling '+Item2+' '+Price+'ea'+' -- '+UName;
if (t > 26) and (t < 29) then // 27-28
sstring := 'Selling '+Item2+' '+Price+'ea'
if (t > 28) and (t < 31) then // 29-30
sstring := 'Selling '+Item2+' '+Price+'ea'+' -- '+UName;
result := sstring;
end;

Procedure SellUntilTrade;
begin
repeat
Talk(SellingThis);
Sleep(WaitTime-WaitTimeRand+(WaitTimeRand*2))
until FindTradeOffer;
AddFriend(GetTrader);
end;

begin
SetUpSRL;
Init;
activateclient;
end.