SRL Archive - OSR Help

Right click trade on npc?


ssshhhaaa

2012-03-12 09:01:25

How would i detect, and then right click and trade a NPC.

If i use the findobjectcustom function, what do i do after that to trade the NPC?

Thanks for the help.

JuKKa

2012-03-12 09:04:32


MMouse(x, y, 3, 3);
If( WaitUptextMulti(['alk-to', 'andit shop', 'hopkeep'], 450))Then
Begin
Mouse(x, y, 3, 3, False);
WaitOption('Trade', 450);
FFlag(0);
Result := WaitFunc(@ShopScreen, 150, 1000);
if(Result)Then
Break;
End;

reply if u need addional help.

ssshhhaaa

2012-03-12 09:15:35

Thanks for that ill try it on my script later.
While your still here, after this how would i choose to buy x amount of one of the items, then x amount of the other items the shopkeeper is selling?

JuKKa

2012-03-12 09:34:39

first u gotta find where the item you want to buy is. (DTM, color, bitmap, even TPA) you need coordinates.

Mouse(x, y, 10, 10, false);
WaitOption('Buy X', 450);
Wait(1000); //just a wait for the chatbox to update
Typesend('X of number u want to buy');