Official ScriptUO EasyUO Scripts > Scripting Chat
Question
(1/1)
Ramses:
TM,
In your tool_runebook_travel sub....
--- Code: ---;=================================================================
; 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
;=================================================================
--- End code ---
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.
TrailMyx:
Here you go.
--- Code: ---;-------------------------------------------------------------------------------
; %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
--- End code ---
Ramses:
thank you, TM
Navigation
[0] Message Index
Go to full version