PDA

View Full Version : [R] Pizza & potato with cheese buyer



samerdl
02-12-2014, 02:06 PM
This scripts buys plain pizza and potato with cheese from the warriors guild on oldschool rs.

Guidelines:

- Wear a phoenix necklace and a ring of life.
- Start with Coins your first inventory slot.
- start near the bank/cook in the warriors guild.

Update, June 28th, 2014:

- Added support for the new deposit box at the bank.
- Simplified the code.
- Should work better (v1 still up, v2 is in pastebin link below).
- Added V4, it adds termination support if your character is no longer at the warriors guild.


V2:

http://pastebin.com/k9CHKimk

File attached below (V1 & v3).

Hoodz
02-13-2014, 06:49 PM
Gz on release!

samerdl
02-15-2014, 03:35 PM
Gz on release!


thanks hoodz :) had it in my library for a while, i used tpa and minimap icons to walk in the past but i find reflection the best. :)

am sure this could help people that f2p pk/war and do various activities and need cheap food, potato with cheese heals 16 hp and costs 10 gp in shop i have plenty of em XD.

Solar
02-15-2014, 04:57 PM
Nice to see you are still around, releasing scripts.

q8post
03-16-2014, 08:29 AM
GJ , much appreciated

chaplin
03-19-2014, 04:58 PM
working great thanks

samerdl
03-21-2014, 11:02 AM
working great thanks

Yep, still works for me as well, am surprised how well this can run and for how long - i barely put any effort into coding it.

Pakyakkistan
04-02-2014, 05:10 PM
Yep, still works for me as well, am surprised how well this can run and for how long - i barely put any effort into coding it.

I seem to have a problem with getting it to find the Cook.
If you start it with the screen open it will buy and hop, but later still cannot find the Cook.
Stands in the South-west Corner behind the last shelf in that direction and repeats walking to the Tile via. MiniMap

Might need an update.

samerdl
04-07-2014, 03:10 PM
I seem to have a problem with getting it to find the Cook.
If you start it with the screen open it will buy and hop, but later still cannot find the Cook.
Stands in the South-west Corner behind the last shelf in that direction and repeats walking to the Tile via. MiniMap

Might need an update.

I'll check it tonight

samerdl
04-08-2014, 12:40 PM
nvm, still working on it(v2)

if you're using this script you need to have Coins in first bank slot & first inv slot, otherwise it fails to withdraw money upon banking and keeps trying to rebank.

Pakyakkistan
04-08-2014, 03:28 PM
nvm, still working on it(v2)

if you're using this script you need to have Coins in first bank slot & first inv slot, otherwise it fails to withdraw money upon banking and keeps trying to rebank.

Banking and everything else seemed to be fine. As well as world hopping. Just find the cook to buy the items was where it had problems (you can have the screen open and it will buy and hop etc. Just would have to manually 'Buy' from the cook each round).

samerdl
04-08-2014, 07:43 PM
Banking and everything else seemed to be fine. As well as world hopping. Just find the cook to buy the items was where it had problems (you can have the screen open and it will buy and hop etc. Just would have to manually 'Buy' from the cook each round).

Interesting.. Just tried it and managed to buy, looking at the script build: it opens the shop screen then reads the text above the pizza/potato and turns it into numbers, now when there aren't 0 in stock or 2 it reads it as -1 and script ignores that (fixed that for next release), if its above 0 (2) then it will click and buy, potato/pizza is by default set to true.

The update i made was buggy, it needed some loop breaking procedures which i started working on then had to go for a few hours and stopped, i'll look back at it tomorrow (burned out atm, sorry).

I'll add some more text debugging to it as well, hopefully i'll shoot you a pm with the revised script so you can test it :D

samerdl
06-28-2014, 01:37 PM
updated:

Added better npc functions and support for deposit box.

hakishakataki
06-28-2014, 04:25 PM
updated:

Added better npc functions and support for deposit box.

sweet dude! How easy do you think it would be to modify the script so that it buys potions from the lady next door?

samerdl
06-28-2014, 05:23 PM
sweet dude! How easy do you think it would be to modify the script so that it buys potions from the lady next door?

I've added V4 (nothing major, just added a termination check if the character is lost and is no longer in the warriors guild).

To answer your question yes, easily:

if LocateNPC('Lidio', 'Lidio') then


Has to be changed to:


if LocateNPC('Lilly', 'Lilly') then



ClickTocontinue;
waithumanclick;
ClickTocontinue;


Completes the trade and brings up the shopscreen, for shopscreen i use my own function called Shopscreens.

Under Buypotato (or you could rename it perhaps or just use it) you can write in a new procedure (that you have to add above this procedure) call it buyAttack; BuyDef; BuyStr; etc, whatever you want (or just a more simpler for-do loop) re-write the cords (which you can get done by going to simba and selecting the green bullseye over to the smart client... Define the cords.

And i think you can figure out the rest, if you need help shoot me a pm and i'll do it (its easy).

hakishakataki
07-03-2014, 04:40 PM
I've added V4 (nothing major, just added a termination check if the character is lost and is no longer in the warriors guild).

To answer your question yes, easily:

if LocateNPC('Lidio', 'Lidio') then


Has to be changed to:


if LocateNPC('Lilly', 'Lilly') then



ClickTocontinue;
waithumanclick;
ClickTocontinue;


Completes the trade and brings up the shopscreen, for shopscreen i use my own function called Shopscreens.

Under Buypotato (or you could rename it perhaps or just use it) you can write in a new procedure (that you have to add above this procedure) call it buyAttack; BuyDef; BuyStr; etc, whatever you want (or just a more simpler for-do loop) re-write the cords (which you can get done by going to simba and selecting the green bullseye over to the smart client... Define the cords.

And i think you can figure out the rest, if you need help shoot me a pm and i'll do it (its easy).

Thanks a bunch Sam! I haven't had time to work on it lately but the next few days are lookin bright. Ill keep you posted :)

icyhottt
11-26-2014, 08:40 AM
great script!

samerdl
11-27-2014, 06:53 PM
great script!

Thanks, was quite basic when i first made it and it filled an urgent need for cheap food for training/pvming/pking.
I gota ask though, does the color one still work? (I am going to assume the reflection one broke or you update it?).

Hoodz
11-27-2014, 07:28 PM
Thanks, was quite basic when i first made it and it filled an urgent need for cheap food for training/pvming/pking.
I gota ask though, does the color one still work? (I am going to assume the reflection one broke or you update it?).

mate! i tried to pm you but your inbox is full, delete some messages!

icyhottt
11-27-2014, 10:26 PM
another thing you could do is create a potatoe farmer for gold

squirrelz
12-20-2014, 10:31 AM
can't get this too start, comes up with a Java error... Can somebody explain how you start a script without SMART? :/