Aegis Support Board: Put text in vars - Aegis Support Board

Jump to content

ASB News! ASB 5.0 Beta V2 has now been released!. See here for more Info.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Put text in vars Is it possible ?

#1 User is offline   Xiruat 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 18-April 08

Posted 20 June 2008 - 02:35 PM

Hi !

As explained on topic, i just want to know if it's possible to put a text (like "hello") in a variable.
After some research, it seems that local vars can do that but i need a var that can be used by every npc, like a global var.

Here is my problem, i want to save the name of two players in a var to make a broadcast like :
" [nameofplayer1] has challenged [nameofplayer2] "

players must be able to register from any town.

help ^^
0

#2 User is offline   Kolkka 

  • Average Member
  • PipPipPipPip
  • Group: Members
  • Posts: 181
  • Joined: 07-August 03
  • Location:Mexico

Posted 22 June 2008 - 05:19 PM

You can use GlobalStr which are the same as GlobalVar, but they are strings.

SetGlobalStr "name1" PcName // Name of the player talking to the npc
SetGlobalStr "name2" theothername //(could be a local var, etc)

then you can do

var localvar1 = GetGlobalStr "name1"
var localvar2 = GetGlobalStr "name2"

broadcastserver "FF0000" FW_NORMAL 10 0 0 "The player [" + localvar1 + "] has challenged [" + localvar2 + "]."
0

#3 User is offline   Xiruat 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 18-April 08

Posted 23 June 2008 - 02:33 PM

Thanks a lot !
All seems to work perfectly now ^^

Well i have an other question, it's about WoE, but i''ll do an other thread.

Thanks again !
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users