Author Topic: Help with script, am I heading int he right direction  (Read 9145 times)

0 Members and 1 Guest are viewing this topic.

Offline BlacklistedTopic starter

  • Jr. Member
  • **
  • Posts: 75
  • Activity:
    0%
  • Reputation Power: 2
  • Blacklisted has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Help with script, am I heading int he right direction
« on: August 10, 2011, 07:33:18 AM »
0
Hi
Could i ask some advice on a script I'm trying to write.

While gathering loot to train imbueing I was getting fed up of dragging the gems and regs out of my pack by hand.
so I wanted to make a script that would pull the gems and regs out and seperate them into different containers, I can get the differant chests to open but im confused when it comes to moving the loot and and how to make the script first check for gems, move the gems then once there are no gems left move onto checking for regs and moving those. once I get that working I can work on adding user defined items. I have looked over some of the scripts already posted for ideas on how to solve it but I'd rather work it out rather than just plagiarise another scripters work.


Code: [Select]
;=================================================================
; Script Name: Blacklisted's MoveLoot
; Author: Blacklisted
; Version: 1.0
; Shard OSI
; Revision Date: 10/8/2011
; Purpose: To move loot into seperate containers
; Globals: None
;=================================================================

SET %Gems HVF_UVF_FVF_EVF_OVF_VUF_GVF_RVF_BVF_VVF_NVF_ZVF_
SET %Reagents KUF_JUF_KZF_JZF_MZF_WZF_RZF_SZF_DUF_TZF_UZF_YZF_IUF_

mainloop:

  gosub SelectLootBag:
  gosub SelectGemBag:
  gosub SelectRegBag:
  gosub OpenLootBag:
  gosub OpenGemBag:
  gosub OpenRegBag:
  gosub GetGems:
  gosub GetRegs:
  gosub MoveGems:
  gosub MoveRegs:
 
return


sub SelectLootBag:
display Please Select Your Loot Bag$
 set #targcurs 1
  target
  targetloop:
  if #targcurs = 1
    {
    goto targetloop:
    }
  set %LootBag #ltargetid
  wait 5
return

sub SelectGemBag:
display Please Select Your Gem Bag$
 set #targcurs 1
  target
  targetloop1:
  if #targcurs = 1
    {
    goto targetloop1:
    }
  set %GemBag #ltargetid
  wait 5
return

sub SelectRegBag:
display Please Select Your Reg Bag$
 set #targcurs 1
  target
  targetloop3:
  if #targcurs = 1
    {
    goto targetloop3:
    }
  set %RegBag #ltargetid
  wait 5
return

sub OpenLootBag:
  set #nextcposx 100
  set #nextcposy 600
  set #lobjectid %LootBag
  event macro 17
  wait 20
return

sub OpenGemBag:
  set #nextcposx 300
  set #nextcposy 600
  set #lobjectid %GemBag
  event macro 17
  wait 20
return

sub OpenRegBag:
  set #nextcposx 500
  set #nextcposy 600
  set #lobjectid %RegBag
  event macro 17
  wait 20
return

sub GetGems:
findItem %Gems C_ , %GemBag
repeat
 gosub MoveGems
until  #findKind = -1
set #lobjectID #findID
set #ltargetKind 1

Offline camotbik

  • Sr. Member
  • *
  • Posts: 349
  • Activity:
    0%
  • Reputation Power: 3
  • camotbik has no influence.
  • Gender: Male
  • Hello! I'm a UO addict.
  • Respect: +38
  • Referrals: 0
    • View Profile
Re: Help with script, am I heading int he right direction
« Reply #1 on: August 10, 2011, 07:55:34 AM »
0
Take a look at your script. It doesnt contain some returns, and the loop isnt working. Why? + In the end of the sub you add: which isn't req.  Look up these topics

http://www.scriptuo.com/index.php?board=17.0


Code: [Select]
SET %Gems HVF_UVF_FVF_EVF_OVF_VUF_GVF_RVF_BVF_VVF_NVF_ZVF_
SET %Reagents KUF_JUF_KZF_JZF_MZF_WZF_RZF_SZF_DUF_TZF_UZF_YZF_IUF

gosub setup
gosub move_gems
gosub move_regs
halt

sub setup
  event SysMessage Target your loot bag
  set #targcurs 1
  while #targcurs <> 0
    wait 1
  set %Lootbag #ltargetid
  
  event SysMessage Target your gem bag
  set #targcurs 1
  while #targcurs <> 0
    wait 1
  set %GemBag #ltargetid
  
  event SysMessage Target your reg bag
  set #targcurs 1
  while #targcurs <> 0
    wait 1
  set %RegBag #ltargetid
return

sub move_gems
  finditem %Gems C_ , %Lootbag
  if #findcnt > 0
  {
    for #FINDINDEX 1 #FINDCNT
    {
      Exevent Drag #findid #findstack
      Exevent Dropc %GemBag
      wait 10
    }
  }
return

sub move_regs
  finditem %Reagents C_ , %Lootbag
  if #findcnt > 0
  {
    for #FINDINDEX 1 #FINDCNT
    {
      Exevent Drag #findid #findstack
      Exevent Dropc %RegBag
      wait 10
    }
  }
return

By the way, you could use ScriptUO to check your script on bugs with the "syntax error check" button.
http://www.scriptuo.com/index.php?action=downloads;sa=view;id=3

e.g. your script
Code: [Select]
Method count: 56
Command count: 56
*** Pass 1 - Label accounting:
*** Warning - GOSUB getregs: - Line 23 has no matching SUBroutine
*** Warning - GOSUB movegems: - Line 24 has no matching SUBroutine
*** Warning - GOSUB moveregs: - Line 25 has no matching SUBroutine
*** Warning - GOSUB movegems - Line 96 has no matching SUBroutine
*** Warning - GOTO targetloop: - Line 37 has no matching tag
*** Warning - GOTO targetloop1: - Line 50 has no matching tag
*** Warning - GOTO targetloop3: - Line 63 has no matching tag
Subroutine labels = 7
Tag labels = 4
4 Code block(s).
7 Warnings(s) encountered.
*** Pass 2 - Execution [SYNTAXCHECK]
« Last Edit: August 10, 2011, 08:18:57 AM by camotbik »
What you witness -- is whatver..
uogamers hybrid.

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Help with script, am I heading int he right direction
« Reply #2 on: August 10, 2011, 08:14:38 AM »
0
Here's a little suggestion to camotbik's suggestion:

Code: [Select]
event SysMessage Target your loot bag
set #targcurs 1
while #targcurs <> 0
wait 1
set %Lootbag #ltargetid
set #lobjectID %Lootbag
event macro 17
wait 5

Added the last three lines which will set the bag to last object, then use last object - opening the bag.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline BlacklistedTopic starter

  • Jr. Member
  • **
  • Posts: 75
  • Activity:
    0%
  • Reputation Power: 2
  • Blacklisted has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Re: Help with script, am I heading int he right direction
« Reply #3 on: August 10, 2011, 11:42:38 AM »
0
Thanks alot guys im going to attempt to add in a menu and made more items like scrolls and imbuing ingredients.
could you give me a quick run down of the "return" actully mean's. and also is it ok to have the "event system message" I think I read on easyuo somewhere GM's may be able scan your journel.
thanks
« Last Edit: August 10, 2011, 11:49:32 AM by Blacklisted »

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Help with script, am I heading int he right direction
« Reply #4 on: August 10, 2011, 11:55:55 AM »
0
It's time you found the tutorials here :)
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline camotbik

  • Sr. Member
  • *
  • Posts: 349
  • Activity:
    0%
  • Reputation Power: 3
  • camotbik has no influence.
  • Gender: Male
  • Hello! I'm a UO addict.
  • Respect: +38
  • Referrals: 0
    • View Profile
Re: Help with script, am I heading int he right direction
« Reply #5 on: August 10, 2011, 01:02:04 PM »
0
I think I read on easyuo somewhere GM's may be able scan your journel.

Lolz, give us the link.
btw, this comand is client sided so gm - even if they would scan your journal - would't see it.
« Last Edit: August 10, 2011, 01:07:38 PM by camotbik »
What you witness -- is whatver..
uogamers hybrid.

Offline Neo

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: Help with script, am I heading int he right direction
« Reply #6 on: August 10, 2011, 08:24:13 PM »
0
Hi Blacklisted! I wrote the script down for you, to do the stuff you wanted it to do, with comments, in the form of a tutorial. This script should be fully functional, and also, it's an easy to read tutorial so that you can understand everything that each line of code does. I hope you can find this useful to help give you a push in the right direction to start learning how to script.

