Author Topic: scripting ?  (Read 3960 times)

0 Members and 1 Guest are viewing this topic.

Offline KuhlKyTopic starter

  • Jr. Member
  • **
  • Posts: 17
  • Activity:
    0%
  • Reputation Power: 1
  • KuhlKy has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
scripting ?
« on: May 12, 2011, 08:19:39 AM »
0
Was wondering if there was a way to get the weight of a keg for when you are making potions or a even a way to read what is written in the gump would be even better

any help would be appreciated.... thanks

Offline Masscre

  • Gran Master Jester !!
  • Scripthack
  • *
  • Posts: 4615
  • Activity:
    0%
  • Reputation Power: 55
  • Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!
  • Gender: Male
  • Air Guitar Commander !!
  • Respect: +144
  • Referrals: 1
    • View Profile
Re: scripting ?
« Reply #1 on: May 12, 2011, 08:33:34 AM »
0
Check out event property this will give you weight and other info for items.

Offline rana70

  • Elite
  • *
  • *
  • Posts: 294
  • Activity:
    0%
  • Reputation Power: 5
  • rana70 has no influence.
  • Gender: Male
  • Respect: +37
  • Referrals: 2
    • View Profile
    • MyScripts
Re: scripting ?
« Reply #2 on: May 12, 2011, 08:43:12 AM »
0
Was wondering if there was a way to get the weight of a keg for when you are making potions or a even a way to read what is written in the gump would be even better

any help would be appreciated.... thanks

Hi,

maybe this little test script gives you a few ideas (Target an Item and it will read out the stuff),
check out the STR Commands in the Docs and I am sure you can get what you like !

Basic idea is to read out the text, narrow it down with the STR command
to your needs eg. cut out name or weight numbers and put this into a var to check on it
or calculate ...


Code: [Select]
; SUB Cut down Item Properties and Display
; This SUB will cut down Item Properties in single Lines
; and gives you the option to Display Lines you want
; and ignore Lines by setting up keywords
;
; Grab the ITEMID
Set #targcurs 1
Target
While #targcurs = 1
 wait 0
; Check out the Property of the Item
FindItem #ltargetID
Event Property #FindID
; #Property hold the full String now, store it for later use
Set %FullProperty #Property
; Get the Number of Lines we have
STR COUNT %FullProperty $
; Setup StartParameters for Line Selection
Set %LineCounterMax #strRES
Set %CutLeftPos 1
Set %DisplayOK #TRUE
Set %LineCounter 1
; Check out what to Display and what to Ignore
Repeat
{
 ; Get the most right poition of our Line
 STR POS %FullProperty $ %LineCounter
 Set %CutRightPos #strRES
 ; to Cut it out we need the Length of the Line
 Set %CutLength %CutRightPos - %CutLeftPos
 ; Cut out our Line from the Full Property
 STR MID %FullProperty %CutLeftPos %CutLength
 ; We got one Line out of the Property
 Set %DisplayLine #strRES
 ; Set %DisplayOK to #FALSE when something we don't want is in Line
 ; excludes: lines with weight or insured or requirement
 if weight in %DisplayLine || insured in %DisplayLine || requirement in %DisplayLine || Weapon , #SPC , Speed in %DisplayLine || Durability in %DisplayLine
  Set %DisplayOK #FALSE
 ; Display Line and prevent from SPAM Alert
  if %DisplayOK = #TRUE
  {
   Msg %DisplayLine $
   STR LEN %DisplayLine
   Set %WaitDelay #strRES * 5
   Wait %WaitDelay ; #strRES
  }
 ; Prepair for next Line
 Set %DisplayOK #TRUE
 Set %CutLeftPos %CutRightPos + 1
 Set %LineCounter %LineCounter + 1
}
Until %LineCounter > %LineCounterMax

halt
« Last Edit: May 12, 2011, 09:55:56 AM by rana70 »

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: scripting ?
« Reply #3 on: May 12, 2011, 09:31:07 AM »
0
error here .. otherwise nice looking code

Set %DisplayOK = #FALSE
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline rana70

  • Elite
  • *
  • *
  • Posts: 294
  • Activity:
    0%
  • Reputation Power: 5
  • rana70 has no influence.
  • Gender: Male
  • Respect: +37
  • Referrals: 2
    • View Profile
    • MyScripts
Re: scripting ?
« Reply #4 on: May 12, 2011, 09:50:48 AM »
0
error here .. otherwise nice looking code

Set %DisplayOK = #FALSE

I think I got the hint ....
and fixed it

thx
cu

Offline KuhlKyTopic starter

  • Jr. Member
  • **
  • Posts: 17
  • Activity:
    0%
  • Reputation Power: 1
  • KuhlKy has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: scripting ?
« Reply #5 on: May 12, 2011, 10:14:30 AM »
0
thanks for help I appreciate it

Scrripty

  • Guest
Re: scripting ?
« Reply #6 on: May 12, 2011, 10:20:24 AM »
0
Why would you worry about kegs when pots stack and you can stack more than 100 at a time?  Kegs are kind of obsolete now.

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: scripting ?
« Reply #7 on: May 12, 2011, 10:48:06 AM »
0
Why would you worry about kegs when pots stack and you can stack more than 100 at a time?  Kegs are kind of obsolete now.
Why does someone have to ask this question every time the word "keg" makes it into a post? ;)

I don't use strictly bottles for either. Better profit margin when selling kegs of a potion.

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Scrripty

  • Guest
Re: scripting ?
« Reply #8 on: May 12, 2011, 10:49:29 AM »
0
Why would you worry about kegs when pots stack and you can stack more than 100 at a time?  Kegs are kind of obsolete now.
Why does someone have to ask this question every time the word "keg" makes it into a post? ;)

I don't use strictly bottles for either. Better profit margin when selling kegs of a potion.

X

This question gets asked because it's pointless and annoying to buy pots in kegs... :)

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: scripting ?
« Reply #9 on: May 12, 2011, 10:52:20 AM »
0
because it's pointless and annoying to buy pots in kegs... :)
Hehe, about as pointless and annoying to the seller as buying bottles to sell pots!!

 ;D
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline KuhlKyTopic starter

  • Jr. Member
  • **
  • Posts: 17
  • Activity:
    0%
  • Reputation Power: 1
  • KuhlKy has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: scripting ?
« Reply #10 on: May 12, 2011, 01:26:46 PM »
0
I prefer to have potions in a keg for my use. It may not be your way Twinkle McNugget but that is what I prefer.

Offline gimlet

  • Very Super Secret
  • Global Moderator
  • *
  • *
  • Posts: 6211
  • Activity:
    1.4%
  • Reputation Power: 71
  • gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!
  • Gender: Male
  • Respect: +274
  • Referrals: 3
    • View Profile
Re: scripting ?
« Reply #11 on: May 12, 2011, 02:08:52 PM »
0
I partly agree with Twinkle McNugget but on seige I can not afford bottles yet.

Tags: