Author Topic: Question  (Read 4120 times)

0 Members and 1 Guest are viewing this topic.

Offline RamsesTopic starter

  • Jr. Member
  • **
  • Posts: 42
  • Activity:
    0%
  • Reputation Power: 0
  • Ramses has no influence.
  • Respect: +11
  • Referrals: 1
    • View Profile
Question
« on: July 29, 2008, 01:54:05 PM »
0
TM,
In your tool_runebook_travel sub....
Code: [Select]
;=================================================================
; Script Name: TrailMyx's Runebook/Spellcast Subs
; Author: TrailMyx
; Version: 2.5
; Shard OSI / FS: OSI / FS
; Revision Date: 09/27/2007
; Purpose:
;   Runebook subs to manage your runebook travel needs.  You need either to know
;   the runebook ID or runebook name.
;
; Subroutines:
;     TM_NewCastSpell - casts spells with appropriate waits, delays, retrys.
;     TM_TravelFromRunebook - Uses specified runbook #FINDID to travel from .  If a location is blocked
;                             the next location will be tried until success.
;     TM_TravelFromNamedRunebook - Same as TM_TravelFromRunebook, but allows you to specify a runebook name
;
;  Examples:
;     gosub TM_NewCastSpell 31 !rbook 10 20 20 ; recall
;     gosub TM_TravelFromRunebook RE 1 3 %runebookid ; travel (recall) to location from #FINDID runebook using slots 1-3
;     gosub TM_TravelFromNamedRunebook GA 1 2 LUMBERJACKING1 ; gate using LUMBERJACKING1 runebook starting at rune 1
;     gosub TM_RandomRunebookTravel SJ 1 6 %runebookid  ; Randomly choose a rune from 1-6 in runebook
;     gosub TM_TravelFromObject RE %runeid ; travels to rune specified by %runeid
;
;  Use of these subrountes is allowed, but please give me (TrailMyx) credit somewhere in your script.
;
;  Release History:
;     2.0 - Initial public release
;     2.1 - Bug in TM_FindValidTextNoAdvance, added return value to TM_TravelFromNamedRunebook
;     2.2 - Bug in TM_NewCastSpell when mana gets too low
;     2.3 - Better spellcasting for chivalry, necro
;           Added TM_TravelFromNamedRunebook
;           Added TM_RandomRunebookTravel
;     2.4 - Little fix for journal handler
;     2.5 - Hack to allow for transport through a red moongate.
;
;  Requirements:
;
;    This script requires that you have your character name
;    setup in a variable called %charname.  Place this bit of code
;    in your script initialization somewhere:
;
;   gosub TM_AddUnderscore #CHARNAME
;   set %charname #RESULT
;=================================================================

The last two lines here
;   gosub TM_AddUnderscore #CHARNAME
;   set %charname #RESULT

Where do I find this Subroutine TM_Addunderscore ? I cannot locate it and would really like to check this out.

thanks.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Question
« Reply #1 on: July 29, 2008, 02:12:33 PM »
0
Here you go.

Code: [Select]
;-------------------------------------------------------------------------------
; %1 - string to mung
sub TM_AddUnderscore
  namespace push
  namespace local AU
  set !tempstring %1
  AddUnderscore_loop1:
    str pos !tempstring #SPC
    if #STRRES <> 0
    {
      set !val #STRRES - 1
      str left !tempstring !val
      set !left #STRRES
      set !val !val + 1
      str del !tempstring 1 !val
      set !tempstring !left , _ , #STRRES
      goto AddUnderscore_loop1
    }
  set #RESULT !tempstring
  namespace pop
return #RESULT
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline RamsesTopic starter

  • Jr. Member
  • **
  • Posts: 42
  • Activity:
    0%
  • Reputation Power: 0
  • Ramses has no influence.
  • Respect: +11
  • Referrals: 1
    • View Profile
Re: Question
« Reply #2 on: August 02, 2008, 05:01:26 PM »
0
thank you, TM

Tags: