SRL Archive - OSR Help

Counting Archery Tickets


NKN

2012-04-22 12:58:42

I need to count the archery tickets.

I was using something like

ProcNameHereBecauseIForgot('inv','color',123123123,[]);
It worked, one time, then set it to 0, even if I restarted the script.

How would I go about counting the archery tickets in my inventory each successful Mainloop?

Blumblebee

2012-04-22 14:52:56

how are you calling it in your script? It is easier to help you by seeing how you do it.

My guess is that either you are not increasing the variable when you call it, (IncEx(ThatProc(), variable)) or perhaps you are calling it wrong. Either way, post the portion of the script that it's from and we can help you out easier.

NKN

2012-04-22 15:00:31

It crashed, and was totally deleted. So I was just looking for other ways to do it.

Nebula

2012-04-22 19:34:53

Straight from my range guild script..


Procedure GetInitialTicketCount;
begin
InitialTicketAmount := (ItemAmount('inv', 'dtm', Ticket, []));
end;

NKN

2012-04-22 20:57:28

I tried using DTM's, didn't work. D:

It works when I first run it, then I tried using something like it again to get total tickets, didn't work.

bolshak25

2012-04-22 21:33:14

do they stack?
if so, are they in the first inv spot?

NKN

2012-04-22 21:36:28

Second inventory spot, they stack.

bg5

2012-04-23 02:57:16

i := GetAmountBox(InvBox(2));

Kyle Undefined

2012-04-23 09:10:30

Check out my outdated Range Guilder script, I forgot how I did the counting, but it worked ;)

Er1k

2012-04-23 10:10:14

From: beginner5
i := GetAmountBox(InvBox(2));


This. The easiest way.