So, here it is:
Code: [Select]
;----------------------------------------------------
; First off, we should start the script by setting the
; variables we're going to use. As you know, standard
; variables always start with '%'. So let's set the ones
; we're going to use!
;----------------------------------------------------
set %gems HVF_UVF_FVF_EVF_OVF_VUF_GVF_RVF_BVF_VVF_NVF_ZVF_
set %reagents KUF_JUF_KZF_JZF_MZF_WZF_RZF_SZF_DUF_TZF_UZF_YZF_IUF_
;-------------------------------------------------------------
; I just copied the gems and reagents types from the code you
; posted on SUO. Saved me some time! :)
; Now, even though we're going to use the menu to define
; the bags' id's, we should start the script off by setting
; the vars we're going to use to N/A. This has two basic
; purposes:
; First one is so that the user sees the bags N/A in the menu,
; making it easier for him to realize he has to set the bags.
; You should always think on ways to make the script more
; intuitive for people who will be using it.
; Remember, not every person who is going to use your script
; is gonna be a rocket scientist! :))
; Second purpose is so that we can put a check to see if the bag
; has been set or not in the menu, before the script starts
; doing it's job of moving items.
; So let's get those N/A's going!
; (actually, if you don't specify the vars, they will be 'set'
; automatically to N/A, but I've wrote it like this
; to ilustrate better what I'm trying to show you!) :)
;-------------------------------------------------------------
set %lootbag N/A
set %gemsbag N/A
set %regsbag N/A

;--------------------------------------------------
; Next, the most basic yet very important thing you should
; know is how subs work. You always use 'gosub subname'
; to go to a sub, however, you should only get out
; of a sub using 'return'. This will take you
; back to where the sub was called in the
; first place (the gosub line).
;
; The example we're gonna see now shows this
; clearly. We're gonna generate the menu for the
; user. We'll use a sub for that!
; So first things first.
;-----------------------------------------------------
gosub menu ; This line here will take you to the sub called
; 'menu'. If you scroll down you can find this sub, and
; you'll notice the last line of it being 'return'.
; So that return will take us back exactly here, where
; we used the 'gosub' command.
;----------------------------------------------------
; Ok, so now our pretty little menu should be built, and the
; user should be seeing it right now! YAY! \0/
; Now, we have to make the script wait here until the
; user clicks something to do whatever the hell he wants
; to have the script do for him. We're going to write
; a little loop to do this. Read this loop carefully
; to see how it works.
;----------------------------------------------------

repeat
if #menubutton = setloot_button
   {
   gosub setloot
   set #menubutton N/A
   }
if #menubutton = setgems_button
   {
   gosub setgems
   set #menubutton N/A
   }
if #menubutton = setregs_button
   {
   gosub setregs
   set #menubutton N/A
   }
if #menubutton = moveregs_button
   {
   if %regsbag <> N/A && %lootbag <> N/A
      {
      gosub moveregs
      set #menubutton N/A
      }
   else
      {
      Display You must set up each bag first
      set #menubutton N/A
      }
   }
if #menubutton = movegems_button
   {
   if %gemsbag <> N/A && %lootbag <> N/A
      {
      gosub movegems
      set #menubutton N/A
      }
   else
      {
      Display You must set up each bag first
      set #menubutton N/A
      }
   }
until #false ; thank you cerveza! :)

;--------------------------------------------------
; Ok, our main loop is done. When the user clicks
; a button, we can see that in the #menubutton
; var. Things you should notice here:
; 1) If a button is pressed, you will go to a sub
;    which will perform what the button suggests.
;    Also, you will set the #menubutton var back to
;    N/A so that you don't keep looping like crazy
;    the same sub over and over.
; 2) If the person tries to use the move subs
;    without having set the ID's of the bags first,
;    the script will warn them about it, and go back
;    to the loop to wait for the bag id's to be set.
;----------------------------------------------------
; I guess now that this is done, we can start building the
; rest of our subs! Let's start with the sub to set
; our loot bag!
;------------------------------------------------------

