hi i know how to count inv items but i dont know how to count the ammout of a spasific item e.g.
if you were cutting yews and like you got a sandwich from the sand wich lady
how would you tell the script just to count the yew logs??
please help
hi i know how to count inv items but i dont know how to count the ammout of a spasific item e.g.
if you were cutting yews and like you got a sandwich from the sand wich lady
how would you tell the script just to count the yew logs??
please help
PLM'S Rimmington Yew Cutter And Banker,Worked: 4hour 54min
Make a DTM of the yew logs, and use CountItems(YourDTM,DTM,sometolerancenumber);
so then in proggie how would i say howmany logs gained
PLM'S Rimmington Yew Cutter And Banker,Worked: 4hour 54min
Lets say you're storing the value in the variable called Logs. You'd use something like this in the main part of your script:
And something like this for the proggy:SCAR Code:Logs:= Logs + CountItems(YourDTM,DTM,5);
SCAR Code:Writeln('Cut ' + IntToStr(Logs) + ' logs!');
You also have to say its in inventory, this is directly from my script:
SCAR Code:LogDTM := DTMFromString('78DA639CCEC4C0C0C9C80002AC0C10E06A27C' +
'12002A441A2FF8180B18F09CA43068C4824909E0354F39701BF9A' +
'8540350204CC990854234A404D3B500D2F01354B816AB8F0AB010' +
'0353C0A3A');
LogsCut := ItemAmount('inv', 'dtm', LogDTM, []);
TotalLogs:= (TotalLogs + LogsCut);
TotalLogs + LogsCut will count how many logs your chopped before you last banked + the logs you've banked since the script started, it wont count items already in the bank.
SCAR Code:WriteLn(Padr('|| Logs Chopped: ' + IntToStr(TotalLogs), 67) + '||');
hey thanks for your help will use and tell u if works for me
PLM'S Rimmington Yew Cutter And Banker,Worked: 4hour 54min
hey i needed this two... Dizl3's way worked for me thanks! When i tryed senrath's way it came up with an error where you wrote (Yourdtm,DTM,5)
for 'yourDTM' i put the name of my dtm
for DTM i just left DTM there -(should i have changed to somthing?)
and for 5 i just left as 5 tol
it said somthing like unknown identerfire DTM i tryed adding it to var but still didnt work
any suggestions
Sorry, I meant to put 'DTM'. You need the ''.
"The enemy of my enemy is next!"~Lord Solar Macharius
"When the power of love overcomes the love of power the world will know peace" ~Jimi Hendrix
Use the spell-checker before you post!
http://www.srl-forums.com/forum/begi...sh-t42131.html
^Beginners guide to English (READ IT!)
There are currently 1 users browsing this thread. (0 members and 1 guests)