SRL Archive - OSR Outdated / Broken Scripts

[R] Pizza & potato with cheese buyer


samerdl

2014-02-12 09:06:50

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

2014-02-13 13:49:16

Gz on release!

samerdl

2014-02-15 10:35:02

From: hoodz
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

2014-02-15 11:57:28

Nice to see you are still around, releasing scripts.

q8post

2014-03-16 04:29:14

GJ , much appreciated

chaplin

2014-03-19 12:58:23

working great thanks

samerdl

2014-03-21 07:02:01

From: chaplin
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

2014-04-02 13:10:17

From: samerdl
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

2014-04-07 11:10:58

From: Pakyakkistan
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

2014-04-08 08:40:45

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

2014-04-08 11:28:41

From: samerdl
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

2014-04-08 15:43:42

From: Pakyakkistan
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

2014-06-28 09:37:53

updated:

Added better npc functions and support for deposit box.

hakishakataki

2014-06-28 12:25:02

From: samerdl
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

2014-06-28 13:23:01

From: hakishakataki
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

2014-07-03 12:40:45

From: samerdl
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

2014-11-26 03:40:33

great script!

samerdl

2014-11-27 13:53:49

From: icyhottt
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

2014-11-27 14:28:33

From: samerdl
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

2014-11-27 17:26:21

another thing you could do is create a potatoe farmer for gold

squirrelz

2014-12-20 05:31:53

can't get this too start, comes up with a Java error… Can somebody explain how you start a script without SMART? :/