;======= Set Loot Bag Sub =======
sub setloot
event SysMessage Target your loot bag ; event SysMessage will display a msg inside you client for you
      set #targcurs 1 ;sets the little target cursor on
      while #targcurs = 1 ; while #targcurs = 1, so while the target cursor is on, it will wait
      wait
      set %lootbag #ltargetid ; once the bag is clicked, we will set it's id
      set #lobjectid #ltargetid ; here we will set the last object to the id of the last target, in this case, our loot bag
      event macro 17 ; event macro 17 is 'Use Last Object', so this will open our loot bag
      menu Edit EUOEdit1 84 44 57 %lootbag
      wait 20
return
;======= End Sub =======

;--------------------------------------------------------
; Noticed the line 'menu Edit EUOEdit1 84 44 57 %lootbag' there?
; This will update the Edit Box for the lootbag in the menu,
; which will now show the id of our dear lootbag!
; Great stuff! Now we're gonna do almost the same thing for
; our other two bags. The difference is, we're not gonna want to open them.
; Why, do you ask? Simply because it would make this more complicated.
; So it's best to leave bags we're going to put stuff IN closed, while
; the bags we're going to get stuff FROM should remain open.
; So, let's do this now!
;---------------------------------------------------------

;======= Set Gems Bag Sub =======
sub setgems
event SysMessage Target your gems bag
      set #targcurs 1
      while #targcurs = 1
      wait
      set %gemsbag #ltargetid
      set #lobjectid #ltargetid
      menu Edit EUOEdit2 84 72 57 %gemsbag
return
;======= End Sub =======

;======= Set Regs Bag Sub =======
sub setregs
event SysMessage Target your regs bag
      set #targcurs 1
      while #targcurs = 1
      wait
      set %regsbag #ltargetid
      set #lobjectid #ltargetid
      menu Edit EUOEdit3 84 104 57 %regsbag
return
;======= End Sub =======

;--------------------------------------
; Piece of cake right? Now, we should write up
; the move subs. So lets get it done!
;----------------------------------------

;======= Move Regs Sub =======
sub moveregs
repeat ; it will repeat whatever is written here, until the condition on the 'until' line is met
finditem %reagents C_ , %lootbag ; this will look for the reagents inside you're lootbag
exevent drag #findid #findstack ; #findstack will hold the amount of reagents in each stack
wait 10
exevent dropc %regsbag ; this line will drop the regs inside your regs bag
wait 10
until #findcnt < 1 ; if you can't find any more items, it will stop repeating!
Display All Done!
return
;======= End Sub =======

;======= Move Gems Sub =======
sub movegems
repeat
finditem %gems C_ , %lootbag
exevent drag #findid #findstack
wait 10
exevent dropc %gemsbag
wait 10
until #findcnt < 1
Display All Done!
return
;======= End Sub =======

;--------------------------------------
; Ok, we should be set now! If no mistake was
; made while writing, this little script
; should do what we expect from it!
; Let's hit play and find out! :))
;--------------------------------------
; Below you can check out the menu sub.
;--------------------------------------


;======= Menu Sub =======
sub menu
menu Clear
menu Window Title Blacklisted's MoveLoot
menu Window Color BtnFace
menu Window Size 221 225
menu Font Transparent #true
menu Font Align Right
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Font Transparent #false
menu Font Align Left
menu Text EUOLabel1 12 44 Loot Bag ID:
menu Text EUOLabel2 12 72 Gems Bag ID:
menu Text EUOLabel3 12 104 Regs Bag ID:
menu Text EUOLabel4 12 144 Move regs to bag:
menu Text EUOLabel5 12 172 Move gems to bag:
menu Button setloot_button 148 44 43 25 Set
menu Font BGColor Window
menu Edit EUOEdit1 84 44 57 %lootbag
menu Font BGColor BtnFace
menu Button setgems_button 148 72 43 25 Set
menu Font BGColor Window
menu Edit EUOEdit2 84 72 57 %gemsbag
menu Font BGColor BtnFace
menu Button setregs_button 148 104 43 25 Set
menu Font BGColor Window
menu Edit EUOEdit3 84 104 57 %regsbag
menu Font BGColor BtnFace
menu Button moveregs_button 124 144 43 25 Go
menu Button movegems_button 124 172 43 25 Go
menu Show 421 270
return
;======= End Sub =======

;----------------------------------------------
; Well, I hope this could point you in the right
; direction to start writing your own scripts!
; I know we can get overwhelmed sometimes, when
; we try to read huge pages of things we
; still don't understand very well. So I hope
; this has made things a little simpler for you!
; Cheers,
;
; frneo
;------------------------------------------------
; End Script
;------------------------------------------------
Just copy this to your EUO. You will find detailed explanations on (almost) everything the code is meant for, and I tried to keep it as simple as possible.

I gave you a few explanations on the use of the menu too.



If you have any questions, just ask and I'll get back to you as soon as possible.

Hope this helps! :)

Cheers!
« Last Edit: August 11, 2011, 03:49:46 PM by frneo »
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Help with script, am I heading int he right direction
« Reply #7 on: August 11, 2011, 03:42:04 AM »
0
I think I read on easyuo somewhere GM's may be able scan your journel.

Lolz, give us the link.
btw, this comand is client sided so gm - even if they would scan your journal - would't see it.

It's hidden in a section called Scripting Tutorials
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline BlacklistedTopic starter

  • Jr. Member
  • **
  • Posts: 75
  • Activity:
    0%
  • Reputation Power: 2
  • Blacklisted has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Re: Help with script, am I heading int he right direction
« Reply #8 on: August 11, 2011, 04:12:50 AM »
0
Thanks frneo, Cerveza & camotbik :)
I'm going to go over it today and spend some time on the tutorials also. I guess i was trying to run before I could walk.
Thanks for taking the time frneo for explaining how each part works it helped  alot im adding other items to the script and ill post up the finished script.
« Last Edit: August 11, 2011, 04:33:40 AM by Blacklisted »

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Help with script, am I heading int he right direction
« Reply #9 on: August 11, 2011, 05:10:26 AM »
0
ewwww... just noticed that frneo uses a goto loop... icky dude!

replace

loop:
with
repeat

and replace

goto loop
with
until #false
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline Goliath

  • Sr. Member
  • *
  • Posts: 424
  • Activity:
    0%
  • Reputation Power: 5
  • Goliath has no influence.
  • Gender: Male
  • Respect: +37
  • Referrals: 2
    • View Profile
Re: Help with script, am I heading int he right direction
« Reply #10 on: August 11, 2011, 05:14:20 AM »
0
I know you may be learning how to script which is aweseom, but have you considered using TMs Advanced Claw looting script?  When I am doing the spawn I use that one and it works great :D  It is crazy advanced and customizable!

Offline Neo

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: Help with script, am I heading int he right direction
« Reply #11 on: August 11, 2011, 06:23:36 AM »
0
ewwww... just noticed that frneo uses a goto loop... icky dude!

replace

loop:
with
repeat

and replace

goto loop
with
until #false
:(

I remember reading this on another post of yours, lol...

That you're totally against using goto...

Does goto really influence how the script works in a bad way?

Or is it just plain aesthetics?

Thank you for the input Cerveza! :)

Cheers!
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Offline Neo

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: Help with script, am I heading int he right direction
« Reply #12 on: August 11, 2011, 06:51:34 AM »
0
Thanks frneo, Cerveza & camotbik :)
I'm going to go over it today and spend some time on the tutorials also. I guess i was trying to run before I could walk.
Thanks for taking the time frneo for explaining how each part works it helped  alot im adding other items to the script and ill post up the finished script.

You're welcome! :)
I'm glad I could help!

If you have any questions on this new version of yours, feel free to ask!

Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Help with script, am I heading int he right direction
« Reply #13 on: August 11, 2011, 06:56:02 AM »
0
One thing is that goto's aren't supported in OEUO, so transitioning scripts that have goto in them over won't work until something is put in place to rewrite them in a script.

Another thing is that they can confuse beginner scripters and cause headaches to advanced scripters.

Post
Post

There's really no reason to ever use a goto in a script.


XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline Neo

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: Help with script, am I heading int he right direction
« Reply #14 on: August 11, 2011, 07:06:57 AM »
0
One thing is that goto's aren't supported in OEUO, so transitioning scripts that have goto in them over won't work until something is put in place to rewrite them in a script.

Another thing is that they can confuse beginner scripters and cause headaches to advanced scripters.

Post
Post

There's really no reason to ever use a goto in a script.



Well, thanks for this!

Didn't know there was such prejudice against goto's in general!

From now on, I'm gonna try to write my stuff without using goto's! Even if it's just for the fun of it!

EDIT: Changed the tutorial script using repeat, and also updated my weapon crafter removing gotos ! :)

« Last Edit: August 11, 2011, 09:09:37 AM by frneo »
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Tags: