Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #13  
Old 05-08-2007, 04:20 AM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
PHP Code:
function onCreated()
{
  
temp.txt "Hello <variable>player.account</variable>. How are you doing on this fine day?";
  
  
this.parseText(temp.txt);
}

function 
parseText(buf)
{
  
temp.tok buf.tokenize(" ");
  
temp.hld temp.tok;
  
  for (
temp.0temp.temp.tok.size(); temp.I++)
  {
    
temp.var = temp.tok[temp.I];
    
    if (
temp.var.starts("<variable>"))
    {
      
temp.str temp.var.substring(10temp.var.pos("</variable>") - 10);
      
      
temp.hld[temp.I] = makevar(temp.str);
    }
  }
  
  for (
temp.var : temp.hldtemp.@= temp.var @ " ";
  
  return 
temp.r;

I made something real quick.
__________________
- Zidane / Zidaya
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:38 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.